Chris@1296
|
1 <h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
|
Chris@1296
|
2
|
Chris@1296
|
3 <ul><%= @issues.collect {|i|
|
Chris@1296
|
4 content_tag('li',
|
Chris@1296
|
5 link_to(h("#{i.tracker} ##{i.id}"),
|
Chris@1296
|
6 { :action => 'show', :id => i }
|
Chris@1296
|
7 ) + h(": #{i.subject}"))
|
Chris@1296
|
8 }.join("\n").html_safe %></ul>
|
Chris@1296
|
9
|
Chris@1296
|
10 <%= form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
|
Chris@1296
|
11 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
|
Chris@1296
|
12 <div class="box tabular">
|
Chris@1296
|
13 <fieldset class="attributes">
|
Chris@1296
|
14 <legend><%= l(:label_change_properties) %></legend>
|
Chris@1296
|
15
|
Chris@1296
|
16 <div class="splitcontentleft">
|
Chris@1296
|
17 <% if @allowed_projects.present? %>
|
Chris@1296
|
18 <p>
|
Chris@1296
|
19 <label for="issue_project_id"><%= l(:field_project) %></label>
|
Chris@1296
|
20 <%= select_tag('issue[project_id]', content_tag('option', l(:label_no_change_option), :value => '') + project_tree_options_for_select(@allowed_projects, :selected => @target_project),
|
Chris@1296
|
21 :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
|
Chris@1296
|
22 </p>
|
Chris@1296
|
23 <% end %>
|
Chris@1296
|
24 <p>
|
Chris@1296
|
25 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
|
Chris@1296
|
26 <%= select_tag('issue[tracker_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@trackers, :id, :name)) %>
|
Chris@1296
|
27 </p>
|
Chris@1296
|
28 <% if @available_statuses.any? %>
|
Chris@1296
|
29 <p>
|
Chris@1296
|
30 <label for='issue_status_id'><%= l(:field_status) %></label>
|
Chris@1296
|
31 <%= select_tag('issue[status_id]',content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_statuses, :id, :name)) %>
|
Chris@1296
|
32 </p>
|
Chris@1296
|
33 <% end %>
|
Chris@1296
|
34
|
Chris@1296
|
35 <% if @safe_attributes.include?('priority_id') -%>
|
Chris@1296
|
36 <p>
|
Chris@1296
|
37 <label for='issue_priority_id'><%= l(:field_priority) %></label>
|
Chris@1296
|
38 <%= select_tag('issue[priority_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
|
Chris@1296
|
39 </p>
|
Chris@1296
|
40 <% end %>
|
Chris@1296
|
41
|
Chris@1296
|
42 <% if @safe_attributes.include?('assigned_to_id') -%>
|
Chris@1296
|
43 <p>
|
Chris@1296
|
44 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
|
Chris@1296
|
45 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
Chris@1296
|
46 content_tag('option', l(:label_nobody), :value => 'none') +
|
Chris@1296
|
47 principals_options_for_select(@assignables)) %>
|
Chris@1296
|
48 </p>
|
Chris@1296
|
49 <% end %>
|
Chris@1296
|
50
|
Chris@1296
|
51 <% if @safe_attributes.include?('category_id') -%>
|
Chris@1296
|
52 <p>
|
Chris@1296
|
53 <label for='issue_category_id'><%= l(:field_category) %></label>
|
Chris@1296
|
54 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
Chris@1296
|
55 content_tag('option', l(:label_none), :value => 'none') +
|
Chris@1296
|
56 options_from_collection_for_select(@categories, :id, :name)) %>
|
Chris@1296
|
57 </p>
|
Chris@1296
|
58 <% end %>
|
Chris@1296
|
59
|
Chris@1296
|
60 <% if @safe_attributes.include?('fixed_version_id') -%>
|
Chris@1296
|
61 <p>
|
Chris@1296
|
62 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
|
Chris@1296
|
63 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
Chris@1296
|
64 content_tag('option', l(:label_none), :value => 'none') +
|
Chris@1296
|
65 version_options_for_select(@versions.sort)) %>
|
Chris@1296
|
66 </p>
|
Chris@1296
|
67 <% end %>
|
Chris@1296
|
68
|
Chris@1296
|
69 <% @custom_fields.each do |custom_field| %>
|
Chris@1296
|
70 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></p>
|
Chris@1296
|
71 <% end %>
|
Chris@1296
|
72
|
Chris@1296
|
73 <% if @copy && @attachments_present %>
|
Chris@1296
|
74 <p>
|
Chris@1296
|
75 <label for='copy_attachments'><%= l(:label_copy_attachments) %></label>
|
Chris@1296
|
76 <%= check_box_tag 'copy_attachments', '1', true %>
|
Chris@1296
|
77 </p>
|
Chris@1296
|
78 <% end %>
|
Chris@1296
|
79
|
Chris@1296
|
80 <% if @copy && @subtasks_present %>
|
Chris@1296
|
81 <p>
|
Chris@1296
|
82 <label for='copy_subtasks'><%= l(:label_copy_subtasks) %></label>
|
Chris@1296
|
83 <%= check_box_tag 'copy_subtasks', '1', true %>
|
Chris@1296
|
84 </p>
|
Chris@1296
|
85 <% end %>
|
Chris@1296
|
86
|
Chris@1296
|
87 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
|
Chris@1296
|
88 </div>
|
Chris@1296
|
89
|
Chris@1296
|
90 <div class="splitcontentright">
|
Chris@1296
|
91 <% if @safe_attributes.include?('is_private') %>
|
Chris@1296
|
92 <p>
|
Chris@1296
|
93 <label for='issue_is_private'><%= l(:field_is_private) %></label>
|
Chris@1296
|
94 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
|
Chris@1296
|
95 content_tag('option', l(:general_text_Yes), :value => '1') +
|
Chris@1296
|
96 content_tag('option', l(:general_text_No), :value => '0')) %>
|
Chris@1296
|
97 </p>
|
Chris@1296
|
98 <% end %>
|
Chris@1296
|
99
|
Chris@1296
|
100 <% if @safe_attributes.include?('parent_issue_id') && @project %>
|
Chris@1296
|
101 <p>
|
Chris@1296
|
102 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
|
Chris@1296
|
103 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
|
Chris@1296
|
104 </p>
|
Chris@1296
|
105 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project)}')" %>
|
Chris@1296
|
106 <% end %>
|
Chris@1296
|
107
|
Chris@1296
|
108 <% if @safe_attributes.include?('start_date') %>
|
Chris@1296
|
109 <p>
|
Chris@1296
|
110 <label for='issue_start_date'><%= l(:field_start_date) %></label>
|
Chris@1296
|
111 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
|
Chris@1296
|
112 </p>
|
Chris@1296
|
113 <% end %>
|
Chris@1296
|
114
|
Chris@1296
|
115 <% if @safe_attributes.include?('due_date') %>
|
Chris@1296
|
116 <p>
|
Chris@1296
|
117 <label for='issue_due_date'><%= l(:field_due_date) %></label>
|
Chris@1296
|
118 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
|
Chris@1296
|
119 </p>
|
Chris@1296
|
120 <% end %>
|
Chris@1296
|
121
|
Chris@1296
|
122 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
|
Chris@1296
|
123 <p>
|
Chris@1296
|
124 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
|
Chris@1296
|
125 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
|
Chris@1296
|
126 </p>
|
Chris@1296
|
127 <% end %>
|
Chris@1296
|
128 </div>
|
Chris@1296
|
129
|
Chris@1296
|
130 </fieldset>
|
Chris@1296
|
131
|
Chris@1296
|
132 <fieldset><legend><%= l(:field_notes) %></legend>
|
Chris@1296
|
133 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
|
Chris@1296
|
134 <%= wikitoolbar_for 'notes' %>
|
Chris@1296
|
135 </fieldset>
|
Chris@1296
|
136 </div>
|
Chris@1296
|
137
|
Chris@1296
|
138 <p>
|
Chris@1296
|
139 <% if @copy %>
|
Chris@1296
|
140 <%= hidden_field_tag 'copy', '1' %>
|
Chris@1296
|
141 <%= submit_tag l(:button_copy) %>
|
Chris@1296
|
142 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
|
Chris@1296
|
143 <% elsif @target_project %>
|
Chris@1296
|
144 <%= submit_tag l(:button_move) %>
|
Chris@1296
|
145 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
|
Chris@1296
|
146 <% else %>
|
Chris@1296
|
147 <%= submit_tag l(:button_submit) %>
|
Chris@1296
|
148 <% end %>
|
Chris@1296
|
149 </p>
|
Chris@1296
|
150
|
Chris@1296
|
151 <% end %>
|