Project

General

Profile

Patch #28510 » 0001-show-issue-assignee-on-roadmap.patch

Marius BĂLTEANU, 2018-04-09 13:03

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="assignee"><%= 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 %></td>
</tr>
<% end -%>
</table>
app/views/versions/show.html.erb
<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="assignee"><%= 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 %></td>
</tr>
<% end %>
</table>
config/locales/en.yml
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
public/stylesheets/application.css
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%; }
test/functional/versions_controller_test.rb
# 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
......
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
(1-1/12)