]> source.dussan.org Git - redmine.git/commitdiff
Adds breadcrumb on all wiki page views.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 4 Jul 2011 19:56:38 +0000 (19:56 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 4 Jul 2011 19:56:38 +0000 (19:56 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6182 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/wiki_helper.rb
app/views/wiki/annotate.rhtml
app/views/wiki/destroy.rhtml
app/views/wiki/diff.rhtml
app/views/wiki/edit.rhtml
app/views/wiki/history.rhtml
app/views/wiki/rename.rhtml
app/views/wiki/show.rhtml

index 48527a9ba4583749a19fe50d3efdce58893a7c04..11d8aa1dd9243a79d8e756a9e4bf5b44d2bb12b7 100644 (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
index dfea19581505f246d7cf7d97c7f605f1c1c4e1e1..863865a26f38cd2a8d129991c0dda2a94c0bdf73 100644 (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 %>
index 400230f898498f43c76bbdc90f56a415a4b291d3..ff8cf2e8ab06b8d90df8f1766aa81d993375911c 100644 (file)
@@ -1,3 +1,5 @@
+<%= wiki_page_breadcrumb(@page) %>
+
 <h2><%=h @page.pretty_title %></h2>
 
 <% form_tag({}, :method => :delete) do %>
index a1006dce342635cf4b1808e7517df554bb275989..4eef50ac21d3657b24b97c01959d76e70e6f68ee 100644 (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 %>
index 5f47c3f8cc0e052b18b75946db399d9a249d20a2..3c51c63257e45578ffa960671a95cbb164085e68 100644 (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| %>
index 392c3b9f1b10b9ef9f79ddca9804bfd458d32933..6027ed965dceb37b7abd4649a5ec306d621c8920 100644 (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>
 
index f94b8bc3d665e519e584d29e2fc95708ed89da17..7a06c0340ca7f8ae727a640e607109b2c2e5ce26 100644 (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' %>
 
index 9b2f2de2805f19c0268c36910c2aa23ca8b0f393..307633990f1d79f67a187fd0c2ff15e974959365 100644 (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>