1
0
Fork 0
dokkan-data-rails/app/views/admin/cards/index.html.slim

31 lines
861 B
Text

- if policy(:card).new?
.row
.col-md-12
.pull-right
= link_to 'New Card', new_admin_card_path, class: 'btn btn-primary'
.row
.col-md-12
table.table.table-striped.table-hover
thead
tr
th Name
th Title
th Updated
th Actions
tbody
- @cards.each do |card|
tr
td= card.name
td= card.title
td= card.updated_at
td
- if policy(:card).edit?
= link_to glyph('edit', classes: 'control-icon'), edit_admin_card_path(card)
- if policy(:card).destroy?
= link_to glyph('trash', classes: 'control-icon'), admin_card_path(card), method: :delete
- if policy(:card).new?
.row
.col-md-12
= link_to 'New Card', new_admin_card_path, class: 'btn btn-primary'