<% content_for(:secondary_links) do %>
  • <%= render "wiki_pages/quick_search" %>
  • <%= subnav_link_to "Listing", wiki_pages_path %> <%= subnav_link_to "Search", search_wiki_pages_path %> <% if CurrentUser.is_member? %> <%= subnav_link_to "New", new_wiki_page_path %> <% end %> <%= subnav_link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %> <% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %>
  • |
  • <%= subnav_link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %> <% elsif @wiki_page && !@wiki_page.new_record? %>
  • |
  • <%= subnav_link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %> <%= subnav_link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %> <% if CurrentUser.is_member? %> <%= subnav_link_to "Edit", edit_wiki_page_path(@wiki_page), "data-shortcut": "e" %> <% end %> <% if CurrentUser.is_builder? && !@wiki_page.is_deleted? %> <%= subnav_link_to "Delete", wiki_page_path(@wiki_page), :remote => true, :method => :delete, :"data-shortcut" => "shift+d", :"data-confirm" => "Are you sure you want to delete this wiki page?" %> <% end %> <% elsif @wiki_page_version %>
  • |
  • <%= subnav_link_to "Newest", wiki_page_path(@wiki_page_version.wiki_page_id) %> <% if @wiki_page_version.previous %> <%= subnav_link_to "Diff", diff_wiki_page_versions_path(:otherpage => @wiki_page_version.id, :thispage => @wiki_page_version.previous.id) %> <% end %> <% if CurrentUser.is_member? %> <%= subnav_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?"} %> <% end %> <% end %>
    <% end %>