<%#-- copyright OpenProject is a project management system. Copyright (C) 2012-2017 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 doc/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(l(:label_project_plural)) -%> <%= toolbar title: l(: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 l(:label_overall_activity), activities_path, class: 'button' %>
  • <% end %> <%= form_tag({}, method: :get, class: "project-filters #{filter_set? ? '-expanded' : ''}") do %>
    <%= l(:label_filter_plural) %>
    <% end %> <% if @projects.any? %>
    <%= sort_header_tag('name', caption: Project.model_name.human) %> <%= sort_header_tag('is_public', caption:Project.human_attribute_name(:is_public)) %> <% if User.current.admin? %><%= sort_header_tag('required_disk_space', caption: I18n.t(:label_required_disk_storage)) %><% end %> <% if User.current.admin? %><%= sort_header_tag('created_on', caption: Project.human_attribute_name(:created_on)) %><% end %> <% if User.current.admin? %><%= sort_header_tag('latest_activity_at', caption: Project.human_attribute_name(:latest_activity_at)) %><% end %> <% project_tree_when_sorted(@projects) do |project, level| %> <%= params[:expand] == 'all' && project.short_description.present? ? '-no-highlighting -expanded' : '' %>"> <% if User.current.admin? %><% end %> <% if User.current.admin? %><% end %> <% if User.current.admin? %><% end %> <% unless project.short_description.empty? %> <%= params[:expand] == 'all' ? '-expanded' : '' %>"> <% end %> <% end %>
    <% if params[:expand] == 'all' %> <%= link_to t(:button_collapse_all), {params: request.query_parameters.except(:expand)} %> <% else %> <%= link_to t(:button_expand_all), {params: request.query_parameters.merge(expand: 'all')} %> <% end %>
    <% if project.archived? %> <%= t('project.archive.archived') %> <% end %> <%= link_to_project(project, {}, {}, false) %> <%= checked_image project.is_public? %><%= number_to_human_size(project.required_disk_space, precision: 2) if project.required_disk_space.to_i > 0 %><%= format_date(project.created_on) %><%= format_date(project.latest_activity_at) %> <% if User.current.admin? %>
    <% end %> <% unless project.short_description.empty? %> <% end %>
    <%= format_text(project.short_description, project: project) %>
    <%= pagination_links_full @projects %>
    <% else %> <%= no_results_box(action_url: new_project_path, display_action: true) %> <% end %> <% if User.current.admin? %>

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

    <% end %>