33 lines
910 B
Text
33 lines
910 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 Type
|
|
th Rarity
|
|
th Actions
|
|
tbody
|
|
- @cards.each do |card|
|
|
tr
|
|
td= card.name
|
|
td= card.title
|
|
td= card.type.name
|
|
td= card.rarity.name
|
|
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'
|