%= render :partial => 'shared/costs_header' %>
<%= @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, :url => {:action => 'update', :project_id => @project}, :method => :put do |f| %>
<%= back_url_hidden_field_tag %>
<%= error_messages_for 'user' %>
<%= Rate.human_attribute_name(:valid_from) %> |
<%= Rate.model_name.human %> |
|
<%- @rates.each_with_index do |rate, index| -%>
<%= render :partial => 'rate', :object => rate, :locals => {:index => index, :classes => cycle('odd', 'even')} %>
<%- end -%>
<%= link_to_function l(:button_add_rate), "addRate($('add_rate_date'))", {:class => "icon icon-add"} %>
<%= submit_tag l(:button_save) %>
<% end %>