Project

General

Profile

Patch #28510 » 0001-Show-assignee-avatar-in-Roadmap-and-Version.patch

Marius BĂLTEANU, 2019-05-18 15:40

View differences:

app/views/versions/index.html.erb
<table class="list related-issues">
<caption><%= l(:label_related_issues) %></caption>
<% issues.each do |issue| -%>
<tr class="hascontextmenu">
<tr class="issue hascontextmenu">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="subject"><%= assignee_avatar(issue.assigned_to, :size => 16, :class => 'icon-gravatar').html_safe + link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="buttons"><%= link_to_context_menu %></td>
</tr>
<% end -%>
app/views/versions/show.html.erb
<%- @issues.each do |issue| -%>
<tr class="issue hascontextmenu">
<td class="checkbox"><%= check_box_tag 'ids[]', issue.id, false, :id => nil %></td>
<td class="subject"><%= link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="subject"><%= assignee_avatar(issue.assigned_to, :size => 16, :class => 'icon-gravatar').html_safe + link_to_issue(issue, :project => (@project != issue.project)) %></td>
<td class="buttons"><%= link_to_context_menu %></td>
</tr>
<% end %>
test/functional/versions_controller_test.rb
end
end
def test_index_should_show_issue_assignee
with_settings :gravatar_enabled => '1' do
Issue.generate!(:project_id => 3, :fixed_version_id => 4, :assigned_to => User.find_by_login('jsmith'))
Issue.generate!(:project_id => 3, :fixed_version_id => 4)
get :index, :params => {:project_id => 3}
assert_response :success
assert_select 'table.related-issues' do
assert_select 'tr.issue', :count => 2 do
assert_select 'img.gravatar.icon-gravatar[title=?]', 'Assignee: John Smith', :count => 1
end
end
end
end
def test_show
get :show, :params => {:id => 2}
assert_response :success
assert_select 'h2', :text => /1.0/
assert_select 'span[class=?]', 'badge badge-status-locked', :text => 'locked'
# no issue avatar when gravatar is disabled
assert_select 'img.gravatar', :count => 0
end
def test_show_should_show_issue_assignee
with_settings :gravatar_enabled => '1' do
get :show, :params => {:id => 2}
assert_response :success
assert_select 'table.related-issues' do
assert_select 'tr.issue', :count => 2 do
assert_select 'img.gravatar.icon-gravatar[title=?]', 'Assignee: Dave Lopper', :count => 1
end
end
end
end
def test_show_issue_calculations_should_take_into_account_only_visible_issues
(9-9/12)