diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:39:39 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-07 09:39:39 +0000 |
commit | 3519083dbe4be46f236a0c2b224fd43d29873c33 (patch) | |
tree | 7f178c71deb89787c45933e8480034fd04ea009f /app/views | |
parent | 4bbd3d81fd5f8860703aa9a29bb6166a334cc6cc (diff) | |
download | redmine-3519083dbe4be46f236a0c2b224fd43d29873c33.tar.gz redmine-3519083dbe4be46f236a0c2b224fd43d29873c33.zip |
Extract grouping logic to an helper.
git-svn-id: http://svn.redmine.org/redmine/trunk@13972 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/_list.html.erb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/views/issues/_list.html.erb b/app/views/issues/_list.html.erb index 024866782..c6c7613b4 100644 --- a/app/views/issues/_list.html.erb +++ b/app/views/issues/_list.html.erb @@ -14,20 +14,18 @@ <% end %> </tr> </thead> - <% previous_group, first = false, true %> <tbody> - <% issue_list(issues) do |issue, level| -%> - <% if @query.grouped? && ((group = @query.group_by_column.value(issue)) != previous_group || first) %> + <% grouped_issue_list(issues, @query, @issue_count_by_group) do |issue, level, group_name, group_count| -%> + <% if group_name %> <% reset_cycle %> <tr class="group open"> <td colspan="<%= query.inline_columns.size + 2 %>"> <span class="expander" onclick="toggleRowGroup(this);"> </span> - <%= (group.blank? && group != false) ? l(:label_none) : column_content(@query.group_by_column, issue) %> <span class="count"><%= @issue_count_by_group[group] %></span> + <%= group_name %> <span class="count"><%= group_count %></span> <%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}", "toggleAllRowGroups(this)", :class => 'toggle-all') %> </td> </tr> - <% previous_group, first = group, false %> <% end %> <tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td> |