From 9bf1715cb489b95b50ab047a9fdf8644141a6ee4 Mon Sep 17 00:00:00 2001 From: Cris Date: Thu, 12 Dec 2019 13:43:07 +0100 Subject: [PATCH 01/11] Removed unused code from CTRL Lehrauftrag bestellen --- .../lehre/lehrauftrag/Lehrauftrag.php | 43 ------------------- 1 file changed, 43 deletions(-) diff --git a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php index 74094f7fb..f1d8cdc1b 100644 --- a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php +++ b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php @@ -229,12 +229,6 @@ class Lehrauftrag extends Auth_Controller { $this->outputJsonSuccess($json); } - - // Send email to Mitarbeiter - // if(!$this->_sendMail($new_lehrvertrag_data_arr)) // TODO: slows down Bestell-process -> better chronjob? - { - // return error information // TODO: implement after decision regarding communication process - } } // ----------------------------------------------------------------------------------------------------------------- @@ -329,41 +323,4 @@ class Lehrauftrag extends Auth_Controller return $unique_new_lehrvertrag_data_arr; } - - private function validateGetPost($lehrauftrag){ - $lehreinheit_id = (isset($lehrauftrag['lehreinheit_id']) && is_numeric($lehrauftrag['lehreinheit_id'])) ? $lehrauftrag['lehreinheit_id'] : null; - $lehrveranstaltung_id = (isset($lehrauftrag['lehrveranstaltung_id']) && is_numeric($lehrauftrag['lehrveranstaltung_id'])) ? $lehrauftrag['lehrveranstaltung_id'] : null; - $person_id = (isset($lehrauftrag['person_id']) && is_numeric($lehrauftrag['person_id'])) ? $lehrauftrag['person_id'] : null; - $mitarbeiter_uid = (isset($lehrauftrag['mitarbeiter_uid']) && is_string($lehrauftrag['mitarbeiter_uid'])) ? $lehrauftrag['mitarbeiter_uid'] : null; - $vertrag_id = (isset($lehrauftrag['vertrag_id']) && is_numeric($lehrauftrag['vertrag_id'])) ? $lehrauftrag['vertrag_id'] : null; - $projektarbeit_id = (isset($lehrauftrag['projektarbeit_id']) && is_numeric($lehrauftrag['projektarbeit_id'])) ? $lehrauftrag['projektarbeit_id'] : null; - $stunden = (isset($lehrauftrag['stunden']) && is_numeric($lehrauftrag['stunden'])) ? $lehrauftrag['stunden'] : null; - $betrag = (isset($lehrauftrag['betrag']) && is_numeric($lehrauftrag['betrag'])) ? $lehrauftrag['betrag'] : null; - $studiensemester_kurzbz = (isset($lehrauftrag['studiensemester_kurzbz']) && is_string($lehrauftrag['studiensemester_kurzbz'])) ? $lehrauftrag['betrag'] : null; - - return array( - $lehreinheit_id, - $lehrveranstaltung_id, - $person_id, - $mitarbeiter_uid, - $vertrag_id, - $projektarbeit_id, - $stunden, - $betrag, - $studiensemester_kurzbz - ); - -// LIST IS TO BE SET ABOVE!!!: -// list( -// $lehreinheit_id, -// $lehrveranstaltung_id, -// $person_id, -// $mitarbeiter_uid, -// $vertrag_id, -// $projektarbeit_id, -// $stunden, -// $betrag, -// $studiensemester_kurzbz -// ) = $this->_validateGetPost($lehrauftrag); - } } From 80f100f5fb333363a3d4038348ff664323a2625e Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 16 Dec 2019 13:57:58 +0100 Subject: [PATCH 02/11] Changed name order: first + family name -> to family + first name This change allows sorting by family name. --- .../views/lehre/lehrauftrag/approveLehrauftragData.php | 4 ++-- application/views/lehre/lehrauftrag/orderLehrauftragData.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 045a34a94..b8b0fd1a0 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -141,7 +141,7 @@ FROM WHEN oe.organisationseinheittyp_kurzbz = \'Department\' THEN (\'DEP \' || oe.bezeichnung) ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) END AS "lv_oe_kurzbz", - (person.vorname || \' \' || person.nachname) AS "lektor", + (person.nachname || \' \' || person.vorname) AS "lektor", TRUNC(lema.semesterstunden, 1) AS "stunden", TRUNC((lema.semesterstunden * lema.stundensatz), 2) AS "betrag", vertrag_id, @@ -255,7 +255,7 @@ FROM ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) END AS "lv_oe_kurzbz", - (vorname || \' \' || nachname) AS "lektor", + (nachname || \' \' || vorname) AS "lektor", TRUNC(pb.stunden, 1) AS "stunden", TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag", vertrag_id, diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 5b68b6b37..ae75d8c48 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -172,7 +172,7 @@ FROM WHEN oe.organisationseinheittyp_kurzbz = \'Department\' THEN (\'DEP \' || oe.bezeichnung) ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) END AS "lv_oe_kurzbz", - (person.vorname || \' \' || person.nachname) AS "lektor", + (person.nachname || \' \' || person.vorname) AS "lektor", TRUNC(lema.semesterstunden, 1) AS "stunden", lema.stundensatz, TRUNC((lema.semesterstunden * lema.stundensatz), 2) AS "betrag", @@ -287,7 +287,7 @@ FROM ELSE (oe.organisationseinheittyp_kurzbz || \' \' || oe.bezeichnung) END AS "lv_oe_kurzbz", - (vorname || \' \' || nachname) AS "lektor", + (nachname || \' \' || vorname) AS "lektor", TRUNC(pb.stunden, 1) AS "stunden", pb.stundensatz, TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag", From c2b9f3a3da1b56dd5c4076ec69d0c5cb23d7020a Mon Sep 17 00:00:00 2001 From: Cris Date: Mon, 16 Dec 2019 14:18:57 +0100 Subject: [PATCH 03/11] =?UTF-8?q?Amended=20help=20info:=20HOWTO=20Spaltenb?= =?UTF-8?q?reite=20ver=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/lehre/lehrauftrag/acceptLehrauftrag.php | 12 ++++++++++++ .../views/lehre/lehrauftrag/approveLehrauftrag.php | 12 ++++++++++++ .../views/lehre/lehrauftrag/orderLehrauftrag.php | 12 ++++++++++++ 3 files changed, 36 insertions(+) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php index 5d1924c92..86a85308e 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php @@ -94,6 +94,18 @@ $this->load->view(
+ +

