app/views/initiatives/gateways/index.html.slim
- suppress_headline_and_article!
- content_for :title do
= "#{Gateway.model_name.human.pluralize} · #{@initiative.name}"
article
h2== "#{Gateway.model_name.human.pluralize} · #{link_to @initiative.name, initiative_by_permalink_path(@initiative)}"
- if @initiative.gateways.exists?
ul.gateways= render partial: 'gateways/gateway', collection: @initiative.gateways.ordered
- else
em.gateways= t('empty', model: Gateway.model_name.human.downcase)
.actions
.action= link_to "#{t('add')} #{Gateway.model_name.human.downcase}", new_initiative_gateway_path(@initiative.id), class: 'button'
.action= link_to t('update_states_from_gateways'), update_states_from_gateways_initiative_path(@initiative.id), method: :put, data: { confirm: t('confirm') }, class: 'button'