]> source.dussan.org Git - redmine.git/commitdiff
Un-inline conditions.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Oct 2015 10:28:58 +0000 (10:28 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 25 Oct 2015 10:28:58 +0000 (10:28 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14749 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/helpers/issues_helper.rb

index 06e5f87bccd6f130e1d99182611b8ffd57e92bd4..42e93655b9dc2c8f95bc023f51a28cbfda89ce41 100644 (file)
@@ -40,15 +40,18 @@ module IssuesHelper
     end
     issue_list(issues) do |issue, level|
       group_name = group_count = nil
-      if query.grouped? && ((group = query.group_by_column.value(issue)) != previous_group || first)
-        if group.blank? && group != false
-          group_name = "(#{l(:label_blank_value)})"
-        else
-          group_name = column_content(query.group_by_column, issue)
+      if query.grouped?
+        group = query.group_by_column.value(issue)
+        if first || group != previous_group
+          if group.blank? && group != false
+            group_name = "(#{l(:label_blank_value)})"
+          else
+            group_name = format_object(group)
+          end
+          group_name ||= ""
+          group_count = issue_count_by_group[group]
+          group_totals = totals_by_group.map {|column, t| total_tag(column, t[group] || 0)}.join(" ").html_safe
         end
-        group_name ||= ""
-        group_count = issue_count_by_group[group]
-        group_totals = totals_by_group.map {|column, t| total_tag(column, t[group] || 0)}.join(" ").html_safe
       end
       yield issue, level, group_name, group_count, group_totals
       previous_group, first = group, false