19 lines
750 B
Plaintext
19 lines
750 B
Plaintext
h1 = Consumer.model_name.human(count: :other)
|
|
|
|
.table-responsive
|
|
table.table
|
|
thead
|
|
tr
|
|
th = Consumer.human_attribute_name('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)
|