From 52585c5a91b65e944602573ba79fed0da355cd37 Mon Sep 17 00:00:00 2001 From: hjust Date: Mon, 21 Dec 2009 17:25:16 +0000 Subject: [PATCH] display "booked on project" for time entries which were not booked on any issue. git-svn-id: https://dev.finn.de/svn/cockpit/trunk@436 7926756e-e54e-46e6-9721-ed318f58905e --- app/models/cost_query.rb | 2 +- app/views/cost_reports/_list_items.rhtml | 2 +- config/locales/de.yml | 4 ++-- config/locales/en.yml | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/models/cost_query.rb b/app/models/cost_query.rb index ba348b24a8..4bbf4cd523 100644 --- a/app/models/cost_query.rb +++ b/app/models/cost_query.rb @@ -277,7 +277,7 @@ class CostQuery < ActiveRecord::Base grouping_scope(:costs) do grouping_column :user_id, :display => from_field(User, :name) - grouping_column :issue_id, :display => from_field(Issue, :subject) + grouping_column :issue_id, :display => from_field(Issue, :subject), :other_group => "#{l(:caption_booked_on_project)}" grouping_column :cost_type_id, :display => from_field(CostType, :name), :other_group => l(:caption_labor_costs) grouping_column :activity_id, :display => from_field(Enumeration, :name) grouping_column(:spent_on, :tyear, :tmonth, :tweek, :time => true) do |column, fields| diff --git a/app/views/cost_reports/_list_items.rhtml b/app/views/cost_reports/_list_items.rhtml index a1ca48f204..2eaffff59f 100644 --- a/app/views/cost_reports/_list_items.rhtml +++ b/app/views/cost_reports/_list_items.rhtml @@ -19,7 +19,7 @@ <% page_costs += entry.real_costs if entry.costs_visible_by?(User.current)%> icon">  - <%= link_to_issue entry.issue if entry.issue %> + <%= entry.issue ? link_to_issue(entry.issue) : l(:caption_booked_on_project) %> <%= (link_to pluralize(entry.units, entry.cost_type.unit, entry.cost_type.unit_plural), {:controller => "costlog", :action => "details", diff --git a/config/locales/de.yml b/config/locales/de.yml index 43c23159ce..f73d285a37 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -4,6 +4,7 @@ de: one: "1 Eintrag" other: "{{count}} Einträge" + caption_booked_on_project: "Auf das Projekt gebucht" field_labor_budget: Arbeitszeitbudget caption_budget_ratio: Verbrauchtes Budget @@ -49,8 +50,7 @@ de: label_kind: Art permission_view_cost_entries: Gebuchte Kosten ansehen label_cost_report: Report - label_rate_plural: !binary | - U8OkdHpl + label_rate_plural: Sätze field_kind: Typ help_override_rate: "Hier einen Wert eingeben um den Standardwert zu \xC3\xBCberschreiben." diff --git a/config/locales/en.yml b/config/locales/en.yml index 2249c652be..d0c45bfcf2 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -70,6 +70,7 @@ en: caption_cost_type_unit_name: Unit Name caption_material_budget: Material Budget caption_rate: Rate + caption_booked_on_project: "Booked on Project" button_add_cost_object: Add Cost Object button_add_budget_item: Add budget item