<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2014 the OpenProject Foundation (OPF) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3. OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: Copyright (C) 2006-2013 Jean-Philippe Lang Copyright (C) 2010-2013 the ChiliProject Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See doc/COPYRIGHT.rdoc for more details. ++#%> <%= form_tag({}) do -%> <%= hidden_field_tag 'back_url', url_for(params) %>
<%= sort_header_tag('id', :caption => '#', :default_order => 'desc') %> <% query.columns.each do |column| %> <%= column_header(column) %> <% end %> <% previous_group = false %> <% issue_list(work_packages) do |work_package, level| -%> <% if query.grouped? && (group = query.group_by_column.value(work_package)) != previous_group %> <% reset_cycle %> <% previous_group = group %> <% end %> "> <% query.columns.each do |column| %> <%= content_tag 'td', column_content(column, work_package), :class => column.name, :lang => column_locale(column) %> <% end %> <% if query.display_sums? %> <% results.caching_issue(work_package) %> <%# Check if we are at the end of a group or the end of a page %> <% if query.grouped? %> <% if !results.next_in_same_group? or work_package == work_packages.last %> "> <% query.columns.each do |column| %> <% end %> <% end %> <% end %> <%# Check if we are at the end of a page %> <% if work_package == work_packages.last %> "> <% query.columns.each do |column| %> <% end %> <% end %> <% end %> <%= call_hook(:issue_list_group_bottom, :current_issue => work_package, :issues => work_packages, :query => query, :group => group) %> <% end -%>
<%= link_to icon_wrapper('icon-context icon-yes', l(:button_check_all)), {}, :onclick => 'toggleSelection(this); return false;', :class => 'no-decoration-on-hover', :title => l(:button_check_all), :alt => l(:button_check_all), :id => 'button_check_all' %>
<%= I18n.t('label_expand') %> <%= I18n.t('label_collapse') %> <%= group.blank? ? '-' : column_content(query.group_by_column, work_package) %> (<%= results.work_package_count_for(group) %>)
<%= check_box_tag("ids[]", work_package.id, false, id: "work_package#{work_package.id}", onclick: 'setAllSelectLinkState(jQuery("a#button_check_all"));' ) %> <% if parent_work_package = work_package.parent_id %> <%=l(:description_subwork_package) + ' ' + l(:label_work_package) + ' #' + parent_work_package.to_s %> <% end -%> <%= link_to work_package.id, work_package_path(work_package) %>
<% column_content = column_content(query.group_by_column, work_package).to_s %> <%=raw t(:label_sum_for, :value => (column_content.empty? ? 'None' : column_content)) %> <%= results.mapping_for(column).call(results.grouped_sum_of(column)) %>
<%= t(:label_sum_for, :value => l(:label_all_work_packages)) %> <%= results.mapping_for(column).call(results.total_sum_of(column)) %>
<% end -%>