diff --git a/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
new file mode 100644
index 000000000..c9dd9a0d4
--- /dev/null
+++ b/application/controllers/lehre/anrechnung/ApproveAnrechnungUebersicht.php
@@ -0,0 +1,98 @@
+ 'admin:rw',
+ 'download' => 'admin:rw'
+ )
+ );
+
+ // Load models
+ $this->load->model('education/Anrechnung_model', 'AnrechnungModel');
+ $this->load->model('content/DmsVersion_model', 'DmsVersionModel');
+
+ // Load libraries
+ $this->load->library('WidgetLib');
+ $this->load->library('PermissionLib');
+ $this->load->library('AnrechnungLib');
+ $this->load->library('DmsLib');
+
+ // Load helpers
+ $this->load->helper('form');
+ $this->load->helper('url');
+ $this->load->helper('hlp_sancho_helper');
+
+ // Load language phrases
+ $this->loadPhrases(
+ array(
+ 'global',
+ 'ui',
+ 'anrechnung',
+ 'person',
+ 'lehre',
+ 'table'
+ )
+ );
+
+ $this->_setAuthUID();
+
+ $this->setControllerId();
+ }
+
+ public function index()
+ {
+ $studiensemester_kurzbz = $this->input->get('studiensemester');
+
+ if (!is_string($studiensemester_kurzbz))
+ {
+ $studiensemester = $this->StudiensemesterModel->getNearest(); // TODO check
+ if (hasData($studiensemester))
+ {
+ $studiensemester_kurzbz = $studiensemester->retval[0]->studiensemester_kurzbz;
+ }
+ elseif (isError($studiensemester))
+ {
+ show_error(getError($studiensemester));
+ }
+ }
+
+ $viewData = array(
+ 'studiensemester_selected' => $studiensemester_kurzbz
+ );
+
+ $this->load->view('lehre/anrechnung/approveAnrechnungUebersicht.php', $viewData);
+ }
+
+ /**
+ * Download and open uploaded document (Nachweisdokument).
+ */
+ public function download()
+ {
+ $dms_id = $this->input->get('dms_id');
+
+ if (!is_numeric($dms_id))
+ {
+ show_error('Wrong parameter');
+ }
+
+ $this->dmslib->download($dms_id);
+ }
+
+
+ /**
+ * Retrieve the UID of the logged user and checks if it is valid
+ */
+ private function _setAuthUID()
+ {
+ $this->_uid = getAuthUID();
+
+ if (!$this->_uid) show_error('User authentification failed');
+ }
+}
\ No newline at end of file
diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php
new file mode 100644
index 000000000..c4c108665
--- /dev/null
+++ b/application/views/lehre/anrechnung/approveAnrechnungUebersicht.php
@@ -0,0 +1,128 @@
+load->view(
+ 'templates/FHC-Header',
+ array(
+ 'title' => $this->p->t('anrechnung', 'anrechnungenGenehmigen'),
+ 'jquery' => true,
+ 'jqueryui' => true,
+ 'bootstrap' => true,
+ 'fontawesome' => true,
+ 'tabulator' => true,
+ 'ajaxlib' => true,
+ 'dialoglib' => true,
+ 'tablewidget' => true,
+ 'phrases' => array(
+ 'global' => array(
+ 'begruendung'
+ ),
+ 'anrechnung' => array(
+ 'nachweisdokumente',
+ 'empfehlung'
+ ),
+ 'ui' => array(
+ 'anzeigen',
+ 'alleAnzeigen',
+ 'hilfeZuDieserSeite',
+ 'hochladen',
+ 'spaltenEinstellen',
+ 'hilfeZuDieserSeite',
+ 'alleAuswaehlen',
+ 'alleAbwaehlen',
+ 'ausgewaehlteZeilen',
+ 'hilfe',
+ 'tabelleneinstellungen',
+ 'keineDatenVorhanden',
+ 'spaltenEinstellen',
+ ),
+ 'person' => array(
+ 'student',
+ 'personenkennzeichen',
+ 'vorname',
+ 'nachname'
+ ),
+ 'lehre' => array(
+ 'studiensemester',
+ 'studiengang',
+ 'lehrveranstaltung',
+ 'ects',
+ 'lektor',
+ ),
+ 'table' => array(
+ 'spaltenEinAusblenden',
+ 'spaltenEinAusblendenMitKlickOeffnen',
+ 'spaltenEinAusblendenAufEinstellungenKlicken',
+ 'spaltenEinAusblendenMitKlickAktivieren',
+ 'spaltenEinAusblendenMitKlickSchliessen',
+ 'spaltenbreiteVeraendern',
+ 'spaltenbreiteVeraendernText',
+ 'spaltenbreiteVeraendernInfotext',
+ 'zeilenAuswaehlen',
+ 'zeilenAuswaehlenEinzeln',
+ 'zeilenAuswaehlenBereich',
+ 'zeilenAuswaehlenAlle'
+ )
+ ),
+ 'customJSs' => array(
+ 'public/js/bootstrapper.js',
+ 'public/js/lehre/anrechnung/approveAnrechnungUebersicht.js'
+ )
+ )
+);
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ load->view('lehre/anrechnung/approveAnrechnungUebersichtData.php'); ?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+load->view('templates/FHC-Footer'); ?>
+
diff --git a/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php
new file mode 100644
index 000000000..b596d8f41
--- /dev/null
+++ b/application/views/lehre/anrechnung/approveAnrechnungUebersichtData.php
@@ -0,0 +1,106 @@
+>' . $LANGUAGE_INDEX . ' AS "status_bezeichnung"
+ FROM anrechnungen
+ JOIN lehre.tbl_anrechnungstatus as anrechnungstatus ON (anrechnungstatus.status_kurzbz = anrechnungen.status_kurzbz)
+ WHERE studiensemester_kurzbz = \'' . $STUDIENSEMESTER . '\'
+';
+
+$filterWidgetArray = array(
+ 'query' => $query,
+ 'tableUniqueId' => 'approveAnrechnungUebersicht',
+ 'requiredPermissions' => 'admin',
+ 'datasetRepresentation' => 'tabulator',
+ 'columnsAliases' => array(
+ 'anrechnung_id',
+ 'lehrveranstaltung_id',
+ 'begruendung_id',
+ 'dms_id',
+ 'studiensemester_kurzbz',
+ 'studiengang_kz',
+ ucfirst($this->p->t('lehre', 'studiengang')),
+ ucfirst($this->p->t('lehre', 'lehrveranstaltung')),
+ ucfirst($this->p->t('person', 'studentIn')),
+ ucfirst($this->p->t('global', 'begruendung')),
+ ucfirst($this->p->t('anrechnung', 'nachweisdokumente')),
+ ucfirst($this->p->t('anrechnung', 'empfehlung')),
+ 'status_kurzbz',
+ 'Status'
+ ),
+ 'datasetRepOptions' => '{
+ height: func_height(this),
+ layout: "fitColumns", // fit columns to width of table
+ autoResize: false, // prevent auto resizing of table (false to allow adapting table size when cols are (de-)activated
+ headerFilterPlaceholder: " ",
+ index: "anrechnung_id", // assign specific column as unique id (important for row indexing)
+ selectable: true, // allow row selection
+ selectableRangeMode: "click", // allow range selection using shift end click on end of range
+ selectablePersistence:false, // deselect previously selected rows when table is filtered, sorted or paginated
+ tableBuilt: function(){
+ func_tableBuilt(this);
+ },
+ tableWidgetFooter: {
+ selectButtons: true
+ }
+ }', // tabulator properties
+ 'datasetRepFieldsDefs' => '{
+ anrechnung_id: {visible: false},
+ lehrveranstaltung_id: {visible: false},
+ begruendung_id: {visible: false},
+ dms_id: {visible: false},
+ studiensemester_kurzbz: {visible: false},
+ studiengang_kz: {visible: false},
+ stg_bezeichnung: {headerFilter:"input"},
+ lv_bezeichnung: {headerFilter:"input"},
+ student: {headerFilter:"input"},
+ begruendung: {headerFilter:"input"},
+ dokument_bezeichnung: {headerFilter:"input", formatter:"link", formatterParams:{
+ labelField:"dokument_bezeichnung",
+ url:function(cell){return "'. current_url() .'/download?dms_id=" + cell.getData().dms_id},
+ target:"_blank"
+ }},
+ empfehlung_anrechnung: {headerFilter:"input", align:"center", formatter: format_nullToMinus},
+ status_kurzbz: {visible: false},
+ status_bezeichnung: {headerFilter:"input"}
+ }', // col properties
+);
+
+echo $this->widgetlib->widget('TableWidget', $filterWidgetArray);
+
+?>
\ No newline at end of file
diff --git a/public/css/Tabulator.css b/public/css/Tabulator.css
index 22eeb4f5c..e9045dc85 100644
--- a/public/css/Tabulator.css
+++ b/public/css/Tabulator.css
@@ -39,4 +39,34 @@
.btn-select-col-selected
{
background-color: #e6e6e6;
+}
+
+.btn-w200
+{
+ width: 200px;
+}
+
+.btn-mr5
+{
+ margin-right: 10px;
+}
+
+.btn-mr10
+{
+ margin-right: 10px;
+}
+
+.btn-mr20
+{
+ margin-right: 20px;
+}
+
+.btn-mr40
+{
+ margin-right: 40px;
+}
+
+.btn-mr50
+{
+ margin-right: 50px;
}
\ No newline at end of file
diff --git a/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js
new file mode 100644
index 000000000..527961d09
--- /dev/null
+++ b/public/js/lehre/anrechnung/approveAnrechnungUebersicht.js
@@ -0,0 +1,38 @@
+const BASE_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router;
+const APPROVE_ANRECHNUNG_DETAIL_URI = "lehre/anrechnung/ApproveAnrechnungDetail";
+
+// TABULATOR FUNCTIONS
+// ---------------------------------------------------------------------------------------------------------------------
+// Returns relative height (depending on screen size)
+function func_height(table){
+ return $(window).height() * 0.50;
+}
+
+// Adds column details
+function func_tableBuilt(table) {
+ table.addColumn(
+ {
+ title: "Details",
+ align: "center",
+ width: 100,
+ formatter: "link",
+ formatterParams:{
+ label:"Details",
+ url:function(cell){
+ return BASE_URL + "/" + APPROVE_ANRECHNUNG_DETAIL_URI + "?anrechnung_id=" + cell.getData().anrechnung_id
+ },
+ target:"_blank"
+ }
+ }, false, "status" // place column after status
+ );
+}
+
+// Formats null values to '-'
+var format_nullToMinus = function(cell, formatterParams){
+ return (cell.getValue() == null) ? '-' : cell.getValue();
+}
+
+
+$(function(){
+
+});
\ No newline at end of file
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index d6cec5a1e..9c8d5a329 100644
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -1569,7 +1569,7 @@ $phrases = array(
'phrases' => array(
array(
'sprache' => 'German',
- 'text' => 'StudentIn',
+ 'text' => 'Student',
'description' => '',
'insertvon' => 'system'
),
@@ -8308,6 +8308,166 @@ Any unusual occurrences
'insertvon' => 'system'
)
)
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'anrechnung',
+ 'phrase' => 'anrechnungenGenehmigen',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Anrechnungen genehmigen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Approve applications',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'anrechnung',
+ 'phrase' => 'anrechnungGenehmigen',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Anrechnung genehmigen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Approve application',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'anrechnung',
+ 'phrase' => 'empfehlungAnfordern',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Empfehlung anfordern',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Request recommendation',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'global',
+ 'phrase' => 'genehmigen',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Genehmigen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Approve',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'global',
+ 'phrase' => 'ablehnen',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Ablehnen',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Reject',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'anrechnung',
+ 'phrase' => 'empfehlung',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Empfehlung',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Recommendation',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'global',
+ 'phrase' => 'begruendung',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Begründung',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Reason',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'person',
+ 'phrase' => 'studentIn',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'StudentIn',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'student',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
)
);