Post.fast_count is dependent on the current user's settings. This meant that tag counts in wiki pages could be different from the tag counts displayed in tag lists.
32 lines
1.6 KiB
Plaintext
32 lines
1.6 KiB
Plaintext
<% content_for(:secondary_links) do %>
|
|
<menu>
|
|
<li><%= render "wiki_pages/quick_search" %></li>
|
|
<li><%= link_to "Listing", wiki_pages_path %></li>
|
|
<li><%= link_to "Search", search_wiki_pages_path %></li>
|
|
|
|
<% if CurrentUser.is_member? %>
|
|
<li><%= link_to "New", new_wiki_page_path %></li>
|
|
<% end %>
|
|
|
|
<li><%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %></li>
|
|
|
|
<% if @wiki_page && !@wiki_page.new_record? %>
|
|
<li>|</li>
|
|
<li><%= link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %></li>
|
|
<li><%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %></li>
|
|
<% if CurrentUser.is_member? %>
|
|
<li id="wiki-page-edit"><%= link_to "Edit", edit_wiki_page_path(@wiki_page) %></li>
|
|
<% end %>
|
|
<% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %>
|
|
<li id="wiki-page-delete"><%= link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :data => {:confirm => "Are you sure you want to delete this wiki page?"} %></li>
|
|
<% end %>
|
|
<% elsif @wiki_page_version %>
|
|
<li>|</li>
|
|
<li><%= link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %></li>
|
|
<% if CurrentUser.is_member? %>
|
|
<li><%= link_to "Revert to", revert_wiki_page_path(@wiki_page_version.wiki_page_id, :version_id => @wiki_page_version.id), :method => :put, :data => {:confirm => "Are you sure you want to revert to this version?"} %></li>
|
|
<% end %>
|
|
<% end %>
|
|
</menu>
|
|
<% end %>
|