diff --git a/app/views/users/_rates.html.erb b/app/views/users/_rates.html.erb index 7e6e203..7e5494c 100644 --- a/app/views/users/_rates.html.erb +++ b/app/views/users/_rates.html.erb @@ -1,3 +1,46 @@ +

<%= 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') %> + + <%= + # TODO: Move to a partial, might have to send include in the Redmine helpers + projects = Project.find(:all, :conditions => { :status => Project::STATUS_ACTIVE}, :include => :parent) + result = [] + user_projects_by_root = projects.group_by(&:root) + user_projects_by_root.keys.sort.each do |root| + result << [h(root.name), root.id] + user_projects_by_root[root].sort.each do |project| + next if project == root + result << ["ยป #{h(project.name)}", project.id] + end + end + + select_tag("project", options_for_select(result)) +%> + + <%= l(:rate_label_currency) %> <%= text_field_tag "rate", nil, :size => 10 %> + + <%= submit_tag l(:button_add),:class => 'button-small' -%> +
+<% end %> +

<%= l(:rate_label_rate_history) %>

<%# TODO: Refactor out of the view once there is a hook in the controller (Post 0.8.0). %> <%# Can't expect everyone to upgrade at the moment %> diff --git a/lang/en.yml b/lang/en.yml index a5ddd1d..648deac 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -2,4 +2,5 @@ rate_label_rates: Rates rate_label_rate: Rate rate_label_rate_history: Rate History - +rate_label_new_rate: New Rate +rate_label_currency: $