From 029a629a1908aa42b9e3aa73b298d5c4c4a5a356 Mon Sep 17 00:00:00 2001 From: hjust Date: Thu, 29 Oct 2009 16:08:51 +0000 Subject: [PATCH] added some labels Merge changes to list bug fixes git-svn-id: https://dev.finn.de/svn/cockpit/trunk@253 7926756e-e54e-46e6-9721-ed318f58905e --- app/models/cost_query.rb | 4 +++- app/views/cost_reports/_group_by.rhtml | 4 ++-- app/views/cost_reports/_list_items.rhtml | 11 +++-------- lang/de.yml | 1 + lang/en.yml | 1 + 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/app/models/cost_query.rb b/app/models/cost_query.rb index 87049aa3ad..b5a3dd3abc 100644 --- a/app/models/cost_query.rb +++ b/app/models/cost_query.rb @@ -267,8 +267,10 @@ class CostQuery < ActiveRecord::Base end grouping_scope(:issues) do - grouping_column(:tracker_id, :fixed_version_id, :subproject_id) + grouping_column :tracker_id, :display => from_field(Tracker, :name) + grouping_column :fixed_version_id, :display => from_field(Version, :name) grouping_column(:cost_object_id, :display => from_field(CostObject, :subject)) + grouping_column :subproject_id, :display => from_field(Project, :name) end grouping_scope(:costs) do diff --git a/app/views/cost_reports/_group_by.rhtml b/app/views/cost_reports/_group_by.rhtml index 5ac6f62206..301da26d9b 100644 --- a/app/views/cost_reports/_group_by.rhtml +++ b/app/views/cost_reports/_group_by.rhtml @@ -9,10 +9,10 @@ <%= - select_tag "group_by[name]", options_for_select(@query.group_by_columns_for_select, (@query.group_by[:name].to_sym unless @query.group_by[:name].blank?)), + select_tag "group_by[name]", options_for_select(@query.group_by_columns_for_select, (@query.group_by[:name].to_s unless @query.group_by[:name].blank?)), :class => "select-small", :onchange => "group_by_changed();" %> <%= - select_tag("group_by[granularity]", options_for_select([[l(:label_year), "year"], [l(:label_month), "month"], [l(:label_week), "week"], [l(:label_day), "day"]], @query.group_by[:granularity]), + select_tag("group_by[granularity]", options_for_select([[l(:label_year), "year"], [l(:label_month), "month"], [l(:label_week), "week"], [l(:label_day_plural), "day"]], @query.group_by[:granularity]), :class => "select-small", :onload => "group_by_changed();", :style => ("display: none" if @query.group_by["name"].blank? || !@query.time_groups.include?(@query.group_by["name"].to_sym))) %> \ No newline at end of file diff --git a/app/views/cost_reports/_list_items.rhtml b/app/views/cost_reports/_list_items.rhtml index 520d5dd070..bfede9d1c2 100644 --- a/app/views/cost_reports/_list_items.rhtml +++ b/app/views/cost_reports/_list_items.rhtml @@ -7,7 +7,6 @@ <%= sort_header_tag("entry__issue_id", :caption => l(:caption_issue), :default_order => 'desc') %> <%= l(:caption_cost_unit_plural) %> - <%= sort_header_tag("entry__cost_type_id", :caption => l(:caption_cost_type), :default_order => 'asc') %> <%= sort_header_tag("entry__activity_id", :caption => l(:label_activity), :default_order => 'asc') %> <%= sort_header_tag("entry__spent_on", :caption => l(:caption_spent), :default_order => 'desc') %> @@ -33,14 +32,10 @@ <%= number_to_currency(entry.real_costs) %> <% end %> - -   - <%= number_to_currency page_costs %> - +

<%= pagination_links_full @entry_pages, @entry_count %>

-

<%= pagination_links_full @entry_pages, @entry_count %>

- -

<%=l :label_overall_costs %>: <%= number_to_currency @entry_sum %>

+
<%= l(:label_costs_per_page)%>: <%= number_to_currency page_costs %>
+
<%=l :label_overall_costs %>: <%= number_to_currency @entry_sum %>
<% end %> diff --git a/lang/de.yml b/lang/de.yml index d7d9b5d672..950321aef3 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -33,6 +33,7 @@ label_cost_object_new: "Neuer Liefergegenstand" label_cost_object_id: "Liefergegenstand #%s" label_view_all_cost_objects: "Alle Liefergegenstände anzeigen" label_overall_costs: "Gesamtkosten" +label_costs_per_page: "Kosten dieser Seite" label_spent_costs: "Gebuchte Kosten" label_spent_units: "Gebuchte Einheiten" label_cost_plural: "Kosten" diff --git a/lang/en.yml b/lang/en.yml index c79c19fc8d..c8e044347e 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -33,6 +33,7 @@ label_cost_object_new: "New Cost Object" label_cost_object_id: "Cost Object #%s" label_view_all_cost_objects: "View all Cost Objects" label_overall_costs: "Overall costs" +label_costs_per_page: "Costs per page" label_spent_costs: "Spent costs" label_spent_units: "Spent units" label_cost_plural: "Costs"