summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-25 10:28:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-10-25 10:28:58 +0000
commit18579303a20ffd26077a1b16b0742498b750845f (patch)
tree974150b922f59b6b6d9a3f92a6bf4336f5f88a18
parent68c192064a803317b8a859d1829439d238e1d9ee (diff)
downloadredmine-18579303a20ffd26077a1b16b0742498b750845f.tar.gz
redmine-18579303a20ffd26077a1b16b0742498b750845f.zip
Un-inline conditions.
git-svn-id: http://svn.redmine.org/redmine/trunk@14749 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/issues_helper.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index 06e5f87bc..42e93655b 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -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