From a4394e877e72d3b7f06bb150042a3cab3bde02e4 Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 30 May 2013 08:05:44 +0000 Subject: [PATCH] add changeset comment in revision page title (#14138) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11909 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/repositories/revision.html.erb | 6 +++++- test/functional/repositories_mercurial_controller_test.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/repositories/revision.html.erb b/app/views/repositories/revision.html.erb index b9293d9d5..a5fe87246 100644 --- a/app/views/repositories/revision.html.erb +++ b/app/views/repositories/revision.html.erb @@ -94,4 +94,8 @@ <%= stylesheet_link_tag "scm" %> <% end %> -<% html_title("#{l(:label_revision)} #{format_revision(@changeset)}") -%> +<% + title = "#{l(:label_revision)} #{format_revision(@changeset)}" + title << " - #{truncate(@changeset.comments, :length => 80)}" + html_title(title) + -%> diff --git a/test/functional/repositories_mercurial_controller_test.rb b/test/functional/repositories_mercurial_controller_test.rb index 4b3263e18..fd9c17b58 100644 --- a/test/functional/repositories_mercurial_controller_test.rb +++ b/test/functional/repositories_mercurial_controller_test.rb @@ -485,7 +485,7 @@ class RepositoriesMercurialControllerTest < ActionController::TestCase assert_response :success assert_template 'revision' assert_select 'title', - :text => 'Revision 1:9d5b5b004199 - eCookbook Subproject 1 - Redmine' + :text => 'Revision 1:9d5b5b004199 - Added 2 files and modified one. - eCookbook Subproject 1 - Redmine' end end end