##// END OF EJS Templates
Bulk edit form lacks estimated time field (#5156)....
Jean-Philippe Lang -
r14908:33720d5fbe75
parent child
Show More

The requested changes are too big and content was truncated. Show full diff

@@ -1,207 +1,215
1 <h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
1 <h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
2
2
3 <% if @saved_issues && @unsaved_issues.present? %>
3 <% if @saved_issues && @unsaved_issues.present? %>
4 <div id="errorExplanation">
4 <div id="errorExplanation">
5 <span>
5 <span>
6 <%= l(:notice_failed_to_save_issues,
6 <%= l(:notice_failed_to_save_issues,
7 :count => @unsaved_issues.size,
7 :count => @unsaved_issues.size,
8 :total => @saved_issues.size,
8 :total => @saved_issues.size,
9 :ids => @unsaved_issues.map {|i| "##{i.id}"}.join(', ')) %>
9 :ids => @unsaved_issues.map {|i| "##{i.id}"}.join(', ')) %>
10 </span>
10 </span>
11 <ul>
11 <ul>
12 <% bulk_edit_error_messages(@unsaved_issues).each do |message| %>
12 <% bulk_edit_error_messages(@unsaved_issues).each do |message| %>
13 <li><%= message %></li>
13 <li><%= message %></li>
14 <% end %>
14 <% end %>
15 </ul>
15 </ul>
16 </div>
16 </div>
17 <% end %>
17 <% end %>
18
18
19 <ul id="bulk-selection">
19 <ul id="bulk-selection">
20 <% @issues.each do |issue| %>
20 <% @issues.each do |issue| %>
21 <%= content_tag 'li', link_to_issue(issue) %>
21 <%= content_tag 'li', link_to_issue(issue) %>
22 <% end %>
22 <% end %>
23 </ul>
23 </ul>
24
24
25 <%= form_tag(bulk_update_issues_path, :id => 'bulk_edit_form') do %>
25 <%= form_tag(bulk_update_issues_path, :id => 'bulk_edit_form') do %>
26 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
26 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
27 <div class="box tabular">
27 <div class="box tabular">
28 <fieldset class="attributes">
28 <fieldset class="attributes">
29 <legend><%= l(:label_change_properties) %></legend>
29 <legend><%= l(:label_change_properties) %></legend>
30
30
31 <div class="splitcontentleft">
31 <div class="splitcontentleft">
32 <% if @allowed_projects.present? %>
32 <% if @allowed_projects.present? %>
33 <p>
33 <p>
34 <label for="issue_project_id"><%= l(:field_project) %></label>
34 <label for="issue_project_id"><%= l(:field_project) %></label>
35 <%= select_tag('issue[project_id]',
35 <%= select_tag('issue[project_id]',
36 project_tree_options_for_select(@allowed_projects,
36 project_tree_options_for_select(@allowed_projects,
37 :include_blank => ((!@copy || (@projects & @allowed_projects == @projects)) ? l(:label_no_change_option) : false),
37 :include_blank => ((!@copy || (@projects & @allowed_projects == @projects)) ? l(:label_no_change_option) : false),
38 :selected => @target_project),
38 :selected => @target_project),
39 :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
39 :onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
40 </p>
40 </p>
41 <% end %>
41 <% end %>
42 <p>
42 <p>
43 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
43 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
44 <%= select_tag('issue[tracker_id]',
44 <%= select_tag('issue[tracker_id]',
45 content_tag('option', l(:label_no_change_option), :value => '') +
45 content_tag('option', l(:label_no_change_option), :value => '') +
46 options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id])) %>
46 options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id])) %>
47 </p>
47 </p>
48 <% if @available_statuses.any? %>
48 <% if @available_statuses.any? %>
49 <p>
49 <p>
50 <label for='issue_status_id'><%= l(:field_status) %></label>
50 <label for='issue_status_id'><%= l(:field_status) %></label>
51 <%= select_tag('issue[status_id]',
51 <%= select_tag('issue[status_id]',
52 content_tag('option', l(:label_no_change_option), :value => '') +
52 content_tag('option', l(:label_no_change_option), :value => '') +
53 options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id])) %>
53 options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id])) %>
54 </p>
54 </p>
55 <% end %>
55 <% end %>
56
56
57 <% if @safe_attributes.include?('priority_id') -%>
57 <% if @safe_attributes.include?('priority_id') -%>
58 <p>
58 <p>
59 <label for='issue_priority_id'><%= l(:field_priority) %></label>
59 <label for='issue_priority_id'><%= l(:field_priority) %></label>
60 <%= select_tag('issue[priority_id]',
60 <%= select_tag('issue[priority_id]',
61 content_tag('option', l(:label_no_change_option), :value => '') +
61 content_tag('option', l(:label_no_change_option), :value => '') +
62 options_from_collection_for_select(IssuePriority.active, :id, :name, @issue_params[:priority_id])) %>
62 options_from_collection_for_select(IssuePriority.active, :id, :name, @issue_params[:priority_id])) %>
63 </p>
63 </p>
64 <% end %>
64 <% end %>
65
65
66 <% if @safe_attributes.include?('assigned_to_id') -%>
66 <% if @safe_attributes.include?('assigned_to_id') -%>
67 <p>
67 <p>
68 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
68 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
69 <%= select_tag('issue[assigned_to_id]',
69 <%= select_tag('issue[assigned_to_id]',
70 content_tag('option', l(:label_no_change_option), :value => '') +
70 content_tag('option', l(:label_no_change_option), :value => '') +
71 content_tag('option', l(:label_nobody), :value => 'none', :selected => (@issue_params[:assigned_to_id] == 'none')) +
71 content_tag('option', l(:label_nobody), :value => 'none', :selected => (@issue_params[:assigned_to_id] == 'none')) +
72 principals_options_for_select(@assignables, @issue_params[:assigned_to_id])) %>
72 principals_options_for_select(@assignables, @issue_params[:assigned_to_id])) %>
73 </p>
73 </p>
74 <% end %>
74 <% end %>
75
75
76 <% if @safe_attributes.include?('category_id') -%>
76 <% if @safe_attributes.include?('category_id') -%>
77 <p>
77 <p>
78 <label for='issue_category_id'><%= l(:field_category) %></label>
78 <label for='issue_category_id'><%= l(:field_category) %></label>
79 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
79 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
80 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:category_id] == 'none')) +
80 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:category_id] == 'none')) +
81 options_from_collection_for_select(@categories, :id, :name, @issue_params[:category_id])) %>
81 options_from_collection_for_select(@categories, :id, :name, @issue_params[:category_id])) %>
82 </p>
82 </p>
83 <% end %>
83 <% end %>
84
84
85 <% if @safe_attributes.include?('fixed_version_id') -%>
85 <% if @safe_attributes.include?('fixed_version_id') -%>
86 <p>
86 <p>
87 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
87 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
88 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
88 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
89 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:fixed_version_id] == 'none')) +
89 content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:fixed_version_id] == 'none')) +
90 version_options_for_select(@versions.sort, @issue_params[:fixed_version_id])) %>
90 version_options_for_select(@versions.sort, @issue_params[:fixed_version_id])) %>
91 </p>
91 </p>
92 <% end %>
92 <% end %>
93
93
94 <% @custom_fields.each do |custom_field| %>
94 <% @custom_fields.each do |custom_field| %>
95 <p>
95 <p>
96 <label><%= custom_field.name %></label>
96 <label><%= custom_field.name %></label>
97 <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
97 <%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
98 </p>
98 </p>
99 <% end %>
99 <% end %>
100
100
101 <% if @copy && Setting.link_copied_issue == 'ask' %>
101 <% if @copy && Setting.link_copied_issue == 'ask' %>
102 <p>
102 <p>
103 <label for='link_copy'><%= l(:label_link_copied_issue) %></label>
103 <label for='link_copy'><%= l(:label_link_copied_issue) %></label>
104 <%= hidden_field_tag 'link_copy', '0' %>
104 <%= hidden_field_tag 'link_copy', '0' %>
105 <%= check_box_tag 'link_copy', '1', params[:link_copy] != 0 %>
105 <%= check_box_tag 'link_copy', '1', params[:link_copy] != 0 %>
106 </p>
106 </p>
107 <% end %>
107 <% end %>
108
108
109 <% if @copy && @attachments_present %>
109 <% if @copy && @attachments_present %>
110 <%= hidden_field_tag 'copy_attachments', '0' %>
110 <%= hidden_field_tag 'copy_attachments', '0' %>
111 <p>
111 <p>
112 <label for='copy_attachments'><%= l(:label_copy_attachments) %></label>
112 <label for='copy_attachments'><%= l(:label_copy_attachments) %></label>
113 <%= check_box_tag 'copy_attachments', '1', params[:copy_attachments] != '0' %>
113 <%= check_box_tag 'copy_attachments', '1', params[:copy_attachments] != '0' %>
114 </p>
114 </p>
115 <% end %>
115 <% end %>
116
116
117 <% if @copy && @subtasks_present %>
117 <% if @copy && @subtasks_present %>
118 <%= hidden_field_tag 'copy_subtasks', '0' %>
118 <%= hidden_field_tag 'copy_subtasks', '0' %>
119 <p>
119 <p>
120 <label for='copy_subtasks'><%= l(:label_copy_subtasks) %></label>
120 <label for='copy_subtasks'><%= l(:label_copy_subtasks) %></label>
121 <%= check_box_tag 'copy_subtasks', '1', params[:copy_subtasks] != '0' %>
121 <%= check_box_tag 'copy_subtasks', '1', params[:copy_subtasks] != '0' %>
122 </p>
122 </p>
123 <% end %>
123 <% end %>
124
124
125 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
125 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
126 </div>
126 </div>
127
127
128 <div class="splitcontentright">
128 <div class="splitcontentright">
129 <% if @safe_attributes.include?('is_private') %>
129 <% if @safe_attributes.include?('is_private') %>
130 <p>
130 <p>
131 <label for='issue_is_private'><%= l(:field_is_private) %></label>
131 <label for='issue_is_private'><%= l(:field_is_private) %></label>
132 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
132 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
133 content_tag('option', l(:general_text_Yes), :value => '1', :selected => (@issue_params[:is_private] == '1')) +
133 content_tag('option', l(:general_text_Yes), :value => '1', :selected => (@issue_params[:is_private] == '1')) +
134 content_tag('option', l(:general_text_No), :value => '0', :selected => (@issue_params[:is_private] == '0'))) %>
134 content_tag('option', l(:general_text_No), :value => '0', :selected => (@issue_params[:is_private] == '0'))) %>
135 </p>
135 </p>
136 <% end %>
136 <% end %>
137
137
138 <% if @safe_attributes.include?('parent_issue_id') && @project %>
138 <% if @safe_attributes.include?('parent_issue_id') && @project %>
139 <p>
139 <p>
140 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
140 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
141 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10, :value => @issue_params[:parent_issue_id] %>
141 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10, :value => @issue_params[:parent_issue_id] %>
142 <label class="inline"><%= check_box_tag 'issue[parent_issue_id]', 'none', (@issue_params[:parent_issue_id] == 'none'), :id => nil, :data => {:disables => '#issue_parent_issue_id'} %><%= l(:button_clear) %></label>
142 <label class="inline"><%= check_box_tag 'issue[parent_issue_id]', 'none', (@issue_params[:parent_issue_id] == 'none'), :id => nil, :data => {:disables => '#issue_parent_issue_id'} %><%= l(:button_clear) %></label>
143 </p>
143 </p>
144 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => Setting.cross_project_subtasks)}')" %>
144 <%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => Setting.cross_project_subtasks)}')" %>
145 <% end %>
145 <% end %>
146
146
147 <% if @safe_attributes.include?('start_date') %>
147 <% if @safe_attributes.include?('start_date') %>
148 <p>
148 <p>
149 <label for='issue_start_date'><%= l(:field_start_date) %></label>
149 <label for='issue_start_date'><%= l(:field_start_date) %></label>
150 <%= text_field_tag 'issue[start_date]', '', :value => @issue_params[:start_date], :size => 10 %><%= calendar_for('issue_start_date') %>
150 <%= text_field_tag 'issue[start_date]', '', :value => @issue_params[:start_date], :size => 10 %><%= calendar_for('issue_start_date') %>
151 <label class="inline"><%= check_box_tag 'issue[start_date]', 'none', (@issue_params[:start_date] == 'none'), :id => nil, :data => {:disables => '#issue_start_date'} %><%= l(:button_clear) %></label>
151 <label class="inline"><%= check_box_tag 'issue[start_date]', 'none', (@issue_params[:start_date] == 'none'), :id => nil, :data => {:disables => '#issue_start_date'} %><%= l(:button_clear) %></label>
152 </p>
152 </p>
153 <% end %>
153 <% end %>
154
154
155 <% if @safe_attributes.include?('due_date') %>
155 <% if @safe_attributes.include?('due_date') %>
156 <p>
156 <p>
157 <label for='issue_due_date'><%= l(:field_due_date) %></label>
157 <label for='issue_due_date'><%= l(:field_due_date) %></label>
158 <%= text_field_tag 'issue[due_date]', '', :value => @issue_params[:due_date], :size => 10 %><%= calendar_for('issue_due_date') %>
158 <%= text_field_tag 'issue[due_date]', '', :value => @issue_params[:due_date], :size => 10 %><%= calendar_for('issue_due_date') %>
159 <label class="inline"><%= check_box_tag 'issue[due_date]', 'none', (@issue_params[:due_date] == 'none'), :id => nil, :data => {:disables => '#issue_due_date'} %><%= l(:button_clear) %></label>
159 <label class="inline"><%= check_box_tag 'issue[due_date]', 'none', (@issue_params[:due_date] == 'none'), :id => nil, :data => {:disables => '#issue_due_date'} %><%= l(:button_clear) %></label>
160 </p>
160 </p>
161 <% end %>
161 <% end %>
162
162
163 <% if @safe_attributes.include?('estimated_hours') %>
164 <p>
165 <label for='issue_estimated_hours'><%= l(:field_estimated_hours) %></label>
166 <%= text_field_tag 'issue[estimated_hours]', '', :value => @issue_params[:estimated_hours], :size => 10 %>
167 <label class="inline"><%= check_box_tag 'issue[estimated_hours]', 'none', (@issue_params[:estimated_hours] == 'none'), :id => nil, :data => {:disables => '#issue_estimated_hours'} %><%= l(:button_clear) %></label>
168 </p>
169 <% end %>
170
163 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
171 <% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
164 <p>
172 <p>
165 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
173 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
166 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }, @issue_params[:done_ratio]) %>
174 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }, @issue_params[:done_ratio]) %>
167 </p>
175 </p>
168 <% end %>
176 <% end %>
169 </div>
177 </div>
170 </fieldset>
178 </fieldset>
171
179
172 <fieldset>
180 <fieldset>
173 <legend><%= l(:field_notes) %></legend>
181 <legend><%= l(:field_notes) %></legend>
174 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
182 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
175 <%= wikitoolbar_for 'notes' %>
183 <%= wikitoolbar_for 'notes' %>
176 </fieldset>
184 </fieldset>
177 </div>
185 </div>
178
186
179 <p>
187 <p>
180 <% if @copy %>
188 <% if @copy %>
181 <%= hidden_field_tag 'copy', '1' %>
189 <%= hidden_field_tag 'copy', '1' %>
182 <%= submit_tag l(:button_copy) %>
190 <%= submit_tag l(:button_copy) %>
183 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
191 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
184 <% elsif @target_project %>
192 <% elsif @target_project %>
185 <%= submit_tag l(:button_move) %>
193 <%= submit_tag l(:button_move) %>
186 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
194 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
187 <% else %>
195 <% else %>
188 <%= submit_tag l(:button_submit) %>
196 <%= submit_tag l(:button_submit) %>
189 <% end %>
197 <% end %>
190 </p>
198 </p>
191
199
192 <% end %>
200 <% end %>
193
201
194 <%= javascript_tag do %>
202 <%= javascript_tag do %>
195 $(window).load(function(){
203 $(window).load(function(){
196 $(document).on('change', 'input[data-disables]', function(){
204 $(document).on('change', 'input[data-disables]', function(){
197 if ($(this).prop('checked')){
205 if ($(this).prop('checked')){
198 $($(this).data('disables')).attr('disabled', true).val('');
206 $($(this).data('disables')).attr('disabled', true).val('');
199 } else {
207 } else {
200 $($(this).data('disables')).attr('disabled', false);
208 $($(this).data('disables')).attr('disabled', false);
201 }
209 }
202 });
210 });
203 });
211 });
204 $(document).ready(function(){
212 $(document).ready(function(){
205 $('input[data-disables]').trigger('change');
213 $('input[data-disables]').trigger('change');
206 });
214 });
207 <% end %>
215 <% end %>
1 NO CONTENT: modified file
NO CONTENT: modified file
The requested commit or file is too big and content was truncated. Show full diff
General Comments 0
You need to be logged in to leave comments. Login now