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

29 lines
808 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 Actions
tbody
- @cards.each do |card|
tr
td= card.name
td= card.title
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'