Show More
Commit Description:
tag
Commit Description:
tag
References:
File last commit:
Show/Diff file:
Action:
app/views/announcements/index.html.haml
| 37 lines
| 1.3 KiB
| text/x-haml
| HamlLexer
|
r557 | %h1 Listing announcements | |||
= link_to '+ Add announcement', new_announcement_path, class: 'btn btn-success' | ||||
%br | ||||
%br | ||||
%table.table.table-striped | ||||
r567 | %thead | |||
r557 | %th Updated | |||
%th Announcement | ||||
%th Author | ||||
r567 | %th{style: 'width: 100px'} Published? | |||
%th{style: 'width: 100px'}Front? | ||||
r557 | %th | |||
%th | ||||
- for announcement in @announcements | ||||
%tr | ||||
- @announcement = announcement | ||||
%td= time_ago_in_words announcement.updated_at | ||||
%td | ||||
- if !announcement.title.blank? | ||||
%b Title: | ||||
= h announcement.title | ||||
%br/ | ||||
- if !announcement.notes.blank? | ||||
%b | ||||
Notes: #{h announcement.notes} | ||||
%br/ | ||||
= h announcement.body | ||||
%td= h announcement.author | ||||
r600 | %td= toggle_button(announcement.published?, toggle_announcement_path(@announcement), "announcement_toggle_#{@announcement.id}", {size: 'btn-sm'}) | |||
%td= toggle_button(announcement.frontpage?, toggle_front_announcement_path(@announcement), "announcement_toggle_front_#{@announcement.id}", {size: 'btn-sm'}) | ||||
r557 | %td= link_to 'Edit', edit_announcement_path(announcement), class: 'btn btn-block btn-sm btn-info' | |||
%td= link_to 'Destroy', announcement, :confirm => 'Are you sure?', :method => :delete, class: "btn btn-block btn-sm btn-danger" | ||||
%br | ||||
= link_to '+ Add announcement', new_announcement_path, class: 'btn btn-success' | ||||