From 8cc5be2c40e3d2711ec15ff63037903be26caee5 Mon Sep 17 00:00:00 2001 From: KarpAlex Date: Mon, 25 Oct 2021 19:14:59 +0200 Subject: [PATCH] Issues GUI: added phrases --- .../controllers/system/issues/Issues.php | 13 +- application/views/system/issues/issues.php | 7 +- .../views/system/issues/issuesData.php | 35 +- public/js/issues/issuesDataset.js | 35 +- system/phrasesupdate.php | 421 ++++++++++++++++++ 5 files changed, 470 insertions(+), 41 deletions(-) diff --git a/application/controllers/system/issues/Issues.php b/application/controllers/system/issues/Issues.php index f942b50d9..e9764fb63 100644 --- a/application/controllers/system/issues/Issues.php +++ b/application/controllers/system/issues/Issues.php @@ -23,18 +23,21 @@ class Issues extends Auth_Controller $this->load->library('PermissionLib'); $this->load->library('WidgetLib'); + // Load models + $this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel'); + $this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel'); + $this->loadPhrases( array( 'global', 'ui', - 'filter' + 'filter', + 'lehre', + 'person', + 'fehlermonitoring' ) ); - // Load models - $this->load->model('person/Benutzerfunktion_model', 'BenutzerfunktionModel'); - $this->load->model('organisation/Organisationseinheit_model', 'OrganisationseinheitModel'); - $this->_setAuthUID(); // sets property uid } diff --git a/application/views/system/issues/issues.php b/application/views/system/issues/issues.php index ebe92012d..9812528d5 100644 --- a/application/views/system/issues/issues.php +++ b/application/views/system/issues/issues.php @@ -15,10 +15,11 @@ $this->load->view( 'navigationwidget' => true, 'dialoglib' => true, 'phrases' => array( - 'ui' => array('bitteEintragWaehlen') + 'ui', + 'fehlermonitoring' ), 'customCSSs' => array('public/css/issues/issuesDataset.css', 'public/css/sbadmin2/tablesort_bootstrap.css'), - 'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js') + 'customJSs' => array('public/js/issues/issuesDataset.js', 'public/js/bootstrapper.js'), ) ); ?> @@ -33,7 +34,7 @@ $this->load->view(
diff --git a/application/views/system/issues/issuesData.php b/application/views/system/issues/issuesData.php index 1f0bf12b0..effa95469 100644 --- a/application/views/system/issues/issuesData.php +++ b/application/views/system/issues/issuesData.php @@ -4,11 +4,12 @@ $PERSON_ID = getAuthPersonId(); $ALL_FUNKTIONEN_OE_KURZBZ = "('" . implode("','", array_keys($all_funktionen_oe_kurzbz)) . "')"; $ALL_OE_KURZBZ_BERECHTIGT = "('" . implode("','", $all_oe_kurzbz_berechtigt) . "')"; $RELEVANT_PRESTUDENT_STATUS = "('Aufgenommener', 'Student', 'Incoming', 'Diplomand', 'Abbrecher', 'Unterbrecher', 'Absolvent')"; +$LANGUAGE_INDEX = getUserLanguage() == 'German' ? '1' : '2'; // get issues for the oes of the uid or for the persons (students, oe-zuordnung) of the oes $query = "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern AS \"Fehlercode extern\", datum AS \"Datum\", inhalt AS \"Inhalt\", inhalt_extern AS \"Inhalt extern\", iss.person_id AS \"PersonId\", iss.oe_kurzbz AS \"OE\", - ftyp.bezeichnung_mehrsprachig[1] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[1] AS \"Fehlerstatus\", + ftyp.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlertyp\", stat.bezeichnung_mehrsprachig[".$LANGUAGE_INDEX."] AS \"Fehlerstatus\", verarbeitetvon AS \"Verarbeitet von\",verarbeitetamum AS \"Verarbeitet am\", fr.app AS \"Applikation\", fr.fehlertyp_kurzbz as \"Fehlertypcode\", iss.status_kurzbz AS \"Statuscode\", pers.vorname AS \"Vorname\", pers.nachname AS \"Nachname\" @@ -17,7 +18,7 @@ $query = "SELECT issue_id, fehlercode AS \"Fehlercode\", iss.fehlercode_extern A JOIN system.tbl_fehlertyp ftyp USING (fehlertyp_kurzbz) JOIN system.tbl_issue_status stat USING (status_kurzbz) LEFT JOIN public.tbl_person pers ON iss.person_id = pers.person_id - WHERE EXISTS ( + WHERE EXISTS ( SELECT 1 FROM system.tbl_fehler_zustaendigkeiten zst WHERE fehlercode = iss.fehlercode AND ( @@ -92,22 +93,22 @@ $filterWidgetArray = array( 'checkboxes' => 'issue_id', 'columnsAliases' => array( 'ID', - 'Fehlercode', - 'Fehlercode extern', - 'Datum', - 'Inhalt', - 'Inhalt extern', + ucfirst($this->p->t('fehlermonitoring', 'fehlercode')), + ucfirst($this->p->t('fehlermonitoring', 'fehlercodeExtern')), + ucfirst($this->p->t('global', 'datum')), + ucfirst($this->p->t('fehlermonitoring', 'inhalt')), + ucfirst($this->p->t('fehlermonitoring', 'inhaltExtern')), 'PersonId', - 'OE', - 'Fehlertyp', - 'Fehlerstatus', - 'Verarbeitet von', - 'Verarbeitet am', - 'Applikation', - 'Fehlertypcode', - 'Statuscode', - 'Vorname', - 'Nachname' + ucfirst($this->p->t('lehre', 'organisationseinheit')), + ucfirst($this->p->t('fehlermonitoring', 'fehlertyp')), + ucfirst($this->p->t('fehlermonitoring', 'fehlerstatus')), + ucfirst($this->p->t('fehlermonitoring', 'verarbeitetVon')), + ucfirst($this->p->t('fehlermonitoring', 'verarbeitetAm')), + ucfirst($this->p->t('global', 'applikation')), + ucfirst($this->p->t('fehlermonitoring', 'fehlertypcode')), + ucfirst($this->p->t('fehlermonitoring', 'statuscode')), + ucfirst($this->p->t('person', 'vorname')), + ucfirst($this->p->t('person', 'nachname')) ), 'formatRow' => function($datasetRaw) { diff --git a/public/js/issues/issuesDataset.js b/public/js/issues/issuesDataset.js index b102a3f96..ac3732844 100644 --- a/public/js/issues/issuesDataset.js +++ b/public/js/issues/issuesDataset.js @@ -11,21 +11,21 @@ var IssuesDataset = { { let auswahlStatus = '
' + - '' + - '' + - '' + - '' + + '' + + '' + + '' + + '' + '
'; let selectAllHtml = '' + - ' Alle  ' + + ' '+FHC_PhrasesLib.t("ui", "alle")+'  ' + '' + - ' Keinen    '; + ' '+FHC_PhrasesLib.t("ui", "keinen")+'    '; let issuescount = 0; @@ -42,7 +42,7 @@ var IssuesDataset = { if (issuescount > 0) { - var countHtml = issuescount + " Fehler"; + var countHtml = issuescount + " "+FHC_PhrasesLib.t("fehlermonitoring", "meldungen"); // Count Records after Filtering $("#filterTableDataset").bind("filterEnd", function() { @@ -86,10 +86,10 @@ var IssuesDataset = { let issue_ids_sel = $("#filterTableDataset input:checked[name=issue_id\\[\\]]"); if(status_kurzbz.length <= 0) - return FHC_DialogLib.alertInfo("Bitte wählen Sie den Status aus."); + return FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("fehlermonitoring", "bitteStatusWaehlen")); if(issue_ids_sel.length <= 0) - return FHC_DialogLib.alertInfo("Bitte wählen Sie die Fehler aus."); + return FHC_DialogLib.alertInfo(FHC_PhrasesLib.t("fehlermonitoring", "bitteFehlerWaehlen")); let issue_ids = []; @@ -107,17 +107,20 @@ var IssuesDataset = { { successCallback: function(data, textStatus, jqXHR) { if (FHC_AjaxClient.isError(data)) - FHC_DialogLib.alertError("Fehler beim Status Ändern: " + FHC_AjaxClient.getError(data)); + FHC_DialogLib.alertError( + FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": " + + FHC_AjaxClient.getError(data) + ); else if (FHC_AjaxClient.hasData(data)) { FHC_FilterWidget.reloadDataset(); FHC_DialogLib.alertSuccess(FHC_AjaxClient.getData(data)); } else - FHC_DialogLib.alertError("Unbekannter Fehler beim Status Ändern"); + FHC_DialogLib.alertError(FHC_PhrasesLib.t("fehlermonitoring", "statusAendernUnbekannterFehler")); }, errorCallback: function(jqXHR, textStatus, errorThrown) { - FHC_DialogLib.alertError("Fehler beim Status Ändern: " + textStatus); + FHC_DialogLib.alertError(FHC_PhrasesLib.t("fehlermonitoring", "statusAendernFehler") + ": " + textStatus); } } ); diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index e1f46d2e5..bbbdb8747 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -13072,6 +13072,427 @@ array( 'insertvon' => 'system' ) ) + ), + //******************* Issue/Fehler Monitoring + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlerMonitoring', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler Monitoring", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error Monitoring", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'keinen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Keinen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "None", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'statusFuerAusgewaehlteSetzen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Status für Ausgewählte setzen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Set state for selected", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'meldungen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Meldungen", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "messages", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'behoben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Behoben", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Resolved", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'inBearbeitung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "In Bearbeitung", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "In progress", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'inhalt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Inhalt", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Content", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'inhaltExtern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Inhalt extern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "External content", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlerstatus', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlerstatus", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error state", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlercode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlercode", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error code", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlercodeExtern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlercode extern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "External error code", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlertyp', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlertyp", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error type", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'verarbeitetVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Verarbeitet von", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Processed by", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'verarbeitetAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Verarbeitet am", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Processed on", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'applikation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Applikation", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "application", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'fehlertypcode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehlertypcode", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error type code", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'statuscode', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Statuscode", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "State code", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'bitteStatusWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte wählen Sie den Status aus.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please select the state.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'bitteFehlerWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Bitte wählen Sie die Fehler aus.", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Please select the errors.", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'statusAendernFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Fehler beim Status Ändern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Error when changing state", + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'fehlermonitoring', + 'phrase' => 'statusAendernUnbekannterFehler', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => "Unbekannter Fehler beim Status Ändern", + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => "Unknown error when changing state", + 'description' => '', + 'insertvon' => 'system' + ) + ) ) );