diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php index fe6a5d0a9..a850bca44 100644 --- a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php +++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php @@ -110,9 +110,35 @@ $this->load->view( load->view('lehre/anrechnung/approveAnrechnungUebersichtData.php'); ?> - +
-
+ + +
+ +
+ + +
diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js index e4af9d5c0..9ba20a5ba 100644 --- a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js +++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js @@ -86,6 +86,57 @@ $(function(){ $('#tableWidgetTabulator').tabulator('redraw', true); }); + // Show only rows with empfohlene + noch nicht genehmigte/abgelehnte anrechnungen + $("#show-recommended").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + {field: 'empfehlung_anrechnung', type: '=', value: 'true'} + ] + ); + }); + + // Show only rows with nicht empfohlene + noch nicht genehmigte/abgelehnte anrechnungen + $("#show-not-recommended").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL}, + {field: 'empfehlung_anrechnung', type: '=', value: 'false'}, + ] + ); + }); + + // Show only rows with genehmigte anrechnungen + $("#show-approved").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_APPROVED} + ] + ); + }); + + // Show only rows with abgelehnte anrechnungen + $("#show-rejected").click(function(){ + $('#tableWidgetTabulator').tabulator('setFilter', + [ + {field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_REJECTED} + ] + ); + }); + + /** + * Show all rows: clear filter and blur button + * Bootstrap button remains in activated style, even when clicking various times. + * This function "resets" button style and clear all tabulators filter. + * NOTE: MUST be after all other filters + */ + $(".btn-clearfilter").click(function(){ + if($(this).hasClass('active')) + { + $('#tableWidgetTabulator').tabulator('clearFilter'); + $(this).blur(); + } + }) + // Approve Anrechnungen $("#approve-anrechnungen").click(function(){ // Get selected rows data diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php index 9c8d5a329..d5a3fdb5c 100644 --- a/system/phrasesupdate.php +++ b/system/phrasesupdate.php @@ -8468,6 +8468,106 @@ Any unusual occurrences 'insertvon' => 'system' ) ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurEmpfohleneAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only recommended ones (that need to be approved/rejected)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurNichtEmpfohleneAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur nicht empfohlene anzeigen (die noch genehmigt/abgelehnt werden müssen)', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only not recommended ones (that need to be approved/rejected)', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurGenehmigteAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur genehmigte anzeigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only approved ones', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurAbgelehnteAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur abgelehnte anzeigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only rejected ones', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nurFehlendeEmpfehlungenAnzeigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nur jene anzeigen, wo eine Empfehlung noch ansteht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Show only those ones that need your recommendation', + 'description' => '', + 'insertvon' => 'system' + ) + ) ) );