##// END OF EJS Templates
Use content_tag for "no change" options....
Jean-Philippe Lang -
r8869:36fa1ff9a9a4
parent child
Show More
@@ -1,125 +1,125
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 <ul><%= @issues.collect {|i|
3 <ul><%= @issues.collect {|i|
4 content_tag('li',
4 content_tag('li',
5 link_to(h("#{i.tracker} ##{i.id}"),
5 link_to(h("#{i.tracker} ##{i.id}"),
6 { :action => 'show', :id => i }
6 { :action => 'show', :id => i }
7 ) + h(": #{i.subject}"))
7 ) + h(": #{i.subject}"))
8 }.join("\n").html_safe %></ul>
8 }.join("\n").html_safe %></ul>
9
9
10 <% form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
10 <% form_tag({:action => 'bulk_update'}, :id => 'bulk_edit_form') do %>
11 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
11 <%= @issues.collect {|i| hidden_field_tag('ids[]', i.id)}.join("\n").html_safe %>
12 <div class="box tabular">
12 <div class="box tabular">
13 <fieldset class="attributes">
13 <fieldset class="attributes">
14 <legend><%= l(:label_change_properties) %></legend>
14 <legend><%= l(:label_change_properties) %></legend>
15
15
16 <div class="splitcontentleft">
16 <div class="splitcontentleft">
17 <% if @allowed_projects.present? %>
17 <% if @allowed_projects.present? %>
18 <p>
18 <p>
19 <label for="issue_project_id"><%= l(:field_project) %></label>
19 <label for="issue_project_id"><%= l(:field_project) %></label>
20 <%= select_tag('issue[project_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + project_tree_options_for_select(@allowed_projects, :selected => @target_project)) %>
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)) %>
21 </p>
21 </p>
22 <%= observe_field :issue_project_id, :url => {:action => 'bulk_edit'},
22 <%= observe_field :issue_project_id, :url => {:action => 'bulk_edit'},
23 :update => 'content',
23 :update => 'content',
24 :with => "Form.serialize('bulk_edit_form')" %>
24 :with => "Form.serialize('bulk_edit_form')" %>
25 <% end %>
25 <% end %>
26 <p>
26 <p>
27 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
27 <label for="issue_tracker_id"><%= l(:field_tracker) %></label>
28 <%= select_tag('issue[tracker_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@trackers, :id, :name)) %>
28 <%= select_tag('issue[tracker_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@trackers, :id, :name)) %>
29 </p>
29 </p>
30 <% if @available_statuses.any? %>
30 <% if @available_statuses.any? %>
31 <p>
31 <p>
32 <label for='issue_status_id'><%= l(:field_status) %></label>
32 <label for='issue_status_id'><%= l(:field_status) %></label>
33 <%= select_tag('issue[status_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_statuses, :id, :name)) %>
33 <%= select_tag('issue[status_id]',content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_statuses, :id, :name)) %>
34 </p>
34 </p>
35 <% end %>
35 <% end %>
36 <p>
36 <p>
37 <label for='issue_priority_id'><%= l(:field_priority) %></label>
37 <label for='issue_priority_id'><%= l(:field_priority) %></label>
38 <%= select_tag('issue[priority_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
38 <%= select_tag('issue[priority_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(IssuePriority.active, :id, :name)) %>
39 </p>
39 </p>
40 <p>
40 <p>
41 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
41 <label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
42 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
42 <%= select_tag('issue[assigned_to_id]', content_tag('option', l(:label_no_change_option), :value => '') +
43 content_tag('option', l(:label_nobody), :value => 'none') +
43 content_tag('option', l(:label_nobody), :value => 'none') +
44 principals_options_for_select(@assignables)) %>
44 principals_options_for_select(@assignables)) %>
45 </p>
45 </p>
46 <% if @project %>
46 <% if @project %>
47 <p>
47 <p>
48 <label for='issue_category_id'><%= l(:field_category) %></label>
48 <label for='issue_category_id'><%= l(:field_category) %></label>
49 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
49 <%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
50 content_tag('option', l(:label_none), :value => 'none') +
50 content_tag('option', l(:label_none), :value => 'none') +
51 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
51 options_from_collection_for_select(@project.issue_categories, :id, :name)) %>
52 </p>
52 </p>
53 <% end %>
53 <% end %>
54 <% #TODO: allow editing versions when multiple projects %>
54 <% #TODO: allow editing versions when multiple projects %>
55 <% if @project %>
55 <% if @project %>
56 <p>
56 <p>
57 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
57 <label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
58 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
58 <%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
59 content_tag('option', l(:label_none), :value => 'none') +
59 content_tag('option', l(:label_none), :value => 'none') +
60 version_options_for_select(@project.shared_versions.open.sort)) %>
60 version_options_for_select(@project.shared_versions.open.sort)) %>
61 </p>
61 </p>
62 <% end %>
62 <% end %>
63
63
64 <% @custom_fields.each do |custom_field| %>
64 <% @custom_fields.each do |custom_field| %>
65 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></p>
65 <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('issue', custom_field, @projects) %></p>
66 <% end %>
66 <% end %>
67
67
68 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
68 <%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
69 </div>
69 </div>
70
70
71 <div class="splitcontentright">
71 <div class="splitcontentright">
72 <% if @safe_attributes.include?('is_private') %>
72 <% if @safe_attributes.include?('is_private') %>
73 <p>
73 <p>
74 <label for='issue_is_private'><%= l(:field_is_private) %></label>
74 <label for='issue_is_private'><%= l(:field_is_private) %></label>
75 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
75 <%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
76 content_tag('option', l(:general_text_Yes), :value => '1') +
76 content_tag('option', l(:general_text_Yes), :value => '1') +
77 content_tag('option', l(:general_text_No), :value => '0')) %>
77 content_tag('option', l(:general_text_No), :value => '0')) %>
78 </p>
78 </p>
79 <% end %>
79 <% end %>
80 <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
80 <% if @project && User.current.allowed_to?(:manage_subtasks, @project) %>
81 <p>
81 <p>
82 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
82 <label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
83 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
83 <%= text_field_tag 'issue[parent_issue_id]', '', :size => 10 %>
84 </p>
84 </p>
85 <div id="parent_issue_candidates" class="autocomplete"></div>
85 <div id="parent_issue_candidates" class="autocomplete"></div>
86 <%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
86 <%= javascript_tag "observeParentIssueField('#{auto_complete_issues_path(:project_id => @project) }')" %>
87 <% end %>
87 <% end %>
88 <p>
88 <p>
89 <label for='issue_start_date'><%= l(:field_start_date) %></label>
89 <label for='issue_start_date'><%= l(:field_start_date) %></label>
90 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
90 <%= text_field_tag 'issue[start_date]', '', :size => 10 %><%= calendar_for('issue_start_date') %>
91 </p>
91 </p>
92 <p>
92 <p>
93 <label for='issue_due_date'><%= l(:field_due_date) %></label>
93 <label for='issue_due_date'><%= l(:field_due_date) %></label>
94 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
94 <%= text_field_tag 'issue[due_date]', '', :size => 10 %><%= calendar_for('issue_due_date') %>
95 </p>
95 </p>
96 <% if Issue.use_field_for_done_ratio? %>
96 <% if Issue.use_field_for_done_ratio? %>
97 <p>
97 <p>
98 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
98 <label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
99 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
99 <%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }) %>
100 </p>
100 </p>
101 <% end %>
101 <% end %>
102 </div>
102 </div>
103
103
104 </fieldset>
104 </fieldset>
105
105
106 <fieldset><legend><%= l(:field_notes) %></legend>
106 <fieldset><legend><%= l(:field_notes) %></legend>
107 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
107 <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
108 <%= wikitoolbar_for 'notes' %>
108 <%= wikitoolbar_for 'notes' %>
109 </fieldset>
109 </fieldset>
110 </div>
110 </div>
111
111
112 <p>
112 <p>
113 <% if @copy %>
113 <% if @copy %>
114 <%= hidden_field_tag 'copy', '1' %>
114 <%= hidden_field_tag 'copy', '1' %>
115 <%= submit_tag l(:button_copy) %>
115 <%= submit_tag l(:button_copy) %>
116 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
116 <%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
117 <% elsif @target_project %>
117 <% elsif @target_project %>
118 <%= submit_tag l(:button_move) %>
118 <%= submit_tag l(:button_move) %>
119 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
119 <%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
120 <% else %>
120 <% else %>
121 <%= submit_tag l(:button_submit) %>
121 <%= submit_tag l(:button_submit) %>
122 <% end %>
122 <% end %>
123 </p>
123 </p>
124
124
125 <% end %>
125 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now