Retrospring/app/views/announcement/index.html.haml

14 lines
641 B
Plaintext

- provide(:title, generate_title("Announcements"))
.container.j2-page
.row
.col-md-12
= link_to "Add new", :announcement_new, class: "btn btn-default"
- @announcements.each do |announcement|
.panel.panel-default
.panel-heading
= announcement.starts_at
.panel-body
= announcement.content
.panel-footer
= button_to "Edit", announcement_edit_path(id: announcement.id), method: :get, class: 'btn btn-link'
= button_to "Delete", announcement_destroy_path(id: announcement.id), method: :delete, class: 'btn btn-link', confirm: 'Are you sure you want to delete this announcement?'