summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-04 11:52:33 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2011-04-04 11:52:33 +0000
commitf6c5426605d721a4e1dca0315ed031d617b85212 (patch)
treef579bf77ff6b74e6b70006ec76933bd7be14f362 /app
parent70a641c9bca8cd9406a6ca0862c3ae8eb2e77258 (diff)
downloadredmine-f6c5426605d721a4e1dca0315ed031d617b85212.tar.gz
redmine-f6c5426605d721a4e1dca0315ed031d617b85212.zip
add view for bulk edit time entries (#7996).
Contributed by Adam Soltys. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5311 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/timelog/bulk_edit.rhtml49
1 files changed, 49 insertions, 0 deletions
diff --git a/app/views/timelog/bulk_edit.rhtml b/app/views/timelog/bulk_edit.rhtml
new file mode 100644
index 000000000..3045e2569
--- /dev/null
+++ b/app/views/timelog/bulk_edit.rhtml
@@ -0,0 +1,49 @@
+<h2><%= l(:label_bulk_edit_selected_time_entries) %></h2>
+
+<ul><%= @time_entries.collect {|i| content_tag('li', link_to(h("#{i.spent_on.strftime("%Y-%m-%d")} -- #{i.project}: #{l(:label_f_hour_plural, :value => i.hours)}"), { :action => 'edit', :id => i }))} %></ul>
+
+<% form_tag(:action => 'bulk_update') do %>
+<%= @time_entries.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
+<div class="box tabular">
+ <fieldset class="attributes">
+ <legend><%= l(:label_change_properties) %></legend>
+ <div>
+ <p>
+ <label><%= l(:field_issue) %></label>
+ <%= text_field :time_entry, :issue_id, :size => 6 %>
+ </p>
+
+ <p>
+ <label><%= l(:field_spent_on) %></label>
+ <%= text_field :time_entry, :spent_on, :size => 10 %><%= calendar_for('time_entry_spent_on') %>
+ </p>
+
+ <p>
+ <label><%= l(:field_hours) %></label>
+ <%= text_field :time_entry, :hours, :size => 6 %>
+ </p>
+
+ <% if @available_activities.any? %>
+ <p>
+ <label><%= l(:field_activity) %></label>
+ <%= select_tag('time_entry[activity_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_activities, :id, :name)) %>
+ </p>
+ <% end %>
+
+ <p>
+ <label><%= l(:field_comments) %></label>
+ <%= text_field(:time_entry, :comments, :size => 100) %>
+ </p>
+
+ <% @custom_fields.each do |custom_field| %>
+ <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('time_entry', custom_field) %></p>
+ <% end %>
+
+ <%= call_hook(:view_time_entries_bulk_edit_details_bottom, { :time_entries => @time_entries }) %>
+ </div>
+
+ </fieldset>
+</div>
+
+<p><%= submit_tag l(:button_submit) %></p>
+<% end %>