From 99db4ec3cefa94c7af46b62511691f638fe6268a Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 21 Jan 2021 11:08:57 +0100 Subject: [PATCH] Adapted empfehlung to be human readable ja/nein/- instead of boolean/null Signed-off-by: cris-technikum --- .../approveAnrechnungUebersicht.php | 2 + .../approveAnrechnungUebersichtData.php | 2 +- .../anrechnung/approveAnrechnungUebersicht.js | 10 +++-- system/phrasesupdate.php | 40 +++++++++++++++++++ 4 files changed, 50 insertions(+), 4 deletions(-) diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index a850bca44..f25a07c85 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -33,6 +33,8 @@ $this->load->view( 'tabelleneinstellungen', 'keineDatenVorhanden', 'spaltenEinstellen', + 'ja', + 'nein' ), 'person' => array( 'student', diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php index f436927e9..f1836d77c 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php @@ -106,7 +106,7 @@ $filterWidgetArray = array( url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id}, target:"_blank" }}, - empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_nullToMinus}, + empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_empfehlung_anrechnung}, status_kurzbz: {visible: false}, status_bezeichnung: {headerFilter:"input"} }', // col properties diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index 9ba20a5ba..454ef9549 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -50,9 +50,13 @@ function func_rowUpdated(row){ row.getElement().style["pointerEvents"] = "none"; } -// Formats null values to '-' -var format_nullToMinus = function(cell, formatterParams){ - return (cell.getValue() == null) ? '-' : cell.getValue(); +// Formats empfehlung_anrechnung +var format_empfehlung_anrechnung = function(cell, formatterParams){ + return (cell.getValue() == null) + ? '-' + : (cell.getValue() == 'true') + ? FHC_PhrasesLib.t("ui", "ja") + : FHC_PhrasesLib.t("ui", "nein"); } /* diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index d5a3fdb5c..f8f7c9eaf 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -8568,6 +8568,46 @@ Any unusual occurrences 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'ja', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ja', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'yes', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nein', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nein', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'no', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) );