diff --git a/app/views/rates/_form.html.erb b/app/views/rates/_form.html.erb index 1a8dde5..db0849b 100644 --- a/app/views/rates/_form.html.erb +++ b/app/views/rates/_form.html.erb @@ -1,4 +1,4 @@ -<% form_tag('/todo') do |f| %> +<% form_for(@rate) do |f| %>
| <%= l(:label_date) %> | @@ -12,7 +12,7 @@ <%= text_field_tag "date_from", nil, :size => 10 %><%= calendar_for('date_from') %>
- <%=
+ <%= # TODO: move to controller once a hook is in place for the Admin panel
projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}, :include => :parent)
select_tag("project",projects_options_for_select(projects))
%>
diff --git a/app/views/rates/new.html.erb b/app/views/rates/new.html.erb
index 0452d95..d32d31c 100644
--- a/app/views/rates/new.html.erb
+++ b/app/views/rates/new.html.erb
@@ -1,27 +1,3 @@
-New rate+<%= l(:rate_label_new_rate) %>-<% form_for(@rate) do |f| %> - <%= f.error_messages %> - -
- <%= f.label :amount %>
- <%= f.label :user_id %>
- <%= f.label :project_id %>
- <%= f.label :date_in_effect %> - <%= f.submit "Create" %> - -<% end %> - -<%= link_to 'Back', rates_path %> +<%= render :partial => 'rates/form' %> diff --git a/app/views/users/_rates.html.erb b/app/views/users/_rates.html.erb index 5af545e..56f9be1 100644 --- a/app/views/users/_rates.html.erb +++ b/app/views/users/_rates.html.erb @@ -1,5 +1,6 @@<%= l(:rate_label_new_rate) %>+<% @rate = Rate.new(:user => @user ) %> <%= render :partial => 'rates/form' %><%= l(:rate_label_rate_history) %> |
|---|