29 lines
784 B
Text
29 lines
784 B
Text
- if policy(:card).new?
|
|
.row
|
|
.col-md-12
|
|
.pull-right
|
|
= link_to 'New Card', new_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_card_path(card)
|
|
- if policy(:card).destroy?
|
|
= link_to glyph('trash', classes: 'control-icon'), card_path(card), method: :delete
|
|
|
|
- if policy(:card).new?
|
|
.row
|
|
.col-md-12
|
|
= link_to 'New Card', new_card_path, class: 'btn btn-primary'
|