You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

bulk_edit.html.erb 1.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <h2><%= l(:label_bulk_edit_selected_time_entries) %></h2>
  2. <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>
  3. <% form_tag(:action => 'bulk_update') do %>
  4. <%= @time_entries.collect {|i| hidden_field_tag('ids[]', i.id)}.join %>
  5. <div class="box tabular">
  6. <fieldset class="attributes">
  7. <legend><%= l(:label_change_properties) %></legend>
  8. <div>
  9. <p>
  10. <label><%= l(:field_issue) %></label>
  11. <%= text_field :time_entry, :issue_id, :size => 6 %>
  12. </p>
  13. <p>
  14. <label><%= l(:field_spent_on) %></label>
  15. <%= text_field :time_entry, :spent_on, :size => 10 %><%= calendar_for('time_entry_spent_on') %>
  16. </p>
  17. <p>
  18. <label><%= l(:field_hours) %></label>
  19. <%= text_field :time_entry, :hours, :size => 6 %>
  20. </p>
  21. <% if @available_activities.any? %>
  22. <p>
  23. <label><%= l(:field_activity) %></label>
  24. <%= select_tag('time_entry[activity_id]', "<option value=\"\">#{l(:label_no_change_option)}</option>" + options_from_collection_for_select(@available_activities, :id, :name)) %>
  25. </p>
  26. <% end %>
  27. <p>
  28. <label><%= l(:field_comments) %></label>
  29. <%= text_field(:time_entry, :comments, :size => 100) %>
  30. </p>
  31. <% @custom_fields.each do |custom_field| %>
  32. <p><label><%= h(custom_field.name) %></label> <%= custom_field_tag_for_bulk_edit('time_entry', custom_field, @projects) %></p>
  33. <% end %>
  34. <%= call_hook(:view_time_entries_bulk_edit_details_bottom, { :time_entries => @time_entries }) %>
  35. </div>
  36. </fieldset>
  37. </div>
  38. <p><%= submit_tag l(:button_submit) %></p>
  39. <% end %>