2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:link).new?
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
.pull-right
|
|
|
|
= link_to 'New Link', new_link_path, class: 'btn btn-primary'
|
2015-10-01 11:56:40 -04:00
|
|
|
|
|
|
|
.row
|
2015-10-06 11:30:39 -04:00
|
|
|
.col-md-12
|
|
|
|
table.table.table-striped.table-hover
|
2015-10-01 11:56:40 -04:00
|
|
|
thead
|
|
|
|
tr
|
|
|
|
th Name
|
|
|
|
th Description
|
|
|
|
th Actions
|
|
|
|
tbody
|
|
|
|
- @links.each do |link|
|
|
|
|
tr
|
|
|
|
td= link.name
|
|
|
|
td= link.description
|
|
|
|
td
|
2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:link).edit?
|
|
|
|
= link_to glyph('edit', classes: 'control-icon'), edit_link_path(link)
|
|
|
|
- if policy(:link).destroy?
|
|
|
|
= link_to glyph('trash', classes: 'control-icon'), link_path(link), method: :delete
|
2015-10-01 11:56:40 -04:00
|
|
|
|
2015-10-08 15:18:21 -04:00
|
|
|
- if policy(:link).new?
|
|
|
|
.row
|
|
|
|
.col-md-12
|
|
|
|
= link_to 'New Link', new_link_path, class: 'btn btn-primary'
|