Adds breadcrumb on all wiki page views.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6182 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2011-07-04 19:56:38 +00:00
parent e950c9db5a
commit 25d900c787
8 changed files with 23 additions and 5 deletions

View File

@ -32,4 +32,10 @@ module WikiHelper
end
s
end
def wiki_page_breadcrumb(page)
breadcrumb(page.ancestors.reverse.collect {|parent|
link_to(h(parent.pretty_title), {:controller => 'wiki', :action => 'show', :id => parent.title, :project_id => parent.project})
})
end
end

View File

@ -3,7 +3,9 @@
<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
<h2><%= @page.pretty_title %></h2>
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @page.pretty_title %></h2>
<p>
<%= l(:label_version) %> <%= link_to @annotate.content.version, :action => 'show', :id => @page.title, :version => @annotate.content.version %>

View File

@ -1,3 +1,5 @@
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @page.pretty_title %></h2>
<% form_tag({}, :method => :delete) do %>

View File

@ -2,7 +2,9 @@
<%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
<h2><%= @page.pretty_title %></h2>
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @page.pretty_title %></h2>
<p>
<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %>

View File

@ -1,3 +1,5 @@
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @page.pretty_title %></h2>
<% form_for :content, @content, :url => {:action => 'update', :id => @page.title}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>

View File

@ -1,4 +1,6 @@
<h2><%= @page.pretty_title %></h2>
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @page.pretty_title %></h2>
<h3><%= l(:label_history) %></h3>

View File

@ -1,4 +1,6 @@
<h2><%= l(:button_rename) %>: <%= @original_title %></h2>
<%= wiki_page_breadcrumb(@page) %>
<h2><%=h @original_title %></h2>
<%= error_messages_for 'page' %>

View File

@ -11,7 +11,7 @@
<%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
</div>
<%= breadcrumb(@page.ancestors.reverse.collect {|parent| link_to h(parent.pretty_title), {:id => parent.title, :project_id => parent.project}}) %>
<%= wiki_page_breadcrumb(@page) %>
<% if @content.version != @page.content.version %>
<p>