<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2018 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-2017 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 docs/COPYRIGHT.rdoc for more details. ++#%> <% content_for :header_tags do %> <%= javascript_include_tag "project/description_handling.js" %> <%= javascript_include_tag "project/filters.js" %> <% end %> <% html_title(t(:label_project_plural)) -%> <%= toolbar title: t(:label_project_plural) do %> <% if User.current.allowed_to?(:add_project, nil, global: true) %>
  • <%= link_to new_project_path, { class: 'button -alt-highlight', aria: {label: t(:label_project_new)}, title: t(:label_project_new) } do %> <%= op_icon('button--icon icon-add') %> <%= Project.model_name.human %> <% end %>
  • <% end %>
  • <%= link_to t(:label_overall_activity), activities_path, class: 'button' %>
  • <% end %> <%= render partial: 'projects/filters/form', locals: { query: @query } %> <% if @projects.any? %>
    <%= render partial: 'hierarchy_header' %> <%= projects_sort_header_tag('name', caption: Project.human_attribute_name(:name), param: :json) %> <%= projects_sort_header_tag('project_status', caption: Project.human_attribute_name(:status), param: :json) %> <%= projects_sort_header_tag('public', caption: Project.human_attribute_name(:public), param: :json) %> <% if EnterpriseToken.allows_to?(:custom_fields_in_projects_list) %> <% @custom_fields.each do |custom_field| %> <%= sort_header_tag("cf_#{custom_field.id}", caption: custom_field.name, param: :json) %> <% end %> <% end %> <% if User.current.admin? %> <%= projects_sort_header_tag('required_disk_space', caption: I18n.t(:label_required_disk_storage), param: :json) %> <%= projects_sort_header_tag('created_at', caption: Project.human_attribute_name(:created_at), param: :json) %> <%= projects_sort_header_tag('latest_activity_at', caption: Project.human_attribute_name(:latest_activity_at), param: :json) %> <% end %> <% projects_with_levels_order_sensitive(@projects) do |project, level| %> <%= params[:expand] == 'all' && short_project_description(project).present? ? '-no-highlighting -expanded' : '' %>"> <% if EnterpriseToken.allows_to?(:custom_fields_in_projects_list) %> <% @custom_fields.each do |custom_field| %> <% end %> <% end %> <% if User.current.admin? %> <% end %> <% unless project.description.blank? %> <%= params[:expand] == 'all' ? '-expanded' : '' %>"> <% end %> <% end %>
    <% if params[:expand] == 'all' %> <%= link_to t(:button_collapse_all), { params: safe_query_params(%w{filters page per_page sortBy}).except(:expand) } %> <% else %> <%= link_to t(:button_expand_all), { params: safe_query_params(%w{filters page per_page sortBy}).merge(expand: 'all') } %> <% end %>
    <% if project.archived? %> <%= t('project.archive.archived') %> <% end %> <%= link_to_project(project, {}, {}, false) %> <% if project.status.try(:code) %> <%= project_status_name(project.status) %> <% end %> <%= checked_image project.public? %> <% custom_value = project.custom_value_for(custom_field).formatted_value %> <% if custom_field.field_format == 'text' %> <%= shorten_text(custom_value, 20) %> <% else %> <%= custom_value %> <% end %> <%= number_to_human_size(project.required_disk_space, precision: 2) if project.required_disk_space.to_i > 0 %> <%= format_date(project.created_at) %> <%= format_date(project.latest_activity_at) %> <% items = project_more_menu_items(project) %> <% if items.any? %>
    <% end %> <% unless project.description.blank? %> <% end %>
    <%= format_text(short_project_description(project), project: project) %>
    <%= pagination_links_full @projects %> <% else %> <%= no_results_box(no_projects_result_box_params) %> <% end %> <% if User.current.admin? %>

    <%= op_icon('icon-info1') %> <%= t(:label_projects_storage_information, count: Project.count, storage: number_to_human_size(Project.total_projects_size, precision: 2)) %>

    <% end %>