Adds a helper that returns issues css classes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2139 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
7cea286c23
commit
02c2a83494
|
@ -33,6 +33,12 @@ module IssuesHelper
|
|||
"<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
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</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 %>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</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 %>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<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">
|
||||
|
|
Loading…
Reference in New Issue