summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-05-09 00:26:17 +0000
committerGo MAEDA <maeda@farend.jp>2023-05-09 00:26:17 +0000
commitbf239fae8a7c11d7f393e0a484d2031239fed10c (patch)
tree681c9f2160b093b777d2d90f458f3b9b034506e8
parent006c6a4e01f7cd5ed179d1010e4507be79847927 (diff)
downloadredmine-bf239fae8a7c11d7f393e0a484d2031239fed10c.tar.gz
redmine-bf239fae8a7c11d7f393e0a484d2031239fed10c.zip
Add breadcrumbs to news pages (#2631).
Patch by Brad Beattie. git-svn-id: https://svn.redmine.org/redmine/trunk@22236 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/news/show.html.erb1
-rw-r--r--test/functional/news_controller_test.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb
index 95d6fe265..9b54a66cb 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -1,3 +1,4 @@
+<%= breadcrumb link_to(l(:label_news_plural), project_news_index_path(@project)) %>
<div class="contextual">
<%= watcher_link(@news, User.current) %>
<%= link_to(l(:button_edit),
diff --git a/test/functional/news_controller_test.rb b/test/functional/news_controller_test.rb
index d21835656..44242e299 100644
--- a/test/functional/news_controller_test.rb
+++ b/test/functional/news_controller_test.rb
@@ -78,6 +78,7 @@ class NewsControllerTest < Redmine::ControllerTest
def test_show
get(:show, :params => {:id => 1})
assert_response :success
+ assert_select 'p.breadcrumb a[href=?]', '/projects/ecookbook/news', :text => 'News'
assert_select 'h2', :text => 'eCookbook first release !'
end