From bf239fae8a7c11d7f393e0a484d2031239fed10c Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 9 May 2023 00:26:17 +0000 Subject: [PATCH] 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 --- app/views/news/show.html.erb | 1 + test/functional/news_controller_test.rb | 1 + 2 files changed, 2 insertions(+) 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)) %>
<%= 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 -- 2.39.5