From db25f950841ee874795d4b9605f8ae2347aaf4f1 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 28 Jun 2019 14:42:30 +0000 Subject: [PATCH] Added entity column on cf_custom_fields.php page. --- WEB-INF/resources/ca.lang.php | 9 +++++++-- WEB-INF/resources/cs.lang.php | 10 +++++++--- WEB-INF/resources/da.lang.php | 10 +++++++--- WEB-INF/resources/de.lang.php | 10 +++++++--- WEB-INF/resources/en.lang.php | 8 ++++++-- WEB-INF/resources/es.lang.php | 9 +++++++-- WEB-INF/resources/et.lang.php | 10 +++++++--- WEB-INF/resources/fa.lang.php | 10 +++++++--- WEB-INF/resources/fi.lang.php | 10 +++++++--- WEB-INF/resources/fr.lang.php | 10 +++++++--- WEB-INF/resources/gr.lang.php | 10 +++++++--- WEB-INF/resources/he.lang.php | 10 +++++++--- WEB-INF/resources/hu.lang.php | 9 +++++++-- WEB-INF/resources/it.lang.php | 10 +++++++--- WEB-INF/resources/ja.lang.php | 10 +++++++--- WEB-INF/resources/ko.lang.php | 10 +++++++--- WEB-INF/resources/nl.lang.php | 10 +++++++--- WEB-INF/resources/no.lang.php | 10 +++++++--- WEB-INF/resources/pl.lang.php | 10 +++++++--- WEB-INF/resources/pt-br.lang.php | 10 +++++++--- WEB-INF/resources/pt.lang.php | 10 +++++++--- WEB-INF/resources/ro.lang.php | 9 +++++++-- WEB-INF/resources/ru.lang.php | 8 ++++++-- WEB-INF/resources/sk.lang.php | 10 +++++++--- WEB-INF/resources/sl.lang.php | 9 +++++++-- WEB-INF/resources/sr.lang.php | 10 +++++++--- WEB-INF/resources/sv.lang.php | 10 +++++++--- WEB-INF/resources/tr.lang.php | 10 +++++++--- WEB-INF/resources/zh-cn.lang.php | 10 +++++++--- WEB-INF/resources/zh-tw.lang.php | 10 +++++++--- WEB-INF/templates/cf_custom_fields.tpl | 10 +++++++++- WEB-INF/templates/footer.tpl | 2 +- cf_custom_field_add.php | 6 +++--- cf_custom_fields.php | 2 +- plugins/CustomFields.class.php | 8 ++++---- 35 files changed, 226 insertions(+), 93 deletions(-) diff --git a/WEB-INF/resources/ca.lang.php b/WEB-INF/resources/ca.lang.php index 0f0b4c7f..42c637b1 100644 --- a/WEB-INF/resources/ca.lang.php +++ b/WEB-INF/resources/ca.lang.php @@ -282,6 +282,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. @@ -414,8 +421,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projectes', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/cs.lang.php b/WEB-INF/resources/cs.lang.php index 9000b3b1..0f25aa66 100644 --- a/WEB-INF/resources/cs.lang.php +++ b/WEB-INF/resources/cs.lang.php @@ -292,6 +292,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. @@ -423,9 +430,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'minulý rok', 'dropdown.selected_year' => 'rok', 'dropdown.all_time' => 'od počátku', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projekty', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/da.lang.php b/WEB-INF/resources/da.lang.php index c1767631..0c59b52a 100644 --- a/WEB-INF/resources/da.lang.php +++ b/WEB-INF/resources/da.lang.php @@ -272,6 +272,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktive Brugere', 'label.inactive_users' => 'Inaktive Brugere', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Fejl', // TODO: Translate the following. @@ -396,9 +403,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'år', 'dropdown.all_time' => 'Alt', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'Projekter', 'dropdown.tasks' => 'Opgaver', 'dropdown.clients' => 'Klienter', diff --git a/WEB-INF/resources/de.lang.php b/WEB-INF/resources/de.lang.php index 9fe12dfc..3b6c1a71 100644 --- a/WEB-INF/resources/de.lang.php +++ b/WEB-INF/resources/de.lang.php @@ -261,6 +261,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktive Nutzer', 'label.inactive_users' => 'Inaktive Nutzer', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Fehler', // TODO: Translate the following. @@ -378,9 +385,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'vorheriges Jahr', 'dropdown.selected_year' => 'Jahr', 'dropdown.all_time' => 'Gesamtzeitraum', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'Projekte', 'dropdown.tasks' => 'Aufgaben', 'dropdown.clients' => 'Kunden', diff --git a/WEB-INF/resources/en.lang.php b/WEB-INF/resources/en.lang.php index 7d25fd69..851c8f93 100644 --- a/WEB-INF/resources/en.lang.php +++ b/WEB-INF/resources/en.lang.php @@ -248,6 +248,12 @@ $i18n_key_words = array( 'label.active_users' => 'Active Users', 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +'entity.time' => 'time', +'entity.user' => 'user', +'entity.project' => 'project', + // Form titles. 'title.error' => 'Error', 'title.success' => 'Success', @@ -363,8 +369,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'year', 'dropdown.all_time' => 'all time', -'dropdown.time' => 'time', -'dropdown.user' => 'user', 'dropdown.projects' => 'projects', 'dropdown.tasks' => 'tasks', 'dropdown.clients' => 'clients', diff --git a/WEB-INF/resources/es.lang.php b/WEB-INF/resources/es.lang.php index 44ed2567..cae02943 100644 --- a/WEB-INF/resources/es.lang.php +++ b/WEB-INF/resources/es.lang.php @@ -285,6 +285,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -414,8 +421,6 @@ $i18n_key_words = array( 'dropdown.selected_year' => 'año', // TODO: translate the following. // 'dropdown.all_time' => 'all time', -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'proyectos', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/et.lang.php b/WEB-INF/resources/et.lang.php index 34a7239b..fbe2e88c 100644 --- a/WEB-INF/resources/et.lang.php +++ b/WEB-INF/resources/et.lang.php @@ -278,6 +278,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktiivsed kasutajad', 'label.inactive_users' => 'Mitteaktiivsed kasutajad', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. @@ -401,9 +408,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'eelmine aasta', 'dropdown.selected_year' => 'aasta', 'dropdown.all_time' => 'kõik ajavahemikud', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projektid', 'dropdown.tasks' => 'tööülesanded', 'dropdown.clients' => 'kliendid', diff --git a/WEB-INF/resources/fa.lang.php b/WEB-INF/resources/fa.lang.php index 3095a87e..13a2d5f4 100644 --- a/WEB-INF/resources/fa.lang.php +++ b/WEB-INF/resources/fa.lang.php @@ -283,6 +283,13 @@ $i18n_key_words = array( 'label.active_users' => 'کاربران فعال', 'label.inactive_users' => 'کاربران غیرفعال', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'خطا', // TODO: Translate the following. @@ -407,9 +414,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', 'dropdown.all_time' => 'همه زمان ها', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'پروژه ها', 'dropdown.tasks' => 'وظایف', 'dropdown.clients' => 'مشتریان', diff --git a/WEB-INF/resources/fi.lang.php b/WEB-INF/resources/fi.lang.php index 752c6ffd..4421b889 100644 --- a/WEB-INF/resources/fi.lang.php +++ b/WEB-INF/resources/fi.lang.php @@ -276,6 +276,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktiiviset käyttäjät', 'label.inactive_users' => 'Ei-aktiiviset käyttäjät', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Virhe', // TODO: Translate the following. @@ -396,9 +403,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'vuosi', 'dropdown.all_time' => 'kaikki tunnit', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projektit', 'dropdown.tasks' => 'tehtävät', 'dropdown.clients' => 'asiakkaat', diff --git a/WEB-INF/resources/fr.lang.php b/WEB-INF/resources/fr.lang.php index ff7e4e6f..3a5ce78a 100644 --- a/WEB-INF/resources/fr.lang.php +++ b/WEB-INF/resources/fr.lang.php @@ -270,6 +270,13 @@ $i18n_key_words = array( 'label.active_users' => 'Utilisateurs actifs', 'label.inactive_users' => 'Utilisateurs inactifs', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Erreur', // TODO: Translate the following. @@ -388,9 +395,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'année dernière', 'dropdown.selected_year' => 'année', 'dropdown.all_time' => 'depuis toujours', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'Projets', 'dropdown.tasks' => 'Tâches', 'dropdown.clients' => 'Clients', diff --git a/WEB-INF/resources/gr.lang.php b/WEB-INF/resources/gr.lang.php index 1e3c8be9..65e73180 100644 --- a/WEB-INF/resources/gr.lang.php +++ b/WEB-INF/resources/gr.lang.php @@ -265,6 +265,13 @@ $i18n_key_words = array( 'label.active_users' => 'Ενεργοί χρήστες', 'label.inactive_users' => 'Ανενεργοί χρήστες', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Σφάλμα', // TODO: Translate the following. @@ -386,9 +393,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'προηγούμενο έτος', 'dropdown.selected_year' => 'έτος', 'dropdown.all_time' => 'όλη την περίοδο', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'έργα', 'dropdown.tasks' => 'εργασίες', 'dropdown.clients' => 'πελάτες', diff --git a/WEB-INF/resources/he.lang.php b/WEB-INF/resources/he.lang.php index 2905e274..3aee8065 100644 --- a/WEB-INF/resources/he.lang.php +++ b/WEB-INF/resources/he.lang.php @@ -291,6 +291,13 @@ $i18n_key_words = array( 'label.active_users' => 'משתמשים פעילים', 'label.inactive_users' => 'משתמשים לא פעילים', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'שגיאה', // TODO: Translate the following. @@ -413,9 +420,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'שנה', 'dropdown.all_time' => 'הכל', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'פרוייקטים', 'dropdown.tasks' => 'משימות', 'dropdown.clients' => 'לקוחות', diff --git a/WEB-INF/resources/hu.lang.php b/WEB-INF/resources/hu.lang.php index d44c8d8a..a998dd86 100644 --- a/WEB-INF/resources/hu.lang.php +++ b/WEB-INF/resources/hu.lang.php @@ -288,6 +288,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -416,8 +423,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projektek', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/it.lang.php b/WEB-INF/resources/it.lang.php index a1efcd52..4f6368bd 100644 --- a/WEB-INF/resources/it.lang.php +++ b/WEB-INF/resources/it.lang.php @@ -269,6 +269,13 @@ $i18n_key_words = array( 'label.active_users' => 'Utenti attivi', 'label.inactive_users' => 'Utenti inattivi', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. @@ -396,9 +403,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'anno precedente', 'dropdown.selected_year' => 'anno', 'dropdown.all_time' => 'tutto il tempo', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'progetti', 'dropdown.tasks' => 'compiti', 'dropdown.clients' => 'clienti', diff --git a/WEB-INF/resources/ja.lang.php b/WEB-INF/resources/ja.lang.php index 1fadd683..8a723bae 100644 --- a/WEB-INF/resources/ja.lang.php +++ b/WEB-INF/resources/ja.lang.php @@ -292,6 +292,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -419,9 +426,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => '昨年', 'dropdown.selected_year' => '年', 'dropdown.all_time' => 'すべての時間', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'プロジェクト', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/ko.lang.php b/WEB-INF/resources/ko.lang.php index 115a96a5..c2957e16 100644 --- a/WEB-INF/resources/ko.lang.php +++ b/WEB-INF/resources/ko.lang.php @@ -292,6 +292,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -422,9 +429,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', 'dropdown.all_time' => '전시간', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => '프로젝트', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/nl.lang.php b/WEB-INF/resources/nl.lang.php index 58d3aaaa..c8346553 100644 --- a/WEB-INF/resources/nl.lang.php +++ b/WEB-INF/resources/nl.lang.php @@ -250,6 +250,13 @@ $i18n_key_words = array( 'label.active_users' => 'Actieve medewerkers', 'label.inactive_users' => 'Inactieve medewerkers', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Fout', 'title.success' => 'Succes', @@ -363,9 +370,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'vorig jaar', 'dropdown.selected_year' => 'jaar', 'dropdown.all_time' => 'alles', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projecten', 'dropdown.tasks' => 'taken', 'dropdown.clients' => 'klanten', diff --git a/WEB-INF/resources/no.lang.php b/WEB-INF/resources/no.lang.php index 27d6a91b..8fb7bf64 100644 --- a/WEB-INF/resources/no.lang.php +++ b/WEB-INF/resources/no.lang.php @@ -289,6 +289,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -417,9 +424,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'prosjekter', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/pl.lang.php b/WEB-INF/resources/pl.lang.php index aa6a2cef..d77a7b4a 100644 --- a/WEB-INF/resources/pl.lang.php +++ b/WEB-INF/resources/pl.lang.php @@ -277,6 +277,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktywni użytkownicy', 'label.inactive_users' => 'Nieaktywni użytkownicy', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Błąd', // TODO: Translate the following. @@ -399,9 +406,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'rok', 'dropdown.all_time' => 'od początku', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projekty', 'dropdown.tasks' => 'zadania', 'dropdown.clients' => 'klienci', diff --git a/WEB-INF/resources/pt-br.lang.php b/WEB-INF/resources/pt-br.lang.php index 3d1d0abe..7165cb51 100644 --- a/WEB-INF/resources/pt-br.lang.php +++ b/WEB-INF/resources/pt-br.lang.php @@ -274,6 +274,13 @@ $i18n_key_words = array( 'label.active_users' => 'Usuários ativos', 'label.inactive_users' => 'Usuários inativos', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Erro', // TODO: Translate the following. @@ -394,9 +401,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'ano', 'dropdown.all_time' => 'todas as datas', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projetos', 'dropdown.tasks' => 'tarefas', 'dropdown.clients' => 'clientes', diff --git a/WEB-INF/resources/pt.lang.php b/WEB-INF/resources/pt.lang.php index 2720464a..6c002439 100644 --- a/WEB-INF/resources/pt.lang.php +++ b/WEB-INF/resources/pt.lang.php @@ -277,6 +277,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -402,9 +409,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projetos', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/ro.lang.php b/WEB-INF/resources/ro.lang.php index 64b4551c..a66f5e4e 100644 --- a/WEB-INF/resources/ro.lang.php +++ b/WEB-INF/resources/ro.lang.php @@ -289,6 +289,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each // page is about and is "consistent" from page to page, meaning that correct grammar is used everywhere. @@ -420,8 +427,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'proiecte', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/ru.lang.php b/WEB-INF/resources/ru.lang.php index 980aa466..93c88dd8 100644 --- a/WEB-INF/resources/ru.lang.php +++ b/WEB-INF/resources/ru.lang.php @@ -247,6 +247,12 @@ $i18n_key_words = array( 'label.active_users' => 'Активные пользователи', 'label.inactive_users' => 'Неактивные пользователи', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +'entity.time' => 'время', +'entity.user' => 'пользователь', +'entity.project' => 'проект', + // Form titles. 'title.error' => 'Ошибка', 'title.success' => 'Успех', @@ -360,8 +366,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'прошлый год', 'dropdown.selected_year' => 'год', 'dropdown.all_time' => 'всё время', -'dropdown.time' => 'время', -'dropdown.user' => 'пользователь', 'dropdown.projects' => 'проекты', 'dropdown.tasks' => 'задачи', 'dropdown.clients' => 'клиенты', diff --git a/WEB-INF/resources/sk.lang.php b/WEB-INF/resources/sk.lang.php index 56d14f66..a1ebcb55 100644 --- a/WEB-INF/resources/sk.lang.php +++ b/WEB-INF/resources/sk.lang.php @@ -281,6 +281,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktívny používatelia', 'label.inactive_users' => 'Neaktívny používatelia', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Chyba', // TODO: Translate the following. @@ -403,9 +410,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'rok', 'dropdown.all_time' => 'celý čas', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projekty', 'dropdown.tasks' => 'úlohy', // TODO: translate the following. diff --git a/WEB-INF/resources/sl.lang.php b/WEB-INF/resources/sl.lang.php index db54f19e..0dac806e 100644 --- a/WEB-INF/resources/sl.lang.php +++ b/WEB-INF/resources/sl.lang.php @@ -272,6 +272,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -394,8 +401,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', // 'dropdown.all_time' => 'all time', -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projekti', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/sr.lang.php b/WEB-INF/resources/sr.lang.php index eb8f3ebf..e73ae464 100644 --- a/WEB-INF/resources/sr.lang.php +++ b/WEB-INF/resources/sr.lang.php @@ -275,6 +275,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktivni korisnik', 'label.inactive_users' => 'Neaktivni korisnik', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. 'title.error' => 'Greška', // TODO: Translate the following. @@ -397,9 +404,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => 'godina', 'dropdown.all_time' => 'svi datumi', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projekti', 'dropdown.tasks' => 'zadaci', 'dropdown.clients' => 'klijenti', diff --git a/WEB-INF/resources/sv.lang.php b/WEB-INF/resources/sv.lang.php index c17662ba..c6bf2f41 100644 --- a/WEB-INF/resources/sv.lang.php +++ b/WEB-INF/resources/sv.lang.php @@ -272,6 +272,13 @@ $i18n_key_words = array( 'label.active_users' => 'Aktiva användare', 'label.inactive_users' => 'Inaktiva användare', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Rubriker för formulär 'title.error' => 'Fel', // TODO: Translate the following. @@ -396,9 +403,6 @@ $i18n_key_words = array( 'dropdown.previous_year' => 'Föregående år', 'dropdown.selected_year' => 'År', 'dropdown.all_time' => 'Livstid', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'Projekt', 'dropdown.tasks' => 'Arbetsuppgifter', 'dropdown.clients' => 'Kunder', diff --git a/WEB-INF/resources/tr.lang.php b/WEB-INF/resources/tr.lang.php index 5701f562..d07275ff 100644 --- a/WEB-INF/resources/tr.lang.php +++ b/WEB-INF/resources/tr.lang.php @@ -296,6 +296,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // Form titles. // TODO: Improve titles for consistency, so that each title explains correctly what each @@ -428,9 +435,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', 'dropdown.all_time' => 'tüm zamanlar', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => 'projeler', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/zh-cn.lang.php b/WEB-INF/resources/zh-cn.lang.php index dce6df85..e5244c07 100644 --- a/WEB-INF/resources/zh-cn.lang.php +++ b/WEB-INF/resources/zh-cn.lang.php @@ -281,6 +281,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -409,9 +416,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', // 'dropdown.selected_year' => 'year', 'dropdown.all_time' => '全部时间', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => '项目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/resources/zh-tw.lang.php b/WEB-INF/resources/zh-tw.lang.php index a18cb213..f5d9e9b3 100644 --- a/WEB-INF/resources/zh-tw.lang.php +++ b/WEB-INF/resources/zh-tw.lang.php @@ -287,6 +287,13 @@ $i18n_key_words = array( // 'label.active_users' => 'Active Users', // 'label.inactive_users' => 'Inactive Users', +// Entity names. We use lower case (in English) because they are used in dropdowns, too. +// They are used to associate a custom field with an entity type. +// TODO: translate the following. +// 'entity.time' => 'time', +// 'entity.user' => 'user', +// 'entity.project' => 'project', + // Form titles. // TODO: Translate the following. // 'title.error' => 'Error', @@ -414,9 +421,6 @@ $i18n_key_words = array( // 'dropdown.previous_year' => 'previous year', 'dropdown.selected_year' => '年', 'dropdown.all_time' => '全部時間', -// TODO: translate the following. -// 'dropdown.time' => 'time', -// 'dropdown.user' => 'user', 'dropdown.projects' => '項目', // TODO: translate the following. // 'dropdown.tasks' => 'tasks', diff --git a/WEB-INF/templates/cf_custom_fields.tpl b/WEB-INF/templates/cf_custom_fields.tpl index 5d254e9c..e64f1815 100644 --- a/WEB-INF/templates/cf_custom_fields.tpl +++ b/WEB-INF/templates/cf_custom_fields.tpl @@ -5,7 +5,8 @@ {if $user->can('manage_custom_fields')} - + + @@ -15,6 +16,13 @@ {foreach $custom_fields as $field} + {if CustomFields::ENTITY_TIME == $field['entity_type']} + + {elseif CustomFields::ENTITY_USER == $field['entity_type']} + + {else} + + {/if} {if CustomFields::TYPE_TEXT == $field['type']} diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 3beac641..23519575 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
{$i18n.label.thing_name}{$i18n.label.thing_name}{$i18n.label.entity} {$i18n.label.type} {$i18n.menu.options}
{$field['label']|escape}{$i18n.entity.time}{$i18n.entity.user}{$i18n.label.type_text}
-
 Anuko Time Tracker 1.19.6.5020 | Copyright © Anuko | +  Anuko Time Tracker 1.19.6.5021 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/cf_custom_field_add.php b/cf_custom_field_add.php index e4a919eb..e8de69e7 100644 --- a/cf_custom_field_add.php +++ b/cf_custom_field_add.php @@ -41,7 +41,7 @@ if (!$user->isPluginEnabled('cf')) { } $fields = CustomFields::getFields(); // Deny access when max number of custom fields is already set. -if (count($fields) >= 1) { +if (count($fields) >= 1 && !isTrue('CF_DEBUG')) { header('Location: access_denied.php'); exit(); } @@ -59,8 +59,8 @@ if ($request->isPost()) { $form = new Form('fieldForm'); $form->addInput(array('type'=>'text','maxlength'=>'100','name'=>'name','value'=>'')); $form->addInput(array('type'=>'combobox','name'=>'entity', - 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('dropdown.time'), - CustomFields::ENTITY_USER=>$i18n->get('dropdown.user')) + 'data'=>array(CustomFields::ENTITY_TIME=>$i18n->get('entity.time'), + CustomFields::ENTITY_USER=>$i18n->get('entity.user')) )); $form->addInput(array('type'=>'combobox','name'=>'type', 'data'=>array(CustomFields::TYPE_TEXT=>$i18n->get('label.type_text'), diff --git a/cf_custom_fields.php b/cf_custom_fields.php index 6de626cc..d877e7c4 100644 --- a/cf_custom_fields.php +++ b/cf_custom_fields.php @@ -54,7 +54,7 @@ if ($request->isPost()) { $fields = CustomFields::getFields(); // At this time only one custom field is supported. Disable the Add button if we already have one or more custom fields. - if (count($fields) > 0) + if (count($fields) > 0 && !isTrue('CF_DEBUG')) $form->getElement('btn_add')->setEnabled(false); } diff --git a/plugins/CustomFields.class.php b/plugins/CustomFields.class.php index a0c49ec5..f36a4263 100644 --- a/plugins/CustomFields.class.php +++ b/plugins/CustomFields.class.php @@ -249,12 +249,12 @@ class CustomFields { $org_id = $user->org_id; $fields = array(); - $sql = "select id, type, label from tt_custom_fields". + $sql = "select id, entity_type, type, label from tt_custom_fields". " where group_id = $group_id and org_id = $org_id and status = 1 and type > 0"; $res = $mdb2->query($sql); if (!is_a($res, 'PEAR_Error')) { while ($val = $res->fetchRow()) { - $fields[] = array('id'=>$val['id'],'type'=>$val['type'],'label'=>$val['label']); + $fields[] = $val; // array('id'=>$val['id'],'type'=>$val['type'],'label'=>$val['label']); } return $fields; } @@ -308,8 +308,8 @@ class CustomFields { $group_id = $user->getGroup(); $org_id = $user->org_id; - $sql = "insert into tt_custom_fields (group_id, org_id, type, label, required, status)". - " values($group_id, $org_id, $field_type, ".$mdb2->quote($field_name).", $required, 1)"; + $sql = "insert into tt_custom_fields (group_id, org_id, entity_type, type, label, required, status)". + " values($group_id, $org_id, $entity_type, $field_type, ".$mdb2->quote($field_name).", $required, 1)"; $affected = $mdb2->exec($sql); return (!is_a($affected, 'PEAR_Error')); } -- 2.20.1