diff --git a/app/views/wiki_pages/_secondary_links.html.erb b/app/views/wiki_pages/_secondary_links.html.erb index 17f9a5758..a95eb10d0 100644 --- a/app/views/wiki_pages/_secondary_links.html.erb +++ b/app/views/wiki_pages/_secondary_links.html.erb @@ -10,7 +10,10 @@
  • <%= link_to "Help", wiki_pages_path(:search => {:title => "help:wiki"}) %>
  • - <% if @wiki_page && !@wiki_page.new_record? %> + <% if @wiki_page && @wiki_page.new_record? && @wiki_page.try(:tag).present? %> +
  • |
  • +
  • <%= link_to "Posts (#{@wiki_page.tag.post_count})", posts_path(:tags => @wiki_page.title) %>
  • + <% elsif @wiki_page && !@wiki_page.new_record? %>
  • |
  • <%= link_to "Posts (#{@wiki_page.tag.try(:post_count) || 0})", posts_path(:tags => @wiki_page.title) %>
  • <%= link_to "History", wiki_page_versions_path(:search => {:wiki_page_id => @wiki_page.id}) %>