- 担当者を表示
- 優先度が高いものは上へ
- クローズしたものは下へ
- 優先度で色付け
- 奇数行と偶数行で色付け
- クローズしたものは背景色をグレーに
- 担当チケットにオレンジマーク
diff --git a/app/views/versions/show.html.erb b/app/views/versions/show.html.erb index fdbec6f..03ea4dd 100644 --- a/app/views/versions/show.html.erb +++ b/app/views/versions/show.html.erb @@ -38,10 +38,18 @@ <%= form_tag({}) do -%> <table class="list related-issues"> <caption><%= l(:label_related_issues) %></caption> - <%- @issues.each do |issue| -%> - <tr class="issue hascontextmenu"> + <%- @issues.sort do |a, b| + if a.closed? == b.closed? + a.priority == b.priority ? b.id <=> a.id : b.priority <=> a.priority + else + b.closed? ? -1 : 1 + end + end.each_with_index do |issue, index| -%> + <tr class="issue hascontextmenu <%= index % 2 == 0 ? 'even' : 'odd' %> <%= issue.closed? ? '' : issue.css_classes %>" + style="<%= issue.closed? ? 'background-color:#e0e0e0' : '' %>"> <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 style="<%= issue.assigned_to == User.current ? 'border-right: 4px solid orange' : '' %>"><%= issue.assigned_to ? issue.assigned_to.lastname : '' %></td> </tr> <% end %> </table>
view のプライグイン化はしづらいけど、直接いじるのも嫌だなぁと思いつつ。良い方法がないものか。