]> source.dussan.org Git - redmine.git/commitdiff
Add breadcrumbs to news pages (#2631).
authorGo MAEDA <maeda@farend.jp>
Tue, 9 May 2023 00:26:17 +0000 (00:26 +0000)
committerGo MAEDA <maeda@farend.jp>
Tue, 9 May 2023 00:26:17 +0000 (00:26 +0000)
Patch by Brad Beattie.

git-svn-id: https://svn.redmine.org/redmine/trunk@22236 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/news/show.html.erb
test/functional/news_controller_test.rb

index 95d6fe2653d288ae398297b4b4f4a1ab5a6cffac..9b54a66cb841f2b111b4645680eb8029e17c0fda 100644 (file)
@@ -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),
index d21835656b497c2314b3b8837b6fb524d3153918..44242e2994ccff0af587fcddf4949e5107be2ce7 100644 (file)
@@ -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