diff --git a/application/views/Studentenverwaltung.php b/application/views/Studentenverwaltung.php index 4d7181c65..8dd2dd93d 100644 --- a/application/views/Studentenverwaltung.php +++ b/application/views/Studentenverwaltung.php @@ -48,6 +48,7 @@ $configArray = [ 'allowUebernahmePunkte' => !defined('FAS_REIHUNGSTEST_PUNKTEUEBERNAHME') ? true : FAS_REIHUNGSTEST_PUNKTEUEBERNAHME, 'useReihungstestPunkte' => !defined('FAS_REIHUNGSTEST_PUNKTE') ? true : FAS_REIHUNGSTEST_PUNKTE, 'hasExcludedAreas' => defined('FAS_REIHUNGSTEST_EXCLUDE_GEBIETE') && !empty(FAS_REIHUNGSTEST_EXCLUDE_GEBIETE), + 'stvTagsEnabled' => defined('STV_TAGS_ENABLED') ? STV_TAGS_ENABLED : false, ]; ?> diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php index c43cb38d1..943363f6d 100644 --- a/config/global.config-default.inc.php +++ b/config/global.config-default.inc.php @@ -371,4 +371,6 @@ define('STATUS_VORRUECKEN_ANZEIGEN', true); //externe Ueberwachung im Testtool erlauben define('TESTTOOL_EXTERNE_UEBERWACHUNG_ALLOWED', false); +//enable tags in StudVW +define('STV_TAGS_ENABLED', false); ?> diff --git a/public/js/components/Stv/Studentenverwaltung.js b/public/js/components/Stv/Studentenverwaltung.js index 64f25c114..66ff7f891 100644 --- a/public/js/components/Stv/Studentenverwaltung.js +++ b/public/js/components/Stv/Studentenverwaltung.js @@ -85,6 +85,7 @@ export default { configAllowUebernahmePunkte: this.config.allowUebernahmePunkte, configUseReihungstestPunkte: this.config.useReihungstestPunkte, configHasExcludedAreas: this.config.hasExcludedAreas, + configStvTagsEnabled: this.config.stvTagsEnabled, appConfig: Vue.computed(() => this.appconfig), hasZGVBakkPermission: this.permissions['student/editBakkZgv'], hasZGVMasterPermission: this.permissions['student/editMakkZgv'], diff --git a/public/js/components/Stv/Studentenverwaltung/List.js b/public/js/components/Stv/Studentenverwaltung/List.js index 5bc094a3c..aff26a2db 100644 --- a/public/js/components/Stv/Studentenverwaltung/List.js +++ b/public/js/components/Stv/Studentenverwaltung/List.js @@ -35,7 +35,11 @@ export default { currentSemester: { from: 'currentSemester', required: true - } + }, + tagsEnabled: { + from: 'configStvTagsEnabled', + default: false + }, }, props: { selected: Array, @@ -65,16 +69,6 @@ export default { columns:[ {title:"UID", field:"uid", headerFilter: true}, {title:"TitelPre", field:"titelpre", headerFilter: "list", headerFilterParams: {valuesLookup:true, listOnEmpty:true, autocomplete:true, sort:"asc"}}, - { - title: 'Tags', - field: 'tags', - tooltip: false, - headerFilter: "input", - headerFilterFunc: tagHeaderFilter, - headerFilterFuncParams: {field: 'tags'}, - formatter: (cell) => tagFormatter(cell, this.$refs.tagComponent), - width: 150, - }, {title:"Nachname", field:"nachname", headerFilter: true}, {title:"Vorname", field:"vorname", headerFilter: true}, {title:"Wahlname", field:"wahlname", visible:false, headerFilter: true}, @@ -279,6 +273,21 @@ export default { return "StudentList_" + today + ".csv"; }, }, + created: function() { + if(this.tagsEnabled) { + const coltags = { + title: 'Tags', + field: 'tags', + tooltip: false, + headerFilter: "input", + headerFilterFunc: tagHeaderFilter, + headerFilterFuncParams: {field: 'tags'}, + formatter: (cell) => tagFormatter(cell, this.$refs.tagComponent), + width: 150, + }; + this.tabulatorOptions.columns.splice(2, 0, coltags); + } + }, watch: { '$p.user_language.value'(n, o) { if (n !== o && o !== undefined && this.$refs.table.tableBuilt) { @@ -582,6 +591,7 @@ export default {