[accessibility] adding alt and title tags to numerous fields

pull/6827/head
Romano Licker 13 years ago
parent ef28d59dbf
commit 683e9ec446
  1. 2
      app/views/cost_objects/_form.rhtml
  2. 10
      app/views/cost_objects/_labor_budget_item.rhtml
  3. 14
      app/views/cost_objects/_material_budget_item.rhtml
  4. 12
      app/views/cost_types/_rate.rhtml
  5. 2
      app/views/hourly_rates/_list_default.rhtml
  6. 6
      app/views/hourly_rates/_list_project.rhtml
  7. 1
      config/locales/de.yml
  8. 1
      config/locales/en.yml

@ -91,5 +91,5 @@
<%= javascript_include_tag 'subform', :plugin => 'redmine_costs' %>
<%= javascript_include_tag 'editinplace', :plugin => 'redmine_costs' %>
<%= javascript_tag "initialize_editinplace('src=\"#{image_path('cancel.png')}\" value=\"#{l(:label_cancel)}\"' )" %>
<%= javascript_tag "initialize_editinplace('src=\"#{image_path('cancel.png')}\" alt=\"#{l(:button_cancel_edit_budget)}\" title=\"#{l(:button_cancel_edit_budget)}\"' )" %>
<% end %>

@ -1,7 +1,7 @@
<%-
index ||= "INDEX"
<%-
index ||= "INDEX"
new_or_existing = labor_budget_item.new_record? ? 'new' : 'existing'
id_or_index = labor_budget_item.new_record? ? index : labor_budget_item.id
id_or_index = labor_budget_item.new_record? ? index : labor_budget_item.id
prefix = "cost_object[#{new_or_existing}_labor_budget_item_attributes][]"
id_prefix = "cost_object_#{new_or_existing}_labor_budget_item_attributes_#{id_or_index}"
name_prefix = "cost_object[#{new_or_existing}_labor_budget_item_attributes][#{id_or_index}]"
@ -9,7 +9,7 @@
@labor_budget_item = labor_budget_item
error_messages = error_messages_for 'labor_budget_item'
-%>
-%>
<% unless error_messages.blank? %><tr><td colspan="5"><%= error_messages %></td></tr><% end %>
<% fields_for prefix, labor_budget_item do |cost_form| %>
@ -35,7 +35,7 @@
<%= observe_field( "#{id_prefix}_hours", :frequency => 1, :url => {:action => :update_labor_budget_item, :project_id => @project.id}, :with => "'user_id=' + encodeURIComponent(document.getElementById('#{id_prefix}_user_id').value) + '&hours=' + encodeURIComponent(value) + '&fixed_date=' + encodeURIComponent(document.getElementById('cost_object_fixed_date').value) + '&element_id=#{id_prefix}'") %>
</td>
<td class="delete">
<%= link_to_function image_tag('delete.png'), "deleteLaborBudgetItem('#{id_prefix}')" %>
<%= link_to_function image_tag('delete.png', :alt => l(:button_delete), :title => l(:button_delete)), "deleteLaborBudgetItem('#{id_prefix}')" %>
</td>
</tr>
<% end %>

@ -1,15 +1,15 @@
<%-
index ||= "INDEX"
<%-
index ||= "INDEX"
new_or_existing = material_budget_item.new_record? ? 'new' : 'existing'
id_or_index = material_budget_item.new_record? ? index : material_budget_item.id
id_or_index = material_budget_item.new_record? ? index : material_budget_item.id
prefix = "cost_object[#{new_or_existing}_material_budget_item_attributes][]"
id_prefix = "cost_object_#{new_or_existing}_material_budget_item_attributes_#{id_or_index}"
name_prefix = "cost_object[#{new_or_existing}_material_budget_item_attributes][#{id_or_index}]"
classes ||= ""
@material_budget_item = material_budget_item
error_messages = error_messages_for 'material_budget_item'
-%>
-%>
<% unless error_messages.blank? %><tr><td colspan="5"><%= error_messages %></td></tr><% end %>
<% fields_for prefix, material_budget_item do |cost_form| %>
@ -38,8 +38,8 @@
end %>
</td>
<td class="delete">
<%= link_to_function image_tag('delete.png'), "deleteMaterialBudgetItem('#{id_prefix}')" %>
<%= link_to_function image_tag('delete.png', :alt => l(:button_delete), :title => l(:button_delete)), "deleteMaterialBudgetItem('#{id_prefix}')" %>
</td>
</tr>
<% end %>

