2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:card).new?
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
.pull-right
|
|
|
|
= link_to 'New Card', new_card_path, class: 'btn btn-primary'
|
2015-10-06 13:55:12 -04:00
|
|
|
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
table.table.table-striped.table-hover
|
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Name
|
2015-10-08 12:40:31 -04:00
|
|
|
th Title
|
2015-10-06 13:55:12 -04:00
|
|
|
th Actions
|
|
|
|
tbody
|
|
|
|
- @cards.each do |card|
|
|
|
|
tr
|
|
|
|
td= card.name
|
2015-10-08 12:40:31 -04:00
|
|
|
td= card.title
|
2015-10-06 13:55:12 -04:00
|
|
|
td
|
2015-10-08 15:18:21 -04:00
|
|
|
- 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
|
2015-10-06 13:55:12 -04:00
|
|
|
|
2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:card).new?
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
= link_to 'New Card', new_card_path, class: 'btn btn-primary'
|