From 60088ed5a30408eb99207c11509deb888494846b 2012-12-09 19:25:03 From: Jean-Philippe Lang Date: 2012-12-09 19:25:03 Subject: [PATCH] Adds filters for custom fields related to the project and user of time entries (#10191). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10971 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/time_entry_query.rb b/app/models/time_entry_query.rb index 4cb9932..60fc843 100644 --- a/app/models/time_entry_query.rb +++ b/app/models/time_entry_query.rb @@ -88,6 +88,7 @@ class TimeEntryQuery < Query } unless activities.empty? add_custom_fields_filters(TimeEntryCustomField.where(:is_filter => true).all) + add_associations_custom_fields_filters :project, :user @available_filters.each do |field, options| options[:name] ||= l(options[:label] || "field_#{field}".gsub(/_id$/, '')) diff --git a/config/locales/ar.yml b/config/locales/ar.yml index d1cbc19..e1e069a 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -1081,3 +1081,4 @@ ar: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 59e4f5f..8567b63 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -1079,3 +1079,4 @@ bg: description_date_from: Въведете начална дата description_date_to: Въведете крайна дата text_repository_identifier_info: 'Позволени са малки букви (a-z), цифри, тирета и _.
Промяна след създаването му не е възможна.' + label_attribute_of_user: User's %{name} diff --git a/config/locales/bs.yml b/config/locales/bs.yml index 2e4d26f..df51bb4 100644 --- a/config/locales/bs.yml +++ b/config/locales/bs.yml @@ -1094,3 +1094,4 @@ bs: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/ca.yml b/config/locales/ca.yml index e8b188a..d64f21b 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -1083,3 +1083,4 @@ ca: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 847563f..0c5182e 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -1084,3 +1084,4 @@ cs: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/da.yml b/config/locales/da.yml index 84aaf4e..31d47f2 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -1098,3 +1098,4 @@ da: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/de.yml b/config/locales/de.yml index b39b2a9..5fffb24 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1097,3 +1097,4 @@ de: setting_non_working_week_days: Arbeitsfreie Tage label_in_the_next_days: in den nächsten label_in_the_past_days: in den letzten + label_attribute_of_user: User's %{name} diff --git a/config/locales/el.yml b/config/locales/el.yml index 59c61af..6c85d35 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -1081,3 +1081,4 @@ el: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 8f38625..d7a425f 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -1083,3 +1083,4 @@ en-GB: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/en.yml b/config/locales/en.yml index ecd15a3..1e359f6 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -884,6 +884,7 @@ en: label_attribute_of_project: "Project's %{name}" label_attribute_of_author: "Author's %{name}" label_attribute_of_assigned_to: "Assignee's %{name}" + label_attribute_of_user: "User's %{name}" label_attribute_of_fixed_version: "Target version's %{name}" label_cross_project_descendants: With subprojects label_cross_project_tree: With project tree diff --git a/config/locales/es.yml b/config/locales/es.yml index f66726d..0ec25d7 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1118,3 +1118,4 @@ es: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/et.yml b/config/locales/et.yml index 57d838f..bd8cf0c 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -1094,3 +1094,4 @@ et: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 9a2aa1c..0cf760e 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -1082,3 +1082,4 @@ eu: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/fa.yml b/config/locales/fa.yml index bab8e17..c882c9a 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -1083,3 +1083,4 @@ fa: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/fi.yml b/config/locales/fi.yml index 213b27a..33169f2 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -1102,3 +1102,4 @@ fi: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7ef4932..398f1b3 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -859,6 +859,7 @@ fr: label_attribute_of_project: "%{name} du projet" label_attribute_of_author: "%{name} de l'auteur" label_attribute_of_assigned_to: "%{name} de l'assigné" + label_attribute_of_user: "%{name} de l'utilisateur" label_attribute_of_fixed_version: "%{name} de la version cible" label_cross_project_descendants: Avec les sous-projets label_cross_project_tree: Avec tout l'arbre diff --git a/config/locales/gl.yml b/config/locales/gl.yml index ca7d3e5..4287660 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -1092,3 +1092,4 @@ gl: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/he.yml b/config/locales/he.yml index 2309de6..7f49ac5 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1086,3 +1086,4 @@ he: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/hr.yml b/config/locales/hr.yml index bdf019d..82e969d 100644 --- a/config/locales/hr.yml +++ b/config/locales/hr.yml @@ -1082,3 +1082,4 @@ hr: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 8e9bbb3..901f5f2 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -1100,3 +1100,4 @@ setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/id.yml b/config/locales/id.yml index 44f270e..6d76f16 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -1085,3 +1085,4 @@ id: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/it.yml b/config/locales/it.yml index 61ec242..0d83e6e 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -1082,3 +1082,4 @@ it: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/ja.yml b/config/locales/ja.yml index f46b3be..5fe7e5c 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -1111,3 +1111,4 @@ ja: setting_non_working_week_days: 休業日 label_in_the_next_days: 今後○日 label_in_the_past_days: 過去○日 + label_attribute_of_user: User's %{name} diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 7243281..d2d6924 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -1131,3 +1131,4 @@ ko: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/lt.yml b/config/locales/lt.yml index 340a0d8..190caa3 100644 --- a/config/locales/lt.yml +++ b/config/locales/lt.yml @@ -1140,3 +1140,4 @@ lt: setting_non_working_week_days: Nedarbo dienos label_in_the_next_days: per ateinančias label_in_the_past_days: per paskutines + label_attribute_of_user: User's %{name} diff --git a/config/locales/lv.yml b/config/locales/lv.yml index 5b25177..2bfbb25 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -1075,3 +1075,4 @@ lv: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/mk.yml b/config/locales/mk.yml index 2ced4c3..5e078df 100644 --- a/config/locales/mk.yml +++ b/config/locales/mk.yml @@ -1081,3 +1081,4 @@ mk: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/mn.yml b/config/locales/mn.yml index 2594d4c..8fbe12a 100644 --- a/config/locales/mn.yml +++ b/config/locales/mn.yml @@ -1082,3 +1082,4 @@ mn: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 87a67d2..6f8aa68 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1063,3 +1063,4 @@ nl: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/no.yml b/config/locales/no.yml index 2d629ad..a1fe6dd 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -1071,3 +1071,4 @@ setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/pl.yml b/config/locales/pl.yml index ec67dfb..3b0c350 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1098,3 +1098,4 @@ pl: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index f2dcbc2..754d4d6 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -1102,3 +1102,4 @@ pt-BR: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/pt.yml b/config/locales/pt.yml index 30ea617..d3e0f27 100644 --- a/config/locales/pt.yml +++ b/config/locales/pt.yml @@ -1086,3 +1086,4 @@ pt: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/ro.yml b/config/locales/ro.yml index cf24e81..70f7d69 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -1078,3 +1078,4 @@ ro: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 0fc48ba..5def59a 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1194,3 +1194,4 @@ ru: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sk.yml b/config/locales/sk.yml index f3b3b61..e3f666d 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -1081,3 +1081,4 @@ sk: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 3994c00..a0f0ee0 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1081,3 +1081,4 @@ sl: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 1114986..4f75bbd 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -1077,3 +1077,4 @@ sq: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sr-YU.yml b/config/locales/sr-YU.yml index 488c8c6..018eb78 100644 --- a/config/locales/sr-YU.yml +++ b/config/locales/sr-YU.yml @@ -1083,3 +1083,4 @@ sr-YU: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 94198fd..9caeab4 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -1082,3 +1082,4 @@ sr: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 27227ae..dd85c05 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -1119,3 +1119,4 @@ sv: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/th.yml b/config/locales/th.yml index b253a82..bbd8c33 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -1078,3 +1078,4 @@ th: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/tr.yml b/config/locales/tr.yml index b31dd8d..f85fb02 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -1100,3 +1100,4 @@ tr: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/uk.yml b/config/locales/uk.yml index 4930ef2..252d3e0 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1076,3 +1076,4 @@ uk: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/vi.yml b/config/locales/vi.yml index a253ca0..9e99cb3 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -1132,3 +1132,4 @@ vi: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name} diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 4cd62db..eff896b 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -1162,3 +1162,4 @@ description_date_from: 輸入起始日期 description_date_to: 輸入結束日期 text_repository_identifier_info: '僅允許使用小寫英文字母 (a-z), 阿拉伯數字, 虛線與底線。
一旦儲存之後, 代碼便無法再次被更改。' + label_attribute_of_user: User's %{name} diff --git a/config/locales/zh.yml b/config/locales/zh.yml index 65c2a64..9567af6 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -1085,3 +1085,4 @@ zh: setting_non_working_week_days: Non-working days label_in_the_next_days: in the next label_in_the_past_days: in the past + label_attribute_of_user: User's %{name}