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

14 lines
649 B
Plaintext
Raw Normal View History

2020-04-19 12:12:22 -07:00
- provide(:title, generate_title("Announcements"))
.container.container--main
2020-04-19 12:12:22 -07:00
.row
.col-md-12
= link_to "Add new", :announcement_new, class: "btn btn-default"
- @announcements.each do |announcement|
.panel.panel-default
2020-04-19 12:50:33 -07:00
.panel-heading
= announcement.starts_at
.panel-body
= announcement.content
.panel-footer
2020-04-19 12:58:57 -07:00
= button_to "Edit", announcement_edit_path(id: announcement.id), method: :get, class: 'btn btn-link'
2020-04-19 12:50:33 -07:00
= 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?'