From: Jean-Philippe Lang Date: Sun, 25 Oct 2015 10:28:58 +0000 (+0000) Subject: Un-inline conditions. X-Git-Tag: 3.2.0~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=18579303a20ffd26077a1b16b0742498b750845f;p=redmine.git Un-inline conditions. git-svn-id: http://svn.redmine.org/redmine/trunk@14749 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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