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/work_packages/moves/new.html.erb

158 lines
8.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.
++#%>
<% html_title @copy ? t(:button_copy) : t(:button_move), t('activerecord.models.work_package') %>
<h2><%= @copy ? t(:button_copy) : t(:button_move) %></h2>
<ul>
<% @work_packages.each do |work_package| -%>
<li>
<%= link_to_work_package work_package %>
<% descendant_count = work_package.descendants.size %>
<% if descendant_count > 0 %>
<span class="contextual-info -small">(+ <%= t('work_packages.x_descendants', count: descendant_count) %>)</span>
<% end %>
</li>
<% end -%>
</ul>
<%= styled_form_tag({action: 'create'},
id: 'move_form',
6 years ago
data: { 'refresh-url': url_for(action: 'new'), 'input-selector': '#new_project_id' },
class: '-wide-labels augment--refresh-on-form-changes') do %>
<% @work_packages.each do |wp| %>
<%= hidden_field_tag 'ids[]', wp.id %>
<% end %>
<%= back_url_hidden_field_tag %>
<section class="form--section">
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= t(:label_change_properties) %></legend>
<div class="grid-block">
<div class="grid-content medium-6">
<div class="form--field">
<label class="form--label" for="new_project_id"><%= WorkPackage.human_attribute_name(:project) %>:</label>
<div class="form--field-container">
<%= styled_select_tag "new_project_id",
project_tree_options_for_select(@allowed_projects, selected: @target_project),
class: 'remote-field--input' %>
</div>
</div>
<div class="form--field">
<label class="form--label" for="new_type_id"><%= WorkPackage.human_attribute_name(:type) %>:</label>
<div class="form--field-container">
<%= styled_select_tag("new_type_id",
content_tag('option', t(:label_no_change_option), value: '') +
options_from_collection_for_select(@types, "id", "name")) %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<div class="form--field-container">
<%= styled_select_tag('status_id',
content_tag('option', t(:label_no_change_option), value: '') +
options_from_collection_for_select(@available_statuses, :id, :name)) %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='version_id'><%= WorkPackage.human_attribute_name(:version) %></label>
<div class="form--field-container">
<%= styled_select_tag('version_id',
content_tag('option', t(:label_no_change_option), value: '') +
version_options_for_select(@available_versions)) %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<div class="form--field-container">
<%= styled_select_tag('priority_id',
content_tag('option', t(:label_no_change_option), value: '') +
options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<div class="form--field-container">
<%= styled_select_tag('assigned_to_id',
content_tag('option', t(:label_no_change_option), value: '') +
content_tag('option', t(:label_nobody), value: 'none') +
options_from_collection_for_select(@target_project.possible_assignees, :id, :name)) %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<div class="form--field-container">
<%= styled_select_tag('responsible_id',
content_tag('option', t(:label_no_change_option), value: '') +
content_tag('option', t(:label_nobody), value: 'none') +
options_from_collection_for_select(@target_project.possible_responsibles, :id, :name)) %>
</div>
</div>
Feature/remove timelog (#8557) * rename costs, introduce budgets * move files from costs to budgets * rename cost_object to budget * remove unused code * move hook - should be turned into standard code in the long run * move type attributes change over to budgets * move patch to work_package proper * move budget menu item up * combine reporting, time and cost module * remove rails based time_entries & reports code * rename cost object filter * adapt menu spec expectations * use cost project module name in administration * include timeline labels in migration * properly place budget linking method * fix permitted params * remove outdated routing spec * adapt budget request specs * ensure order of descendent updates * remove outdated specs * fix checking for reporting to be enabled * fix displaying spent units * fix time entries activity event url * reenable current rate tab * fix path on budget page * allow bulk editing of budgets only in one project scenario * fix sanitizing reference in controller * include module required for format_date * fix reference to correct units from work package spent units * linting * remove outdated spec * remove outdated views and permission references * remove acts_as_event from time_entries There is no atom link for time entries * remove acts_as_event from projects There are no atom links for projects * introduce budget filter for cost reports * remove actions added to removed controller * move time entries to the costs module * factor in view_own permission when calculating time entry visibility * linting * move mounting of time entries * include budgets into api v3 documentation
4 years ago
<div class="form--field">
<%= styled_label_tag :budget_id, Budget.model_name.human %>
<%= styled_select_tag('budget_id', (@target_project == @project ? content_tag('option', t(:label_no_change_option), :value => '') : "") +
content_tag('option', t(:label_none), :value => 'none') +
options_from_collection_for_select(@target_project.budgets, :id, :subject)) %>
</div>
</div>
<div class="grid-content medium-6">
<div class="form--field">
<label class="form--label" for='start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<div class="form--field-container">
<%= styled_text_field_tag 'start_date', '', size: 10, class: '-augmented-datepicker' %>
</div>
</div>
<div class="form--field">
<label class="form--label" for='due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<div class="form--field-container">
<%= styled_text_field_tag 'due_date', '', size: 10, class: '-augmented-datepicker' %>
</div>
</div>
</div>
</div>
</fieldset>
<fieldset class="form--fieldset">
<legend class="form--fieldset-legend"><%= Journal.human_attribute_name(:notes) %></legend>
<%= label_tag 'notes', Journal.human_attribute_name(:notes), class: 'hidden-for-sighted' %>
<%= styled_text_area_tag 'notes', @notes, cols: 60, rows: 10, class: 'wiki-edit', with_text_formatting: true %>
</fieldset>
<%= call_hook(:view_work_packages_move_bottom, work_packages: @work_packages, target_project: @target_project, copy: !!@copy) %>
</section>
<% if @copy %>
<%= hidden_field_tag("copy") %>
<%= styled_submit_tag t(:button_copy), class: '-highlight' %>
<%= styled_submit_tag t(:button_copy_and_follow), name: 'follow', class: '-highlight' %>
<% else %>
<%= styled_submit_tag t(:button_move), class: '-highlight' %>
<%= styled_submit_tag t(:button_move_and_follow), name: 'follow', class: '-highlight' %>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= robot_exclusion_tag %>
<% end %>