"<strong>#{@cached_label_priority}</strong>: #{issue.priority.name}"
end
+ # Returns a string of css classes that apply to the given issue
+ def css_issue_classes(issue)
+ s = "issue status-#{issue.status.position} priority-#{issue.priority.position}"
+ s
+ end
+
def sidebar_queries
unless @sidebar_queries
# User can see public queries and his own queries
</tr></thead>
<tbody>
<% issues.each do |issue| -%>
- <tr id="issue-<%= issue.id %>" class="issue hascontextmenu <%= cycle('odd', 'even') %> <%= "status-#{issue.status.position} priority-#{issue.priority.position}" %>">
+ <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= css_issue_classes(issue) %>">
<td class="checkbox"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
<td><%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %></td>
<% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %>
</tr></thead>
<tbody>
<% for issue in issues %>
- <tr id="issue-<%= issue.id %>" class="issue hascontextmenu <%= cycle('odd', 'even') %> <%= "status-#{issue.status.position} priority-#{issue.priority.position}" %>">
+ <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= css_issue_classes(issue) %>">
<td class="id">
<%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;') %>
<%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %>
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
-<div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>">
+<div class="<%= css_issue_classes(@issue) %>">
<%= avatar(@issue.author, :size => "64") %>
<h3><%=h @issue.subject %></h3>
<p class="author">