From 02c2a8349472928408ad8dda779362f2f1f3c1aa Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Tue, 16 Dec 2008 21:11:37 +0000 Subject: [PATCH] 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 --- app/helpers/issues_helper.rb | 6 ++++++ app/views/issues/_list.rhtml | 2 +- app/views/issues/_list_simple.rhtml | 2 +- app/views/issues/show.rhtml | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index 43acabd19..afc8b8559 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -33,6 +33,12 @@ module IssuesHelper "#{@cached_label_priority}: #{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 diff --git a/app/views/issues/_list.rhtml b/app/views/issues/_list.rhtml index b42357894..cbdd4fd72 100644 --- a/app/views/issues/_list.rhtml +++ b/app/views/issues/_list.rhtml @@ -11,7 +11,7 @@ <% issues.each do |issue| -%> - "> + <%= check_box_tag("ids[]", issue.id, false, :id => nil) %> <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %> <% query.columns.each do |column| %><%= content_tag 'td', column_content(column, issue), :class => column.name %><% end %> diff --git a/app/views/issues/_list_simple.rhtml b/app/views/issues/_list_simple.rhtml index 8900b7359..e401a4a2a 100644 --- a/app/views/issues/_list_simple.rhtml +++ b/app/views/issues/_list_simple.rhtml @@ -8,7 +8,7 @@ <% for issue in issues %> - "> + <%= check_box_tag("ids[]", issue.id, false, :style => 'display:none;') %> <%= link_to issue.id, :controller => 'issues', :action => 'show', :id => issue %> diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml index 5c174e05b..d5babe331 100644 --- a/app/views/issues/show.rhtml +++ b/app/views/issues/show.rhtml @@ -9,7 +9,7 @@

<%= @issue.tracker.name %> #<%= @issue.id %>

-
"> +
<%= avatar(@issue.author, :size => "64") %>

<%=h @issue.subject %>

-- 2.39.5