2011-04-04 15:52:33 +04:00
|
|
|
<h2><%= l(:label_bulk_edit_selected_time_entries) %></h2>
|
|
|
|
|
2012-12-22 16:24:43 +04:00
|
|
|
<ul id="bulk-selection">
|
2012-12-22 14:57:01 +04:00
|
|
|
<% @time_entries.each do |entry| %>
|
|
|
|
<%= content_tag 'li',
|
|
|
|
link_to("#{format_date(entry.spent_on)} - #{entry.project}: #{l(:label_f_hour_plural, :value => entry.hours)}", edit_time_entry_path(entry)) %>
|
|
|
|
<% end %>
|
2011-12-17 13:21:37 +04:00
|
|
|
</ul>
|
2011-04-04 15:52:33 +04:00
|
|
|
|
2012-12-22 16:24:43 +04:00
|
|
|
<%= form_tag(bulk_update_time_entries_path, :id => 'bulk_edit_form') do %>
|
2011-12-21 17:42:19 +04:00
|
|
|
<%= @time_entries.collect {|i| hidden_field_tag('ids[]', i.id)}.join.html_safe %>
|
2011-04-04 15:52:33 +04:00
|
|
|
<div class="box tabular">
|
|
|
|
<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>
|
2012-05-05 20:09:27 +04:00
|
|
|
<%= select_tag('time_entry[activity_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_activities, :id, :name)) %>
|
2011-04-04 15:52:33 +04:00
|
|
|
</p>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<label><%= l(:field_comments) %></label>
|
|
|
|
<%= text_field(:time_entry, :comments, :size => 100) %>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<% @custom_fields.each do |custom_field| %>
|
2011-04-07 20:34:58 +04:00
|
|
|
<p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('time_entry', custom_field, @projects) %></p>
|
2011-04-04 15:52:33 +04:00
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= call_hook(:view_time_entries_bulk_edit_details_bottom, { :time_entries => @time_entries }) %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p><%= submit_tag l(:button_submit) %></p>
|
|
|
|
<% end %>
|