From 40ee7e72b8077c6c6830c6d643c840044f991121 Mon Sep 17 00:00:00 2001 From: albert Date: Fri, 22 Mar 2013 10:31:27 -0700 Subject: [PATCH] fixes #965 --- app/views/forum_topics/_secondary_links.html.erb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/views/forum_topics/_secondary_links.html.erb b/app/views/forum_topics/_secondary_links.html.erb index e7dc908ed..4d468602c 100644 --- a/app/views/forum_topics/_secondary_links.html.erb +++ b/app/views/forum_topics/_secondary_links.html.erb @@ -16,6 +16,16 @@
  • <%= link_to "Edit", edit_forum_topic_path(@forum_topic) %>
  • <% if CurrentUser.is_janitor? %>
  • <%= link_to "Delete", forum_topic_path(@forum_topic), :remote => true, :method => :delete, :confirm => "Do you want to delete this forum topic?" %>
  • + <% if @forum_topic.is_locked? %> +
  • <%= link_to "Unlock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => false}), :method => :put %>
  • + <% else %> +
  • <%= link_to "Lock", forum_topic_path(@forum_topic, :forum_topic => {:is_locked => true}), :method => :put %>
  • + <% end %> + <% if @forum_topic.is_sticky? %> +
  • <%= link_to "Unsticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => false}), :method => :put %>
  • + <% else %> +
  • <%= link_to "Sticky", forum_topic_path(@forum_topic, :forum_topic => {:is_sticky => true}), :method => :put %>
  • + <% end %> <% end %> <% end %> <% end %>