summaryrefslogtreecommitdiff
path: root/app/views/forumthreads/edit.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/forumthreads/edit.html.erb')
-rw-r--r--app/views/forumthreads/edit.html.erb6
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>