From 4a5a68f19cda7de53ddd256fef71bf76a4512cd5 Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 18 Sep 2018 23:44:42 +0000 Subject: [PATCH] Add assignee's icon to tooltips in gantt and calendar (#29306). Patch by Mizuki ISHIKAWA. git-svn-id: http://svn.redmine.org/redmine/trunk@17493 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/helpers/issues_helper.rb | 2 +- test/functional/calendars_controller_test.rb | 11 +++++++---- test/functional/gantts_controller_test.rb | 12 ++++++++---- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index e6654d908..e1e0fc559 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -65,7 +65,7 @@ module IssuesHelper "#{@cached_label_status}: #{h(issue.status.name)}
".html_safe + "#{@cached_label_start_date}: #{format_date(issue.start_date)}
".html_safe + "#{@cached_label_due_date}: #{format_date(issue.due_date)}
".html_safe + - "#{@cached_label_assigned_to}: #{h(issue.assigned_to)}
".html_safe + + "#{@cached_label_assigned_to}: #{avatar(issue.assigned_to, :size => "13", :title => l(:field_assigned_to)) if issue.assigned_to} #{h(issue.assigned_to)}
".html_safe + "#{@cached_label_priority}: #{h(issue.priority.name)}".html_safe end diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb index 9f9b2a2ef..a1036441d 100644 --- a/test/functional/calendars_controller_test.rb +++ b/test/functional/calendars_controller_test.rb @@ -33,9 +33,11 @@ class CalendarsControllerTest < Redmine::ControllerTest :queries def test_show - get :show, :params => { - :project_id => 1 - } + with_settings :gravatar_enabled => '1' do + get :show, :params => { + :project_id => 1 + } + end assert_response :success # query form @@ -51,8 +53,9 @@ class CalendarsControllerTest < Redmine::ControllerTest # Assert context menu on issues assert_select 'form[data-cm-url=?]', '/issues/context_menu' - assert_select 'div.issue.hascontextmenu' do + assert_select 'div.issue.hascontextmenu.tooltip' do assert_select 'input[name=?][type=?]', 'ids[]', 'checkbox' + assert_select 'img[class="gravatar"]' end end diff --git a/test/functional/gantts_controller_test.rb b/test/functional/gantts_controller_test.rb index dd397d0e4..2ca34aef0 100644 --- a/test/functional/gantts_controller_test.rb +++ b/test/functional/gantts_controller_test.rb @@ -30,9 +30,11 @@ class GanttsControllerTest < Redmine::ControllerTest def test_gantt_should_work i2 = Issue.find(2) i2.update_attribute(:due_date, 1.month.from_now) - get :show, :params => { - :project_id => 1 - } + with_settings :gravatar_enabled => '1' do + get :show, :params => { + :project_id => 1 + } + end assert_response :success # query form @@ -49,7 +51,9 @@ class GanttsControllerTest < Redmine::ControllerTest # Assert context menu on issues subject and gantt bar assert_select 'div[class=?]', 'issue-subject hascontextmenu' - assert_select 'div[class=?]', 'tooltip hascontextmenu' + assert_select 'div.tooltip.hascontextmenu' do + assert_select 'img[class="gravatar"]' + end assert_select "form[data-cm-url=?]", '/issues/context_menu' # Issue with start and due dates