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

128 lines
4.9 KiB

<%#-- copyright
OpenProject is a project management system.
Copyright (C) 2012-2013 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-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 doc/COPYRIGHT.rdoc for more details.
++#%>
<%= header_tags %>
<h2><%= @copy ? l(:button_copy) : l(:button_move) %></h2>
<ul>
<% @work_packages.each do |work_package| -%>
<li><%= link_to_work_package work_package %></li>
<% end -%>
</ul>
<%= form_tag({:action => 'create'}, :id => 'move_form') do %>
<%= @work_packages.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %>
<div class="box tabular">
<fieldset class="attributes">
<legend><%= l(:label_change_properties) %></legend>
<div class="splitcontentleft">
<p><label for="new_project_id"><%= WorkPackage.human_attribute_name(:project) %>:</label>
<%= select_tag "new_project_id",
project_tree_options_for_select(@allowed_projects, :selected => @target_project),
:onchange => remote_function(:url => { :action => 'new' },
:method => :get,
:update => 'content',
:with => "Form.serialize('move_form')") %></p>
<p><label for="new_type_id"><%= WorkPackage.human_attribute_name(:type) %>:</label>
<%= select_tag("new_type_id",
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@types, "id", "name")) %>
</p>
<p>
<label for='status_id'><%= WorkPackage.human_attribute_name(:status) %></label>
<%= select_tag('status_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(@available_statuses, :id, :name)) %>
</p>
<p>
<label for='priority_id'><%= WorkPackage.human_attribute_name(:priority) %></label>
<%= select_tag('priority_id',
content_tag('option', l(:label_no_change_option), :value => '') +
options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
</p>
<p>
<label for='assigned_to_id'><%= WorkPackage.human_attribute_name(:assigned_to) %></label>
<%= select_tag('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(@target_project.assignable_users, :id, :name)) %>
</p>
<p>
<label for='responsible_id'><%= WorkPackage.human_attribute_name(:responsible) %></label>
<%= select_tag('responsible_id',
content_tag('option', l(:label_no_change_option), :value => '') +
content_tag('option', l(:label_nobody), :value => 'none') +
options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>
</p>
</div>
<div class="splitcontentright">
<p>
<label for='start_date'><%= WorkPackage.human_attribute_name(:start_date) %></label>
<%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
</p>
<p>
<label for='due_date'><%= WorkPackage.human_attribute_name(:due_date) %></label>
<%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
</p>
</div>
</fieldset>
<fieldset><legend><%= Journal.human_attribute_name(:notes) %></legend>
<%= label_tag 'notes', Journal.human_attribute_name(:notes), :class => 'hidden-for-sighted' %>
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
<%= wikitoolbar_for 'notes' %>
</fieldset>
<%= call_hook(:view_work_packages_move_bottom, :work_packages => @work_packages, :target_project => @target_project, :copy => !!@copy) %>
</div>
<% if @copy %>
<%= hidden_field_tag("copy") %>
<%= submit_tag l(:button_copy) %>
<%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
<% else %>
<%= submit_tag l(:button_move) %>
<%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
<% end %>
<% end %>
<% content_for :header_tags do %>
<%= robot_exclusion_tag %>
<% end %>