summaryrefslogtreecommitdiffstats
path: root/app/views/timelog
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-04 17:22:08 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-04-04 17:22:08 +0000
commit7b125bc2924125200e13bdbe5dc4c04e3078d157 (patch)
tree2721f982a3af27f2a074df2343a859a78cfcff9d /app/views/timelog
parent41cb7a3a55261c4497ea42510ab6753cac365409 (diff)
downloadredmine-7b125bc2924125200e13bdbe5dc4c04e3078d157.tar.gz
redmine-7b125bc2924125200e13bdbe5dc4c04e3078d157.zip
Better handling of update failures when bulk editing time entries.
git-svn-id: http://svn.redmine.org/redmine/trunk@16477 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/timelog')
-rw-r--r--app/views/timelog/bulk_edit.html.erb26
1 files changed, 21 insertions, 5 deletions
diff --git a/app/views/timelog/bulk_edit.html.erb b/app/views/timelog/bulk_edit.html.erb
index 640f7d893..96c953151 100644
--- a/app/views/timelog/bulk_edit.html.erb
+++ b/app/views/timelog/bulk_edit.html.erb
@@ -1,5 +1,21 @@
<h2><%= l(:label_bulk_edit_selected_time_entries) %></h2>
+<% if @unsaved_time_entries.present? %>
+<div id="errorExplanation">
+ <span>
+ <%= l(:notice_failed_to_save_time_entries,
+ :count => @unsaved_time_entries.size,
+ :total => @saved_time_entries.size,
+ :ids => @unsaved_time_entries.map {|i| "##{i.id}"}.join(', ')) %>
+ </span>
+ <ul>
+ <% bulk_edit_error_messages(@unsaved_time_entries).each do |message| %>
+ <li><%= message %></li>
+ <% end %>
+ </ul>
+</div>
+<% end %>
+
<ul id="bulk-selection">
<% @time_entries.each do |entry| %>
<%= content_tag 'li',
@@ -12,29 +28,29 @@
<div class="box tabular">
<div>
<p>
- <label><%= l(:field_issue) %></label>
+ <label for="time_entry_issue_id"><%= l(:field_issue) %></label>
<%= text_field :time_entry, :issue_id, :size => 6 %>
</p>
<p>
- <label><%= l(:field_spent_on) %></label>
+ <label for="time_entry_spent_on"><%= l(:field_spent_on) %></label>
<%= date_field :time_entry, :spent_on, :size => 10 %><%= calendar_for('time_entry_spent_on') %>
</p>
<p>
- <label><%= l(:field_hours) %></label>
+ <label for="time_entry_hours"><%= l(:field_hours) %></label>
<%= text_field :time_entry, :hours, :size => 6 %>
</p>
<% if @available_activities.any? %>
<p>
- <label><%= l(:field_activity) %></label>
+ <label for="time_entry_activity_id"><%= l(:field_activity) %></label>
<%= select_tag('time_entry[activity_id]', content_tag('option', l(:label_no_change_option), :value => '') + options_from_collection_for_select(@available_activities, :id, :name)) %>
</p>
<% end %>
<p>
- <label><%= l(:field_comments) %></label>
+ <label for="time_entry_comments"><%= l(:field_comments) %></label>
<%= text_field(:time_entry, :comments, :size => 100) %>
</p>