Files
codeocean/app/views/consumers/index.html.slim

19 lines
750 B
Plaintext

h1 = Consumer.model_name.human(count: 2)
.table-responsive
table.table
thead
tr
th = t('activerecord.attributes.consumer.name')
th colspan=3 = t('shared.actions')
tbody
- @consumers.each do |consumer|
tr
td = link_to_if(policy(consumer).show?, consumer.name, consumer)
td = link_to(t('shared.show'), consumer) if policy(consumer).show?
td = link_to(t('shared.edit'), edit_consumer_path(consumer)) if policy(consumer).edit?
td = link_to(t('shared.destroy'), consumer, data: {confirm: t('shared.confirm_destroy')}, method: :delete) if policy(consumer).destroy?
= render('shared/pagination', collection: @consumers)
p = render('shared/new_button', model: Consumer)