OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/app/views/copy_projects/copy_settings/_copy_associations.html.erb

77 lines
4.0 KiB

<%#-- copyright
OpenProject is an open source project management software.
Copyright (C) 2012-2021 the OpenProject GmbH
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 docs/COPYRIGHT.rdoc for more details.
++#%>
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= t(:button_copy) %></legend>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "overview", checked: true, label: t(:label_overview), count: nil } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "queries", checked: true, label: t(:label_query_plural),
count: project.queries.count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "boards", checked: true, label: t('boards.label_boards'),
count: ::Boards::Grid.where(project: project).count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "forums", checked: false, label: t(:label_forum_plural),
count: project.forums.count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "members", checked: true, label: t(:label_member_plural),
count: project.members.count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "versions", checked: true, label: t(:label_version_plural),
count: project.versions.count } %>
<% if project.wiki.present? %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "wiki", checked: true, label: t(:label_wiki_page_plural),
count: project.wiki.nil? ? 0 : project.wiki.pages.count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "wiki_page_attachments", checked: false, label: t(:label_wiki_page_attachments),
count: project.wiki.pages.joins(:attachments).count('attachments.id') } %>
<% end %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "work_packages", checked: true, label: t(:label_work_package_plural),
count: project.work_packages.count } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "work_package_attachments", checked: true, label: t(:label_work_package_attachments),
count: project.work_packages.joins(:attachments).count('attachments.id') } %>
<%= render partial: "copy_projects/copy_settings/block_checkbox",
locals: { name: "categories", checked: true,
label: t(:label_work_package_category_plural),
count: project.categories.count } %>
<%= hidden_field_tag 'only[]', '' %>
<br />
<label class="block">
<%= check_box_tag 'notifications', 1, params[:notifications] %>
<%= t(:label_project_copy_notifications) %>
</label>
</fieldset>