summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-27 18:41:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-27 18:41:42 +0000
commitb9e380c9febe08a0332e785299f6dcc495463a3e (patch)
tree74cfb2a039f2f73503748b11981efa859c77e332
parent89602004098de22c59e668ad814969f5f12cd80b (diff)
downloadredmine-b9e380c9febe08a0332e785299f6dcc495463a3e.tar.gz
redmine-b9e380c9febe08a0332e785299f6dcc495463a3e.zip
Add breadcrumb nav for the forums (#892).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1299 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/application_helper.rb4
-rw-r--r--app/views/boards/show.rhtml2
-rw-r--r--app/views/messages/show.rhtml5
-rw-r--r--public/stylesheets/application.css1
4 files changed, 11 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 510ecd15e..77019eba3 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -156,6 +156,10 @@ module ApplicationHelper
links.size > 1 ? l(:label_display_per_page, links.join(', ')) : nil
end
+ def breadcrumb(*args)
+ content_tag('p', args.join(' &#187; ') + ' &#187; ', :class => 'breadcrumb')
+ end
+
def html_title(*args)
if args.empty?
title = []
diff --git a/app/views/boards/show.rhtml b/app/views/boards/show.rhtml
index 54645622e..26d17ae56 100644
--- a/app/views/boards/show.rhtml
+++ b/app/views/boards/show.rhtml
@@ -1,3 +1,5 @@
+<%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}) %>
+
<div class="contextual">
<%= link_to_if_authorized l(:label_message_new),
{:controller => 'messages', :action => 'new', :board_id => @board},
diff --git a/app/views/messages/show.rhtml b/app/views/messages/show.rhtml
index 632f603ff..ef7db71ef 100644
--- a/app/views/messages/show.rhtml
+++ b/app/views/messages/show.rhtml
@@ -1,9 +1,12 @@
+<%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}),
+ link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %>
+
<div class="contextual">
<%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit' %>
<%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %>
</div>
-<h2><%= link_to h(@board.name), :controller => 'boards', :action => 'show', :project_id => @project, :id => @board %> &#187; <%=h @topic.subject %></h2>
+<h2><%=h @topic.subject %></h2>
<div class="message">
<p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index c30367903..01b31fa45 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -159,6 +159,7 @@ hr { width: 100%; height: 1px; background: #ccc; border: 0;}
textarea.wiki-edit { width: 99%; }
li p {margin-top: 0;}
div.issue {background:#ffffdd; padding:6px; margin-bottom:6px;border: 1px solid #d7d7d7;}
+p.breadcrumb { font-size: 0.9em; margin: 4px 0 4px 0;}
fieldset#filters .buttons { text-align: right; font-size: 0.9em; margin: 0 4px 0px 0; }