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

16 lines
711 B
Plaintext
Raw Normal View History

2020-04-19 12:12:22 -07:00
- provide(:title, generate_title("Announcements"))
.container.container--main
2020-05-07 10:49:39 -07:00
- @announcements.each do |announcement|
.card
.card-body
.d-flex.w-100.justify-content-between
%p.mb-3= announcement.content
%small.text-muted= announcement.starts_at
.d-flex.w-100
= link_to "Edit", announcement_edit_path(id: announcement.id), class: 'btn btn-link text-primary'
= button_to "Delete", announcement_destroy_path(id: announcement.id), method: :delete, class: 'btn btn-link text-danger', confirm: 'Are you sure you want to delete this announcement?'
2020-04-19 12:12:22 -07:00
.row
.col-md-12
2020-05-07 10:49:39 -07:00
= link_to "Add new", :announcement_new, class: "btn btn-primary"