From a8ae7d59d13dc73e68911588c00087a4e3e4402c Mon Sep 17 00:00:00 2001 From: Marius BALTEANU Date: Mon, 9 Apr 2018 10:55:43 +0000 Subject: [PATCH] show issue assignee on roadmap --- app/views/versions/index.html.erb | 3 ++- app/views/versions/show.html.erb | 1 + config/locales/en.yml | 1 + public/stylesheets/application.css | 2 ++ test/functional/versions_controller_test.rb | 10 ++++++++++ 5 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/views/versions/index.html.erb b/app/views/versions/index.html.erb index 2914a6d..9b2fa9f 100644 --- a/app/views/versions/index.html.erb +++ b/app/views/versions/index.html.erb @@ -27,9 +27,10 @@ <% issues.each do |issue| -%> - + + <% end -%> diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb index a62b0a1..1ffff72 100644 --- a/app/views/versions/show.html.erb +++ b/app/views/versions/show.html.erb @@ -44,6 +44,7 @@ <%= check_box_tag 'ids[]', issue.id, false, :id => nil %> <%= link_to_issue(issue, :project => (@project != issue.project)) %> + <%= avatar(issue.assigned_to, :size => "20", :class => "gravatar", :title => l(:label_attribute_with_value, :attribute => l(:field_assigned_to), :value => issue.assigned_to.to_s)) if issue.assigned_to %> <% end %> diff --git a/config/locales/en.yml b/config/locales/en.yml index d909543..e63e5e9 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1024,6 +1024,7 @@ en: label_font_monospace: Monospaced font label_font_proportional: Proportional font label_last_notes: Last notes + label_attribute_with_value: "%{attribute}: %{value}" button_login: Login button_submit: Submit diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 35bd4ca..df7fff3 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -531,7 +531,9 @@ div#search-results-counts ul { margin-top: 0.5em; } div#search-results-counts li { list-style-type:none; float: left; margin-left: 1em; } div#roadmap .related-issues { margin-bottom: 1em; } +div#roadmap .related-issues tr.issue { height: 25px; } div#roadmap .related-issues td.checkbox { display: none; } +div#roadmap .related-issues td.assignee { text-align: right; } div#roadmap .wiki h1:first-child { display: none; } div#roadmap .wiki h1 { font-size: 120%; } div#roadmap .wiki h2 { font-size: 110%; } diff --git a/test/functional/versions_controller_test.rb b/test/functional/versions_controller_test.rb index 3d5af8d..edc1af4 100644 --- a/test/functional/versions_controller_test.rb +++ b/test/functional/versions_controller_test.rb @@ -46,6 +46,9 @@ class VersionsControllerTest < Redmine::ControllerTest # Links to completed versions in the sidebar assert_select 'a[href=?]', '/versions/1' end + + # Issue with assignee should contain user's avatar + assert_select 'td.assignee img[class=?][title=?]', 'gravatar', 'Assignee: Dave Lopper' end def test_index_with_completed_versions @@ -99,6 +102,13 @@ class VersionsControllerTest < Redmine::ControllerTest assert_response :success assert_select 'h2', :text => /1.0/ + + assert_select '#roadmap' do + # Issue without assignee should not contain user's avatar + assert_select 'tr.issue:first-child td.assignee img', 0 + # Issue with assignee should contain user's avatar + assert_select 'tr.issue td.assignee img[class=?][title=?]', 'gravatar', 'Assignee: Dave Lopper' + end end def test_show_issue_calculations_should_take_into_account_only_visible_issues -- 2.1.4