|
|
|
@ -17,13 +17,13 @@ |
|
|
|
|
<% cost_types.each do |cost_type| %> |
|
|
|
|
<% odd_even = cycle('odd', 'even') %> |
|
|
|
|
<tr class="<%= odd_even %>"> |
|
|
|
|
<%= content_tag :td, link_to(cost_type.name, cost_type) %> |
|
|
|
|
<%= content_tag :td, link_to(cost_type.name, {:controller => '/cost_types', :action => 'edit', :id => cost_type}) %> |
|
|
|
|
<%= content_tag :td, cost_type.unit %> |
|
|
|
|
<%= content_tag :td, cost_type.unit_plural %> |
|
|
|
|
<% rate = cost_type.rate_at(@fixed_date) %> |
|
|
|
|
<%= content_tag :td, number_to_currency( rate ? rate.rate : 0.0), :class => "currency", :id => "cost_type_#{cost_type.id}_rate"%> |
|
|
|
|
<td> |
|
|
|
|
<%= form_for cost_type, set_rate_cost_type_path(cost_tyoe) do |f| %> |
|
|
|
|
<%= form_for cost_type, :url => { :controller => '/cost_types', :action => 'set_rate', :id => cost_type } do |f| %> |
|
|
|
|
<label class="hidden-for-sighted" for="<%= "rate_field_#{cost_type.id}" %>"><%= l(:caption_set_rate) %></label> |
|
|
|
|
<%= f.text_field :rate, :value => "", :name => :rate, :size => 7, :id => "rate_field_#{cost_type.id}" %> <%= Setting.plugin_openproject_costs['costs_currency'] %> |
|
|
|
|
<%= image_submit_tag "save.png", :alt => l(:caption_save_rate), :title => l(:caption_save_rate) %> |
|
|
|
@ -31,7 +31,7 @@ |
|
|
|
|
</td> |
|
|
|
|
<%= content_tag :td, cost_type.is_default? ? image_tag('check.png', :alt => l(:general_text_Yes)) : "" %> |
|
|
|
|
<td> |
|
|
|
|
<%= form_for cost_type, toggle_delete_cost_type_path(cost_type) do |f| %> |
|
|
|
|
<%= form_for cost_type, :url => { :controller => '/cost_types', :action => 'toggle_delete', :id => cost_type } do |f| %> |
|
|
|
|
<%= image_submit_tag "locked.png", :alt => l(:button_lock), :title => l(:button_lock), :onclick => "return confirm('#{escape_javascript(l(:text_are_you_sure))}')" %> |
|
|
|
|
<% end %> |
|
|
|
|
</td> |
|
|
|
|