##// END OF EJS Templates
Adds a hook on issue move form (#4850)....
Jean-Philippe Lang -
r3342:77459f9ae488
parent child
Show More
@@ -1,55 +1,57
1 <h2><%= @copy ? l(:button_copy) : l(:button_move) %></h2>
1 <h2><%= @copy ? l(:button_copy) : l(:button_move) %></h2>
2
2
3 <ul>
3 <ul>
4 <% @issues.each do |issue| -%>
4 <% @issues.each do |issue| -%>
5 <li><%= link_to_issue issue %></li>
5 <li><%= link_to_issue issue %></li>
6 <% end -%>
6 <% end -%>
7 </ul>
7 </ul>
8
8
9 <% form_tag({}, :id => 'move_form') do %>
9 <% form_tag({}, :id => 'move_form') do %>
10 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
10 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
11
11
12 <div class="box tabular">
12 <div class="box tabular">
13 <p><label for="new_project_id"><%=l(:field_project)%>:</label>
13 <p><label for="new_project_id"><%=l(:field_project)%>:</label>
14 <%= select_tag "new_project_id",
14 <%= select_tag "new_project_id",
15 project_tree_options_for_select(@allowed_projects, :selected => @target_project),
15 project_tree_options_for_select(@allowed_projects, :selected => @target_project),
16 :onchange => remote_function(:url => { :action => 'move' },
16 :onchange => remote_function(:url => { :action => 'move' },
17 :method => :get,
17 :method => :get,
18 :update => 'content',
18 :update => 'content',
19 :with => "Form.serialize('move_form')") %></p>
19 :with => "Form.serialize('move_form')") %></p>
20
20
21 <p><label for="new_tracker_id"><%=l(:field_tracker)%>:</label>
21 <p><label for="new_tracker_id"><%=l(:field_tracker)%>:</label>
22 <%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
22 <%= select_tag "new_tracker_id", "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, "id", "name") %></p>
23
23
24 <p>
24 <p>
25 <label><%= l(:field_assigned_to) %></label>
25 <label><%= l(:field_assigned_to) %></label>
26 <%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') +
26 <%= select_tag('assigned_to_id', content_tag('option', l(:label_no_change_option), :value => '') +
27 content_tag('option', l(:label_nobody), :value => 'none') +
27 content_tag('option', l(:label_nobody), :value => 'none') +
28 options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>
28 options_from_collection_for_select(@target_project.assignable_users, :id, :name)) %>
29 </p>
29 </p>
30
30
31 <p>
31 <p>
32 <label><%= l(:field_status) %></label>
32 <label><%= l(:field_status) %></label>
33 <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
33 <%= select_tag('status_id', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
34 </p>
34 </p>
35
35
36 <p>
36 <p>
37 <label><%= l(:field_start_date) %></label>
37 <label><%= l(:field_start_date) %></label>
38 <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
38 <%= text_field_tag 'start_date', '', :size => 10 %><%= calendar_for('start_date') %>
39 </p>
39 </p>
40
40
41 <p>
41 <p>
42 <label><%= l(:field_due_date) %></label>
42 <label><%= l(:field_due_date) %></label>
43 <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
43 <%= text_field_tag 'due_date', '', :size => 10 %><%= calendar_for('due_date') %>
44 </p>
44 </p>
45
46 <%= call_hook(:view_issues_move_bottom, :issue => @issue, :target_project => @target_project, :copy => !!@copy) %>
45 </div>
47 </div>
46
48
47 <% if @copy %>
49 <% if @copy %>
48 <%= hidden_field_tag("copy_options[copy]", "1") %>
50 <%= hidden_field_tag("copy_options[copy]", "1") %>
49 <%= submit_tag l(:button_copy) %>
51 <%= submit_tag l(:button_copy) %>
50 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
52 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
51 <% else %>
53 <% else %>
52 <%= submit_tag l(:button_move) %>
54 <%= submit_tag l(:button_move) %>
53 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
55 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
54 <% end %>
56 <% end %>
55 <% end %>
57 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now