@ -1,7 +1,7 @@
<%-
index ||= "INDEX"
<%-
index ||= "INDEX"
new_or_existing = rate.new_record? ? 'new' : 'existing'
id_or_index = rate.new_record? ? index : rate.id
id_or_index = rate.new_record? ? index : rate.id
prefix = "cost_type[#{new_or_existing}_rate_attributes][]"
id_prefix = "cost_type_#{new_or_existing}_rate_attributes_#{id_or_index}"
name_prefix = "cost_type[#{new_or_existing}_rate_attributes][#{id_or_index}]"
@ -9,7 +9,7 @@
@rate = rate
error_messages = error_messages_for 'rate'
-%>
-%>
<% unless error_messages.blank? %><tr><td colspan="3"><%= error_messages %></td></tr><% end %>
@ -17,6 +17,6 @@
<tr class="<%= classes %>" id="<%= id_prefix %>">
<td><%= rate_form.text_field :valid_from, :size => 10, :class => 'date', :index => id_or_index %><%= calendar_for("#{id_prefix}_valid_from") %></td>
<td class="currency"><%= rate_form.text_field :rate, :size => 7, :index => id_or_index, :value => rate.rate ? rate.rate.round(2) : "" %> <%= Setting.plugin_redmine_costs['costs_currency'] %></td>
<td><%= image_to_function 'delete.png', "var e = $('#{id_prefix}');parent=e.up();e.remove();recalculate_even_odd(parent)"%></td>
<td><%= image_to_function 'delete.png', "var e = $('#{id_prefix}');parent=e.up();e.remove();recalculate_even_odd(parent)", {:alt => l(:button_delete), :title => l(:button_delete)}%></td>
</tr>
<% end %>
<% end %>

@ -17,7 +17,7 @@
<tr class="<%= cycle('odd', 'even') %>">
<td style="padding-right: 1em;"><%= rate.valid_from %></td>
<td class="currency"><%= number_to_currency(rate.rate) %></td>
<td><%= rate == current_rate ? image_tag('true.png') : "" %></td>
<td><%= rate == current_rate ? image_tag('true.png', :alt => l(:general_text_Yes)) : "" %></td>
</tr>
<%- end -%>
</tbody>

@ -1,7 +1,7 @@
<%
rates = @rates unless rates
project = @project unless project
current_rate = @user.current_rate(project)
%>
@ -26,9 +26,9 @@
<tr class="<%= cycle('odd', 'even') %>">
<td style="padding-right: 1em;"><%= rate.valid_from %></td>
<td class="currency"><%= number_to_currency(rate.rate) %></td>
<td><%= rate == current_rate ? image_tag('true.png') : "" %></td>
<td><%= rate == current_rate ? image_tag('true.png', :alt => l(:general_text_Yes)) : "" %></td>
</tr>
<%- end -%>
</tbody>
</table>
<% end %>
<% end %>

@ -161,3 +161,4 @@ de:
caption_save_rate: "Satz speichern"
caption_locked_on: "Gesperrt am"
caption_show_locked: "Gesperrte Typen anzeigen"
button_cancel_edit_budget: "Budget bearbeiten abbrechen"

@ -159,3 +159,4 @@ en:
caption_save_rate: "Save rate"
caption_locked_on: "Locked on"
caption_show_locked: "Show locked types"
button_cancel_edit_budget: "Cancel editing budget"

Loading…
Cancel
Save