diff options
author | Logan Fick <logaldeveloper@protonmail.com> | 2019-02-24 13:01:53 -0500 |
---|---|---|
committer | Logan Fick <logaldeveloper@protonmail.com> | 2019-02-24 13:01:53 -0500 |
commit | 32e7b99b6da9bc5397e65dc4d2a146d7d2da510f (patch) | |
tree | 52a5aa2f203653d6dbe573cb1ede477a12fc8100 /app/views/forumthreads/edit.html.erb | |
parent | 244a047cad85690a29af12c2f3d7866fe9f79e40 (diff) | |
parent | 2fe1cead68d3f66be5a9c6003990362e99bc1307 (diff) |
Merged pull request #56.
Diffstat (limited to 'app/views/forumthreads/edit.html.erb')
-rw-r--r-- | app/views/forumthreads/edit.html.erb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/views/forumthreads/edit.html.erb b/app/views/forumthreads/edit.html.erb index 5667cf2..30c9b08 100644 --- a/app/views/forumthreads/edit.html.erb +++ b/app/views/forumthreads/edit.html.erb @@ -11,6 +11,8 @@ end %> +<% forum = Forum.find(@thread.forum_id) %> + <h1>Edit Thread</h1> <%= link_to @thread.forum.group, forumgroup_path(@thread.forum.group) %> → <%= link_to @thread.forum, @thread.forum %> → <%= link_to @thread, @thread %> → Edit thread <%= form_for @thread do |f|%> @@ -37,5 +39,7 @@ <%= render partial: "md_editor", locals: {name: "forumthread[content]", content: @thread.content} %> <p><%= f.submit "Update Thread", class: "btn blue left" %></p> <% end %> -<%= button_to "Delete Thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %> +<% if mod? || !forum.disable_deletion %> + <%= button_to "Delete Thread", @thread, :method => "delete", data: {confirm: "Delete thread & comments forever?"}, class: "btn red right" %> +<% end %> <div class="clear"></div> |