app/views/forums/threads/edit.html.haml
- content_for(:title) { "Edit Thread | #{@thread.title}" }
= render 'forums/head', object: @thread, subheading: 'Editing thread'
.card.bg-light.mb-3
.card-body
= bootstrap_form_for @thread do |f|
= render 'form', f: f, post: @post
.d-flex.justify-content-end
= link_to 'Cancel', :back, class: 'btn btn-link mr-2'
= f.primary 'Update'
- if user_can_manage_thread?
.alert.alert-danger.mb-3
%label.alert-heading.font-weight-bold
Danger Zone
.btn-toolbar.guttered
= button_to forums_thread_path(@thread), method: :delete, class: 'btn btn-sm btn-danger',
data: { confirm: 'Are you sure you want to delete this Thread?' } do
= inline_svg_tag 'open_iconic/trash.svg', class: 'icon mr-2'
Delete