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