diff --git a/app/views/rates/_form.html.erb b/app/views/rates/_form.html.erb new file mode 100644 index 0000000..1a8dde5 --- /dev/null +++ b/app/views/rates/_form.html.erb @@ -0,0 +1,29 @@ +<% form_tag('/todo') do |f| %> + + + + + + + + + + + + + + + +
<%= l(:label_date) %><%= l(:label_project) %><%= l(:rate_label_rate) %>
+ <%= text_field_tag "date_from", nil, :size => 10 %><%= calendar_for('date_from') %> + + <%= + projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}, :include => :parent) + select_tag("project",projects_options_for_select(projects)) + %> + + <%= l(:rate_label_currency) %> <%= text_field_tag "rate", nil, :size => 10 %> + + <%= submit_tag l(:button_add),:class => 'button-small' -%> +
+<% end %> diff --git a/app/views/users/_rates.html.erb b/app/views/users/_rates.html.erb index d221651..ffc10eb 100644 --- a/app/views/users/_rates.html.erb +++ b/app/views/users/_rates.html.erb @@ -1,34 +1,6 @@

<%= l(:rate_label_new_rate) %>

-<% form_tag('/todo') do |f| %> - - - - - - - - - - - - - - - -
<%= l(:label_date) %><%= l(:label_project) %><%= l(:rate_label_rate) %>
- <%= text_field_tag "date_from", nil, :size => 10 %><%= calendar_for('date_from') %> - - <%= - projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}, :include => :parent) - select_tag("project",projects_options_for_select(projects)) - %> - - <%= l(:rate_label_currency) %> <%= text_field_tag "rate", nil, :size => 10 %> - - <%= submit_tag l(:button_add),:class => 'button-small' -%> -
-<% end %> +<%= render :partial => 'rates/form' %>

<%= l(:rate_label_rate_history) %>

<%# TODO: Refactor out of the view once there is a hook in the controller (Post 0.8.0). %>