diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index 48527a9ba..11d8aa1dd 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -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 diff --git a/app/views/wiki/annotate.rhtml b/app/views/wiki/annotate.rhtml index dfea19581..863865a26 100644 --- a/app/views/wiki/annotate.rhtml +++ b/app/views/wiki/annotate.rhtml @@ -3,7 +3,9 @@ <%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> -

<%= @page.pretty_title %>

+<%= wiki_page_breadcrumb(@page) %> + +

<%=h @page.pretty_title %>

<%= l(:label_version) %> <%= link_to @annotate.content.version, :action => 'show', :id => @page.title, :version => @annotate.content.version %> diff --git a/app/views/wiki/destroy.rhtml b/app/views/wiki/destroy.rhtml index 400230f89..ff8cf2e8a 100644 --- a/app/views/wiki/destroy.rhtml +++ b/app/views/wiki/destroy.rhtml @@ -1,3 +1,5 @@ +<%= wiki_page_breadcrumb(@page) %> +

<%=h @page.pretty_title %>

<% form_tag({}, :method => :delete) do %> diff --git a/app/views/wiki/diff.rhtml b/app/views/wiki/diff.rhtml index a1006dce3..4eef50ac2 100644 --- a/app/views/wiki/diff.rhtml +++ b/app/views/wiki/diff.rhtml @@ -2,7 +2,9 @@ <%= link_to(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> -

<%= @page.pretty_title %>

+<%= wiki_page_breadcrumb(@page) %> + +

<%=h @page.pretty_title %>

<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => @diff.content_from.version %> diff --git a/app/views/wiki/edit.rhtml b/app/views/wiki/edit.rhtml index 5f47c3f8c..3c51c6325 100644 --- a/app/views/wiki/edit.rhtml +++ b/app/views/wiki/edit.rhtml @@ -1,3 +1,5 @@ +<%= wiki_page_breadcrumb(@page) %> +

<%=h @page.pretty_title %>

<% form_for :content, @content, :url => {:action => 'update', :id => @page.title}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %> diff --git a/app/views/wiki/history.rhtml b/app/views/wiki/history.rhtml index 392c3b9f1..6027ed965 100644 --- a/app/views/wiki/history.rhtml +++ b/app/views/wiki/history.rhtml @@ -1,4 +1,6 @@ -

<%= @page.pretty_title %>

+<%= wiki_page_breadcrumb(@page) %> + +

<%=h @page.pretty_title %>

<%= l(:label_history) %>

diff --git a/app/views/wiki/rename.rhtml b/app/views/wiki/rename.rhtml index f94b8bc3d..7a06c0340 100644 --- a/app/views/wiki/rename.rhtml +++ b/app/views/wiki/rename.rhtml @@ -1,4 +1,6 @@ -

<%= l(:button_rename) %>: <%= @original_title %>

+<%= wiki_page_breadcrumb(@page) %> + +

<%=h @original_title %>

<%= error_messages_for 'page' %> diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 9b2f2de28..307633990 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -11,7 +11,7 @@ <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %> -<%= 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 %>