##// END OF EJS Templates
Sort versions drop down on the bulk edit form....
Jean-Philippe Lang -
r4419:86e17ce74ffd
parent child
Show More
@@ -1,83 +1,83
1 <h2><%= l(:label_bulk_edit_selected_issues) %></h2>
1 <h2><%= l(:label_bulk_edit_selected_issues) %></h2>
2
2
3 <ul><%= @issues.collect {|i| content_tag('li', link_to(h("#{i.tracker} ##{i.id}"), { :action => 'show', :id => i }) + h(": #{i.subject}")) }.join("\n") %></ul>
3 <ul><%= @issues.collect {|i| content_tag('li', link_to(h("#{i.tracker} ##{i.id}"), { :action => 'show', :id => i }) + h(": #{i.subject}")) }.join("\n") %></ul>
4
4
5 <% form_tag(:action => 'bulk_update') do %>
5 <% form_tag(:action => 'bulk_update') do %>
6 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
6 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
7 <div class="box tabular">
7 <div class="box tabular">
8 <fieldset class="attributes">
8 <fieldset class="attributes">
9 <legend><%= l(:label_change_properties) %></legend>
9 <legend><%= l(:label_change_properties) %></legend>
10
10
11 <div class="splitcontentleft">
11 <div class="splitcontentleft">
12 <p>
12 <p>
13 <label><%= l(:field_tracker) %></label>
13 <label><%= l(:field_tracker) %></label>
14 <%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
14 <%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
15 </p>
15 </p>
16 <% if @available_statuses.any? %>
16 <% if @available_statuses.any? %>
17 <p>
17 <p>
18 <label><%= l(:field_status) %></label>
18 <label><%= l(:field_status) %></label>
19 <%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
19 <%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
20 </p>
20 </p>
21 <% end %>
21 <% end %>
22 <p>
22 <p>
23 <label><%= l(:field_priority) %></label>
23 <label><%= l(:field_priority) %></label>
24 <%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
24 <%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.all, :id, :name)) %>
25 </p>
25 </p>
26 <p>
26 <p>
27 <label><%= l(:field_assigned_to) %></label>
27 <label><%= l(:field_assigned_to) %></label>
28 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
28 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
29 content_tag('option', l(:label_nobody), :value => 'none') +
29 content_tag('option', l(:label_nobody), :value => 'none') +
30 options_from_collection_for_select(@assignables, :id, :name)) %>
30 options_from_collection_for_select(@assignables, :id, :name)) %>
31 </p>
31 </p>
32 <% if @project %>
32 <% if @project %>
33 <p>
33 <p>
34 <label><%= l(:field_category) %></label>
34 <label><%= l(:field_category) %></label>
35 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
35 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
36 content_tag('option', l(:label_none), :value => 'none') +
36 content_tag('option', l(:label_none), :value => 'none') +
37 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
37 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
38 </p>
38 </p>
39 <% end %>
39 <% end %>
40 <% #TODO: allow editing versions when multiple projects %>
40 <% #TODO: allow editing versions when multiple projects %>
41 <% if @project %>
41 <% if @project %>
42 <p>
42 <p>
43 <label><%= l(:field_fixed_version) %></label>
43 <label><%= l(:field_fixed_version) %></label>
44 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
44 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
45 content_tag('option', l(:label_none), :value => 'none') +
45 content_tag('option', l(:label_none), :value => 'none') +
46 version_options_for_select(@project.shared_versions.open)) %>
46 version_options_for_select(@project.shared_versions.open.sort)) %>
47 </p>
47 </p>
48 <% end %>
48 <% end %>
49
49
50 <% @custom_fields.each do |custom_field| %>
50 <% @custom_fields.each do |custom_field| %>
51 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field) %></p>
51 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field) %></p>
52 <% end %>
52 <% end %>
53
53
54 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
54 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
55 </div>
55 </div>
56
56
57 <div class="splitcontentright">
57 <div class="splitcontentright">
58 <p>
58 <p>
59 <label><%= l(:field_start_date) %></label>
59 <label><%= l(:field_start_date) %></label>
60 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
60 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
61 </p>
61 </p>
62 <p>
62 <p>
63 <label><%= l(:field_due_date) %></label>
63 <label><%= l(:field_due_date) %></label>
64 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
64 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
65 </p>
65 </p>
66 <% if Issue.use_field_for_done_ratio? %>
66 <% if Issue.use_field_for_done_ratio? %>
67 <p>
67 <p>
68 <label><%= l(:field_done_ratio) %></label>
68 <label><%= l(:field_done_ratio) %></label>
69 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
69 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
70 </p>
70 </p>
71 <% end %>
71 <% end %>
72 </div>
72 </div>
73
73
74 </fieldset>
74 </fieldset>
75
75
76 <fieldset><legend><%= l(:field_notes) %></legend>
76 <fieldset><legend><%= l(:field_notes) %></legend>
77 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
77 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
78 <%= wikitoolbar_for 'notes' %>
78 <%= wikitoolbar_for 'notes' %>
79 </fieldset>
79 </fieldset>
80 </div>
80 </div>
81
81
82 <p><%= submit_tag l(:button_submit) %></p>
82 <p><%= submit_tag l(:button_submit) %></p>
83 <% end %>
83 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now