Ansicht

+
+ Spaltenbreite verändern +

+ Um die Spaltenbreite zu verändern, fährt man im Spaltenkopf langsam mit dem Mauszeiger auf + den rechten Rand der entprechenden Spalte.
+ Sobald sich der Mauszeiger in einen Doppelpfeil verwandelt, wird die Maustaste geklickt und + mit gedrückter Maustaste die Spalte nach rechts erweitert oder nach links verkleinert. +

+
+
diff --git a/application/views/lehre/lehrauftrag/approveLehrauftrag.php b/application/views/lehre/lehrauftrag/approveLehrauftrag.php index 71c1840c6..f36ae7dc7 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftrag.php @@ -133,6 +133,18 @@ $this->load->view(
+

Ansicht

+
+ Spaltenbreite verändern +

+ Um die Spaltenbreite zu verändern, fährt man im Spaltenkopf langsam mit dem Mauszeiger auf + den rechten Rand der entprechenden Spalte.
+ Sobald sich der Mauszeiger in einen Doppelpfeil verwandelt, wird die Maustaste geklickt und + mit gedrückter Maustaste die Spalte nach rechts erweitert oder nach links verkleinert. +

+
+
+ diff --git a/application/views/lehre/lehrauftrag/orderLehrauftrag.php b/application/views/lehre/lehrauftrag/orderLehrauftrag.php index 8938a305c..b04aa7985 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftrag.php @@ -135,6 +135,18 @@ $this->load->view(
+

Ansicht

+
+ Spaltenbreite verändern +

+ Um die Spaltenbreite zu verändern, fährt man im Spaltenkopf langsam mit dem Mauszeiger auf + den rechten Rand der entprechenden Spalte.
+ Sobald sich der Mauszeiger in einen Doppelpfeil verwandelt, wird die Maustaste geklickt und + mit gedrückter Maustaste die Spalte nach rechts erweitert oder nach links verkleinert. +

+
+
+ From 754868e7fd0f6a39ac5ee907f5f31a795f5f897c Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 14:31:17 +0100 Subject: [PATCH 04/11] Added GUI for Stornierte Lehrauftraege (for the lectors) Added new button 'Nur stornierte anzeigen'. When the button is clicked, a collapsed modul opens below showing details about cancelled contracts of the requested study semester. --- .../lehre/lehrauftrag/acceptLehrauftrag.php | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php index 86a85308e..7e4e01aef 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php @@ -151,6 +151,11 @@ $this->load->view( + +
@@ -162,6 +167,28 @@ $this->load->view(
+
+
+ + +
+
+

+ p->t('global', 'stornierteLehrauftraege')); ?>: + + + + + +

+
+
+ load->view('lehre/lehrauftrag/cancelledLehrauftragData.php'); ?> +
+
+
+
+
From ef3eedb989dcb078e2b36a455bb664b834ad6037 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 14:37:38 +0100 Subject: [PATCH 05/11] Added data query and tabulator for 'Stornierte Lehrauftraege' This file is triggered within the view acceptLehrauftrag.php. It displays information about the lectors cancelled contracts: - Vertragstyp - Bezeichnung - Stunden - Betrag - Storno Datum - Storno von --- .../lehrauftrag/cancelledLehrauftragData.php | 104 ++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 application/views/lehre/lehrauftrag/cancelledLehrauftragData.php diff --git a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php new file mode 100644 index 000000000..ec286ced2 --- /dev/null +++ b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php @@ -0,0 +1,104 @@ + $query, + 'tableUniqueId' => 'cancelledLehrauftrag', + 'requiredPermissions' => 'lehre/lehrauftrag_akzeptieren', + 'datasetRepresentation' => 'tabulator', + 'reloadDataset' => true, // reload query on page refresh + 'columnsAliases' => array( // TODO: use phrasen + 'Status', + 'Studiensemester', + 'Typ', + 'LV- / Projektbezeichnung', + 'Stunden', + 'Betrag', + 'Storniert am' + ), + 'datasetRepOptions' => '{ + layout: "fitColumns", // fit columns to width of table + responsiveLayout: "hide", // hide columns that dont fit on the table + movableColumns: true, // allows changing column + rowFormatter:function(row){ + func_rowFormatter(row); + }, + selectableCheck: function(row){ + return func_selectableCheck(row); + }, + renderComplete:function(){ + func_renderComplete(this); + }, + tableBuilt: function(){ + func_tableBuilt(this); + } + }', // tabulator properties + 'datasetRepFieldsDefs' => '{ + vertrag_id: {visible: false}, + vertragsstunden_studiensemester_kurzbz: {visible: false}, + vertragstyp_kurzbz: {widthGrow: 2}, + bezeichnung: {widthGrow: 2}, + vertragsstunden: { + align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1}, + bottomCalc:"sum", bottomCalcParams:{precision:1} + }, + betrag: { + align:"right", formatter: form_formatNulltoStringNumber, + bottomCalc:"sum", bottomCalcParams:{precision:2}, bottomCalcFormatter:"money", bottomCalcFormatterParams:{decimal: ",", thousand: ".", symbol:"€"} + }, + storniert: {align:"center", mutator: mut_formatStringDate, tooltip: storniert_tooltip}, + storniert_von: {visible: false}, + letzterStatus_vorStorniert: {visible: false} + }', // col properties +); + +echo $this->widgetlib->widget('TableWidget', $tableWidgetArray); + +?> From 34a55e2332012290df56ad29a8d64f7e75975cac Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 14:48:53 +0100 Subject: [PATCH 06/11] Added/Adapted JS functions for 'Stornierte Lehrauftraege' - redrawed tabulator when opening the collapsed module. Must be done to display stornierte lehrauftraege. - generated storniert-tooltip - generated storniert-status icon - adapted selectableCheck to leave stornierte unselectable --- .../js/lehre/lehrauftrag/acceptLehrauftrag.js | 225 ++++++++++-------- 1 file changed, 130 insertions(+), 95 deletions(-) diff --git a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js index ea96a8c7c..00750430f 100644 --- a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js +++ b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js @@ -17,7 +17,7 @@ const COLOR_LIGHTGREY = "#f5f5f5"; const ICON_LEHRAUFTRAG_ORDERED = ''; const ICON_LEHRAUFTRAG_APPROVED = ''; const ICON_LEHRAUFTRAG_CHANGED = ''; - +const ICON_LEHRAUFTRAG_CANCELLED = ''; // ----------------------------------------------------------------------------------------------------------------- // Mutators - setter methods to manipulate table data when entering the tabulator @@ -134,10 +134,12 @@ function func_selectableCheck(row){ var betrag = parseFloat(row.getData().betrag); var vertrag_betrag = parseFloat(row.getData().vertrag_betrag); - if (isNaN(betrag)) - { - betrag = 0; - } + var is_storniert = row.getData().storniert != undefined; + + if (isNaN(betrag)) + { + betrag = 0; + } // only allow to select bestellte && erteilte && nicht geaenderte Lehraufträge return row.getData().bestellt != null && // bestellt @@ -149,18 +151,18 @@ function func_selectableCheck(row){ // Adds column status function func_tableBuilt(table) { - // Add status column to table - table.addColumn( - { - title: "", - field: "status", - width:40, - align:"center", - downloadTitle: 'Status', - formatter: status_formatter, - tooltip: status_tooltip - }, true - ); + // Add status column to table + table.addColumn( + { + title: "", + field: "status", + width:40, + align:"center", + downloadTitle: 'Status', + formatter: status_formatter, + tooltip: status_tooltip + }, true + ); } // Sets status values into column status @@ -311,9 +313,10 @@ function func_rowSelectionChanged(data, rows){ // Generates status icons status_formatter = function(cell, formatterParams, onRendered){ - var bestellt = cell.getRow().getData().bestellt; - var erteilt = cell.getRow().getData().erteilt; - var akzeptiert = cell.getRow().getData().akzeptiert; + var bestellt = cell.getRow().getData().bestellt; + var erteilt = cell.getRow().getData().erteilt; + var akzeptiert = cell.getRow().getData().akzeptiert; + var is_storniert = cell.getRow().getData().storniert != undefined; var stunden = parseFloat(cell.getRow().getData().stunden); var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); @@ -326,47 +329,54 @@ status_formatter = function(cell, formatterParams, onRendered){ betrag = 0; } - // commented icons would be so nice to have with fontawsome 5.11... - if (bestellt != null && isNaN(vertrag_betrag)) - { - return ""; // kein Vertrag - } - else if (bestellt != null && (betrag != vertrag_betrag) || - bestellt != null && stunden != vertrag_stunden) - { - return ICON_LEHRAUFTRAG_CHANGED; // geaendert - // return ""; - } - else if (bestellt == null && erteilt == null && akzeptiert == null) - { - return ""; // neu - } - else if (bestellt != null && erteilt == null && akzeptiert == null) - { - return ICON_LEHRAUFTRAG_ORDERED; // bestellt - // return ""; - } - else if (bestellt != null && erteilt != null && akzeptiert == null) - { - return ICON_LEHRAUFTRAG_APPROVED; // erteilt - // return ""; - } - else if (bestellt != null && erteilt != null && akzeptiert != null) - { - return ""; // akzeptiert - // return ""; - } - else - { - return ""; // default - } + // commented icons would be so nice to have with fontawsome 5.11... + if (bestellt != null && isNaN(vertrag_betrag)) + { + return ""; // kein Vertrag + } + else if (bestellt != null && (betrag != vertrag_betrag) || + bestellt != null && stunden != vertrag_stunden) + { + return ICON_LEHRAUFTRAG_CHANGED; // geaendert + // return ""; + } + else if (bestellt == null && erteilt == null && akzeptiert == null && !is_storniert) + { + return ""; // neu + } + else if (bestellt != null && erteilt == null && akzeptiert == null) + { + return ICON_LEHRAUFTRAG_ORDERED; // bestellt + // return ""; + } + else if (bestellt != null && erteilt != null && akzeptiert == null) + { + return ICON_LEHRAUFTRAG_APPROVED; // erteilt + // return ""; + } + else if (bestellt != null && erteilt != null && akzeptiert != null) + { + return ""; // akzeptiert + // return ""; + } + else if (is_storniert) + { + return ICON_LEHRAUFTRAG_CANCELLED; // storniert + } + else + { + return ""; // default + } }; // Generates status tooltip status_tooltip = function(cell){ - var bestellt = cell.getRow().getData().bestellt; - var erteilt = cell.getRow().getData().erteilt; - var akzeptiert = cell.getRow().getData().akzeptiert; + var bestellt = cell.getRow().getData().bestellt; + var erteilt = cell.getRow().getData().erteilt; + var akzeptiert = cell.getRow().getData().akzeptiert; + var is_storniert = cell.getRow().getData().storniert != undefined; + var letzterStatus_vorStorniert = cell.getRow().getData().letzterStatus_vorStorniert; + var stunden = parseFloat(cell.getRow().getData().stunden); var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); @@ -379,32 +389,42 @@ status_tooltip = function(cell){ betrag = 0; } - var text = 'Lehrauftrag in Bearbeitung. '; + if (letzterStatus_vorStorniert != undefined && letzterStatus_vorStorniert == 'akzeptiert') + { + letzterStatus_vorStorniert = 'angenommen'; + } - if (bestellt != null && erteilt == null && akzeptiert == null - && (betrag != vertrag_betrag || stunden != vertrag_stunden)) // geaendert (when never erteilt before) - { - text += 'Wartet auf Erteilung.'; - return text; - } - else if (bestellt != null && erteilt != null && akzeptiert == null - && (betrag != vertrag_betrag || stunden != vertrag_stunden)) // geaendert (when has been erteilt once) - { - text += 'Wartet auf erneute Erteilung.'; - return text; - } - else if (bestellt != null && erteilt == null && akzeptiert == null) // bestellt - { - return 'Letzter Status: Bestellt. Wartet auf Erteilung.'; - } - else if (bestellt != null && erteilt != null && akzeptiert == null) // erteilt - { - return 'Letzter Status: Erteilt. Wartet auf Annahme durch Lektor.'; - } - else if (bestellt != null && erteilt != null && akzeptiert != null) // akzeptiert - { - return 'Letzter Status: Angenommen. Vertrag wurde beidseitig abgeschlossen.'; - } + var text = 'Lehrauftrag in Bearbeitung. '; + + if (bestellt != null && erteilt == null && akzeptiert == null + && (betrag != vertrag_betrag || stunden != vertrag_stunden)) // geaendert (when never erteilt before) + { + text += 'Wartet auf Erteilung.'; + return text; + } + else if (bestellt != null && erteilt != null && akzeptiert == null + && (betrag != vertrag_betrag || stunden != vertrag_stunden)) // geaendert (when has been erteilt once) + { + text += 'Wartet auf erneute Erteilung.'; + return text; + } + else if (bestellt != null && erteilt == null && akzeptiert == null) // bestellt + { + return 'Letzter Status: Bestellt. Wartet auf Erteilung.'; + } + else if (bestellt != null && erteilt != null && akzeptiert == null) // erteilt + { + return 'Letzter Status: Erteilt. Wartet auf Annahme durch Lektor.'; + } + else if (bestellt != null && erteilt != null && akzeptiert != null) // akzeptiert + { + return 'Letzter Status: Angenommen. Vertrag wurde beidseitig abgeschlossen.'; + } + else if (is_storniert) + { + return 'Dieser Vertrag wurde storniert. Letzter Status vor Stornierung war: ' + + letzterStatus_vorStorniert; // storniert + } } // Generates bestellt tooltip @@ -429,6 +449,13 @@ akzeptiert_tooltip = function(cell){ } } +// Generates storniert tooltip +storniert_tooltip = function(cell){ + if (cell.getRow().getData().storniert_von != null) { + return 'Storniert von: ' + cell.getRow().getData().storniert_von; + } +} + $(function() { // Show all rows @@ -468,17 +495,20 @@ $(function() { ); }); - // Set png-icons into filter-buttons - $(".btn-lehrauftrag").each(function(){ - switch(this.id) { - case 'show-ordered': - this.innerHTML = ICON_LEHRAUFTRAG_ORDERED; - break; - case 'show-approved': - this.innerHTML = ICON_LEHRAUFTRAG_APPROVED; - break; - } - }); + // Set png-icons into filter-buttons + $(".btn-lehrauftrag").each(function(){ + switch(this.id) { + case 'show-ordered': + this.innerHTML = ICON_LEHRAUFTRAG_ORDERED; + break; + case 'show-approved': + this.innerHTML = ICON_LEHRAUFTRAG_APPROVED; + break; + case 'show-cancelled': + this.innerHTML = ICON_LEHRAUFTRAG_CANCELLED; + break; + } + }); // De/activate and un/focus on clicked button $(".btn-lehrauftrag").click(function() { @@ -488,8 +518,13 @@ $(function() { $(this).addClass('focus').addClass('active'); }); - // Approve Lehrauftraege - $("#accept-lehrauftraege").click(function(){ + // Redraw table stornierte lehrauftraege on button click + $('#collapseCancelledLehrauftraege').on('shown.bs.collapse', function () { + $('[tableuniqueid = cancelledLehrauftrag] #tableWidgetTabulator').tabulator('redraw', true); + }); + + // Approve Lehrauftraege + $("#accept-lehrauftraege").click(function(){ // Get selected rows data var selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') From 627ad0e499ad1629d6f2c38c0f4140517fbbd8a0 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 14:49:52 +0100 Subject: [PATCH 07/11] Added phrase 'Stornierte Lehrauftraege' to phrasesupdate --- system/phrasesupdate.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 4ec315575..a2af8b1a8 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -4074,7 +4074,27 @@ When on hold, the date is only a reminder.', 'insertvon' => 'system' ) ) - ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'stornierteLehrauftraege', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Stornierte Lehraufträge', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Cancelled lectureships', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) ); From 4b33f6c0bd7210da10e021602edc346d112b949a Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 14:51:45 +0100 Subject: [PATCH 08/11] Minor code prettyfying (tabs instead whitespaces, line wraps) --- .../lehre/lehrauftrag/acceptLehrauftrag.php | 18 +- .../js/lehre/lehrauftrag/acceptLehrauftrag.js | 578 +++++++++--------- 2 files changed, 302 insertions(+), 294 deletions(-) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php index 7e4e01aef..e575fd680 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php @@ -133,7 +133,7 @@ $this->load->view( - +
load->view('lehre/lehrauftrag/acceptLehrauftragData.php'); ?> @@ -146,10 +146,18 @@ $this->load->view(
'; - footer_html += '
'; + footer_html += ''; - footer_html += ''; + footer_html += ''; - footer_html += '
'; - footer_html += '
'; + footer_html += ''; + footer_html += ''; - return footer_html; + return footer_html; } // Performs download CSV function footer_downloadCSV(){ - $('#tableWidgetTabulator').tabulator("download", "csv", "data.csv", {bom:true}); // BOM for correct UTF-8 char output + $('#tableWidgetTabulator').tabulator("download", "csv", "data.csv", {bom:true}); // BOM for correct UTF-8 char output } /* @@ -286,12 +287,12 @@ function footer_downloadCSV(){ * Select all (filtered) rows and ignore rows that are bestellt and erteilt */ function footer_selectAll(){ - $('#tableWidgetTabulator').tabulator('getRows', true) - .filter(row => row.getData().bestellt != null && // bestellt - row.getData().erteilt != null && // AND erteilt - row.getData().akzeptiert == null && // AND NOT akzeptiert - row.getData().status != 'Geändert') // AND NOT geändert - .forEach((row => row.select())); + $('#tableWidgetTabulator').tabulator('getRows', true) + .filter(row => row.getData().bestellt != null && // bestellt + row.getData().erteilt != null && // AND erteilt + row.getData().akzeptiert == null && // AND NOT akzeptiert + row.getData().status != 'Geändert') // AND NOT geändert + .forEach((row => row.select())); } /* @@ -299,12 +300,12 @@ function footer_selectAll(){ * Deselect all (filtered) rows */ function footer_deselectAll(){ - $('#tableWidgetTabulator').tabulator('deselectRow'); + $('#tableWidgetTabulator').tabulator('deselectRow'); } // Displays number of selected rows on row selection change function func_rowSelectionChanged(data, rows){ - $('#number-selected').html("Für Annehmen ausgewählt: " + rows.length + ""); + $('#number-selected').html("Für Annehmen ausgewählt: " + rows.length + ""); } // ----------------------------------------------------------------------------------------------------------------- @@ -318,16 +319,16 @@ status_formatter = function(cell, formatterParams, onRendered){ var akzeptiert = cell.getRow().getData().akzeptiert; var is_storniert = cell.getRow().getData().storniert != undefined; - var stunden = parseFloat(cell.getRow().getData().stunden); - var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); + var stunden = parseFloat(cell.getRow().getData().stunden); + var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); - var betrag = parseFloat(cell.getRow().getData().betrag); - var vertrag_betrag = parseFloat(cell.getRow().getData().vertrag_betrag); + var betrag = parseFloat(cell.getRow().getData().betrag); + var vertrag_betrag = parseFloat(cell.getRow().getData().vertrag_betrag); - if (isNaN(betrag)) - { - betrag = 0; - } + if (isNaN(betrag)) + { + betrag = 0; + } // commented icons would be so nice to have with fontawsome 5.11... if (bestellt != null && isNaN(vertrag_betrag)) @@ -378,16 +379,16 @@ status_tooltip = function(cell){ var letzterStatus_vorStorniert = cell.getRow().getData().letzterStatus_vorStorniert; - var stunden = parseFloat(cell.getRow().getData().stunden); - var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); + var stunden = parseFloat(cell.getRow().getData().stunden); + var vertrag_stunden = parseFloat(cell.getRow().getData().vertrag_stunden); - var betrag = parseFloat(cell.getRow().getData().betrag); - var vertrag_betrag = parseFloat(cell.getRow().getData().vertrag_betrag); + var betrag = parseFloat(cell.getRow().getData().betrag); + var vertrag_betrag = parseFloat(cell.getRow().getData().vertrag_betrag); - if (isNaN(betrag)) - { - betrag = 0; - } + if (isNaN(betrag)) + { + betrag = 0; + } if (letzterStatus_vorStorniert != undefined && letzterStatus_vorStorniert == 'akzeptiert') { @@ -429,24 +430,24 @@ status_tooltip = function(cell){ // Generates bestellt tooltip bestellt_tooltip = function(cell){ - if (cell.getRow().getData().bestellt_von != null) - { - return 'Bestellt von: ' + cell.getRow().getData().bestellt_von; - } + if (cell.getRow().getData().bestellt_von != null) + { + return 'Bestellt von: ' + cell.getRow().getData().bestellt_von; + } } // Generates erteilt tooltip erteilt_tooltip = function(cell){ - if (cell.getRow().getData().erteilt_von != null) { - return 'Erteilt von: ' + cell.getRow().getData().erteilt_von; - } + if (cell.getRow().getData().erteilt_von != null) { + return 'Erteilt von: ' + cell.getRow().getData().erteilt_von; + } } // Generates akzeptiert tooltip akzeptiert_tooltip = function(cell){ - if (cell.getRow().getData().akzeptiert_von != null) { - return 'Angenommen von: ' + cell.getRow().getData().akzeptiert_von; - } + if (cell.getRow().getData().akzeptiert_von != null) { + return 'Angenommen von: ' + cell.getRow().getData().akzeptiert_von; + } } // Generates storniert tooltip @@ -457,43 +458,42 @@ storniert_tooltip = function(cell){ } $(function() { + // Show all rows + $("#show-all").click(function(){ + $('#tableWidgetTabulator').tabulator('clearFilter'); + }); - // Show all rows - $("#show-all").click(function(){ - $('#tableWidgetTabulator').tabulator('clearFilter'); - }); + // Show only rows with ordered lehrauftraege + $("#show-ordered").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'bestellt', type: '!=', value: null}, + {field: 'erteilt', type: '=', value: null}, + {field: 'akzeptiert', type: '=', value: null} + ] + ); + }); - // Show only rows with ordered lehrauftraege - $("#show-ordered").click(function(){ - $('#tableWidgetTabulator').tabulator('setFilter', - [ - {field: 'bestellt', type: '!=', value: null}, - {field: 'erteilt', type: '=', value: null}, - {field: 'akzeptiert', type: '=', value: null} - ] - ); - }); + // Show only rows with erteilte lehrauftraege + $("#show-approved").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', [ + {field: 'bestellt', type: '!=', value: null}, // filter when is bestellt + {field: 'erteilt', type: '!=', value: null}, // and is erteilt + {field: 'akzeptiert', type: '=', value: null} // and is not akzeptiert + ] + ); + }); - // Show only rows with erteilte lehrauftraege - $("#show-approved").click(function(){ - $('#tableWidgetTabulator').tabulator('setFilter', [ - {field: 'bestellt', type: '!=', value: null}, // filter when is bestellt - {field: 'erteilt', type: '!=', value: null}, // and is erteilt - {field: 'akzeptiert', type: '=', value: null} // and is not akzeptiert - ] - ); - }); - - // Show only rows with akzeptierte lehrauftraege - $("#show-accepted").click(function(){ - $('#tableWidgetTabulator').tabulator('setFilter', - [ - {field: 'bestellt', type: '!=', value: null}, - {field: 'erteilt', type: '!=', value: null}, - {field: 'akzeptiert', type: '!=', value: null} - ] - ); - }); + // Show only rows with akzeptierte lehrauftraege + $("#show-accepted").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'bestellt', type: '!=', value: null}, + {field: 'erteilt', type: '!=', value: null}, + {field: 'akzeptiert', type: '!=', value: null} + ] + ); + }); // Set png-icons into filter-buttons $(".btn-lehrauftrag").each(function(){ @@ -510,13 +510,13 @@ $(function() { } }); - // De/activate and un/focus on clicked button - $(".btn-lehrauftrag").click(function() { + // De/activate and un/focus on clicked button + $(".btn-lehrauftrag").click(function() { - // De/activate and un/focus on clicked button - $(".btn-lehrauftrag").removeClass('focus').removeClass('active'); - $(this).addClass('focus').addClass('active'); - }); + // De/activate and un/focus on clicked button + $(".btn-lehrauftrag").removeClass('focus').removeClass('active'); + $(this).addClass('focus').addClass('active'); + }); // Redraw table stornierte lehrauftraege on button click $('#collapseCancelledLehrauftraege').on('shown.bs.collapse', function () { @@ -526,73 +526,73 @@ $(function() { // Approve Lehrauftraege $("#accept-lehrauftraege").click(function(){ - // Get selected rows data - var selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') - .map(function(data){ - // reduce to necessary fields - return { - 'row_index' : data.row_index, - 'vertrag_id' : data.vertrag_id - } - }); + // Get selected rows data + var selected_data = $('#tableWidgetTabulator').tabulator('getSelectedData') + .map(function(data){ + // reduce to necessary fields + return { + 'row_index' : data.row_index, + 'vertrag_id' : data.vertrag_id + } + }); - // Alert and exit if no lehraufgang is selected - if (selected_data.length == 0) - { - FHC_DialogLib.alertInfo('Bitte wählen Sie erst zumindest einen Lehrauftrag'); + // Alert and exit if no lehraufgang is selected + if (selected_data.length == 0) + { + FHC_DialogLib.alertInfo('Bitte wählen Sie erst zumindest einen Lehrauftrag'); - // Emtpy password field - $("#password").val(''); + // Emtpy password field + $("#password").val(''); - return; - } + return; + } - // Get password for verification - var password = $("#password").val(); - if (password == '') - { - FHC_DialogLib.alertInfo('Bitte verifizieren Sie sich mit Ihrem Login Passwort.'); + // Get password for verification + var password = $("#password").val(); + if (password == '') + { + FHC_DialogLib.alertInfo('Bitte verifizieren Sie sich mit Ihrem Login Passwort.'); - // Focus on password field - $("#password").focus(); + // Focus on password field + $("#password").focus(); - return; - } + return; + } - // Prepare data object for ajax call - var data = { - 'password': password, - 'selected_data': selected_data - }; + // Prepare data object for ajax call + var data = { + 'password': password, + 'selected_data': selected_data + }; - FHC_AjaxClient.ajaxCallPost( - FHC_JS_DATA_STORAGE_OBJECT.called_path + "/acceptLehrauftrag", - data, - { - successCallback: function (data, textStatus, jqXHR) - { - if (data.error) - { - // Password not verified - FHC_DialogLib.alertWarning(data.retval); - } - if (!data.error && data.retval != null) - { - // Update status 'Erteilt' - $('#tableWidgetTabulator').tabulator('updateData', data.retval); - FHC_DialogLib.alertSuccess(data.retval.length + " Lehraufträge wurden akzeptiert."); - } - }, - errorCallback: function (jqXHR, textStatus, errorThrown) - { - FHC_DialogLib.alertError("Systemfehler
Bitte kontaktieren Sie Ihren Administrator."); - } - } - ); + FHC_AjaxClient.ajaxCallPost( + FHC_JS_DATA_STORAGE_OBJECT.called_path + "/acceptLehrauftrag", + data, + { + successCallback: function (data, textStatus, jqXHR) + { + if (data.error) + { + // Password not verified + FHC_DialogLib.alertWarning(data.retval); + } + if (!data.error && data.retval != null) + { + // Update status 'Erteilt' + $('#tableWidgetTabulator').tabulator('updateData', data.retval); + FHC_DialogLib.alertSuccess(data.retval.length + " Lehraufträge wurden akzeptiert."); + } + }, + errorCallback: function (jqXHR, textStatus, errorThrown) + { + FHC_DialogLib.alertError("Systemfehler
Bitte kontaktieren Sie Ihren Administrator."); + } + } + ); - // Empty password field - $("#password").val(''); + // Empty password field + $("#password").val(''); - }); + }); }); From 83fb32bc185b100c813e83a0a2dd03841f797a3c Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 15:37:25 +0100 Subject: [PATCH 09/11] Reordered columns: Now Ausbildungssemester right after STG-Typ-Kurzbezeichnung --- .../views/lehre/lehrauftrag/acceptLehrauftragData.php | 6 +++--- .../views/lehre/lehrauftrag/approveLehrauftragData.php | 6 +++--- .../views/lehre/lehrauftrag/orderLehrauftragData.php | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index 13460d38e..70ab7247c 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -15,11 +15,11 @@ SELECT studiensemester_kurzbz, studiengang_kz, stg_typ_kurzbz, + semester, orgform_kurzbz, person_id, typ, auftrag, - semester, lv_oe_kurzbz, gruppe, stunden, @@ -293,11 +293,11 @@ $filterWidgetArray = array( 'Studiensemester', 'Studiengang-KZ', 'Studiengang', + 'Semester', 'OrgForm', 'Person-ID', 'Typ', 'LV- / Projektbezeichnung', - 'Semester', 'Organisationseinheit', 'Gruppe', 'Stunden', @@ -354,11 +354,11 @@ $filterWidgetArray = array( studiensemester_kurzbz: {visible: false}, studiengang_kz: {visible: false}, stg_typ_kurzbz: {headerFilter:"input", width: "5%"}, + semester: {headerFilter:"input"}, orgform_kurzbz: {headerFilter:"input"}, person_id: {visible: false}, typ: {headerFilter:"input", width: "7%"}, auftrag: {headerFilter:"input", width: "15%"}, - semester: {headerFilter:"input"}, lv_oe_kurzbz: {headerFilter:"input", width: "8%"}, gruppe: {headerFilter:"input", width: "5%"}, stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1}, diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index b8b0fd1a0..2f21ff0b3 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -16,11 +16,11 @@ SELECT studiensemester_kurzbz, studiengang_kz, stg_typ_kurzbz, + semester, orgform_kurzbz, person_id, typ, auftrag, - semester, lv_oe_kurzbz, gruppe, lektor, @@ -303,11 +303,11 @@ $filterWidgetArray = array( 'Studiensemester', 'Studiengang-KZ', 'Studiengang', + 'Semester', 'OrgForm', 'Person-ID', 'Typ', 'LV- / Projektbezeichnung', - 'Semester', 'Organisationseinheit', 'Gruppe', 'Lektor', @@ -374,11 +374,11 @@ $filterWidgetArray = array( studiensemester_kurzbz: {headerFilter:"input"}, studiengang_kz: {visible: false}, stg_typ_kurzbz: {headerFilter:"input", width: "5%"}, + semester: {headerFilter:"input"}, orgform_kurzbz: {headerFilter:"input"}, person_id: {visible: false}, typ: {headerFilter:"input"}, auftrag: {headerFilter:"input", width:"20%"}, - semester: {headerFilter:"input"}, lv_oe_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, lektor: {headerFilter:"input"}, diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index ae75d8c48..746f65d10 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -16,6 +16,7 @@ SELECT studiensemester_kurzbz, studiengang_kz, stg_typ_kurzbz, + semester, /* get valid STPL(s), to which the lehrveranstaltung is assigned to (can be more) */ /* therefore join over lv, studiensemester and semester */ ( @@ -50,7 +51,6 @@ SELECT person_id, typ, auftrag, - semester, lv_oe_kurzbz, gruppe, lektor, @@ -335,12 +335,12 @@ $filterWidgetArray = array( 'Studiensemester', 'Studiengang-KZ', 'Studiengang', + 'Semester', 'Studienplan', 'OrgForm', 'Person-ID', 'Typ', 'LV- / Projektbezeichnung', - 'Semester', 'Organisationseinheit', 'Gruppe', 'Lektor', @@ -409,12 +409,12 @@ $filterWidgetArray = array( studiensemester_kurzbz: {headerFilter:"input"}, studiengang_kz: {visible: false}, stg_typ_kurzbz: {headerFilter:"input", width: "5%"}, + semester: {headerFilter:"input"}, studienplan_bezeichnung: {headerFilter:"input", width: "7%"}, orgform_kurzbz: {headerFilter:"input"}, person_id: {visible: false}, typ: {headerFilter:"input"}, auftrag: {headerFilter:"input", width:"15%"}, - semester: {headerFilter:"input"}, lv_oe_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, lektor: {headerFilter:"input"}, From ff9aa5c48aaabd566fe9d56f6ab36bcb24d05ca2 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 15:40:16 +0100 Subject: [PATCH 10/11] Expanded 'lector'-column width --- application/views/lehre/lehrauftrag/approveLehrauftragData.php | 2 +- application/views/lehre/lehrauftrag/orderLehrauftragData.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index 2f21ff0b3..befff5d5a 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -381,7 +381,7 @@ $filterWidgetArray = array( auftrag: {headerFilter:"input", width:"20%"}, lv_oe_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, - lektor: {headerFilter:"input"}, + lektor: {headerFilter:"input", widthGrow: 3}, stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1}, headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator, bottomCalc:"sum", bottomCalcParams:{precision:1}}, diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 746f65d10..3469a7c76 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -417,7 +417,7 @@ $filterWidgetArray = array( auftrag: {headerFilter:"input", width:"15%"}, lv_oe_kurzbz: {headerFilter:"input"}, gruppe: {headerFilter:"input"}, - lektor: {headerFilter:"input"}, + lektor: {headerFilter:"input", widthGrow: 3}, stunden: {align:"right", formatter: form_formatNulltoStringNumber, formatterParams:{precision:1}, headerFilter:"input", headerFilterFunc: hf_filterStringnumberWithOperator, bottomCalc:"sum", bottomCalcParams:{precision:1}}, From df057faa8fbedae7c41f8f0b9b6d694d7da7c290 Mon Sep 17 00:00:00 2001 From: Cris Date: Wed, 18 Dec 2019 15:45:34 +0100 Subject: [PATCH 11/11] Added default text 'Keine Daten vorhanden' for empty tables Before the tabulator sometimes looked kind of 'undone', when no data was loaded. Now a nice message is displayed if the table is empty. --- .../views/lehre/lehrauftrag/acceptLehrauftragData.php | 1 + .../views/lehre/lehrauftrag/approveLehrauftragData.php | 1 + .../views/lehre/lehrauftrag/cancelledLehrauftragData.php | 1 + .../views/lehre/lehrauftrag/orderLehrauftragData.php | 1 + public/js/lehre/lehrauftrag/acceptLehrauftrag.js | 6 ++++++ public/js/lehre/lehrauftrag/approveLehrauftrag.js | 7 +++++++ public/js/lehre/lehrauftrag/orderLehrauftrag.js | 7 +++++++ 7 files changed, 24 insertions(+) diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php index 70ab7247c..9f96a0922 100644 --- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php @@ -318,6 +318,7 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table responsiveLayout: "hide", // hide columns that dont fit on the table movableColumns: true, // allows changing column + placeholder: func_placeholder(), headerFilterPlaceholder: " ", index: "row_index", // assign specific column as unique id (important for row indexing) selectable: true, // allow row selection diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php index befff5d5a..c9793fda7 100644 --- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php @@ -329,6 +329,7 @@ $filterWidgetArray = array( layout: "fitColumns", // fit columns to width of table responsiveLayout: "hide", // hide columns that dont fit on the table movableColumns: true, // allows changing column + placeholder: func_placeholder(), headerFilterPlaceholder: " ", groupBy:"lehrveranstaltung_id", groupToggleElement:"header", //toggle group on click anywhere in the group header diff --git a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php index ec286ced2..04d314636 100644 --- a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php @@ -67,6 +67,7 @@ $tableWidgetArray = array( layout: "fitColumns", // fit columns to width of table responsiveLayout: "hide", // hide columns that dont fit on the table movableColumns: true, // allows changing column + placeholder: func_placeholder(), rowFormatter:function(row){ func_rowFormatter(row); }, diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php index 3469a7c76..2eed6ae63 100644 --- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php +++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php @@ -363,6 +363,7 @@ $filterWidgetArray = array( layout:"fitColumns", // fit columns to width of table responsiveLayout:"hide", // hide columns that dont fit on the table movableColumns: true, // allows changing column + placeholder: func_placeholder(), headerFilterPlaceholder: " ", groupBy:"lehrveranstaltung_id", groupToggleElement:"header", //toggle group on click anywhere in the group header diff --git a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js index 3be0bcb2b..03c72e2f2 100644 --- a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js +++ b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js @@ -81,6 +81,12 @@ function hf_filterStringnumberWithOperator(headerValue, rowValue, rowData){ // Tabulator table format functions // ----------------------------------------------------------------------------------------------------------------- +// Displays text when table is empty +function func_placeholder() +{ + return "

Keine Daten vorhanden.

"; +} + // Formats the rows function func_rowFormatter(row){ var bestellt = row.getData().bestellt; diff --git a/public/js/lehre/lehrauftrag/approveLehrauftrag.js b/public/js/lehre/lehrauftrag/approveLehrauftrag.js index da3697adf..94e6af473 100644 --- a/public/js/lehre/lehrauftrag/approveLehrauftrag.js +++ b/public/js/lehre/lehrauftrag/approveLehrauftrag.js @@ -94,6 +94,13 @@ function func_initialFilter(){ // ----------------------------------------------------------------------------------------------------------------- // Tabulator table format functions // ----------------------------------------------------------------------------------------------------------------- + +// Displays text when table is empty +function func_placeholder() +{ + return "

Keine Daten vorhanden.

"; +} + // Formats the group header function func_groupHeader(data){ return data[0].lv_bezeichnung + "  " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung; diff --git a/public/js/lehre/lehrauftrag/orderLehrauftrag.js b/public/js/lehre/lehrauftrag/orderLehrauftrag.js index d27da0e4e..4e58272e5 100644 --- a/public/js/lehre/lehrauftrag/orderLehrauftrag.js +++ b/public/js/lehre/lehrauftrag/orderLehrauftrag.js @@ -99,6 +99,13 @@ function func_dataLoaded(data, table){ // ----------------------------------------------------------------------------------------------------------------- // Tabulator table format functions // ----------------------------------------------------------------------------------------------------------------- + +// Displays text when table is empty +function func_placeholder() +{ + return "

Keine Daten vorhanden.

"; +} + // Formats the group header function func_groupHeader(data) { return data[0].lv_bezeichnung + "  " + ' ( LV-ID: ' + data[0].lehrveranstaltung_id + ' )'; // change name to lehrveranstaltung;