|
|
|
@ -30,138 +30,138 @@ See doc/COPYRIGHT.rdoc for more details. |
|
|
|
|
<%= form_tag({}) do -%> |
|
|
|
|
<%= hidden_field_tag 'back_url', url_for(params) %> |
|
|
|
|
<div class="autoscroll"> |
|
|
|
|
<table class="list issues"> |
|
|
|
|
|
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th class="checkbox hide-when-print"><%= link_to icon_wrapper('icon-context icon-yes', "#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), {}, |
|
|
|
|
:onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;', |
|
|
|
|
:class => 'no-decoration-on-hover', |
|
|
|
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", |
|
|
|
|
:alt => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> |
|
|
|
|
</th> |
|
|
|
|
<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %> |
|
|
|
|
<table class="list issues"> |
|
|
|
|
|
|
|
|
|
<thead> |
|
|
|
|
<tr> |
|
|
|
|
<th class="checkbox hide-when-print"><%= link_to icon_wrapper('icon-context icon-yes', "#{l(:button_check_all)}/#{l(:button_uncheck_all)}"), {}, |
|
|
|
|
:onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;', |
|
|
|
|
:class => 'no-decoration-on-hover', |
|
|
|
|
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}", |
|
|
|
|
:alt => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %> |
|
|
|
|
</th> |
|
|
|
|
<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %> |
|
|
|
|
|
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<%= column_header(column) %> |
|
|
|
|
<% end %> |
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<%= column_header(column) %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
</tr> |
|
|
|
|
</thead> |
|
|
|
|
|
|
|
|
|
<% previous_group = false %> |
|
|
|
|
<% previous_group = false %> |
|
|
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
<tbody> |
|
|
|
|
|
|
|
|
|
<% issue_list(work_packages) do |work_package, level| -%> |
|
|
|
|
<% issue_list(work_packages) do |work_package, level| -%> |
|
|
|
|
|
|
|
|
|
<% if query.grouped? && (group = query.group_by_column.value(work_package)) != previous_group %> |
|
|
|
|
<% reset_cycle %> |
|
|
|
|
<tr class="group open"> |
|
|
|
|
<td colspan="<%= query.columns.size + 2 %>"> |
|
|
|
|
<span class="expander icon-context icon-minus" onclick="toggleRowGroup(this); return false;"> |
|
|
|
|
<span class="hidden-for-sighted expand"><%= I18n.t('label_expand') %></span> |
|
|
|
|
<span class="hidden-for-sighted collapse"><%= I18n.t('label_collapse') %></span> |
|
|
|
|
</span> |
|
|
|
|
<% if query.grouped? && (group = query.group_by_column.value(work_package)) != previous_group %> |
|
|
|
|
<% reset_cycle %> |
|
|
|
|
<tr class="group open"> |
|
|
|
|
<td colspan="<%= query.columns.size + 2 %>"> |
|
|
|
|
<span class="expander icon-context icon-minus" onclick="toggleRowGroup(this); return false;"> |
|
|
|
|
<span class="hidden-for-sighted expand"><%= I18n.t('label_expand') %></span> |
|
|
|
|
<span class="hidden-for-sighted collapse"><%= I18n.t('label_collapse') %></span> |
|
|
|
|
</span> |
|
|
|
|
|
|
|
|
|
<span> |
|
|
|
|
<%= group.blank? ? |
|
|
|
|
'-' : |
|
|
|
|
column_content(query.group_by_column, work_package) %> |
|
|
|
|
<span> |
|
|
|
|
<%= group.blank? ? |
|
|
|
|
'-' : |
|
|
|
|
column_content(query.group_by_column, work_package) %> |
|
|
|
|
|
|
|
|
|
<span class="count"> |
|
|
|
|
(<%= results.work_package_count_for(group) %>) |
|
|
|
|
<span class="count"> |
|
|
|
|
(<%= results.work_package_count_for(group) %>) |
|
|
|
|
|
|
|
|
|
<span aria-hidden="true" role="presentation" tabindex="-1"> |
|
|
|
|
<%= link_to_function("#{l(:button_collapse_all)}", |
|
|
|
|
"toggleAllRowGroups(this)", |
|
|
|
|
:class => 'toggle-all') %> |
|
|
|
|
<span aria-hidden="true" role="presentation" tabindex="-1"> |
|
|
|
|
<%= link_to_function("#{l(:button_collapse_all)}", |
|
|
|
|
"toggleAllRowGroups(this)", |
|
|
|
|
:class => 'toggle-all') %> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</span> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
|
<% previous_group = group %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<tr id="work_package-<%= work_package.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= work_package_css_classes(work_package) %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> |
|
|
|
|
|
|
|
|
|
<td class="checkbox hide-when-print"> |
|
|
|
|
<label for="work_package<%= work_package.id %>" class="hidden-for-sighted"> |
|
|
|
|
<%= l(:description_select_work_package) + '#' + work_package.id.to_s %> |
|
|
|
|
</label> |
|
|
|
|
|
|
|
|
|
<%= check_box_tag("ids[]", work_package.id, false, :id => "work_package#{work_package.id}") %> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<td class="id"> |
|
|
|
|
<% if parent_work_package = work_package.parent_id %> |
|
|
|
|
<span class='hidden-for-sighted'> |
|
|
|
|
<%=l(:description_subwork_package) + ' ' + l(:label_work_package) + ' #' + parent_work_package.to_s %> |
|
|
|
|
</span> |
|
|
|
|
<% end -%> |
|
|
|
|
|
|
|
|
|
<%= link_to work_package.id, work_package_path(work_package) %> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<%= content_tag 'td', column_content(column, work_package), :class => column.name %> |
|
|
|
|
<% end %> |
|
|
|
|
</tr> |
|
|
|
|
<% previous_group = group %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<tr id="work_package-<%= work_package.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= work_package_css_classes(work_package) %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>"> |
|
|
|
|
<% if query.display_sums? %> |
|
|
|
|
|
|
|
|
|
<td class="checkbox hide-when-print"> |
|
|
|
|
<label for="work_package<%= work_package.id %>" class="hidden-for-sighted"> |
|
|
|
|
<%= l(:description_select_work_package) + '#' + work_package.id.to_s %> |
|
|
|
|
</label> |
|
|
|
|
<% results.caching_issue(work_package) %> |
|
|
|
|
<%# Check if we are at the end of a group or the end of a page %> |
|
|
|
|
|
|
|
|
|
<%= check_box_tag("ids[]", work_package.id, false, :id => "work_package#{work_package.id}") %> |
|
|
|
|
</td> |
|
|
|
|
<% if query.grouped? %> |
|
|
|
|
<% if !results.next_in_same_group? or work_package == work_packages.last %> |
|
|
|
|
|
|
|
|
|
<td class="id"> |
|
|
|
|
<% if parent_work_package = work_package.parent_id %> |
|
|
|
|
<span class='hidden-for-sighted'> |
|
|
|
|
<%=l(:description_subwork_package) + ' ' + l(:label_work_package) + ' #' + parent_work_package.to_s %> |
|
|
|
|
</span> |
|
|
|
|
<% end -%> |
|
|
|
|
<tr class="<%= cycle('odd', 'even') + " sum grouped " + work_package_css_classes(work_package) %>"> |
|
|
|
|
|
|
|
|
|
<%= link_to work_package.id, work_package_path(work_package) %> |
|
|
|
|
</td> |
|
|
|
|
<td colspan="2"> |
|
|
|
|
<% column_content = column_content(query.group_by_column, work_package).to_s %> |
|
|
|
|
<%=raw t(:label_sum_for, :value => (column_content.empty? ? 'None' : column_content)) %> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<%= content_tag 'td', column_content(column, work_package), :class => column.name %> |
|
|
|
|
<% end %> |
|
|
|
|
</tr> |
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<td> |
|
|
|
|
<%= results.mapping_for(column).call(results.grouped_sum_of(column)) %> |
|
|
|
|
</td> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% if query.display_sums? %> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<% results.caching_issue(work_package) %> |
|
|
|
|
<%# Check if we are at the end of a group or the end of a page %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% if query.grouped? %> |
|
|
|
|
<% if !results.next_in_same_group? or work_package == work_packages.last %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<tr class="<%= cycle('odd', 'even') + " sum grouped " + work_package_css_classes(work_package) %>"> |
|
|
|
|
<%# Check if we are at the end of a page %> |
|
|
|
|
<% if work_package == work_packages.last %> |
|
|
|
|
|
|
|
|
|
<tr class="<%= "#{cycle('odd', 'even')} sum group all #{work_package_css_classes(work_package)}" %>"> |
|
|
|
|
<td colspan="2"> |
|
|
|
|
<% column_content = column_content(query.group_by_column, work_package).to_s %> |
|
|
|
|
<%=raw t(:label_sum_for, :value => (column_content.empty? ? 'None' : column_content)) %> |
|
|
|
|
<%= t(:label_sum_for, :value => l(:label_all_work_packages)) %> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<td> |
|
|
|
|
<%= results.mapping_for(column).call(results.grouped_sum_of(column)) %> |
|
|
|
|
<%= results.mapping_for(column).call(results.total_sum_of(column)) %> |
|
|
|
|
</td> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<%# Check if we are at the end of a page %> |
|
|
|
|
<% if work_package == work_packages.last %> |
|
|
|
|
|
|
|
|
|
<tr class="<%= "#{cycle('odd', 'even')} sum group all #{work_package_css_classes(work_package)}" %>"> |
|
|
|
|
<td colspan="2"> |
|
|
|
|
<%= t(:label_sum_for, :value => l(:label_all_work_packages)) %> |
|
|
|
|
</td> |
|
|
|
|
|
|
|
|
|
<% query.columns.each do |column| %> |
|
|
|
|
<td> |
|
|
|
|
<%= results.mapping_for(column).call(results.total_sum_of(column)) %> |
|
|
|
|
</td> |
|
|
|
|
<% end %> |
|
|
|
|
</tr> |
|
|
|
|
|
|
|
|
|
<% end %> |
|
|
|
|
<% end %> |
|
|
|
|
|
|
|
|
|
<%= call_hook(:issue_list_group_bottom, :current_issue => work_package, |
|
|
|
|
:issues => work_packages, |
|
|
|
|
:query => query, |
|
|
|
|
:group => group) %> |
|
|
|
|
<%= call_hook(:issue_list_group_bottom, :current_issue => work_package, |
|
|
|
|
:issues => work_packages, |
|
|
|
|
:query => query, |
|
|
|
|
:group => group) %> |
|
|
|
|
|
|
|
|
|
<% end -%> |
|
|
|
|
<% end -%> |
|
|
|
|
|
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
</div> |
|
|
|
|
<% end -%> |
|
|
|
|