<%= @project.nil? ? l(:caption_default_rate_history_for, :user => @user.name) : l(:caption_rate_history_for_project, :user => @user.name, :project => @project.name) %>

<%- default_rate = @user.current_default_rate -%> <% if default_rate%>

<%= l(:label_current_default_rate) %>: <%= number_to_currency(default_rate.rate)%>

<% end %> <% javascript_tag do -%> RatesForm = new Subform('<%= escape_javascript(render(:partial => "rate", :object => HourlyRate.new )) %>',<%= @rates.length %>,'rates_body'); <% end -%> <% labelled_tabular_form_for :user, @user, :url => {:action => 'edit'} do |f| %> <%= back_url_hidden_field_tag %> <%= error_messages_for 'user' %> <%- @rates.each_with_index do |rate, index| -%> <%= render :partial => 'rate', :object => rate, :locals => {:index => index, :classes => cycle('odd', 'even')} %> <%- end -%>
<%= l(:label_valid_from) %> <%= l(:label_rate) %>
<%= text_field_tag :add_rate_date, "", :size => 10, :value => Date.today %><%= calendar_for("add_rate_date") %> <%= link_to_function l(:button_add_rate), "addRate($('add_rate_date'))", {:class => "icon icon-add"} %>
<%= submit_tag l(:button_save) %>
<% end %> <% content_for :header_tags do %> <%= javascript_include_tag 'subform', :plugin => 'redmine_costs' %> <%= javascript_include_tag 'cost_types', :plugin => 'redmine_costs' %> <% end %>