diff --git a/application/config/navigation.php b/application/config/navigation.php index 7f1b29932..d123399b6 100644 --- a/application/config/navigation.php +++ b/application/config/navigation.php @@ -9,20 +9,60 @@ $config['navigation_header'] = array( 'link' => site_url(''), 'icon' => '', 'description' => 'FH-Complete', - 'sort' => 1 + 'sort' => 10 ), - 'vilesci' => array( - 'link' => base_url('vilesci'), - 'icon' => '', - 'description' => 'Vilesci', - 'sort' => 2, - 'requiredPermissions' => 'basis/vilesci:r' + 'Organisation' => array( + 'link' => '#', + 'icon' => 'sitemap', + 'description' => 'Organisation', + 'sort' => 20, + 'children'=> array( + 'vilesci' => array( + 'link' => base_url('vilesci'), + 'icon' => '', + 'description' => 'Vilesci', + 'expand' => true, + 'sort' => 1, + 'requiredPermissions' => 'basis/vilesci:r' + ) + ) ), - 'cis' => array( - 'link' => CIS_ROOT, - 'icon' => '', - 'description' => 'CIS', - 'sort' => 3 + 'Lehre' => array( + 'link' => '#', + 'icon' => 'graduation-cap', + 'description' => 'Lehre', + 'sort' => 30, + 'children'=> array( + 'cis' => array( + 'link' => CIS_ROOT, + 'icon' => '', + 'description' => 'CIS', + 'sort' => 10 + ), + 'infocenter' => array( + 'link' => site_url('system/infocenter/InfoCenter'), + 'icon' => 'info', + 'description' => 'Infocenter', + 'expand' => true, + 'sort' => 20, + 'requiredPermissions' => 'infocenter:r' + ), + ) + ), + 'Personen' => array( + 'link' => '#', + 'icon' => 'user', + 'description' => 'Personen', + 'sort' => 40, + 'children'=> array( + 'bpk' => array( + 'link' => site_url('person/BPKWartung'), + 'icon' => '', + 'description' => 'BPK Wartung', + 'sort' => 10, + 'requiredPermissions' => 'admin:r' + ) + ) ) ) ); diff --git a/application/controllers/api/v1/crm/Buchungstyp.php b/application/controllers/api/v1/crm/Buchungstyp.php index a5bf44dfc..0253050f3 100644 --- a/application/controllers/api/v1/crm/Buchungstyp.php +++ b/application/controllers/api/v1/crm/Buchungstyp.php @@ -21,7 +21,7 @@ class Buchungstyp extends APIv1_Controller */ public function __construct() { - parent::__construct(array('Buchungstyp' => 'basis/buchungstyp:rw'); + parent::__construct(array('Buchungstyp' => 'basis/buchungstyp:rw')); // Load model BuchungstypModel $this->load->model('crm/buchungstyp_model', 'BuchungstypModel'); diff --git a/application/controllers/person/BPKWartung.php b/application/controllers/person/BPKWartung.php new file mode 100644 index 000000000..a8e9b8829 --- /dev/null +++ b/application/controllers/person/BPKWartung.php @@ -0,0 +1,199 @@ + 'admin:r', + 'showDetails' => 'admin:r', + 'saveBPK' => 'admin:rw', + ) + ); + + // Loads models + $this->load->model('crm/akte_model', 'AkteModel'); + $this->load->model('person/person_model', 'PersonModel'); + $this->load->model('person/adresse_model', 'AdressModel'); + + $this->load->library('WidgetLib'); + $this->loadPhrases( + array( + 'global', + 'person', + 'lehre', + 'ui', + 'infocenter', + 'filter' + ) + ); + + $this->setControllerId(); // sets the controller id + } + + // ----------------------------------------------------------------------------------------------------------------- + // Public methods + + /** + * Main page of the InfoCenter tool + */ + public function index() + { + $this->_setNavigationMenuIndex(); // define the navigation menu for this page + + $this->load->view('person/bpk/bpkwartung.php'); + } + + /** + * Personal details page of the InfoCenter tool + * Initialization function, gets person and prestudent data and loads the view with the data + * @param $person_id + */ + public function showDetails() + { + $this->_setNavigationMenuShowDetails(); + $person_id = $this->input->get('person_id'); + + if (!is_numeric($person_id)) + show_error('person id is not numeric!'); + + $personexists = $this->PersonModel->load($person_id); + + if (isError($personexists)) + show_error($personexists->retval); + + if (!hasData($personexists)) + show_error('Person does not exist!'); + + $persondata = $this->_loadPersonData($person_id); + + + $data[self::FHC_CONTROLLER_ID] = $this->getControllerId(); + + $this->load->view('person/bpk/bpkDetails.php', $persondata); + } + + /** + * Saves a ZGV for a prestudent, includes Ort, Datum, Nation for bachelor and master + * @param $prestudent_id + */ + public function saveBPK() + { + $person_id = $this->input->post('person_id'); + $bpk = $this->input->post('bpk'); + + if (isEmptyString($person_id)) + $result = error('PersonID missing'); + else + { + $result = $this->PersonModel->update( + $person_id, + array( + 'bpk' => $bpk, + 'updateamum' => date('Y-m-d H:i:s') + ) + ); + redirect('person/BPKWartung/index'); + } + } + + // ----------------------------------------------------------------------------------------------------------------- + // Private methods + + /** + * Loads all necessary Person data: Stammdaten (name, svnr, contact, ...), Dokumente, Logs and Notizen + * @param $person_id + * @return array + */ + private function _loadPersonData($person_id) + { + $stammdaten = $this->PersonModel->getPersonStammdaten($person_id, true); + + if (isError($stammdaten)) + { + show_error($stammdaten->retval); + } + + if (!isset($stammdaten->retval)) + return null; + + $adresse = $this->AdressModel->getZustellAdresse($person_id); + + if (isError($adresse)) + { + show_error($adresse->retval); + } + + $data = array( + 'stammdaten' => $stammdaten->retval, + 'adresse' => $adresse->retval[0] + ); + + return $data; + } + + /** + * Define the navigation menu for the showDetails page + */ + private function _setNavigationMenuShowDetails() + { + $this->load->library('NavigationLib', array('navigation_page' => 'person/BPKWartung/showDetails')); + + $link = site_url('person/BPKWartung'); + + $this->navigationlib->setSessionMenu( + array( + 'back' => $this->navigationlib->oneLevel( + 'Zurück', // description + $link, // link + array(), // children + 'angle-left', // icon + true, // expand + null, // subscriptDescription + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 1 // sort + ) + ) + ); + } + + /** + * Define the navigation menu for the showDetails page + */ + private function _setNavigationMenuIndex() + { + $this->load->library('NavigationLib', array('navigation_page' => 'person/BPKWartung/index')); + + $link = site_url(); + + $this->navigationlib->setSessionMenu( + array( + 'back' => $this->navigationlib->oneLevel( + 'Zurück', // description + $link, // link + array(), // children + 'angle-left', // icon + true, // expand + null, // subscriptDescription + null, // subscriptLinkClass + null, // subscriptLinkValue + '', // target + 1 // sort + ) + ) + ); + } +} diff --git a/application/controllers/system/Navigation.php b/application/controllers/system/Navigation.php index 3471165a8..7f10fadc8 100644 --- a/application/controllers/system/Navigation.php +++ b/application/controllers/system/Navigation.php @@ -57,7 +57,7 @@ class Navigation extends Auth_Controller // Private methods /** - * Loads the FiltersLib with the NAVIGATION_PAGE_PARAM parameter + * Loads the NavigationLib with the NAVIGATION_PAGE_PARAM parameter * If the parameter NAVIGATION_PAGE_PARAM is not given then the execution of the controller is terminated and * an error message is printed */ @@ -76,7 +76,7 @@ class Navigation extends Auth_Controller $navigationPage = $this->input->post(self::NAVIGATION_PAGE_PARAM); // is retrived from the HTTP POST } - // Loads the FiltersLib that contains all the used logic + // Loads the NavigationLib that contains all the used logic $this->load->library('NavigationLib', array(self::NAVIGATION_PAGE_PARAM => $navigationPage)); } else // Otherwise an error will be written in the output diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 4662fbc40..670dabddd 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -74,6 +74,7 @@ class InfoCenter extends Auth_Controller 'saveFormalGeprueft' => 'infocenter:rw', 'getLastPrestudentWithZgvJson' => 'infocenter:r', 'getZgvInfoForPrestudent' => 'infocenter:r', + 'saveBewPriorisierung' => 'infocenter:rw', 'saveZgvPruefung' => 'infocenter:rw', 'saveAbsage' => 'infocenter:rw', 'saveFreigabe' => 'infocenter:rw', @@ -81,6 +82,7 @@ class InfoCenter extends Auth_Controller 'updateNotiz' => 'infocenter:rw', 'reloadNotizen' => 'infocenter:r', 'reloadLogs' => 'infocenter:r', + 'reloadZgvPruefungen' => 'infocenter:r', 'outputAkteContent' => 'infocenter:r', 'getParkedDate' => 'infocenter:r', 'park' => 'infocenter:rw', @@ -280,6 +282,22 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/studiengangZgvInfo.php', $data); } + /** + * Saves application priority for a prestudent + */ + public function saveBewPriorisierung() + { + $prestudent_id = $this->input->post('prestudentid'); + $change = $this->input->post('change'); + + if (!is_numeric($change) || !is_numeric($prestudent_id)) + $result = error('Parameteres missing'); + else + $result = $this->PrestudentModel->changePrio($prestudent_id, intval($change)); + + $this->output->set_content_type('application/json')->set_output(json_encode($result)); + } + /** * Saves a ZGV for a prestudent, includes Ort, Datum, Nation for bachelor and master * @param $prestudent_id @@ -338,55 +356,50 @@ class InfoCenter extends Auth_Controller * inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status. * @param $prestudent_id */ - public function saveAbsage($prestudent_id) + public function saveAbsage() { + $json = null; + $prestudent_id = $this->input->post('prestudent_id'); $statusgrund = $this->input->post('statusgrund'); $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); - if (isError($lastStatus)) + $this->StatusgrundModel->addSelect('bezeichnung_mehrsprachig'); + $statusgrresult = $this->StatusgrundModel->load($statusgrund); + + if (hasData($lastStatus) && hasData($statusgrresult)) { - show_error($lastStatus->retval); - } - - //check if still Interessent and not freigegeben yet - if (count($lastStatus->retval) > 0 && $lastStatus->retval[0]->status_kurzbz === 'Interessent' && !isset($lastStatus->retval[0]->bestaetigtam)) - { - $result = $this->PrestudentstatusModel->insert( - array( - 'prestudent_id' => $prestudent_id, - 'studiensemester_kurzbz' => $lastStatus->retval[0]->studiensemester_kurzbz, - 'ausbildungssemester' => $lastStatus->retval[0]->ausbildungssemester, - 'datum' => date('Y-m-d'), - 'orgform_kurzbz' => $lastStatus->retval[0]->orgform_kurzbz, - 'studienplan_id' => $lastStatus->retval[0]->studienplan_id, - 'status_kurzbz' => 'Abgewiesener', - 'statusgrund_id' => $statusgrund, - 'insertvon' => $this->_uid, - 'insertamum' => date('Y-m-d H:i:s') - ) - ); - - if (isError($result)) + //check if still Interessent and not freigegeben yet + if ($lastStatus->retval[0]->status_kurzbz === 'Interessent' && !isset($lastStatus->retval[0]->bestaetigtam)) { - show_error($result->retval); + $result = $this->PrestudentstatusModel->insert( + array( + 'prestudent_id' => $prestudent_id, + 'studiensemester_kurzbz' => $lastStatus->retval[0]->studiensemester_kurzbz, + 'ausbildungssemester' => $lastStatus->retval[0]->ausbildungssemester, + 'datum' => date('Y-m-d'), + 'orgform_kurzbz' => $lastStatus->retval[0]->orgform_kurzbz, + 'studienplan_id' => $lastStatus->retval[0]->studienplan_id, + 'status_kurzbz' => 'Abgewiesener', + 'statusgrund_id' => $statusgrund, + 'insertvon' => $this->_uid, + 'insertamum' => date('Y-m-d H:i:s') + ) + ); + + $json = $result; + if (isSuccess($result)) + { + $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); + + //statusgrund bezeichnung for logging + $statusgrund_bez = $statusgrresult->retval[0]->bezeichnung_mehrsprachig[1]; + + $this->_log($logdata['person_id'], 'abgewiesen', array($prestudent_id, $logdata['studiengang_kurzbz'], $statusgrund_bez)); + } } - - $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - - //statusgrund bezeichnung for logging - $this->StatusgrundModel->addSelect('bezeichnung_mehrsprachig'); - $result = $this->StatusgrundModel->load($statusgrund); - if (isError($result)) - { - show_error($result->retval); - } - - $statusgrund_bez = $result->retval[0]->bezeichnung_mehrsprachig[1]; - - $this->_log($logdata['person_id'], 'abgewiesen', array($prestudent_id, $logdata['studiengang_kurzbz'], $statusgrund_bez)); } - $this->_redirectToStart($prestudent_id, 'ZgvPruef'); + $this->output->set_content_type('application/json')->set_output(json_encode($json)); } /** @@ -394,16 +407,18 @@ class InfoCenter extends Auth_Controller * updates bestaetigtam and bestaetigtvon fields of the last status * @param $prestudent_id */ - public function saveFreigabe($prestudent_id) + public function saveFreigabe() { + $json = null; + $prestudent_id = $this->input->post('prestudent_id'); + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); - if (isError($lastStatus)) - { - show_error($lastStatus->retval); - } + $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - if (count($lastStatus->retval) > 0) + $akteresult = $this->AkteModel->loadWhere(array('person_id' => $logdata['person_id'], 'formal_geprueft_amum !=' => NULL)); + + if (hasData($lastStatus) && isSuccess($akteresult)) { $lastStatus = $lastStatus->retval[0]; @@ -425,45 +440,36 @@ class InfoCenter extends Auth_Controller ) ); - if (isError($result)) + $json = $result; + + if (isSuccess($result)) { - show_error($result->retval); + $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); + + //set documents which have been formal geprüft to accepted + $dokument_kurzbzs = array(); + + foreach ($akteresult->retval as $akte) + { + $dokument_kurzbzs[] = $akte->dokument_kurzbz; + } + + $acceptresult = $this->DokumentprestudentModel->setAcceptedDocuments($prestudent_id, $dokument_kurzbzs); + + //returns null if no documents to accept + if ($acceptresult !== null && isError($acceptresult)) + { + $json->error = 2; + } + + $this->_log($logdata['person_id'], 'freigegeben', array($prestudent_id, $logdata['studiengang_kurzbz'])); + + $this->_sendFreigabeMail($prestudent_id); } - - $this->load->model('crm/dokumentprestudent_model', 'DokumentprestudentModel'); - - $logdata = $this->_getPersonAndStudiengangFromPrestudent($prestudent_id); - - //set documents which have been formal geprüft to accepted - $result = $this->AkteModel->loadWhere(array('person_id' => $logdata['person_id'], 'formal_geprueft_amum !=' => NULL)); - - if (isError($result)) - { - show_error($result->retval); - } - - $dokument_kurzbzs = array(); - - foreach ($result->retval as $akte) - { - $dokument_kurzbzs[] = $akte->dokument_kurzbz; - } - - $result = $this->DokumentprestudentModel->setAcceptedDocuments($prestudent_id, $dokument_kurzbzs); - - //returns null if no documents to accept - if ($result !== null && isError($result)) - { - show_error($result->retval); - } - - $this->_sendFreigabeMail($prestudent_id); - - $this->_log($logdata['person_id'], 'freigegeben', array($prestudent_id, $logdata['studiengang_kurzbz'])); } } - $this->_redirectToStart($prestudent_id, 'ZgvPruef'); + $this->output->set_content_type('application/json')->set_output(json_encode($json)); } /** @@ -543,6 +549,19 @@ class InfoCenter extends Auth_Controller $this->load->view('system/infocenter/logs.php', array('logs' => $logs)); } + /** + * Loads Zgv Prüfung view for a person, helper for reloading after ajax request + * @param $person_id + */ + public function reloadZgvPruefungen($person_id) + { + $prestudentdata = $this->_loadPrestudentData($person_id); + + $prestudentdata[self::FHC_CONTROLLER_ID] = $this->getControllerId(); + + $this->load->view('system/infocenter/zgvpruefungen.php', $prestudentdata); + } + /** * Outputs content of an Akte, sends appropriate headers (so the document can be downloaded) * @param $akte_id @@ -864,7 +883,7 @@ class InfoCenter extends Auth_Controller 'filters' => $this->navigationlib->oneLevel( 'Filter', // description '#', // link - (isset($filtersArray['children'])?$filtersArray['children']:''), // children + (isset($filtersArray['children']) ? $filtersArray['children'] : ''), // children '', // icon true, // expand null, // subscriptDescription @@ -880,20 +899,18 @@ class InfoCenter extends Auth_Controller /** * Utility method used to fill elements of the InfoCenter left menu of the main InfoCenter page */ - private function _fillFilters($filters, &$tofill) + private function _fillFilters($filters, &$toFill) { - $toPrint = "%s?%s=%s&%s=%s"; - foreach ($filters as $filterId => $description) { - $tofill['children'][] = array( - 'link' => sprintf( - $toPrint, - site_url(self::INFOCENTER_URI), 'filter_id', $filterId, - FHC_Controller::FHC_CONTROLLER_ID, - $this->getControllerId() - ), - 'description' => $description + $toFill['children'][] = $this->navigationlib->oneLevel( + $description, // description + sprintf( + '%s?%s=%s', + site_url(self::INFOCENTER_URI), + 'filter_id', + $filterId + ) // link ); } } @@ -901,20 +918,18 @@ class InfoCenter extends Auth_Controller /** * Utility method used to fill elements of the InfoCenter left menu of the freigegeben InfoCenter page */ - private function _fillFiltersFreigegeben($filters, &$tofill) + private function _fillFiltersFreigegeben($filters, &$toFill) { - $toPrint = "%s?%s=%s&%s=%s"; - foreach ($filters as $filterId => $description) { - $tofill['children'][] = array( - 'link' => sprintf( - $toPrint, - site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE), 'filter_id', $filterId, - FHC_Controller::FHC_CONTROLLER_ID, - $this->getControllerId() - ), - 'description' => $description + $toFill['children'][] = $this->navigationlib->oneLevel( + $description, // description + sprintf( + '%s?%s=%s', + site_url(self::INFOCENTER_URI.'/'.self::FREIGEGEBEN_PAGE), + 'filter_id', + $filterId + ) // link ); } } @@ -923,23 +938,26 @@ class InfoCenter extends Auth_Controller * Utility method used to fill elements of the InfoCenter left menu * with the list of the custom filter of the authenticated user */ - private function _fillCustomFilters($filters, &$tofill) + private function _fillCustomFilters($filters, &$toFill) { - $toPrint = "%s?%s=%s&%s=%s"; - foreach ($filters as $filterId => $description) { - $tofill['children'][] = array( - 'link' => sprintf( - $toPrint, - site_url(self::INFOCENTER_URI), 'filter_id', $filterId, - FHC_Controller::FHC_CONTROLLER_ID, - $this->getControllerId() - ), - 'description' => $description, - 'subscriptDescription' => 'Remove', - 'subscriptLinkClass' => 'remove-custom-filter', - 'subscriptLinkValue' => $filterId + $toFill['children'][] = $this->navigationlib->oneLevel( + $description, // description + sprintf( + '%s?%s=%s', + site_url(self::INFOCENTER_URI), + 'filter_id', + $filterId + ), // link + null, // children + '', // icon + false, // expand + 'Remove', // subscriptDescription + 'remove-custom-filter', // subscriptLinkClass + $filterId, // subscriptLinkValue + null, // sort + null // requiredPermissions ); } } @@ -1058,6 +1076,8 @@ class InfoCenter extends Auth_Controller show_error($prestudenten->retval); } + $interessentenCount = array(); + foreach ($prestudenten->retval as $prestudent) { $prestudent = $this->PrestudentModel->getPrestudentWithZgv($prestudent->prestudent_id); @@ -1079,43 +1099,128 @@ class InfoCenter extends Auth_Controller //if prestudent is not interessent or is already bestaetigt, then show only as information, non-editable $zgvpruefung->infoonly = !isset($zgvpruefung->prestudentstatus) || isset($zgvpruefung->prestudentstatus->bestaetigtam) || $zgvpruefung->prestudentstatus->status_kurzbz != 'Interessent'; + //numeric application priority and arrows for changing + $zgvpruefung->changeup = false; + $zgvpruefung->changedown = false; + + if (isset($zgvpruefung->prestudentstatus->status_kurzbz) && $zgvpruefung->prestudentstatus->status_kurzbz == 'Interessent') + { + if (isset($zgvpruefung->prestudentstatus->studiensemester_kurzbz)) + { + $studiensemester = $zgvpruefung->prestudentstatus->studiensemester_kurzbz; + $zgvpruefung->changeup = $this->PrestudentModel->checkPrioChange($zgvpruefung->prestudent_id, $studiensemester, -1); + $zgvpruefung->changedown = $this->PrestudentModel->checkPrioChange($zgvpruefung->prestudent_id, $studiensemester, 1); + if (array_key_exists($studiensemester, $interessentenCount)) + $interessentenCount[$studiensemester]++; + else + $interessentenCount[$studiensemester] = 1; + } + } + $zgvpruefungen[] = $zgvpruefung; } - // Interessenten come first, otherwise by bewerbungsdatum desc, then by prestudent_id desc - usort($zgvpruefungen, function ($a, $b) { - $bewdatesort = isset($a->prestudentstatus) && isset($b->prestudentstatus) ? strcmp($b->prestudentstatus->bewerbung_abgeschicktamum, $a->prestudentstatus->bewerbung_abgeschicktamum) : 0; - $defaultsort = $bewdatesort === 0 ? (int)$b->prestudent_id - (int)$a->prestudent_id : $bewdatesort; - if (!isset($a->prestudentstatus->status_kurzbz) || !isset($b->prestudentstatus->status_kurzbz)) - return $defaultsort; - elseif ($a->prestudentstatus->status_kurzbz === 'Interessent' && $b->prestudentstatus->status_kurzbz === 'Interessent') - { - //infoonly Interessenten come after new Interessenten - if ($a->infoonly === $b->infoonly) - return $defaultsort; - elseif ($a->infoonly) - return 1; - elseif ($b->infoonly) - return -1; - } - elseif ($a->prestudentstatus->status_kurzbz === 'Interessent') - return -1; - elseif ($b->prestudentstatus->status_kurzbz === 'Interessent') - return 1; - else - return $defaultsort; - }); + $this->load->model('organisation/studiensemester_model', 'StudiensemesterModel'); + + $this->_sortPrestudents($zgvpruefungen); $statusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => 'Abgewiesener'))->retval; $data = array ( 'zgvpruefungen' => $zgvpruefungen, + 'numberinteressenten' => $interessentenCount, 'statusgruende' => $statusgruende ); return $data; } + /** + * Helper function for sorting prestudents + * @param $zgvpruefungen + */ + private function _sortPrestudents(&$zgvpruefungen) + { + usort($zgvpruefungen, function ($a, $b) { + //sort: + // 1: Studiensemester + if (isset($a->prestudentstatus->studiensemester_kurzbz) || isset($b->prestudentstatus->studiensemester_kurzbz)) + { + if (!isset($a->prestudentstatus->studiensemester_kurzbz)) + return 1; + elseif(!isset($b->prestudentstatus->studiensemester_kurzbz)) + return -1; + + $starta = $this->StudiensemesterModel->load($a->prestudentstatus->studiensemester_kurzbz); + if (!hasData($starta)) + { + show_error($starta->retval); + } + + $startb = $this->StudiensemesterModel->load($b->prestudentstatus->studiensemester_kurzbz); + if (!hasData($startb)) + { + show_error($startb->retval); + } + + $starta = date_format(date_create($starta->retval[0]->start), 'Y-m-d'); + $startb = date_format(date_create($startb->retval[0]->start), 'Y-m-d'); + + if ($starta > $startb) + return -1; + elseif ($starta < $startb) + return 1; + } + // 2: Status + if (isset($a->prestudentstatus->status_kurzbz) || isset($a->prestudentstatus->status_kurzbz)) + { + if (!isset($b->prestudentstatus->status_kurzbz)) + return -1; + elseif (!isset ($a->prestudentstatus->status_kurzbz)) + return 1; + elseif ($a->prestudentstatus->status_kurzbz !== $b->prestudentstatus->status_kurzbz) + { + if ($a->prestudentstatus->status_kurzbz === 'Interessent') + return -1; + elseif ($b->prestudentstatus->status_kurzbz === 'Interessent') + return 1; + } + } + + // 3: Priorisierung, Nulls last + if (isset($a->priorisierung) || isset($b->priorisierung)) + { + if (!isset($a->priorisierung)) + return 1; + elseif (!isset($b->priorisierung)) + return -1; + elseif ($a->priorisierung > $b->priorisierung) + return 1; + elseif ($a->priorisierung < $b->priorisierung) + return -1; + } + + // 4: Bewerbungsdatum + $starta = isset($a->prestudentstatus->bewerbung_abgeschicktamum) ? $a->prestudentstatus->bewerbung_abgeschicktamum : null; + $startb = isset($b->prestudentstatus->bewerbung_abgeschicktamum) ? $b->prestudentstatus->bewerbung_abgeschicktamum : null; + + if (isset($starta) || isset($startb)) + { + if (!isset($starta)) + return 1; + elseif(!isset($startb)) + return -1; + elseif ($starta > $startb) + return -1; + elseif ($starta < $startb) + return 1; + } + + // 5: prestudentid + return (int)$b->prestudent_id - (int)$a->prestudent_id; + }); + } + /** * Helper function for redirecting to initial page for person from a prestudent-specific page * @param $prestudent_id diff --git a/application/core/DB_Model.php b/application/core/DB_Model.php index 6273cb962..b636c3fe5 100644 --- a/application/core/DB_Model.php +++ b/application/core/DB_Model.php @@ -26,6 +26,8 @@ class DB_Model extends FHC_Model private $executedQueryMetaData; private $executedQueryListFields; + private $debugMode; + /** * Constructor */ @@ -42,6 +44,10 @@ class DB_Model extends FHC_Model // Loads the UDF library $this->load->library('UDFLib'); + // Loads the logs library + $this->load->library('LogLib'); + + $this->debugMode = isset($this->db->db_debug) && $this->db->db_debug === true; } // ------------------------------------------------------------------------------------------ @@ -62,7 +68,11 @@ class DB_Model extends FHC_Model if (isError($validate = $this->_manageUDFs($data, $this->dbTable))) return $validate; // DB-INSERT - if ($this->db->insert($this->dbTable, $data)) + $insert = $this->db->insert($this->dbTable, $data); + + $this->_logLastQuery(); + + if ($insert) { // If the table has a primary key that uses a sequence if ($this->hasSequence === true) @@ -126,7 +136,11 @@ class DB_Model extends FHC_Model $this->db->where($tmpId); // DB-UPDATE - if ($this->db->update($this->dbTable, $data)) + $update = $this->db->update($this->dbTable, $data); + + $this->_logLastQuery(); + + if ($update) { return success($id); } @@ -164,7 +178,11 @@ class DB_Model extends FHC_Model } // DB-DELETE - if ($this->db->delete($this->dbTable, $tmpId)) + $delete = $this->db->delete($this->dbTable, $tmpId); + + $this->_logLastQuery(); + + if ($delete) { return success($id); } @@ -201,15 +219,7 @@ class DB_Model extends FHC_Model $tmpId = array($this->pk => $id); } - // DB-SELECT - if ($result = $this->db->get_where($this->dbTable, $tmpId)) - { - return success($this->_toPhp($result)); - } - else - { - return error($this->db->error(), FHC_DB_ERROR); - } + return $this->loadWhere($tmpId); } /** @@ -223,7 +233,11 @@ class DB_Model extends FHC_Model if (is_null($this->dbTable)) return error(FHC_MODEL_ERROR, FHC_NODBTABLE); // Execute query - if ($result = $this->db->get_where($this->dbTable, $where)) + $result = $this->db->get_where($this->dbTable, $where); + + $this->_logLastQuery(); + + if ($result) { return success($this->_toPhp($result)); } @@ -292,6 +306,9 @@ class DB_Model extends FHC_Model // Execute the query $resultDB = $this->db->get_where($this->dbTable, $where); + + $this->_logLastQuery(); + // If everything went ok... if ($resultDB) { @@ -603,7 +620,6 @@ class DB_Model extends FHC_Model // Workaround to get metadata from this table $result = $this->db->query(sprintf(DB_Model::QUERY_LIST_FIELDS, $this->dbTable)); - if (is_object($result)) { $listFields = $result->list_fields(); @@ -736,6 +752,8 @@ class DB_Model extends FHC_Model $resultDB = $this->db->query($query); } + $this->_logLastQuery(); + // If no errors occurred if ($resultDB) { @@ -940,4 +958,12 @@ class DB_Model extends FHC_Model return $this->execQuery($query, array(strtolower($schema), strtolower($table))); } + + /** + * + */ + private function _logLastQuery() + { + if ($this->debugMode) $this->loglib->logDebug($this->db->last_query()); + } } diff --git a/application/libraries/FiltersLib.php b/application/libraries/FiltersLib.php index 51c399f29..5d9fb5b26 100644 --- a/application/libraries/FiltersLib.php +++ b/application/libraries/FiltersLib.php @@ -263,7 +263,6 @@ class FiltersLib public function generateDatasetQuery($query, $filters) { $datasetQuery = 'SELECT * FROM ('.$query.') '.self::DATASET_TABLE_ALIAS; - $trimedval = trim($query); // If the given query is valid and the parameter filters is an array if (!isEmptyString($query) && $filters != null && is_array($filters)) @@ -366,7 +365,7 @@ class FiltersLib public function removeSelectedField($selectedField) { $removeSelectedField = false; - $trimedval = (isset($selectedField)?trim($selectedField):''); + // Checks the parameter selectedField if (!isEmptyString($selectedField)) { @@ -400,7 +399,7 @@ class FiltersLib public function addSelectedField($selectedField) { $removeSelectedField = false; - $trimedval = (isset($selectedField)?trim($selectedField):''); + // Checks the parameter selectedField if (!isEmptyString($selectedField)) { @@ -429,7 +428,7 @@ class FiltersLib public function removeAppliedFilter($appliedFilter) { $removeAppliedFilter = false; - $trimedval = (isset($appliedFilter)?trim($appliedFilter):''); + // Checks the parameter appliedFilter if (!isEmptyString($appliedFilter)) { @@ -517,7 +516,7 @@ class FiltersLib public function addFilter($filter) { $addFilter = false; - $trimedval = (isset($filter)?trim($filter):''); + // Checks the parameter filter if (!isEmptyString($filter)) { @@ -560,7 +559,7 @@ class FiltersLib public function saveCustomFilter($customFilterDescription) { $saveCustomFilter = false; // by default returns a failure - $trimedval = (isset($customFilterDescription)?trim($customFilterDescription):''); + // Checks parameter customFilterDescription if not valid stop the execution if (isEmptyString($customFilterDescription)) { diff --git a/application/libraries/LogLib.php b/application/libraries/LogLib.php index a42132644..cb0541003 100644 --- a/application/libraries/LogLib.php +++ b/application/libraries/LogLib.php @@ -16,27 +16,48 @@ class LogLib const CLASS_POSTFIX = '->'; const LINE_SEPARATOR = ':'; + // -------------------------------------------------------------------------------------------------------------- + // Public methods + /** - * format + * logDebug */ - private function format($class, $function, $line) + public function logDebug($message) { - $formatted = LogLib::CALLER_PREFIX; - - if (!is_null($class) && $class != '') - { - $formatted .= $class.LogLib::CLASS_POSTFIX; - } - - $formatted .= $function.LogLib::LINE_SEPARATOR.$line.LogLib::CALLER_POSTFIX.' '; - - return $formatted; + $this->_log(LogLib::DEBUG, $message); } /** - * getCaller + * logInfo */ - private function getCaller() + public function logInfo($message) + { + $this->_log(LogLib::INFO, $message); + } + + /** + * logError + */ + public function logError($message) + { + $this->_log(LogLib::ERROR, $message); + } + + // -------------------------------------------------------------------------------------------------------------- + // Private methods + + /** + * log + */ + private function _log($level, $message) + { + log_message($level, $this->_getCaller().$message); + } + + /** + * _getCaller + */ + private function _getCaller() { $classIndex = 3; $functionIndex = 3; @@ -60,38 +81,23 @@ class LogLib $line = $backtrace_arr[$lineIndex]['line']; } - return $this->format($class, $function, $line); + return $this->_format($class, $function, $line); } /** - * log + * format */ - private function log($level, $message) + private function _format($class, $function, $line) { - log_message($level, $this->getCaller().$message); - } + $formatted = LogLib::CALLER_PREFIX; - /** - * logDebug - */ - public function logDebug($message) - { - $this->log(LogLib::DEBUG, $message); - } + if (!is_null($class) && $class != '') + { + $formatted .= $class.LogLib::CLASS_POSTFIX; + } - /** - * logInfo - */ - public function logInfo($message) - { - $this->log(LogLib::INFO, $message); - } + $formatted .= $function.LogLib::LINE_SEPARATOR.$line.LogLib::CALLER_POSTFIX.' '; - /** - * logError - */ - public function logError($message) - { - $this->log(LogLib::ERROR, $message); + return $formatted; } } diff --git a/application/libraries/NavigationLib.php b/application/libraries/NavigationLib.php index 1b15943ea..812467c78 100644 --- a/application/libraries/NavigationLib.php +++ b/application/libraries/NavigationLib.php @@ -69,7 +69,7 @@ class NavigationLib public function oneLevel( $description, $link = '#', $children = null, $icon = '', $expand = false, $subscriptDescription = null, $subscriptLinkClass = null, $subscriptLinkValue = null, $target = '', - $sort = null, $requiredPermissions = null) + $sort = null, $requiredPermissions = null, $subscriptLinkHref = '#') { return array( 'description' => $description, @@ -82,7 +82,8 @@ class NavigationLib 'subscriptLinkClass' => $subscriptLinkClass, 'subscriptLinkValue' => $subscriptLinkValue, 'sort' => $sort, - 'requiredPermissions' => $requiredPermissions + 'requiredPermissions' => $requiredPermissions, + 'subscriptLinkHref' => $subscriptLinkHref ); } @@ -235,8 +236,7 @@ class NavigationLib { $extensionArray = array_merge_recursive( $extensionArray, - $this->_wildcardsearch($config[$configName], - $navigationPage) + $this->_wildcardsearch($config[$configName], $navigationPage) ); } } diff --git a/application/libraries/PhrasesLib.php b/application/libraries/PhrasesLib.php index 88e79b467..6793f38e0 100644 --- a/application/libraries/PhrasesLib.php +++ b/application/libraries/PhrasesLib.php @@ -194,7 +194,6 @@ class PhrasesLib { $_phrase = $this->_phrases[$i]; // single phrase - $trimedval = trim($_phrase->text); // If the single phrase match the given parameters and is not an empty string if ($_phrase->category == $category && $_phrase->phrase == $phrase diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php index 4cfe08e9a..b7e54185e 100644 --- a/application/models/crm/Prestudent_model.php +++ b/application/models/crm/Prestudent_model.php @@ -185,7 +185,6 @@ class Prestudent_model extends DB_Model return $this->execQuery(sprintf($query, is_array($prestudent_id) ? 'IN' : '='), array($prestudent_id)); } - /** * gets extended zgv data (with zgv bezeichnung) for a prestudent * includes last status, Studiengang, zgv, zgv master @@ -219,6 +218,18 @@ class Prestudent_model extends DB_Model if (count($lastStatus->retval) > 0) { + // get Studiengangname from Studienlan and -ordnung + $studienordnung = $this->PrestudentstatusModel->getStudienordnungFromPrestudent($prestudent_id); + if ($studienordnung->error) + return error($studienordnung->retval); + + if (count($studienordnung->retval) > 0) + { + $lastStatus->retval[0]->studiengangkurzbzlang = $studienordnung->retval[0]->studiengangkurzbzlang; + $lastStatus->retval[0]->studiengangbezeichnung = $studienordnung->retval[0]->studiengangbezeichnung; + $lastStatus->retval[0]->studiengangbezeichnung_englisch = $studienordnung->retval[0]->studiengangbezeichnung_englisch; + } + $this->load->model('system/sprache_model', 'SpracheModel'); $language = $this->SpracheModel->load($lastStatus->retval[0]->sprache); @@ -278,4 +289,234 @@ class Prestudent_model extends DB_Model return $this->execQuery($qry, $parametersArray); } + + /** + * Returns a list with Bewerbungen (applications) + * @param $person_id person who sent application(s) + * @param string $studiensemester_kurzbz + * @param bool $abgeschickt optional, wether application was filled out and sent + * @param bool $bestaetigt optional, wether application was confirmed by infocenter + * @return array with Bewerber + */ + public function getBewerbungen($person_id, $studiensemester_kurzbz = null, $abgeschickt = null, $bestaetigt = null) + { + $bewerbungen = array(); + $prestudents = $this->loadWhere(array('person_id' => $person_id)); + + if (!hasData($prestudents)) + return $bewerbungen; + + $this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel'); + + foreach ($prestudents->retval as $prestudent) + { + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent->prestudent_id, $studiensemester_kurzbz); + + if (!hasData($lastStatus)) + continue; + + $lastStatus = $lastStatus->retval[0]; + + if ($lastStatus->status_kurzbz !== 'Interessent') + continue; + + $bewerbung_abgeschicktamum = $lastStatus->bewerbung_abgeschicktamum; + $bestaetigtam = $lastStatus->bestaetigtam; + + $abgeschicktcond = true; + if (($abgeschickt === false && isset($bewerbung_abgeschicktamum)) || ($abgeschickt === true && !isset($bewerbung_abgeschicktamum))) + $abgeschicktcond = false; + + $bestaetigtcond = true; + if (($bestaetigt === false && isset($bestaetigtam)) || ($bestaetigt === true && !isset($bestaetigtam))) + $bestaetigtcond = false; + + if ($bestaetigtcond && $abgeschicktcond) + { + $prestudent->lastStatus = $lastStatus; + $bewerbungen[] = $prestudent; + } + } + + return $bewerbungen; + } + + /** + * Checks if application priority can be changed for a prestudent + * @param $prestudent_id + * @param $studiensemester Semester in which Prestudent applied + * @param $change increase priority (< 0) or decrease priority (> 0) + * @return bool wether priority can be changed + */ + public function checkPrioChange($prestudent_id, $studiensemester, $change) + { + if (!is_numeric($change)) + return false; + + $this->addSelect('person_id, priorisierung'); + $prestudent = $this->load($prestudent_id); + + if (!hasData($prestudent)) + return false; + + $person_id = $prestudent->retval[0]->person_id; + + $bewerberarr = $this->getBewerbungen($person_id, $studiensemester); + + //Prio can be added when prio is null and there is only one prestudent + if (count($bewerberarr) === 1 && !isset($prestudent->retval[0]->priorisierung) && $change < 0) + return true; + + if (count($bewerberarr) <= 1) + return false; + + if (!isset($prestudent->retval[0]->priorisierung)) + { + if ($change < 0) + return true; //null values can be changed to priority numbers (prority increase) + else + return false; + } + + $priomin = 0; + $priomax = PHP_INT_MAX; + $currprio = intval($prestudent->retval[0]->priorisierung); + + foreach ($bewerberarr as $bewerber) + { + if (is_numeric($bewerber->priorisierung)) + { + $bewprio = intval($bewerber->priorisierung); + if ($bewprio < $priomax) + $priomax = $bewprio; + + if ($bewprio > $priomin) + $priomin = $bewprio; + } + } + + //no prio change when prestudent has max or min prio + if (($currprio === $priomax && $change < 0) || ($currprio === $priomin && $change > 0)) + { + return false; + } + + return true; + } + + /** + * Changes application priority for a prestudent + * Swaps priorities with nearest neighbour (nearest bewerber/prestudent) + * for the same studiensemester in order to move priority up/down + * @param $prestudent_id + * @param $change increase priority (< 0) or decrease priority (> 0) + * @return bool wether change of priority was sucessfull + */ + public function changePrio($prestudent_id, $change) + { + $this->addSelect('person_id, priorisierung'); + $prestudent = $this->load($prestudent_id); + + if (!hasData($prestudent)) + return false; + + $this->load->model('prestudentstatus_model', 'PrestudentstatusModel'); + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id, null, 'Interessent'); + + if (!hasData($lastStatus)) + return false; + + $studiensemester_kurzbz = $lastStatus->retval[0]->studiensemester_kurzbz; + + if (!$this->checkPrioChange($prestudent_id, $studiensemester_kurzbz, $change)) + return false; + + $person_id = $prestudent->retval[0]->person_id; + $currprio = intval($prestudent->retval[0]->priorisierung); + + $difftonext = PHP_INT_MAX; + $neighbour = null; + + $bewerberarr = $this->getBewerbungen($person_id, $studiensemester_kurzbz ); + + foreach ($bewerberarr as $bewerber) + { + if (is_numeric($bewerber->priorisierung)) + { + $bewprio = intval($bewerber->priorisierung); + + $diff = 0; + if ($change < 0 && ($bewprio < $currprio || is_null($prestudent->retval[0]->priorisierung))) //prio up + { + $diff = $currprio - $bewprio; + } + elseif ($change > 0 && $bewprio > $currprio) + { + $diff = $bewprio - $currprio; + } + + if ($diff !== 0 && $diff < $difftonext) + { + $difftonext = $diff; + $neighbour = $bewerber; + } + } + } + + if (is_null($prestudent->retval[0]->priorisierung)) + { + //if null value, add as prio 1 + $newprio = isset($neighbour->priorisierung) ? intval($neighbour->priorisierung) + 1 : 1; + + $result = $this->PrestudentModel->update( + $prestudent_id, + array( + 'priorisierung' => $newprio + ) + ); + + if (isError($result)) + { + return false; + } + else + { + return true; + } + } + else + { + $this->db->trans_start(false); + //prio swap + $resultFirst = $this->PrestudentModel->update( + $prestudent_id, + array( + 'priorisierung' => intval($neighbour->priorisierung) + ) + ); + + + $resultSecond = $this->PrestudentModel->update( + $neighbour->prestudent_id, + array( + 'priorisierung' => $currprio + ) + ); + + // Transaction complete! + $this->db->trans_complete(); + + // Check if everything went ok during the transaction + if ($this->db->trans_status() === false || isError($resultFirst) || isError($resultSecond)) + { + $this->db->trans_rollback(); + return false; + } + else + { + $this->db->trans_commit(); + return true; + } + } + } } diff --git a/application/models/crm/Prestudentstatus_model.php b/application/models/crm/Prestudentstatus_model.php index db98ddff6..fb265edbe 100644 --- a/application/models/crm/Prestudentstatus_model.php +++ b/application/models/crm/Prestudentstatus_model.php @@ -37,10 +37,11 @@ class Prestudentstatus_model extends DB_Model array_push($parametersArray, $studiensemester_kurzbz); $query .= ' AND studiensemester_kurzbz = ?'; } + if ($status_kurzbz != '') { array_push($parametersArray, $status_kurzbz); - $query .= ' AND status_kurzbz = ?'; + $query .= ' AND tbl_prestudentstatus.status_kurzbz = ?'; } $query .= ' ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1'; @@ -113,6 +114,41 @@ class Prestudentstatus_model extends DB_Model * @param $prestudent_id * @return array */ + public function getStudienordnungFromPrestudent($prestudent_id) + { + $lastStatus = $this->getLastStatus($prestudent_id); + + if ($lastStatus->error) + { + return error($lastStatus->retval); + } + + if (count($lastStatus->retval) > 0) + { + $lastStatus = $lastStatus->retval[0]; + + $this->addJoin('lehre.tbl_studienplan', 'studienplan_id'); + $this->addJoin('lehre.tbl_studienordnung', 'studienordnung_id'); + return $this->loadWhere( + array( + 'public.tbl_prestudentstatus.prestudent_id' => $lastStatus->prestudent_id, + 'public.tbl_prestudentstatus.status_kurzbz' => $lastStatus->status_kurzbz, + 'public.tbl_prestudentstatus.studiensemester_kurzbz' => $lastStatus->studiensemester_kurzbz, + 'public.tbl_prestudentstatus.ausbildungssemester' => $lastStatus->ausbildungssemester + ) + ); + } + else + { + return success(array()); + } + } + + /** + * Gets Studienordnung for last status of Prestudent, including ZGV information text + * @param $prestudent_id + * @return array + */ public function getStudienordnungWithZgvText($prestudent_id) { $lastStatus = $this->getLastStatus($prestudent_id); @@ -140,7 +176,7 @@ class Prestudentstatus_model extends DB_Model } else { - return sucess(array()); + return success(array()); } } } diff --git a/application/models/person/Adresse_model.php b/application/models/person/Adresse_model.php index 3b17ce956..e049f5ad6 100644 --- a/application/models/person/Adresse_model.php +++ b/application/models/person/Adresse_model.php @@ -11,4 +11,15 @@ class Adresse_model extends DB_Model $this->dbTable = 'public.tbl_adresse'; $this->pk = 'adresse_id'; } + + + /** + * gets person data from uid + * @param $uid + * @return array + */ + public function getZustellAdresse($person_id) + { + return $this->loadWhere(array('person_id' => $person_id, 'zustelladresse'=> true)); + } } diff --git a/application/views/person/bpk/bpkData.php b/application/views/person/bpk/bpkData.php new file mode 100644 index 000000000..f7bf75b50 --- /dev/null +++ b/application/views/person/bpk/bpkData.php @@ -0,0 +1,58 @@ + ' + SELECT + person_id, vorname, nachname, geschlecht, svnr, ersatzkennzeichen, matr_nr, + staatsbuergerschaft, gebdatum + FROM + public.tbl_person + WHERE + matr_nr is not null + AND bpk is null + AND EXISTS(SELECT 1 FROM public.tbl_benutzer JOIN public.tbl_student ON(uid=student_uid) AND + person_id=tbl_person.person_id AND tbl_benutzer.aktiv=true) + ', + 'requiredPermissions' => 'admin', + 'additionalColumns' => array('Details'), + 'columnsAliases' => array( + 'PersonID', + ucfirst($this->p->t('person', 'vorname')) , + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('person', 'geschlecht')), + ucfirst($this->p->t('person', 'svnr')), + ucfirst($this->p->t('person', 'ersatzkennzeichen')), + ucfirst($this->p->t('person', 'matrikelnummer')), + ucfirst($this->p->t('person', 'staatsbuergerschaft')), + ucfirst($this->p->t('person', 'geburtsdatum')), + ), + 'formatRow' => function($datasetRaw) { + + /* NOTE: Dont use $this here for PHP Version compatibility */ + $datasetRaw->{'Details'} = sprintf( + 'Details', + site_url('person/BPKWartung/showDetails'), + $datasetRaw->{'person_id'}, + 'index', + (isset($_GET['fhc_controller_id'])?$_GET['fhc_controller_id']:'') + ); + + if ($datasetRaw->{'ersatzkennzeichen'} == null) + { + $datasetRaw->{'ersatzkennzeichen'} = '-'; + } + if ($datasetRaw->{'svnr'} == null) + { + $datasetRaw->{'svnr'} = '-'; + } + + return $datasetRaw; + } + ); + + $filterWidgetArray['app'] = 'core'; + $filterWidgetArray['datasetName'] = 'overview'; + $filterWidgetArray['filterKurzbz'] = 'BPKWartung'; + $filterWidgetArray['filter_id'] = $this->input->get('filter_id'); + + echo $this->widgetlib->widget('FilterWidget', $filterWidgetArray); +?> diff --git a/application/views/person/bpk/bpkDetails.php b/application/views/person/bpk/bpkDetails.php new file mode 100644 index 000000000..e771cb7f5 --- /dev/null +++ b/application/views/person/bpk/bpkDetails.php @@ -0,0 +1,153 @@ +load->view( + 'templates/FHC-Header', + array( + 'title' => 'bPK Details', + 'jquery' => true, + 'bootstrap' => true, + 'fontawesome' => true, + 'jqueryui' => true, + 'ajaxlib' => true, + 'tablesorter' => true, + 'tinymce' => true, + 'sbadmintemplate' => true, + 'addons' => true, + 'navigationwidget' => true, + 'customCSSs' => array( + 'public/css/sbadmin2/admintemplate.css', + 'public/css/sbadmin2/tablesort_bootstrap.css', + 'public/css/infocenter/infocenterDetails.css' + ), + 'customJSs' => array( + 'public/js/bootstrapper.js', + 'public/js/tablesort/tablesort.js' + ), + 'phrases' => array( + 'ui' => array( + 'gespeichert', + 'fehlerBeimSpeichern' + ), + 'global' => array( + 'bis', + 'zeilen' + ) + ) + ) + ); +?> +
+| p->t('person','titelpre')) ?> | +titelpre ?> | +
| p->t('person','vorname')) ?> | +vorname ?> | +
| p->t('person','nachname')) ?> | ++ nachname ?> | +
| p->t('person','titelpost')) ?> | +titelpost ?> | +
| p->t('person','geburtsdatum')) ?> | ++ gebdatum), 'd.m.Y') ?> | +
| p->t('person','svnr')) ?> | ++ svnr ?> | +
| p->t('person','ersatzkennzeichen')) ?> | ++ ersatzkennzeichen ?> | +
| p->t('person','staatsbuergerschaft')) ?> | ++ staatsbuergerschaft ?> | +
| p->t('person','geschlecht')) ?> | ++ geschlecht ?> | +
| p->t('person','bpk')) ?> | ++ bpk ?> | +
| p->t('person','postleitzahl')) ?> | ++ plz ?> | +
| p->t('person','strasse')) ?> | ++ strasse ?> | +
| p->t('person','titelpre')) ?> | +titelpre ?> | +|||||
| p->t('person','vorname')) ?> | vorname ?> | @@ -10,6 +16,12 @@nachname ?> | ||||
| p->t('person','titelpost')) ?> | +titelpost ?> | +|||||
| p->t('person','geburtsdatum')) ?> | @@ -57,21 +69,23 @@ kontakte as $kontakt): ?> | |||||
| p->t('person','email')) ?> | - kontakttyp === 'telefon'): ?> -p->t('person','telefon')) ?> | +p->t('person', 'email')) ?> | + kontakttyp === 'telefon' || $kontakt->kontakttyp === 'mobil'): ?> +p->t('person', 'telefon')) ?> | + +kontakttyp) ?> | kontakttyp.'">';?> kontakttyp === 'email'): ?> - + kontakt; if ($kontakt->kontakttyp === 'email'): ?> - - + + '?> | anmerkung; ?> | diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index b68ac5310..8640b70db 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -1,43 +1,90 @@