<%#-- copyright OpenProject is an open source project management software. Copyright (C) 2012-2020 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-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. ++#%> <% html_title l(:label_bulk_edit_selected_work_packages) %> <% if @bulk_errors.present? %>

<%= t('work_packages.bulk.could_not_be_saved') %>

<% end %>

<%= l(:label_bulk_edit_selected_work_packages) %>

<%= styled_form_tag(url_for(controller: '/work_packages/bulk', action: :update), method: :put, class: '-wide-labels') do %> <% @work_packages.each do |wp| %> <%= hidden_field_tag 'ids[]', wp.id %> <% end %> <%= back_url_hidden_field_tag %>
<%= l(:label_change_properties) %>
<%= styled_select_tag('work_package[type_id]', "".html_safe + options_from_collection_for_select(@types, :id, :name)) %>
<% if @available_statuses.any? %>
<%= styled_select_tag('work_package[status_id]', "".html_safe + options_from_collection_for_select(@available_statuses, :id, :name)) %>
<% else %>
<%= t('work_packages.move.no_common_statuses_exists') %>
<% end %>
<%= styled_select_tag('work_package[priority_id]', "".html_safe + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
<%= styled_select_tag('work_package[assigned_to_id]', content_tag('option', l(:label_no_change_option), value: '') + content_tag('option', l(:label_nobody), value: 'none') + options_from_collection_for_select(@assignables, :id, :name)) %>
<%= styled_select_tag('work_package[responsible_id]', content_tag('option', l(:label_no_change_option), value: '') + content_tag('option', l(:label_nobody), value: 'none') + options_from_collection_for_select(@responsibles, :id, :name)) %>
<% if @project %>
<%= styled_select_tag('work_package[category_id]', content_tag('option', l(:label_no_change_option), value: '') + content_tag('option', l(:label_none), value: 'none') + options_from_collection_for_select(@project.categories, :id, :name)) %>
<% end %> <% #TODO: allow editing versions when multiple projects %> <% if @project %>
<%= styled_select_tag('work_package[version_id]', content_tag('option', l(:label_no_change_option), value: '') + content_tag('option', l(:label_none), value: 'none') + version_options_for_select(@project.shared_versions.with_status_open.order_by_semver_name)) %>
<% end %> <% @custom_fields.each do |custom_field| %>
<%= blank_custom_field_label_tag('work_package', custom_field) %>
<%= custom_field_tag_for_bulk_edit('work_package', custom_field, @project) %>
<% end %> <%= call_hook(:view_work_packages_bulk_edit_details_bottom, { work_packages: @work_packages }) %>
<% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
<%= styled_text_field_tag 'work_package[parent_id]', '', size: 10 %>
<% end %>
<%= styled_text_field_tag 'work_package[start_date]', '', size: 10, class: '-augmented-datepicker' %>
<%= styled_text_field_tag 'work_package[due_date]', '', size: 10, class: '-augmented-datepicker' %>
<% if WorkPackage.use_field_for_done_ratio? %>
<%= styled_select_tag 'work_package[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
<% end %>
<%= Journal.human_attribute_name(:notes) %> <%= label_tag 'notes', Journal.human_attribute_name(:notes), class: 'hidden-for-sighted' %> <%= styled_text_area_tag 'notes', @notes, class: 'wiki-edit', with_text_formatting: true %>

<%= send_notification_option %>

<%= styled_button_tag l(:button_submit), class: '-highlight -with-icon icon-checkmark' %>

<% end %>