diff --git a/application/config/fhcomplete.php b/application/config/fhcomplete.php index b680d6f5d..15c5d8be0 100644 --- a/application/config/fhcomplete.php +++ b/application/config/fhcomplete.php @@ -243,4 +243,4 @@ $config['fhc_acl'] = array // $config['addons_aufnahme_url'] = array(); -$config['addons_aufnahme_url']['OE_ROOT'] = 'http://debian.dev/addons/aufnahme/OE_ROOT/cis/index.php'; +$config['addons_aufnahme_url']['OE_ROOT'] = 'https://SERVER-NAME/addons/aufnahme/OE_ROOT/cis/index.php'; diff --git a/application/config/navigation.php b/application/config/navigation.php new file mode 100644 index 000000000..6e1c711ed --- /dev/null +++ b/application/config/navigation.php @@ -0,0 +1,75 @@ + array( + 'FH-Complete' => base_url('index.ci.php/'), + 'Vilesci' => base_url('/vilesci'), + 'CIS' => CIS_ROOT + ), + 'system/infocenter/InfoCenter/index' => array( + 'FH-Complete' => base_url('index.ci.php/'), + 'Vilesci' => base_url('/vilesci'), + 'CIS' => CIS_ROOT + ), + 'system/infocenter/InfoCenter/showDetails' => array( + 'FH-Complete' => base_url('index.ci.php/'), + 'Vilesci' => base_url('/vilesci'), + 'CIS' => CIS_ROOT + ) +); + +$config['navigation_menu'] = array(); + +$config['navigation_menu']['Vilesci/index'] = array( + 'Dashboard' => array( + 'link' => '#', + 'description' => 'Dashboard', + 'icon' => 'dashboard' + ), + 'Lehre' => array( + 'link' => '#', + 'icon' => 'graduation-cap', + 'description' => 'Lehre', + 'expand' => true, + 'children'=> array( + 'CIS' => array( + 'link' => CIS_ROOT, + 'icon' => '', + 'description' => 'CIS', + 'expand' => true + ), + 'Infocenter' => array( + 'link' => base_url('index.ci.php/system/infocenter/InfoCenter'), + 'icon' => 'info', + 'description' => 'Infocenter', + 'expand' => true + ), + ) + ), + 'Administration' => array( + 'link' => '#', + 'icon' => 'gear', + 'description' => 'Administration', + 'expand' => false, + 'children'=> array( + 'Vilesci' => array( + 'link' => base_url('vilesci/'), + 'icon' => '', + 'description' => 'Vilesci', + 'expand' => true + ), + 'Extensions' => array( + 'link' => base_url('index.ci.php/system/extensions/Manager'), + 'icon' => 'cubes', + 'description' => 'Extensions Manager', + 'expand' => true + ), + 'Datenschutz' => array( + 'link' => base_url('index.ci.php/extensions/FHC-Core-DSMS/export'), + 'description' => 'Datenschutz', + 'icon' => 'legal', + 'expand' => true + ) + ) + ) +); diff --git a/application/controllers/system/Messages.php b/application/controllers/system/Messages.php index 36db0238d..dd112d204 100644 --- a/application/controllers/system/Messages.php +++ b/application/controllers/system/Messages.php @@ -314,6 +314,7 @@ class Messages extends VileSci_Controller if (isset($vorlage_kurzbz)) { $this->load->model('system/Vorlagestudiengang_model', 'VorlagestudiengangModel'); + $this->VorlagestudiengangModel->addOrder('version','DESC'); $result = $this->VorlagestudiengangModel->loadWhere(array('vorlage_kurzbz' => $vorlage_kurzbz)); $this->output diff --git a/application/controllers/system/Navigation.php b/application/controllers/system/Navigation.php new file mode 100644 index 000000000..037a7d0f4 --- /dev/null +++ b/application/controllers/system/Navigation.php @@ -0,0 +1,98 @@ +config->load('navigation'); + + // Load session library + $this->load->library('session'); + } + + /** + * + */ + public function menu() + { + $navigation_widget_called = $this->input->get('navigation_widget_called'); + $json = array(); + + if (isset($navigation_widget_called)) + { + $navigationMenuArray = $this->config->item('navigation_menu'); + + if (isset($navigationMenuArray) && is_array($navigationMenuArray)) + { + if (isset($navigationMenuArray[$navigation_widget_called])) + { + $json = $navigationMenuArray[$navigation_widget_called]; + } + } + + if (isset($_SESSION['navigation_menu'])) + { + $navigationMenuSessionArray = $_SESSION['navigation_menu']; + + if (isset($navigationMenuSessionArray) && is_array($navigationMenuSessionArray)) + { + if (isset($navigationMenuSessionArray[$navigation_widget_called])) + { + $json = array_merge($json, $navigationMenuSessionArray[$navigation_widget_called]); + } + } + } + } + + $this->output->set_content_type('application/json')->set_output(json_encode($json)); + } + + /** + * + */ + public function header() + { + $navigation_widget_called = $this->input->get('navigation_widget_called'); + $json = array(); + + if (isset($navigation_widget_called)) + { + $navigationHeaderArray = $this->config->item('navigation_header'); + + if (isset($navigationHeaderArray) && is_array($navigationHeaderArray)) + { + if (isset($navigationHeaderArray[$navigation_widget_called])) + { + $json = $navigationHeaderArray[$navigation_widget_called]; + } + } + + if (isset($_SESSION['navigation_header'])) + { + $navigationHeaderSessionArray = $_SESSION['navigation_header']; + + if (isset($navigationHeaderSessionArray) && is_array($navigationHeaderSessionArray)) + { + if (isset($navigationHeaderSessionArray[$navigation_widget_called])) + { + $json = array_merge($json, $navigationHeaderSessionArray[$navigation_widget_called]); + } + } + } + } + + $this->output->set_content_type('application/json')->set_output(json_encode($json)); + } +} diff --git a/application/controllers/system/extensions/Manager.php b/application/controllers/system/extensions/Manager.php index db56b0d8b..9e24f00f5 100644 --- a/application/controllers/system/extensions/Manager.php +++ b/application/controllers/system/extensions/Manager.php @@ -11,15 +11,19 @@ class Manager extends VileSci_Controller * */ public function __construct() - { - parent::__construct(); + { + parent::__construct(); // Load helpers to upload files $this->load->helper(array('form', 'url')); - // Loads the extensions library - $this->load->library('ExtensionsLib'); - } + // Loads the extensions library + $this->load->library('ExtensionsLib'); + + $this->load->library('PermissionLib'); + if(!$this->permissionlib->isBerechtigt('system/extensions')) + show_error('You have no Permission! You need Extensions Permission'); + } /** * diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 216aa0619..5b13ce76d 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -45,8 +45,6 @@ class InfoCenter extends VileSci_Controller ) ); private $uid; // contains the UID of the logged user - private $navigationMenuArray; // contains all the voices for the navigation menu - private $navigationHeaderArray; /** * Constructor @@ -77,12 +75,7 @@ class InfoCenter extends VileSci_Controller if(!$this->permissionlib->isBerechtigt('basis/person')) show_error('You have no Permission! You need Infocenter Role'); - $this->_setNavigationMenuArray(); // sets property navigationMenuArray - - $this->navigationHeaderArray = array( - 'headertext' => 'Infocenter', - 'headertextlink' => base_url('index.ci.php/system/infocenter/InfoCenter') - ); + $this->setNavigationMenuArray(); // sets property navigationMenuArray } // ----------------------------------------------------------------------------------------------------------------- @@ -93,13 +86,7 @@ class InfoCenter extends VileSci_Controller */ public function index() { - $this->load->view( - 'system/infocenter/infocenter.php', - array( - 'navigationHeaderArray' => $this->navigationHeaderArray, - 'navigationMenuArray' => $this->navigationMenuArray - ) - ); + $this->load->view('system/infocenter/infocenter.php'); } /** @@ -131,11 +118,7 @@ class InfoCenter extends VileSci_Controller 'system/infocenter/infocenterDetails.php', array_merge( $persondata, - $prestudentdata, - array( - 'navigationHeaderArray' => $this->navigationHeaderArray, - 'navigationMenuArray' => $this->navigationMenuArray - ) + $prestudentdata ) ); } @@ -464,7 +447,7 @@ class InfoCenter extends VileSci_Controller /** * */ - private function _setNavigationMenuArray() + public function setNavigationMenuArray() { $listFiltersSent = array(); $listFiltersNotSent = array(); @@ -532,12 +515,22 @@ class InfoCenter extends VileSci_Controller $this->_fillCustomFilters($listCustomFilters, $filtersarray['personal']); } - $this->navigationMenuArray = array( - 'dashboard' => array( + if (!isset($_SESSION['navigation_menu'])) + { + $_SESSION['navigation_menu'] = array(); + } + + $_SESSION['navigation_menu']['system/infocenter/InfoCenter/index'] = array( + 'filters' => array( 'link' => '#', - 'description' => 'Dashboard', - 'icon' => 'dashboard' - ), + 'description' => 'Filter', + 'icon' => 'filter', + 'expand' => true, + 'children' => $filtersarray + ) + ); + + $_SESSION['navigation_menu']['system/infocenter/InfoCenter/showDetails'] = array( 'filters' => array( 'link' => '#', 'description' => 'Filter', @@ -565,11 +558,17 @@ class InfoCenter extends VileSci_Controller foreach ($filters as $filterId => $description) { $toPrint = "%s=%s"; + + if ($this->router->method != 'index') + { + + } + $tofill['children'][] = array( 'link' => sprintf($toPrint, base_url('index.ci.php/system/infocenter/InfoCenter?filter_id'), $filterId), 'description' => $description, 'subscriptDescription' => 'Remove', - 'subscriptLinkId' => 'removeFilterById', + 'subscriptLinkClass' => 'remove-filter', 'subscriptLinkValue' => $filterId ); } @@ -817,6 +816,8 @@ class InfoCenter extends VileSci_Controller $prestudentstatus = $prestudent->prestudentstatus; $person_id = $prestudent->person_id; $person = $this->PersonModel->getPersonStammdaten($person_id, true)->retval; + $dokumente = $this->AkteModel->getAktenWithDokInfo($person_id, null, false)->retval; + $dokumenteNachzureichen = $this->AkteModel->getAktenWithDokInfo($person_id, null, true)->retval; //fill mail variables $interessentbez = $person->geschlecht == 'm' ? 'Ein Interessent' : 'Eine Interessentin'; @@ -824,6 +825,25 @@ class InfoCenter extends VileSci_Controller $orgform = $prestudentstatus->orgform != '' ? ' ('.$prestudentstatus->orgform.')' : ''; $geschlecht = $person->geschlecht == 'm' ? 'männlich' : 'weiblich'; $geburtsdatum = date('d.m.Y', strtotime($person->gebdatum)); + $zgvort = !empty($prestudent->zgvort) ? ' in '.$prestudent->zgvort : ''; + $zgvnation = !empty($prestudent->zgvnation_bez) ? ', '.$prestudent->zgvnation_bez : ''; + $zgvdatum = !empty($prestudent->zgvdatum) ? ', am '.date_format(date_create($prestudent->zgvdatum), 'd.m.Y') : ''; + + $dokumenteNachzureichenMail = $dokumenteMail = array(); + //convert documents to array so they can be parsed, and keeping only needed fields + $lastel = end($dokumente); + foreach ($dokumente as $dokument) + { + $postfix = $lastel === $dokument ? '' : ' |'; + $dokumenteMail[] = array('dokument_bezeichnung' => $dokument->dokument_bezeichnung.$postfix); + } + + foreach ($dokumenteNachzureichen as $dokument) + { + $anmerkung = !empty($dokument->anmerkung) ? ' | Anmerkung: '.$dokument->anmerkung : ''; + $nachgereichtam = !empty($dokument->nachgereicht_am) ? ' | wird nachgereicht bis '.date_format(date_create($dokument->nachgereicht_am), 'd.m.Y') : ''; + $dokumenteNachzureichenMail[] = array('dokument_bezeichnung' => $dokument->dokument_bezeichnung, 'anmerkung' => $anmerkung, 'nachgereicht_am' => $nachgereichtam); + } $notizenBewerbung = $this->NotizModel->getNotizByTitel($person_id, 'Anmerkung zur Bewerbung')->retval; @@ -860,7 +880,13 @@ class InfoCenter extends VileSci_Controller 'gebdatum' => $geburtsdatum, 'mailadresse' => $mailadresse, 'prestudentid' => $prestudent_id, - 'notizentext' => $notizentext + 'zgvbez' => $prestudent->zgv_bez, + 'zgvort' => $zgvort, + 'zgvdatum' => $zgvdatum, + 'zgvnation' => $zgvnation, + 'notizentext' => $notizentext, + 'dokumente' => $dokumenteMail, + 'dokumente_nachgereicht' => $dokumenteNachzureichenMail ); $this->load->library('parser'); diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index be9e39082..bcc45ff17 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -29,18 +29,16 @@ class DB_Model extends FHC_Model /** * Constructor */ - public function __construct($dbTable = null, $pk = null, $hasSequence = true) + public function __construct($dbtype = 'default') { // Call parent constructor parent::__construct(); // Set properties - $this->pk = $pk; - $this->dbTable = $dbTable; - $this->hasSequence = $hasSequence; + $this->hasSequence = true; // Loads DB conns and confs - $this->load->database(); + $this->load->database($dbtype); // Loads the UDF library $this->load->library('UDFLib'); diff --git a/application/models/system/Extensions_model.php b/application/models/system/Extensions_model.php index c93817040..0792732d8 100644 --- a/application/models/system/Extensions_model.php +++ b/application/models/system/Extensions_model.php @@ -7,7 +7,7 @@ class Extensions_model extends DB_Model */ public function __construct() { - parent::__construct(); + parent::__construct('system'); $this->dbTable = 'system.tbl_extensions'; $this->pk = 'extension_id'; } diff --git a/application/views/home.php b/application/views/home.php index 5e7deddb0..cd032bc71 100644 --- a/application/views/home.php +++ b/application/views/home.php @@ -11,35 +11,9 @@ $this->load->view('templates/FHC-Header', ?>
| Studiengang | -{studiengangbez} {studiengangtypbez} {orgform} {sprache} | -
| Studiensemester | -{studiensemester} | -
| Geschlecht | -{geschlecht} | -
| Vorname | -{vorname} | -
| Nachname | -{nachname} | -
| Geburtsdatum | -{gebdatum} | -
| E-Mail Adresse | -{mailadresse} | -
| Prestudent ID | -{prestudentid} | -
| Anmerkungen zur Bewerbung | -{notizentext} | -
| Studiengang | +{studiengangbez} {studiengangtypbez} {orgform} {sprache} | +
| Studiensemester | +{studiensemester} | +
| Geschlecht | +{geschlecht} | +
| Vorname | +{vorname} | +
| Nachname | +{nachname} | +
| Geburtsdatum | +{gebdatum} | +
| E-Mail Adresse | +{mailadresse} | +
| Prestudent ID | +{prestudentid} | +
| Zugangsvoraussetzung | +{zgvbez}{zgvort}{zgvnation}{zgvdatum} | +
| Erbrachte Dokumente | ++ {dokumente} + {dokument_bezeichnung} + {/dokumente} + | +
| Nachzureichende Dokumente | +
+ {dokumente_nachgereicht}
+ {dokument_bezeichnung}{anmerkung}{nachgereicht_am}
+ + {/dokumente_nachgereicht} + |
+
| Anmerkungen zur Bewerbung | +{notizentext} | +
| @@ -196,7 +197,7 @@ $(document).ready(function() |