diff --git a/application/controllers/system/Filters.php b/application/controllers/system/Filters.php index 738799747..fcf37f158 100644 --- a/application/controllers/system/Filters.php +++ b/application/controllers/system/Filters.php @@ -37,7 +37,7 @@ class Filters extends VileSci_Controller { $json = new stdClass(); - $session = $this->_readSession($this->input->get('fhc_controller_id')); + $session = $this->_readSession($this->_getFilterUniqueId()); $json->selectedFields = $session['selectedFields']; $json->columnsAliases = $session['columnsAliases']; @@ -55,7 +55,7 @@ class Filters extends VileSci_Controller { $json = new stdClass(); - $session = $this->_readSession($this->input->get('fhc_controller_id')); + $session = $this->_readSession($this->_getFilterUniqueId()); $json->allSelectedFields = $session['allSelectedFields']; $json->allColumnsAliases = $session['allColumnsAliases']; @@ -72,11 +72,12 @@ class Filters extends VileSci_Controller public function sortSelectedFields() { $selectedFieldsLst = $this->input->post('selectedFieldsLst'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + + $filterUniqueId = $this->_getFilterUniqueId(); $json = new stdClass(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $allSelectedFields = $session['allSelectedFields']; $allColumnsAliases = $session['allColumnsAliases']; @@ -105,8 +106,8 @@ class Filters extends VileSci_Controller } } - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['selectedFields'] = $json->selectedFields; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['columnsAliases'] = $json->columnsAliases; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['selectedFields'] = $json->selectedFields; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['columnsAliases'] = $json->columnsAliases; $this->output->set_content_type('application/json')->set_output(json_encode($json)); } @@ -118,7 +119,7 @@ class Filters extends VileSci_Controller { $json = new stdClass(); - $session = $this->_readSession($this->input->get('fhc_controller_id')); + $session = $this->_readSession($this->_getFilterUniqueId()); $json->allSelectedFields = $session['allSelectedFields']; $json->allColumnsAliases = $session['allColumnsAliases']; @@ -175,19 +176,19 @@ class Filters extends VileSci_Controller */ public function saveFilter() { - $this->_saveFilter($this->input->post("customFilterDescription"), $this->input->post("fhc_controller_id")); + $this->_saveFilter($this->input->post("customFilterDescription"), $this->_getFilterUniqueId()); - $this->output->set_content_type('application/json')->set_output(json_encode('Tutto bene!!!')); + $this->output->set_content_type('application/json')->set_output(json_encode('Filter saved')); } /** * */ - private function _saveFilter($customFilterDescription, $fhc_controller_id) + private function _saveFilter($customFilterDescription, $filterUniqueId) { $objToBeSaved = new stdClass(); - $filterSessionArray = $this->_readSession($fhc_controller_id); + $filterSessionArray = $this->_readSession($filterUniqueId); $objToBeSaved->name = $customFilterDescription; @@ -240,8 +241,8 @@ class Filters extends VileSci_Controller $personId = $resultBenutzer->retval[0]->person_id; $result = $this->FiltersModel->loadWhere(array( - 'app' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['app'], - 'dataset_name' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['datasetName'], + 'app' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['app'], + 'dataset_name' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['datasetName'], 'description' => $descPGArray, 'person_id' => $personId )); @@ -250,8 +251,8 @@ class Filters extends VileSci_Controller { $this->FiltersModel->update( array( - 'app' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['app'], - 'dataset_name' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['datasetName'], + 'app' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['app'], + 'dataset_name' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['datasetName'], 'description' => $descPGArray, 'person_id' => $personId ), @@ -263,8 +264,8 @@ class Filters extends VileSci_Controller else { $this->FiltersModel->insert(array( - 'app' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['app'], - 'dataset_name' => $_SESSION[self::SESSION_NAME][$fhc_controller_id]['datasetName'], + 'app' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['app'], + 'dataset_name' => $_SESSION[self::SESSION_NAME][$filterUniqueId]['datasetName'], 'filter_kurzbz' => uniqid($personId, true), 'person_id' => $personId, 'description' => $descPGArray, @@ -282,7 +283,6 @@ class Filters extends VileSci_Controller public function deleteCustomFilter() { $filter_id = $this->input->post('filter_id'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); if (is_numeric($filter_id)) { @@ -298,9 +298,9 @@ class Filters extends VileSci_Controller public function removeSelectedFields() { $fieldName = $this->input->post('fieldName'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + $filterUniqueId = $this->_getFilterUniqueId(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $allSelectedFields = $session['allSelectedFields']; $allColumnsAliases = $session['allColumnsAliases']; @@ -318,8 +318,8 @@ class Filters extends VileSci_Controller } } - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['selectedFields'] = $selectedFields; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['columnsAliases'] = $columnsAliases; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['selectedFields'] = $selectedFields; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['columnsAliases'] = $columnsAliases; $json = new stdClass(); @@ -337,9 +337,9 @@ class Filters extends VileSci_Controller public function removeSelectedFilters() { $fieldName = $this->input->post('fieldName'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + $filterUniqueId = $this->_getFilterUniqueId(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $selectedFilters = $session['selectedFilters']; $selectedFiltersActiveFilters = $session['activeFilters']; @@ -354,10 +354,10 @@ class Filters extends VileSci_Controller array_splice($selectedFiltersActiveFiltersOption, $pos, 1); } - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['selectedFilters'] = $selectedFilters; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFilters'] = $selectedFiltersActiveFilters; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOperation'] = $selectedFiltersActiveFiltersOperation; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOption'] = $selectedFiltersActiveFiltersOption; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['selectedFilters'] = $selectedFilters; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFilters'] = $selectedFiltersActiveFilters; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOperation'] = $selectedFiltersActiveFiltersOperation; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOption'] = $selectedFiltersActiveFiltersOption; $json = new stdClass(); @@ -375,9 +375,9 @@ class Filters extends VileSci_Controller public function addSelectedFields() { $fieldName = $this->input->post('fieldName'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + $filterUniqueId = $this->_getFilterUniqueId(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $allSelectedFields = $session['allSelectedFields']; $allColumnsAliases = $session['allColumnsAliases']; @@ -396,8 +396,8 @@ class Filters extends VileSci_Controller } } - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['selectedFields'] = $selectedFields; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['columnsAliases'] = $columnsAliases; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['selectedFields'] = $selectedFields; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['columnsAliases'] = $columnsAliases; $json = new stdClass(); @@ -415,9 +415,9 @@ class Filters extends VileSci_Controller public function addSelectedFilters() { $fieldName = $this->input->post('fieldName'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + $filterUniqueId = $this->_getFilterUniqueId(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $selectedFilters = $session['selectedFilters']; $selectedFiltersActiveFilters = $session['activeFilters']; @@ -432,10 +432,10 @@ class Filters extends VileSci_Controller $selectedFiltersActiveFiltersOption[$fieldName] = ""; } - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['selectedFilters'] = $selectedFilters; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFilters'] = $selectedFiltersActiveFilters; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOperation'] = $selectedFiltersActiveFiltersOperation; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOption'] = $selectedFiltersActiveFiltersOption; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['selectedFilters'] = $selectedFilters; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFilters'] = $selectedFiltersActiveFilters; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOperation'] = $selectedFiltersActiveFiltersOperation; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOption'] = $selectedFiltersActiveFiltersOption; $json = new stdClass(); @@ -456,17 +456,17 @@ class Filters extends VileSci_Controller $filterOperations = $this->input->post('filterOperations'); $filterOperationValues = $this->input->post('filterOperationValues'); $filterOptions = $this->input->post('filterOptions'); - $fhc_controller_id = $this->input->post('fhc_controller_id'); + $filterUniqueId = $this->_getFilterUniqueId(); - $session = $this->_readSession($fhc_controller_id); + $session = $this->_readSession($filterUniqueId); $activeFilters = array_combine($fieldNames, $filterOperationValues); $activeFiltersOperation = array_combine($fieldNames, $filterOperations); $activeFiltersOption = array_combine($fieldNames, $filterOptions); - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFilters'] = $activeFilters; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOperation'] = $activeFiltersOperation; - $_SESSION[self::SESSION_NAME][$fhc_controller_id]['activeFiltersOption'] = $activeFiltersOption; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFilters'] = $activeFilters; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOperation'] = $activeFiltersOperation; + $_SESSION[self::SESSION_NAME][$filterUniqueId]['activeFiltersOption'] = $activeFiltersOption; $json = new stdClass(); @@ -485,7 +485,7 @@ class Filters extends VileSci_Controller { $json = new stdClass(); - $session = $this->_readSession($this->input->get('fhc_controller_id')); + $session = $this->_readSession($this->_getFilterUniqueId()); $dataset = $session['dataset']; @@ -500,10 +500,10 @@ class Filters extends VileSci_Controller /** * */ - private function _readSession($fhc_controller_id) + private function _readSession($filterUniqueId) { - if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$fhc_controller_id])) - return $_SESSION[self::SESSION_NAME][$fhc_controller_id]; + if (isset($_SESSION[self::SESSION_NAME]) && isset($_SESSION[self::SESSION_NAME][$filterUniqueId])) + return $_SESSION[self::SESSION_NAME][$filterUniqueId]; return array(); } @@ -511,7 +511,7 @@ class Filters extends VileSci_Controller /** * */ - private function _writeSession($data, $fhc_controller_id) + private function _writeSession($data, $filterUniqueId) { if (!isset($_SESSION[self::SESSION_NAME]) || (isset($_SESSION[self::SESSION_NAME]) && !is_array($_SESSION[self::SESSION_NAME]))) @@ -519,6 +519,25 @@ class Filters extends VileSci_Controller $_SESSION[self::SESSION_NAME] = array(); } - $_SESSION[self::SESSION_NAME][$fhc_controller_id] = $data; + $_SESSION[self::SESSION_NAME][$filterUniqueId] = $data; + } + + /** + * + */ + private function _getFilterUniqueId() + { + $_getFilterUniqueId = ''; + + if ($_SERVER['REQUEST_METHOD'] === 'POST') + { + $_getFilterUniqueId = $this->input->post('filter_page').'/'.$this->input->post('fhc_controller_id'); + } + elseif ($_SERVER['REQUEST_METHOD'] === 'GET') + { + $_getFilterUniqueId = $this->input->get('filter_page').'/'.$this->input->get('fhc_controller_id'); + } + + return $_getFilterUniqueId; } } diff --git a/application/controllers/system/Messages.php b/application/controllers/system/Messages.php index dd112d204..9d66dac4d 100644 --- a/application/controllers/system/Messages.php +++ b/application/controllers/system/Messages.php @@ -20,6 +20,13 @@ class Messages extends VileSci_Controller $this->load->library('WidgetLib'); $this->load->model('person/Person_model', 'PersonModel'); + + $this->loadPhrases(array( + 'global', + 'person', + 'lehre', + 'ui', + 'infocenter')); $this->_setAuthUID(); // sets property uid } diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php index 1973b84c5..35b4d2879 100644 --- a/application/controllers/system/infocenter/InfoCenter.php +++ b/application/controllers/system/infocenter/InfoCenter.php @@ -6,7 +6,7 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); * Also shows infocenter-related data for a person and its prestudents, enables document and zgv checks, * displays and saves Notizen for a person, logs infocenter-related actions for a person */ -class InfoCenter extends VileSci_Controller +class InfoCenter extends FHC_Controller { // App and Verarbeitungstaetigkeit name for logging const APP = 'infocenter'; @@ -21,12 +21,14 @@ class InfoCenter extends VileSci_Controller 'saveformalgep' => array( 'logtype' => 'Action', 'name' => 'Document formally checked', - 'message' => 'Document %s formally checked, set to %s' + 'message' => 'Document %s formally checked, set to %s', + 'success' => null ), 'savezgv' => array( 'logtype' => 'Action', 'name' => 'ZGV saved', - 'message' => 'ZGV saved for degree program %s, prestudentid %s' + 'message' => 'ZGV saved for degree program %s, prestudentid %s', + 'success' => null ), 'abgewiesen' => array( 'logtype' => 'Processstate', @@ -41,12 +43,14 @@ class InfoCenter extends VileSci_Controller 'savenotiz' => array( 'logtype' => 'Action', 'name' => 'Note added', - 'message' => 'Note with title %s was added' + 'message' => 'Note with title %s was added', + 'success' => null ), 'updatenotiz' => array( 'logtype' => 'Action', 'name' => 'Note updated', - 'message' => 'Note with title %s was updated' + 'message' => 'Note with title %s was updated', + 'success' => null ) ); private $uid; // contains the UID of the logged user @@ -74,6 +78,17 @@ class InfoCenter extends VileSci_Controller $this->load->library('PersonLogLib'); $this->load->library('WidgetLib'); + $this->loadPhrases( + array( + 'global', + 'person', + 'lehre', + 'ui', + 'infocenter', + 'filter' + ) + ); + $this->_setAuthUID(); // sets property uid $this->load->library('PermissionLib'); @@ -127,13 +142,14 @@ class InfoCenter extends VileSci_Controller $persondata = $this->_loadPersonData($person_id); $prestudentdata = $this->_loadPrestudentData($person_id); - $this->load->view( - 'system/infocenter/infocenterDetails.php', - array_merge( - $persondata, - $prestudentdata - ) + $data = array_merge( + $persondata, + $prestudentdata ); + + $data['fhc_controller_id'] = $this->fhc_controller_id; + + $this->load->view('system/infocenter/infocenterDetails.php', $data); } /** @@ -147,7 +163,7 @@ class InfoCenter extends VileSci_Controller if(isError($result)) show_error($result->retval); - redirect(self::URL_PREFIX); + redirect(self::URL_PREFIX.'?fhc_controller_id='.$this->fhc_controller_id); } /** @@ -405,7 +421,8 @@ class InfoCenter extends VileSci_Controller $result = $this->DokumentprestudentModel->setAcceptedDocuments($prestudent_id, $dokument_kurzbzs); - if (isError($result)) + //returns null if no documents to accept + if ($result !== null && isError($result)) { show_error($result->retval); } @@ -465,12 +482,11 @@ class InfoCenter extends VileSci_Controller ) ); - - $json = FALSE; + $json = false; if (isSuccess($result)) { - $json = TRUE; + $json = true; //set log "Notiz updated" $this->_log($person_id, 'updatenotiz', array($titel)); @@ -535,6 +551,61 @@ class InfoCenter extends VileSci_Controller ->_display(); } + /** + * Gets the date until which a person is parked + * @param $person_id + */ + public function getParkedDate($person_id) + { + $result = $this->personloglib->getParkedDate($person_id); + + $this->output + ->set_content_type('application/json') + ->set_output(json_encode($result)); + } + + /** + * Initializes parking of a person, i.e. a person is not expected to do any actions while it is parked + */ + public function park() + { + $person_id = $this->input->post('person_id'); + $date = $this->input->post('parkdate'); + + $this->personloglib->park($person_id, date_format(date_create($date), 'Y-m-d'), self::TAETIGKEIT, self::APP, null, $this->uid); + } + + /** + * Removes parking of a person + */ + public function unPark() + { + $person_id = $this->input->post('person_id'); + + $this->personloglib->unPark($person_id); + } + + /** + * Gets the End date of the current Studienjahr + */ + public function getStudienjahrEnd() + { + $this->load->model('organisation/studienjahr_model', 'StudienjahrModel'); + + $result = $this->StudienjahrModel->getCurrStudienjahr(); + + $json = false; + + if (hasData($result)) + { + $json = $result->retval[0]->ende; + } + + $this->output + ->set_content_type('application/json') + ->set_output(json_encode($json)); + } + // ----------------------------------------------------------------------------------------------------------------- // Private methods @@ -592,13 +663,13 @@ class InfoCenter extends VileSci_Controller $filtersarray = array( 'abgeschickt' => array( 'link' => '#', - 'description' => 'Abgeschickt', + 'description' => ucfirst($this->p->t('global', 'abgeschickt')), 'expand' => true, 'children' => array() ), 'nichtabgeschickt' => array( 'link' => '#', - 'description' => 'Nicht abgeschickt', + 'description' => ucfirst($this->p->t('global', 'nichtAbgeschickt')), 'expand' => true, 'children' => array() ) @@ -649,10 +720,10 @@ class InfoCenter extends VileSci_Controller { foreach ($filters as $filterId => $description) { - $toPrint = "%s?%s=%s&%s=%s"; + $toPrint = "%s?%s=%s"; $tofill['children'][] = array( - 'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId, 'fhc_controller_id', $this->fhc_controller_id), + 'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId), 'description' => $description ); } @@ -662,10 +733,10 @@ class InfoCenter extends VileSci_Controller { foreach ($filters as $filterId => $description) { - $toPrint = "%s?%s=%s&%s=%s"; + $toPrint = "%s?%s=%s"; $tofill['children'][] = array( - 'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId, 'fhc_controller_id', $this->fhc_controller_id), + 'link' => sprintf($toPrint, site_url('system/infocenter/InfoCenter'), 'filter_id', $filterId), 'description' => $description, 'subscriptDescription' => 'Remove', 'subscriptLinkClass' => 'remove-filter', @@ -754,7 +825,7 @@ class InfoCenter extends VileSci_Controller show_error($user_person->retval); } - $messagelink = base_url('/index.ci.php/system/Messages/write/'.$user_person->retval[0]->person_id); + $messagelink = site_url('/system/Messages/write/'.$user_person->retval[0]->person_id); $data = array ( 'lockedby' => $lockedby, @@ -856,7 +927,7 @@ class InfoCenter extends VileSci_Controller $this->PrestudentModel->addSelect('person_id'); $person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id; - redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'#'.$section); + redirect(self::URL_PREFIX.'/showDetails/'.$person_id.'?fhc_controller_id='.$this->fhc_controller_id.'#'.$section); } /** @@ -890,15 +961,20 @@ class InfoCenter extends VileSci_Controller { $logdata = $this->logparams[$logname]; + $datatolog = array( + 'name' => $logdata['name'] + ); + + if (isset($logdata['message'])) + $datatolog['message'] = vsprintf($logdata['message'], $messageparams); + + if (array_key_exists('success', $logdata)) + $datatolog['success'] = true; + $this->personloglib->log( $person_id, $logdata['logtype'], - array( - 'name' => $logdata['name'], - 'message' => vsprintf($logdata['message'], - $messageparams), - 'success' => 'true' - ), + $datatolog, self::TAETIGKEIT, self::APP, null, @@ -1004,7 +1080,7 @@ class InfoCenter extends VileSci_Controller if (!empty($receiver)) { //Freigabeinformationmail sent from default system mail to studiengang mail(s) - $sent = $this->maillib->send('', $receiver, $subject, $email); + $sent = $this->maillib->send('', $receiver, $subject, $email, '', null, null, 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Inhalt vollständig darzustellen.'); if (!$sent) $this->loglib->logError('Error when sending Freigabe mail'); diff --git a/application/libraries/PersonLogLib.php b/application/libraries/PersonLogLib.php index cf713825d..8145b88ac 100644 --- a/application/libraries/PersonLogLib.php +++ b/application/libraries/PersonLogLib.php @@ -7,6 +7,8 @@ if (! defined('BASEPATH')) exit('No direct script access allowed'); */ class PersonLogLib { + const PARKED_LOGNAME = 'Parked'; + /** * Constructor */ @@ -79,4 +81,101 @@ class PersonLogLib else show_error($result->retval); } + + /** + * Parks a person, i.e. marks a person so no actions are expected for the person (e.g. as a prestudent) + * Done by adding a logentry in the future + * @param $person_id + * @param $date + * @param $taetigkeit_kurzbz + * @param string $app + * @param null $oe_kurzbz + * @param null $user + * @return bool wether parking was successfull + */ + public function park($person_id, $date, $taetigkeit_kurzbz, $app = 'core', $oe_kurzbz = null, $user = null) + { + $logdata = array( + 'name' => self::PARKED_LOGNAME + ); + + $data = array( + 'person_id' => $person_id, + 'zeitpunkt' => $date, + 'taetigkeit_kurzbz' => $taetigkeit_kurzbz, + 'app' => $app, + 'oe_kurzbz' => $oe_kurzbz, + 'logtype_kurzbz' => 'Processstate', + 'logdata' => json_encode($logdata), + 'insertvon' => $user + ); + + $result = $this->ci->PersonLogModel->insert($data); + if (isSuccess($result)) + return true; + else + show_error($result->retval); + } + + /** + * Unparks a person, i.e. removes all log entries in the future + * @param $person_id + */ + public function unPark($person_id) + { + $result = $this->ci->PersonLogModel->getLogsInFuture($person_id); + + $deleted = array(); + + if (isSuccess($result)) + { + if (count($result->retval) > 0) + { + foreach ($result->retval as $log) + { + $logdata = json_decode($log->logdata); + if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) + { + $delresult = $this->ci->PersonLogModel->deleteLog($log->log_id); + if (isSuccess($delresult)) + $deleted[] = $log->log_id; + } + } + } + } + else + show_error($result->retval); + } + + /** + * Gets date until which a person is parked + * @param $person_id + * @return the date if person is parked, null otherwise + */ + public function getParkedDate($person_id) + { + $result = $this->ci->PersonLogModel->getLogsInFuture($person_id); + + $parkeddate = null; + + if (isSuccess($result)) + { + if (count($result->retval) > 0) + { + foreach ($result->retval as $log) + { + $logdata = json_decode($log->logdata); + if (isset($logdata->name) && $logdata->name === self::PARKED_LOGNAME) + { + $parkeddate = $log->zeitpunkt; + break; + } + } + } + } + else + show_error($result->retval); + + return $parkeddate; + } } diff --git a/application/libraries/PhrasesLib.php b/application/libraries/PhrasesLib.php index 99b73732b..1194e769c 100644 --- a/application/libraries/PhrasesLib.php +++ b/application/libraries/PhrasesLib.php @@ -187,22 +187,67 @@ class PhrasesLib { for ($i = 0; $i < count($this->_phrases); $i++) { + $_phrase = $this->_phrases[$i]; - + if ($_phrase->category == $category && $_phrase->phrase == $phrase && $_phrase->orgeinheit_kurzbz == $orgeinheit_kurzbz - && $_phrase->orgform_kurzbz== $orgform_kurzbz) - { - if ($parameters == null) $parameters = array(); + && $_phrase->orgform_kurzbz== $orgform_kurzbz + && (!empty($_phrase->text))) + { + if ($parameters == null) + $parameters = array(); + + return $this->_ci->parser->parse_string($_phrase->text, $parameters, true); + } + } + + //fallback 1: if phrase not found in phrases-array, try with default language + $default_language = DEFAULT_LANGUAGE; + $categories = $this->_ci->PhraseModel->getCategories(); + + if (hasData($categories)) + { + $categories = $categories->retval; + foreach($categories as $cat) + $all_categories[] = $cat->category; + } + + $phrases = $this->_ci->PhraseModel->getPhrasesByCategoryAndLanguage($all_categories, $default_language); + + if (hasData($phrases)) + { + $default_phrases = $phrases->retval; + } - echo $this->_ci->parser->parse_string($_phrase->text, $parameters, true)."\n"; - break; + if (isset($default_phrases) && is_array($default_phrases)) + { + for ($i = 0; $i < count($default_phrases); $i++) + { + $_phrase = $default_phrases[$i]; +// var_dump($_phrase); + +// echo $phrase . "
"; +// echo $_phrase->phrase . "

"; + + if ($_phrase->category == $category + && $_phrase->phrase == $phrase + && $_phrase->orgeinheit_kurzbz == $orgeinheit_kurzbz + && $_phrase->orgform_kurzbz== $orgform_kurzbz) + { + if ($parameters == null) + $parameters = array(); + return $this->_ci->parser->parse_string($_phrase->text, $parameters, true); + } } } - } + + //fallback 2: if phrase not found at all, return phrasename + $phrase = '<< PHRASE ' . $phrase . ' >>'; + return $this->_ci->parser->parse_string($phrase, $parameters, true); + } } - // ----------------------------------------------------------------------------------------------------------------- // Private methods diff --git a/application/models/organisation/Studienjahr_model.php b/application/models/organisation/Studienjahr_model.php index ace9c1525..36784a280 100644 --- a/application/models/organisation/Studienjahr_model.php +++ b/application/models/organisation/Studienjahr_model.php @@ -12,4 +12,21 @@ class Studienjahr_model extends DB_Model $this->pk = 'studienjahr_kurzbz'; $this->hasSequence = false; } + + /** + * Gets current Studienjahr, as determined by its start and enddate + * @return array|null + */ + public function getCurrStudienjahr() + { + $query = 'SELECT * + FROM public.tbl_studienjahr + JOIN public.tbl_studiensemester using(studienjahr_kurzbz) + WHERE start <= now() + AND ende >= now() + ORDER by start DESC + LIMIT 1'; + + return $this->execQuery($query); + } } diff --git a/application/models/system/PersonLog_model.php b/application/models/system/PersonLog_model.php index 02f52008c..e5f2c543d 100644 --- a/application/models/system/PersonLog_model.php +++ b/application/models/system/PersonLog_model.php @@ -90,4 +90,36 @@ class PersonLog_model extends CI_Model return success($result->result()); } + + /** + * Gets all logs with zeitpunkt > today + * @param $person_id + * @return array + */ + public function getLogsInFuture($person_id) + { + $this->db->order_by('zeitpunkt', 'DESC'); + $this->db->order_by('log_id', 'DESC'); + + $where = "logtype_kurzbz = 'Processstate' + AND person_id=".$this->db->escape($person_id)." + AND zeitpunkt >= now()"; + + $result = $this->db->get_where($this->dbTable, $where); + + return success($result->result()); + } + + /** + * Deletes a log + * @param $log_id + * @return array + */ + public function deleteLog($log_id) + { + $this->db->where('log_id', $log_id); + $result = $this->db->delete($this->dbTable); + + return success($result); + } } diff --git a/application/models/system/Phrase_model.php b/application/models/system/Phrase_model.php index a0363eb5a..dff8bebaf 100644 --- a/application/models/system/Phrase_model.php +++ b/application/models/system/Phrase_model.php @@ -77,4 +77,15 @@ class Phrase_model extends DB_Model return $this->execQuery($query, array($categories, $language)); } -} + + /** + * Loads all categories + */ + public function getCategories() + { + $query = 'SELECT DISTINCT category + FROM system.tbl_phrase'; + + return $this->execQuery($query); + } +} \ No newline at end of file diff --git a/application/views/home.php b/application/views/home.php index cd032bc71..598413c32 100644 --- a/application/views/home.php +++ b/application/views/home.php @@ -5,7 +5,9 @@ $this->load->view('templates/FHC-Header', 'jquery' => true, 'bootstrap' => true, 'fontawesome' => true, - 'sbadmintemplate' => true + 'sbadmintemplate' => true, + 'ajaxlib' => true, + 'navigationwidget' => true ) ); ?> diff --git a/application/views/system/infocenter/addNotiz.php b/application/views/system/infocenter/addNotiz.php index a8396fe40..f8f02570a 100644 --- a/application/views/system/infocenter/addNotiz.php +++ b/application/views/system/infocenter/addNotiz.php @@ -2,11 +2,11 @@
- +
- +
@@ -21,8 +21,8 @@
- - + +
\ No newline at end of file diff --git a/application/views/system/infocenter/anmerkungenZurBewerbung.php b/application/views/system/infocenter/anmerkungenZurBewerbung.php index 565db79db..ee21b55e8 100644 --- a/application/views/system/infocenter/anmerkungenZurBewerbung.php +++ b/application/views/system/infocenter/anmerkungenZurBewerbung.php @@ -5,7 +5,7 @@ - + diff --git a/application/views/system/infocenter/dokpruefung.php b/application/views/system/infocenter/dokpruefung.php index 8261a2ebd..b599b6b06 100644 --- a/application/views/system/infocenter/dokpruefung.php +++ b/application/views/system/infocenter/dokpruefung.php @@ -2,11 +2,11 @@
Anmerkungen zur Bewerbungp->t('infocenter','anmerkungenZurBewerbung')) ?>
- - - - - + + + + + @@ -35,14 +35,14 @@ 0): ?>
-

Nachzureichende Dokumente:

+

p->t('infocenter','nachzureichendeDokumente')) ?>

NameTypUploaddatumAusstellungsnationFormal geprüftp->t('global','name')) ?>p->t('global','typ')) ?>p->t('global','uploaddatum')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('infocenter','formalGeprueft')) ?>
- - - - + + + + diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php index ab9746a8e..9bc9ea20d 100644 --- a/application/views/system/infocenter/infocenter.php +++ b/application/views/system/infocenter/infocenter.php @@ -9,6 +9,9 @@ 'fontawesome' => true, 'sbadmintemplate' => true, 'tablesorter' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, 'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css', 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') ) @@ -24,7 +27,7 @@
- +
diff --git a/application/views/system/infocenter/infocenterData.php b/application/views/system/infocenter/infocenterData.php index 8abc163b7..d33b33bd4 100755 --- a/application/views/system/infocenter/infocenterData.php +++ b/application/views/system/infocenter/infocenterData.php @@ -2,6 +2,7 @@ $APP = 'infocenter'; $NOTBEFORE = '2018-03-01 18:00:00'; + $filterWidgetArray = array( 'query' => ' SELECT @@ -151,9 +152,17 @@ ),\', \' ) AS "StgAktiv", pl.zeitpunkt AS "LockDate", - pl.lockuser as "LockUser" + pl.lockuser as "LockUser", + pd.parkdate AS "ParkDate" FROM public.tbl_person p LEFT JOIN (SELECT person_id, zeitpunkt, uid as lockuser FROM system.tbl_person_lock WHERE app = \''.$APP.'\') pl USING(person_id) + LEFT JOIN ( + SELECT person_id, zeitpunkt as parkdate + FROM system.tbl_log + WHERE logtype_kurzbz = \'Processstate\' + AND logdata->>\'name\' = \'Parked\' + AND zeitpunkt >= now() + ) pd USING(person_id) WHERE EXISTS( SELECT 1 @@ -186,17 +195,33 @@ ) ORDER BY "LastAction" ASC ', - 'fhc_controller_id' => $fhc_controller_id, 'checkboxes' => 'PersonId', 'additionalColumns' => array('Details'), - 'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation', 'Letzte Aktion','Letzter Bearbeiter', - 'StSem','GesendetAm','NumAbgeschickt','StgSent','StgNotSent','StgAktiv', 'Sperrdatum','GesperrtVon'), + 'columnsAliases' => array( + 'PersonID', + ucfirst($this->p->t('person', 'vorname')) , + ucfirst($this->p->t('person', 'nachname')), + ucfirst($this->p->t('person', 'geburtsdatum')), + ucfirst($this->p->t('person', 'nation')), + ucfirst($this->p->t('global', 'letzteAktion')), + ucfirst($this->p->t('global', 'letzterBearbeiter')), + ucfirst($this->p->t('lehre', 'studiensemester')), + ucfirst($this->p->t('global', 'gesendetAm')), + ucfirst($this->p->t('global', 'abgeschickt')).' ('.$this->p->t('global', 'anzahl').')', + ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'gesendet').')', + ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'nichtGesendet').')', + ucfirst($this->p->t('lehre', 'studiengang')).' ('.$this->p->t('global', 'aktiv').')', + ucfirst($this->p->t('global', 'sperrdatum')), + ucfirst($this->p->t('global', 'gesperrtVon')), + ucfirst($this->p->t('global', 'parkdatum')) + ), 'formatRaw' => function($datasetRaw) { $datasetRaw->{'Details'} = sprintf( - 'Details', - site_url('system/infocenter/InfoCenter/showDetails/'), - $datasetRaw->{'PersonId'} + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + $this->input->get('fhc_controller_id') ); if ($datasetRaw->{'SendDate'} == null) @@ -205,7 +230,7 @@ } else { - $datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}),'Y-m-d H:i'); + $datasetRaw->{'SendDate'} = date_format(date_create($datasetRaw->{'SendDate'}), 'Y-m-d H:i'); } if ($datasetRaw->{'LastAction'} == null) @@ -214,7 +239,7 @@ } else { - $datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}),'Y-m-d H:i'); + $datasetRaw->{'LastAction'} = date_format(date_create($datasetRaw->{'LastAction'}), 'Y-m-d H:i'); } if ($datasetRaw->{'User/Operator'} == '') @@ -232,6 +257,11 @@ $datasetRaw->{'LockUser'} = '-'; } + if ($datasetRaw->{'ParkDate'} == null) + { + $datasetRaw->{'ParkDate'} = '-'; + } + if ($datasetRaw->{'StgAbgeschickt'} == null) { $datasetRaw->{'StgAbgeschickt'} = '-'; @@ -253,10 +283,20 @@ }, 'markRow' => function($datasetRaw) { + $mark = ''; + if ($datasetRaw->LockDate != null) { - return FilterWidget::DEFAULT_MARK_ROW_CLASS; + $mark = FilterWidget::DEFAULT_MARK_ROW_CLASS; } + + if ($datasetRaw->ParkDate != null) + { + // Parking has priority over locking + $mark = "text-info"; + } + + return $mark; } ); diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php index 7038031a0..5da3dc1c1 100755 --- a/application/views/system/infocenter/infocenterDetails.php +++ b/application/views/system/infocenter/infocenterDetails.php @@ -11,6 +11,8 @@ 'tinymce' => true, 'sbadmintemplate' => true, 'addons' => true, + 'ajaxlib' => true, + 'navigationwidget' => true, 'customCSSs' => array( 'public/css/sbadmin2/admintemplate.css', @@ -40,14 +42,14 @@
- wird bearbeitet von: + p->t('global', 'wirdBearbeitetVon') . ':' ?>    -  Freigeben +  p->t('ui', 'freigeben')) ?>
@@ -57,7 +59,7 @@
-

Stammdaten

+

p->t('global','stammdaten')) ?>

load->view('system/infocenter/stammdaten.php'); ?> load->view('system/infocenter/anmerkungenZurBewerbung.php'); ?> @@ -71,7 +73,7 @@
-

Dokumentenprüfung

+

p->t('infocenter','dokumentenpruefung')) ?>

load->view('system/infocenter/dokpruefung.php'); ?>
@@ -85,7 +87,7 @@
-

ZGV-Prüfung

+

p->t('infocenter', 'zgv') . ' - ' . ucfirst($this->p->t('lehre','pruefung'))?>

load->view('system/infocenter/zgvpruefungen.php'); ?> @@ -100,7 +102,7 @@
-

Nachrichten

+

p->t('global','nachrichten')) ?>

@@ -119,7 +121,7 @@
-

Notizen & Aktivitäten

+

p->t('global','notizen')) . ' & ' . ucfirst($this->p->t('global','aktivitaeten')) ?>

@@ -131,8 +133,11 @@ load->view('system/infocenter/notizen.php'); ?>
-
+
+
+
load->view('system/infocenter/logs.php'); ?> +
diff --git a/application/views/system/infocenter/infocenterFreigegeben.php b/application/views/system/infocenter/infocenterFreigegeben.php index 03da9b718..03733efe1 100644 --- a/application/views/system/infocenter/infocenterFreigegeben.php +++ b/application/views/system/infocenter/infocenterFreigegeben.php @@ -9,6 +9,9 @@ 'fontawesome' => true, 'sbadmintemplate' => true, 'tablesorter' => true, + 'ajaxlib' => true, + 'filterwidget' => true, + 'navigationwidget' => true, 'customCSSs' => 'public/css/sbadmin2/tablesort_bootstrap.css', 'customJSs' => array('public/js/bootstrapper.js', 'public/js/infocenter/infocenterPersonDataset.js') ) @@ -170,7 +173,6 @@ ) ORDER BY "LastAction" ASC ', - 'fhc_controller_id' => $fhc_controller_id, 'checkboxes' => 'PersonId', 'additionalColumns' => array('Details'), 'columnsAliases' => array('PersonID','Vorname','Nachname','GebDatum','Nation','Letzte Aktion','Letzter Bearbeiter', @@ -178,9 +180,10 @@ 'formatRaw' => function($datasetRaw) { $datasetRaw->{'Details'} = sprintf( - 'Details', - base_url('index.ci.php/system/infocenter/InfoCenter/showDetails/'), - $datasetRaw->{'PersonId'} + 'Details', + site_url('system/infocenter/InfoCenter/showDetails'), + $datasetRaw->{'PersonId'}, + $this->input->get('fhc_controller_id') ); if ($datasetRaw->{'SendDate'} == null) diff --git a/application/views/system/infocenter/logs.php b/application/views/system/infocenter/logs.php index 65b67624e..a45034818 100644 --- a/application/views/system/infocenter/logs.php +++ b/application/views/system/infocenter/logs.php @@ -1,19 +1,19 @@ -
TypNachzureichen amAusstellungsnationAnmerkungp->t('global','typ')) ?>p->t('infocenter','nachzureichenAm')) ?>p->t('infocenter','ausstellungsnation')) ?>p->t('global','anmerkung')) ?>
- - - - - - - - - - - - - - - - +
DatumAktivitätUser
zeitpunkt), 'd.m.Y H:i:s') ?>logdata->name) ? $log->logdata->name : '' ?>insertvon ?>
+ + + + + + + + + + + + + + + +
p->t('global', 'datum')) ?>p->t('global', 'aktivitaet')) ?>User
zeitpunkt), 'd.m.Y H:i:s') ?>logdata->name) ? $log->logdata->name : '' ?>insertvon ?>
\ No newline at end of file diff --git a/application/views/system/infocenter/notizen.php b/application/views/system/infocenter/notizen.php index 646645ae3..d0c13e5ee 100644 --- a/application/views/system/infocenter/notizen.php +++ b/application/views/system/infocenter/notizen.php @@ -1,8 +1,8 @@ - - + + diff --git a/application/views/system/infocenter/stammdaten.php b/application/views/system/infocenter/stammdaten.php index daf0b7d24..45c2326e9 100755 --- a/application/views/system/infocenter/stammdaten.php +++ b/application/views/system/infocenter/stammdaten.php @@ -2,41 +2,41 @@
DatumNotizp->t('global', 'datum')) ?>p->t('global', 'notiz')) ?> User
- + - + - + - + - + - + - + - +
Vornamep->t('person','vorname')) ?> vorname ?>
Nachnamep->t('person','nachname')) ?> nachname ?>
Geburtsdatump->t('person','geburtsdatum')) ?> gebdatum), 'd.m.Y') ?>
Sozialversicherungsnrp->t('person','svnr')) ?> svnr ?>
Staatsbürgerschaftp->t('person','staatsbuergerschaft')) ?> staatsbuergerschaft ?>
Geschlechtp->t('person','geschlecht')) ?> geschlecht ?>
Geburtsnationp->t('person','geburtsnation')) ?> geburtsnation ?>
Geburtsortp->t('person','geburtsort')) ?> gebort ?>
@@ -45,18 +45,22 @@ - + - - - + + + kontakte as $kontakt): ?> - + kontakttyp === 'email'): ?> + + kontakttyp === 'telefon'): ?> + +
Kontaktep->t('global','kontakt')) ?>
TypKontaktAnmerkungp->t('global','typ')) ?>p->t('global','kontakt')) ?>p->t('global','anmerkung')) ?>
kontakttyp); ?>p->t('person','email')) ?>p->t('person','telefon')) ?> kontakttyp.'">';?> kontakttyp === 'email'): ?> @@ -76,7 +80,7 @@ adressen as $adresse): ?>
- Adresse + p->t('person','adresse')) ?> strasse.', '.$adresse->plz.' '.$adresse->ort : '' ?> @@ -97,13 +101,13 @@  Nachricht senden + class="fa fa-envelope"> p->t('ui','nachrichtSenden') ?> zugangscode)): ?>
 Zugang Bewerbung + target='_blank'> p->t('infocenter','zugangBewerbung') ?>
diff --git a/application/views/system/infocenter/zgvpruefungen.php b/application/views/system/infocenter/zgvpruefungen.php index 1a31fc643..383dd5a62 100644 --- a/application/views/system/infocenter/zgvpruefungen.php +++ b/application/views/system/infocenter/zgvpruefungen.php @@ -27,14 +27,14 @@ prestudentstatus->bestaetigtam)): ?>
- An Studiengang freigegeben + p->t('global', 'anStudiengangFreigegeben') ?>
- prestudentstatus->bewerbung_abgeschicktamum) ? '' : ''); ?> - prestudentstatus->bewerbungsnachfrist) ? ' | Nachfrist: '. date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?> - prestudentstatus->bewerbungstermin) ? ' | Bewerbungsfrist: '. date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?> + p->t('infocenter','bewerbung')) . ' ' . $this->p->t('global','abgeschickt') . ': '.(isset($zgvpruefung->prestudentstatus->bewerbung_abgeschicktamum) ? '' : ''); ?> + prestudentstatus->bewerbungsnachfrist) ? ' | ' . $this->p->t('infocenter', 'nachfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungsnachfrist), 'd.m.Y') : ''); ?> + prestudentstatus->bewerbungstermin) ? ' | ' . $this->p->t('infocenter', 'bewerbungsfrist') . ': ' . date_format(date_create($zgvpruefung->prestudentstatus->bewerbungstermin), 'd.m.Y') : ''); ?>
@@ -49,7 +49,7 @@
- + prestudentstatus->status_kurzbz)) { @@ -60,7 +60,7 @@
- + prestudentstatus->studiensemester_kurzbz) ? $zgvpruefung->prestudentstatus->studiensemester_kurzbz : '' ?>
@@ -73,7 +73,7 @@
- + prestudentstatus->orgform)) ? ', ' : ''; @@ -90,18 +90,18 @@
- + zgv_bez; ?>
- +
- + zgvort); else: @@ -127,7 +127,7 @@
- + zgvdatum) ? "" : date_format(date_create($zgvpruefung->zgvdatum), 'd.m.Y'); if ($infoonly): @@ -143,7 +143,7 @@
- + zgvnation_bez; else @@ -159,7 +159,7 @@ studiengangtyp === 'm') : ?>
-
+
zgvmas_bez; @@ -173,7 +173,7 @@
- + zgvmaort; else: @@ -186,7 +186,7 @@
- + zgvmadatum) ? "" : date_format(date_create($zgvpruefung->zgvmadatum), 'd.m.Y'); if ($infoonly): @@ -201,8 +201,7 @@
-
+
zgvmanation_bez; @@ -221,12 +220,12 @@
@@ -249,8 +248,7 @@ class="d-inline float-right" required> @@ -261,7 +259,7 @@ class="btn btn-default" data-toggle="modal" data-target="#absageModal_prestudent_id ?>"> - Absage + p->t('ui', 'absagen') ?>
@@ -280,33 +278,20 @@ × + id="absageModalLabel">p->t('infocenter', 'absageBestaetigen') ?>
@@ -337,7 +322,7 @@ data-toggle="modal" data-target="#freigabeModal_prestudent_id ?>" data-toggle="tooltip" title=""> - Freigabe an Studiengang + p->t('ui', 'freigabeAnStudiengang') ?>
@@ -354,29 +339,20 @@ + p->t('global', 'freigabeBestaetigen') ?>
@@ -390,7 +366,7 @@
prestudentstatus->bestaetigtam) ? '' : '' ?> - +
diff --git a/application/views/system/messageList.php b/application/views/system/messageList.php index d549d68a4..6edd4f4b1 100644 --- a/application/views/system/messageList.php +++ b/application/views/system/messageList.php @@ -1,97 +1,100 @@ - 0; -$widthColumn = $msgExists === true ? 8 : 12; -?> -
- - - - - - - - - - - - - - - - - - - - - -
Gesendet amSenderEmpfängerBetreffGelesen am
insertamum) ? date_format(date_create($message->insertamum), 'd.m.Y H:i:s') : '' ?>sevorname.' '.$message->senachname ?>revorname.' '.$message->renachname ?>subject ?>statusamum) ? date_format(date_create($message->statusamum), 'd.m.Y H:i:s') : '' ?>
-
- -
-
-
-
- -
-
- - \ No newline at end of file diff --git a/application/views/system/messageWrite.php b/application/views/system/messageWrite.php index 3f9ed5254..85c003cfd 100644 --- a/application/views/system/messageWrite.php +++ b/application/views/system/messageWrite.php @@ -32,14 +32,14 @@ $href = str_replace("/system/Messages/write", "/system/Messages/send", $_SERVER[
- +
- +
- +
 
- +
- + 1) diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index 853eb8de7..8b4dc058a 100755 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -22,6 +22,8 @@ $tablesorter = isset($tablesorter) ? $tablesorter : false; $tinymce = isset($tinymce) ? $tinymce : false; $sbadmintemplate = isset($sbadmintemplate) ? $sbadmintemplate : false; $addons = isset($addons) ? $addons : false; +$filterwidget = isset($filterwidget) ? $filterwidget : false; +$navigationwidget = isset($navigationwidget) ? $navigationwidget : false; /** * Print the given title of the page @@ -165,6 +167,12 @@ function _generateAddonsJSsInclude($calledFrom) _generateCSSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/css/sb-admin-2.min.css'); } + // FilterWidget CSS + if ($filterwidget === true) _generateCSSsInclude('public/css/FilterWidget.css'); + + // NavigationWidget CSS + if ($navigationwidget === true) _generateCSSsInclude('public/css/NavigationWidget.css'); + // Eventually required CSS _generateCSSsInclude($customCSSs); // Eventually required CSS @@ -210,6 +218,12 @@ function _generateAddonsJSsInclude($calledFrom) _generateJSsInclude('vendor/BlackrockDigital/startbootstrap-sb-admin-2/dist/js/sb-admin-2.min.js'); } + // FilterWidget JS + if($filterwidget === true) _generateJSsInclude('public/js/FilterWidget.js') ; + + // NavigationWidget JS + if($navigationwidget === true) _generateJSsInclude('public/js/NavigationWidget.js') ; + // Load addon hooks JS if ($addons === true) _generateAddonsJSsInclude($calledPath.'/'.$calledMethod); diff --git a/application/views/widgets/filter/filter.php b/application/views/widgets/filter/filter.php index 5fbff4953..ac29efe30 100644 --- a/application/views/widgets/filter/filter.php +++ b/application/views/widgets/filter/filter.php @@ -1,164 +1,3 @@ - -
@@ -168,7 +7,7 @@
diff --git a/application/views/widgets/filter/saveFilter.php b/application/views/widgets/filter/saveFilter.php index ce2d454ca..c1f09a413 100644 --- a/application/views/widgets/filter/saveFilter.php +++ b/application/views/widgets/filter/saveFilter.php @@ -1,36 +1,3 @@ - -
diff --git a/application/views/widgets/filter/selectFields.php b/application/views/widgets/filter/selectFields.php index a011e5555..73461840a 100644 --- a/application/views/widgets/filter/selectFields.php +++ b/application/views/widgets/filter/selectFields.php @@ -1,247 +1,11 @@ - - -
- -
- - Add field: - - - - - -
+ + + +
diff --git a/application/views/widgets/filter/selectFilters.php b/application/views/widgets/filter/selectFilters.php index cf5443069..ffb93dfe5 100644 --- a/application/views/widgets/filter/selectFilters.php +++ b/application/views/widgets/filter/selectFilters.php @@ -1,282 +1,3 @@ - -
diff --git a/application/views/widgets/filter/tableDataset.php b/application/views/widgets/filter/tableDataset.php index 1a19876f4..ca917503a 100644 --- a/application/views/widgets/filter/tableDataset.php +++ b/application/views/widgets/filter/tableDataset.php @@ -1,153 +1,3 @@ - -
diff --git a/application/views/widgets/navigation.php b/application/views/widgets/navigation.php index 8a57dab57..efc953f5f 100644 --- a/application/views/widgets/navigation.php +++ b/application/views/widgets/navigation.php @@ -1,9 +1,9 @@ - diff --git a/application/views/widgets/navigationHeader.php b/application/views/widgets/navigationHeader.php index 0d050df2a..8e2a936a4 100644 --- a/application/views/widgets/navigationHeader.php +++ b/application/views/widgets/navigationHeader.php @@ -1,39 +1,11 @@ - - - + diff --git a/application/views/widgets/navigationMenu.php b/application/views/widgets/navigationMenu.php index 9ef727083..42dd901fb 100644 --- a/application/views/widgets/navigationMenu.php +++ b/application/views/widgets/navigationMenu.php @@ -1,169 +1,3 @@ - - - - "); + } + + var arrayFieldsToDisplay = []; + + if (data.columnsAliases != null && $.isArray(data.columnsAliases) && data.columnsAliases.length > 0) + { + arrayFieldsToDisplay = data.columnsAliases; + } + else if (data.selectedFields != null && $.isArray(data.selectedFields)) + { + arrayFieldsToDisplay = data.selectedFields; + } + + /* ------------------------------------------------------------------------------------------------ */ + if (data.checkboxes != null && data.checkboxes != "") + { + $("#filterTableDataset > thead > tr").html(""); + } + + for (var i = 0; i < arrayFieldsToDisplay.length; i++) + { + var th = arrayFieldsToDisplay[i]; + + $("#filterTableDataset > thead > tr").append(""); + } + + if (data.additionalColumns != null && $.isArray(data.additionalColumns)) + { + for (var i = 0; i < data.additionalColumns.length; i++) + { + var th = data.additionalColumns[i]; + + $("#filterTableDataset > thead > tr").append(""); + } + } + /* ------------------------------------------------------------------------------------------------ */ + + if (arrayFieldsToDisplay.length > 0) + { + if (data.dataset != null && $.isArray(data.dataset)) + { + for (var i = 0; i < data.dataset.length; i++) + { + var record = data.dataset[i]; + var strHtml = ''; + + if (data.checkboxes != null && data.checkboxes != "") + { + strHtml += ''; + } + + $.each(arrayFieldsToDisplay, function(i, fieldToDisplay) { + + if (record.hasOwnProperty(data.selectedFields[i])) + { + strHtml += ''; + } + }); + + if (data.additionalColumns != null && $.isArray(data.additionalColumns)) + { + $.each(data.additionalColumns, function(i, additionalColumn) { + + if (record.hasOwnProperty(additionalColumn)) + { + strHtml += ''; + } + + }); + } + + strHtml += ''; + + $("#filterTableDataset > tbody").append(strHtml); + } + } + else + { + // console.log("No dataset!!!"); + } + } + else + { + console.log("No fields to display!!!"); + } + } + else + { + console.log("No data!!!"); + } + + FHC_FilterWidget._callTableSorter(); + + } + } + ); + }, + + //------------------------------------------------------------------------------------------------------------------ + // Private methods + + /** + * + */ + _dndSF: function() { + $(".filter-select-field-dnd-span").draggable({ + containment: "parent", + cursor: "move", + opacity: 0.4, + revert: "invalid", + revertDuration: 200, + drag: function(event, ui) { + + var padding = 20; + var draggedElement = $(this); + + $(".filter-select-field-dnd-span").each(function(i, e) { + + if ($(this).attr('id') != draggedElement.attr('id')) + { + $(this).removeClass("selection-after"); + $(this).removeClass("selection-before"); + + var elementCenter = $(this).offset().left + ((padding + $(this).width()) / 2); + + if (event.pageX > ($(this).offset().left - (padding / 2)) + && event.pageX < ($(this).offset().left + $(this).width() + (padding / 2))) + { + if (event.pageX > elementCenter) + { + $(this).addClass("selection-after"); + $(this).removeClass("selection-before"); + } + else if (event.pageX < elementCenter) + { + $(this).addClass("selection-before"); + $(this).removeClass("selection-after"); + } + } + } + + }); + + } + }); + + $(".filter-select-field-dnd-span").droppable({ + accept: ".filter-select-field-dnd-span", + drop: function(event, ui) { + + var padding = 20; + var elementCenter = $(this).offset().left + ((padding + $(this).width()) / 2); + var draggedElement = ui.helper; + + if (event.pageX > elementCenter) + { + draggedElement.insertAfter($(this)); + } + else if (event.pageX < elementCenter) + { + draggedElement.insertBefore($(this)); + } + + $(this).removeClass("selection-before"); + $(this).removeClass("selection-after"); + + draggedElement.css({left: '0px', top: '10px'}); + + var arrayDndId = []; + + $(".filter-select-field-dnd-span").each(function(i, e) { + + arrayDndId[i] = $(this).attr('id').replace('dnd', ''); + + }); + + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/sortSelectedFields', + { + selectedFieldsLst: arrayDndId, + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFields(); + + FHC_FilterWidget.renderSelectedFields(); + FHC_FilterWidget.renderTableDataset(); + } + } + ); + } + }); + }, + + /** + * + */ + _resetEventsSF: function() { + $("#addField").off('change'); + $(".remove-field").off('click'); + }, + + /** + * + */ + _addEventsSF: function() { + $("#addField").change(function(event) { + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/addSelectedFields', + { + fieldName: $(this).val(), + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFields(); + + FHC_FilterWidget.renderSelectedFields(); + FHC_FilterWidget.renderTableDataset(); + } + } + ); + }); + + $(".remove-field").click(function(event) { + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/removeSelectedFields', + { + fieldName: $(this).attr('fieldToRemove'), + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFields(); + + FHC_FilterWidget.renderSelectedFields(); + FHC_FilterWidget.renderTableDataset(); + } + } + ); + }); + }, + + /** + * + */ + _resetSelectedFields: function() { + $("#filterSelectFieldsDnd").html(""); + $("#addField").html(""); + }, + + /** + * + */ + _resetEventsSFilters: function() { + $("#addFilter").off('change'); + }, + + /** + * + */ + _addEventsSFilters: function() { + $("#addFilter").change(function(event) { + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/addSelectedFilters', + { + fieldName: $(this).val(), + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFilters(); + + FHC_FilterWidget.renderSelectedFilters(); + FHC_FilterWidget.renderTableDataset(); + } + } + ); + }); + + $(".select-filter-operation").change(function() { + + if ($(this).val() == "set" || $(this).val() == "nset") + { + $(this).parent().parent().find(".select-filter-operation-value").addClass("hidden-control"); + $(this).parent().parent().find(".select-filter-option").addClass("hidden-control"); + + $(this).parent().parent().find(".select-filter-operation-value").prop('disabled', true); + $(this).parent().parent().find(".select-filter-option").prop('disabled', true); + } + else + { + $(this).parent().parent().find(".select-filter-operation-value").removeClass("hidden-control"); + $(this).parent().parent().find(".select-filter-option").removeClass("hidden-control"); + + $(this).parent().parent().find(".select-filter-operation-value").prop('disabled', false); + $(this).parent().parent().find(".select-filter-option").prop('disabled', false); + } + + }); + + $("#applyFilter").click(function() { + + var selectFilterName = []; + var selectFilterOperation = []; + var selectFilterOperationValue = []; + var selectFilterOption = []; + + $("#selectedFilters > div").each(function(i, e) { + var tmpSelectFilterName = $(this).find('.hidden-field-name').val(); + var tmpSelectFilterOperation = $(this).find('.select-filter-operation').val(); + var tmpSelectFilterOperationValue = $(this).find('.select-filter-operation-value:enabled').val(); + var tmpSelectFilterOption = $(this).find('.select-filter-option:enabled').val(); + + selectFilterName.push(tmpSelectFilterName); + selectFilterOperation.push(tmpSelectFilterOperation); + selectFilterOperationValue.push(tmpSelectFilterOperationValue != null ? tmpSelectFilterOperationValue : ""); + selectFilterOption.push(tmpSelectFilterOption != null ? tmpSelectFilterOption : ""); + }); + + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/applyFilter', + { + filterNames: selectFilterName, + filterOperations: selectFilterOperation, + filterOperationValues: selectFilterOperationValue, + filterOptions: selectFilterOption, + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFilters(); + + location.reload(); + } + } + ); + }); + + $(".remove-selected-filter").click(function(event) { + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/removeSelectedFilters', + { + fieldName: $(this).attr('filterToRemove'), + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: function(data, textStatus, jqXHR) { + FHC_FilterWidget._resetSelectedFilters(); + + location.reload(); + } + } + ); + }); + + }, + + /** + * + */ + _getSelectedFilterFields: function(metaData, activeFilters, activeFiltersOperation, activeFiltersOption) { + var html = ''; + + if (metaData.type.toLowerCase().indexOf("int") >= 0) + { + html = ''; + html += ' '; + html += ''; + html += ''; + html += ' '; + html += ''; + } + if (metaData.type.toLowerCase().indexOf('varchar') >= 0 || metaData.type.toLowerCase() == 'text') + { + html = ''; + html += ' '; + html += ''; + html += ''; + html += ' '; + html += ''; + } + if (metaData.type.toLowerCase().indexOf('bool') >= 0) + { + html = ''; + html += ' '; + html += ''; + html += ''; + html += ' '; + html += ''; + } + if (metaData.type.toLowerCase().indexOf('timestamp') >= 0 || metaData.type.toLowerCase().indexOf('date') >= 0) + { + var classOperation = 'form-control select-filter-operation-value'; + var classOption = 'form-control select-filter-option'; + var disabled = ""; + + if (activeFiltersOperation == "set" || activeFiltersOperation == "nset") + { + classOperation += ' hidden-control'; + classOption += ' hidden-control'; + disabled = "disabled"; + } + + html = ''; + html += ' '; + html += ''; + html += ''; + html += ' '; + html += ''; + html += ''; + html += ' '; + html += ''; + } + + html += ''; + html += ' '; + html += ''; + + return html; + }, + + /** + * + */ + _resetSelectedFilters: function() { + $("#addFilter").html(""); + $("#selectedFilters").html(""); + }, + + /** + * + */ + _callTableSorter: function() { + // Checks if the table contains data (rows) + if ($('#filterTableDataset').find('tbody:empty').length == 0 + && $('#filterTableDataset').find('tr:empty').length == 0 + && $('#filterTableDataset').hasClass('table-condensed')) + { + $("#filterTableDataset").tablesorter({ + widgets: ["zebra", "filter"] + }); + + var config = $('#filterTableDataset')[0].config; + $.tablesorter.updateAll(config, true, null); + } + }, + + /** + * + */ + _resetTableDataset: function() { + $("#filterTableDataset > thead > tr").html(""); + $("#filterTableDataset > tbody").html(""); + }, + + /** + * + */ + _getFilterPage: function() { + return FHC_JS_DATA_STORAGE_OBJECT.called_path + "/" + FHC_JS_DATA_STORAGE_OBJECT.called_method; + } +}; + + +/** + * When JQuery is up + */ +$(document).ready(function() { + + $("[data-toggle='collapse']").click(function() { + + var filterOptionsStatus = sessionStorage.getItem('filter-options-status'); + + if (filterOptionsStatus != null && filterOptionsStatus == 'closed') + { + sessionStorage.setItem('filter-options-status', 'open'); + } + else + { + sessionStorage.setItem('filter-options-status', 'closed'); + } + + }); + + var filterOptionsStatus = sessionStorage.getItem('filter-options-status'); + if (filterOptionsStatus != null && filterOptionsStatus == 'open') + { + $('.collapse').collapse("show"); + } + + $("#saveCustomFilterButton").click(function() { + if ($("#customFilterDescription").val() != '') + { + // + FHC_AjaxClient.ajaxCallPost( + 'system/Filters/saveFilter', + { + customFilterDescription: $("#customFilterDescription").val(), + filter_page: FHC_FilterWidget._getFilterPage() + }, + { + successCallback: refreshSideMenu // NOTE: to be checked + } + ); + } + else + { + alert("Please fill te description of this filter"); + } + }); + + FHC_FilterWidget.renderSelectedFields(); + FHC_FilterWidget.renderSelectedFilters(); + FHC_FilterWidget.renderTableDataset(); + +}); diff --git a/public/js/NavigationWidget.js b/public/js/NavigationWidget.js new file mode 100644 index 000000000..8b3405c26 --- /dev/null +++ b/public/js/NavigationWidget.js @@ -0,0 +1,198 @@ +/** + * FH-Complete + * + * @package + * @author + * @copyright Copyright (c) 2016 fhcomplete.org + * @license GPLv3 + * @link https://fhcomplete.org + * @since Version 1.0.0 + */ + +/** + * FHC_NavigationWidget + */ +var FHC_NavigationWidget = { + //------------------------------------------------------------------------------------------------------------------ + // Public methods + + /** + * Renders the header menu (top horizontal menu) + */ + renderHeaderMenu: function() { + // + FHC_AjaxClient.ajaxCallGet( + 'system/Navigation/header', + { + navigation_widget_called: FHC_NavigationWidget._getNavigationWidgetCalled() + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (data != null) + { + jQuery.each(data, function(i, e) { + $(".menu-header-items").append('' + i + ''); + }); + } + } + } + ); + }, + + /** + * Renders the side left menu + */ + renderSideMenu: function() { + // + FHC_AjaxClient.ajaxCallGet( + 'system/Navigation/menu', + { + navigation_widget_called: FHC_NavigationWidget._getNavigationWidgetCalled() + }, + { + successCallback: function(data, textStatus, jqXHR) { + if (data != null) + { + var strMenu = ''; + + FHC_NavigationWidget._printCollapseIcon(); + + jQuery.each(data, function(i, e) { + strMenu += FHC_NavigationWidget._printNavItem(e); + }); + + $("#side-menu").html(strMenu); + $("#side-menu").metisMenu(); + } + + if (typeof sideMenuHook == 'function') + { + sideMenuHook(); + } + } + } + ); + }, + + //------------------------------------------------------------------------------------------------------------------ + // Private methods + + /** + * + */ + _printCollapseIcon: function() { + // Hiding/showing navigation menu - works only with sb admin 2 template!! + if(!$("#collapseicon").length) + $("#side-menu").parent().append('
'); + + $("#collapseicon").click(function() { + $("#page-wrapper").css('margin-left', '0px'); + $("#side-menu").hide(); + $("#collapseicon").hide(); + $("#collapseinicon").show(); + }); + + $("#collapseinicon").click(function() { + $("#page-wrapper").css('margin-left', '250px'); + $("#side-menu").show(); + $("#collapseicon").show(); + $("#collapseinicon").hide(); + }); + }, + + /** + * + */ + _printNavItem: function(item, depth = 1) { + strMenu = ""; + var expanded = typeof item['expand'] != 'undefined' && item['expand'] === true ? ' active' : ''; + + strMenu += '
  • '; + + if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined') + { + strMenu += ''; + } + + // Handle fhc_controller_id + var fhc_controller_id = FHC_AjaxClient.getUrlParameter('fhc_controller_id'); + if (fhc_controller_id != null && fhc_controller_id != '' && item['link'] != '#') + { + if (item['link'].indexOf('?') != -1) + { + item['link'] += '&'; + } + else + { + item['link'] += '?'; + } + + item['link'] += 'fhc_controller_id=' + fhc_controller_id; + } + + strMenu += ''; + + if (item['icon'] != 'undefined') + { + strMenu += ' '; + } + + strMenu += item['description']; + + if (typeof item['children'] != 'undefined' && Object.keys(item['children']).length > 0) + { + strMenu += ''; + } + + strMenu += ''; + + if (typeof item['subscriptLinkClass'] != 'undefined' && typeof item['subscriptDescription'] != 'undefined') + { + strMenu += ' (' + item['subscriptDescription'] + ')'; + strMenu += ''; + } + + if (typeof item['children'] != 'undefined' && Object.keys(item['children']).length > 0) + { + var level = ''; + if (depth === 1) + { + level = 'second'; + } + else if (depth > 1) + { + level = 'third'; + } + + strMenu += ''; + } + + strMenu += '
  • '; + + return strMenu; + }, + + /** + * Returns the URI of the caller + */ + _getNavigationWidgetCalled: function() { + return FHC_JS_DATA_STORAGE_OBJECT.called_path + "/" + FHC_JS_DATA_STORAGE_OBJECT.called_method; + } +}; + +/** + * When JQuery is up + */ +$(document).ready(function() { + + FHC_NavigationWidget.renderHeaderMenu(); + + FHC_NavigationWidget.renderSideMenu(); + +}); diff --git a/public/js/infocenter/infocenterDetails.js b/public/js/infocenter/infocenterDetails.js index e5c966f7b..445e667cd 100644 --- a/public/js/infocenter/infocenterDetails.js +++ b/public/js/infocenter/infocenterDetails.js @@ -1,25 +1,6 @@ -/** - * - */ -function getUrlParameter(sParam) -{ - var sPageURL = decodeURIComponent(window.location.search.substring(1)), - sURLVariables = sPageURL.split('&'), - sParameterName, - i; - for (i = 0; i < sURLVariables.length; i++) - { - sParameterName = sURLVariables[i].split('='); - - if (sParameterName[0] === sParam) - { - return sParameterName[1]; - } - } -} - -var fhc_controller_id = getUrlParameter("fhc_controller_id"); +var fhc_controller_id = FHC_AjaxClient.getUrlParameter('fhc_controller_id'); +const CONTROLLER_URL = FHC_JS_DATA_STORAGE_OBJECT.app_root + FHC_JS_DATA_STORAGE_OBJECT.ci_router + "/"+FHC_JS_DATA_STORAGE_OBJECT.called_path; /** * javascript file for infocenterDetails page @@ -31,7 +12,7 @@ $(document).ready( addTablesorter("doctable", [[2, 1], [1, 0]], ["zebra"]); addTablesorter("nachgdoctable", [[2, 0], [1, 1]], ["zebra"]); addTablesorter("msgtable", [[0, 1], [2, 0]], ["zebra", "filter"], 2); - tablesortAddPager("msgtable", "msgpager", 10); + tablesortAddPager("msgtable", "msgpager", 14); formatNotizTable(); formatLogTable(); @@ -42,6 +23,8 @@ $(document).ready( "dateFormat": "dd.mm.yy" }); + var personid = $("#hiddenpersonid").val(); + //add submit event to message send link $("#sendmsglink").click( function () @@ -54,7 +37,6 @@ $(document).ready( $(".prchbox").click(function () { var boxid = this.id; - var personid = $("#hiddenpersonid").val(); var akteid = boxid.substr(boxid.indexOf("_") + 1); var checked = this.checked; saveFormalGeprueft(personid, akteid, checked) @@ -64,7 +46,6 @@ $(document).ready( $(".zgvUebernehmen").click(function () { var btn = $(this); - var personid = $("#hiddenpersonid").val(); var prestudentid = this.id.substr(this.id.indexOf("_") + 1); $('#zgvUebernehmenNotice').remove(); zgvUebernehmen(personid, prestudentid, btn) @@ -118,11 +99,11 @@ $(document).ready( if (notizId !== '') { - updateNotiz(notizId, personId, data); + updateNotiz(notizId, personid, data); } else { - saveNotiz(personId, data); + saveNotiz(personid, data); } } ); @@ -150,6 +131,9 @@ $(document).ready( } ); + //check if person is parked and display it + getParkedDateAjax(personid); + }); function openZgvInfoForPrestudent(prestudent_id) @@ -157,7 +141,6 @@ function openZgvInfoForPrestudent(prestudent_id) var screenwidth = screen.width; var popupwidth = 760; var marginleft = screenwidth - popupwidth; - console.log(marginleft); window.open("../getZgvInfoForPrestudent/" + prestudent_id, "_blank","resizable=yes,scrollbars=yes,width="+popupwidth+",height="+screen.height+",left="+marginleft); } @@ -169,7 +152,7 @@ function saveFormalGeprueft(personid, akteid, checked) $.ajax({ type: "POST", dataType: "json", - url: "../saveFormalGeprueft/" + personid + '?fhc_controller_id=' + fhc_controller_id, + url: CONTROLLER_URL+"/saveFormalGeprueft/" + personid + '?fhc_controller_id=' + fhc_controller_id, data: {"akte_id": akteid, "formal_geprueft": checked}, success: function (data, textStatus, jqXHR) { @@ -197,9 +180,9 @@ function saveFormalGeprueft(personid, akteid, checked) function zgvUebernehmen(personid, prestudentid, btn) { $.ajax({ - type: "POST", + type: "GET", dataType: "json", - url: "../getLastPrestudentWithZgvJson/" + personid + '?fhc_controller_id=' + fhc_controller_id, + url: CONTROLLER_URL+"/getLastPrestudentWithZgvJson/" + personid + '?fhc_controller_id=' + fhc_controller_id, success: function (data, textStatus, jqXHR) { if (data !== null) @@ -239,7 +222,7 @@ function saveZgv(data) type: "POST", dataType: "json", data: data, - url: "../saveZgvPruefung/" + prestudentid + '?fhc_controller_id=' + fhc_controller_id, + url: CONTROLLER_URL+"/saveZgvPruefung/" + prestudentid + '?fhc_controller_id=' + fhc_controller_id, success: function (data, textStatus, jqXHR) { if (data === prestudentid) @@ -265,7 +248,7 @@ function saveNotiz(personid, data) type: "POST", dataType: "json", data: data, - url: "../saveNotiz/" + personid + '?fhc_controller_id=' + fhc_controller_id, + url: CONTROLLER_URL+"/saveNotiz/" + personid + '?fhc_controller_id=' + fhc_controller_id, success: function (data, textStatus, jqXHR) { refreshNotizen(); @@ -284,7 +267,7 @@ function updateNotiz(notizId, personId, data) type: "POST", dataType: "json", data: data, - url: "../updateNotiz/" + notizId + "/" + personId + '?fhc_controller_id=' + fhc_controller_id, + url: CONTROLLER_URL+"/updateNotiz/" + notizId + "/" + personId + '?fhc_controller_id=' + fhc_controller_id, success: function (data, textStatus, jqXHR) { if (data) @@ -301,13 +284,91 @@ function updateNotiz(notizId, personId, data) }); } +function getStudienjahrEndAjax() +{ + $.ajax({ + url: CONTROLLER_URL+"/getStudienjahrEnd?fhc_controller_id="+fhc_controller_id, + method: "GET", + success: function(data, textStatus, jqXHR) + { + //var gerdate = data.substring(8, 10) + "."+data.substring(5, 7) + "." + data.substring(0, 4); + var engdate = $.datepicker.parseDate("yy-mm-dd", data); + var gerdate = $.datepicker.formatDate("dd.mm.yy", engdate); + $("#parkdate").val(gerdate); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus); + } + }); +} + +function getParkedDateAjax(personid) +{ + $.ajax({ + url: CONTROLLER_URL+"/getParkedDate/"+personid+"?fhc_controller_id="+fhc_controller_id, + method: "GET", + success: function(data, textStatus, jqXHR) + { + refreshParking(data); + refreshLog(); + getStudienjahrEndAjax(); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus); + } + }); +} + +function parkPersonAjax(personid, date) +{ + $.ajax({ + url: CONTROLLER_URL+"/park?fhc_controller_id="+fhc_controller_id, + method: "POST", + data: + { + "person_id": personid, + "parkdate": date + }, + success: function(data, textStatus, jqXHR) + { + getParkedDateAjax(personid); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus); + } + }); +} + +function unparkPersonAjax(personid) +{ + $.ajax({ + url: CONTROLLER_URL+"/unpark?fhc_controller_id="+fhc_controller_id, + method: "POST", + data: + { + "person_id": personid + }, + success: function(data, textStatus, jqXHR) + { + getParkedDateAjax(personid); + }, + error: function (jqXHR, textStatus, errorThrown) + { + alert(textStatus); + } + }); +} + // ----------------------------------------------------------------------------------------------------------------- // methods executed after ajax (refreshers) function refreshLog() { var personid = $("#hiddenpersonid").val(); - $("#logs").load('../reloadLogs/' + personid, + $("#logs").load('../reloadLogs/' + personid + '?fhc_controller_id=' + fhc_controller_id, function () { //readd tablesorter @@ -319,7 +380,7 @@ function refreshLog() function formatLogTable() { addTablesorter("logtable", [[0, 1]], ["filter"], 2); - tablesortAddPager("logtable", "logpager", 23); + tablesortAddPager("logtable", "logpager", 22); $("#logtable").addClass("table-condensed"); } @@ -336,10 +397,54 @@ function refreshNotizen() ); } +function refreshParking(date) +{ + if (date === null) + { + $("#parking").html( + '
    '+ + '     '+ + 'bis  '+ + ''+ + '
    '); + + $("#parkdate").datepicker({ + "dateFormat": "dd.mm.yy", + "minDate": 0 + }); + + $("#parklink").click( + function () + { + var personid = $("#hiddenpersonid").val(); + var date = $("#parkdate").val(); + + parkPersonAjax(personid, date); + } + ); + } + else + { + var parkdate = $.datepicker.parseDate("yy-mm-dd", date); + var gerparkdate = $.datepicker.formatDate("dd.mm.yy", parkdate); + $("#parking").html( + 'BewerberIn geparkt bis '+gerparkdate+'     '+ + ' '); + + $("#unparklink").click( + function () + { + var personid = $("#hiddenpersonid").val(); + unparkPersonAjax(personid, date); + } + ); + } +} + function formatNotizTable() { addTablesorter("notiztable", [[0, 1]], ["filter"], 2); - tablesortAddPager("notiztable", "notizpager", 10); + tablesortAddPager("notiztable", "notizpager", 11); $("#notiztable").addClass("table-condensed"); } diff --git a/public/js/infocenter/infocenterPersonDataset.js b/public/js/infocenter/infocenterPersonDataset.js index 7f99b6fc6..2c063ac4d 100644 --- a/public/js/infocenter/infocenterPersonDataset.js +++ b/public/js/infocenter/infocenterPersonDataset.js @@ -25,17 +25,21 @@ function appendTableActionsHtml() '' + ' Keinen    '; - var messageHtml = 'Mit Ausgewählten:  ' + + var actionHtml = 'Mit Ausgewählten:  ' + '' + ' Nachricht senden'; + var legendHtml = ' Gesperrt    ' + + ' Geparkt'; + var personcount = 0; $.ajax({ url: window.location.pathname.replace('infocenter/InfoCenter', 'Filters/rowNumber'), method: "GET", data: { - fhc_controller_id: getUrlParameter("fhc_controller_id") + fhc_controller_id: getUrlParameter("fhc_controller_id"), + filter_page: FHC_JS_DATA_STORAGE_OBJECT.called_path + "/" + FHC_JS_DATA_STORAGE_OBJECT.called_method }, dataType: "json" }) @@ -51,9 +55,12 @@ function appendTableActionsHtml() var countHtml = personcount + " " + persontext; $("#datasetActionsTop, #datasetActionsBottom").append( - "
    " + selectAllHtml + "  " + messageHtml + "
    "+ - "
    " + countHtml + "
    "+ - "
    " + "
    "+ + "
    " + selectAllHtml + "  " + actionHtml + "
    "+ + "
    " + legendHtml + "
    "+ + "
    " + countHtml + "
    "+ + "
    "+ + "
    " ); $("#datasetActionsBottom").append("

    "); } @@ -138,7 +145,7 @@ function refreshSideMenu() }) .done(function(data, textStatus, jqXHR) { - renderSideMenu(); + FHC_NavigationWidget.renderSideMenu(); }).fail(function(jqXHR, textStatus, errorThrown) { alert(textStatus); diff --git a/public/js/tablesort/tablesort.js b/public/js/tablesort/tablesort.js index 7ee70a002..ee386bb7d 100644 --- a/public/js/tablesort/tablesort.js +++ b/public/js/tablesort/tablesort.js @@ -46,7 +46,7 @@ function tablesortAddPager(tableid, pagerid, size) '' + ''; - var rowcount = $("#" + tableid + " tr").length; + var rowcount = $("#" + tableid + " tbody tr").length; //not show pager if only one table page if (rowcount > size) diff --git a/rdf/kontakt.rdf.php b/rdf/kontakt.rdf.php index f4ab8fce8..426c17fea 100644 --- a/rdf/kontakt.rdf.php +++ b/rdf/kontakt.rdf.php @@ -73,7 +73,8 @@ else function draw_rdf($row) { global $rdf_url; - + if($row->kontakttyp == 'hidden') + return; echo ' @@ -93,4 +94,4 @@ function draw_rdf($row) } ?> - \ No newline at end of file + diff --git a/rdf/kontakttyp.rdf.php b/rdf/kontakttyp.rdf.php index 9d7d373aa..c8bd02da3 100644 --- a/rdf/kontakttyp.rdf.php +++ b/rdf/kontakttyp.rdf.php @@ -49,6 +49,8 @@ if($kontakt->getKontakttyp()) { foreach ($kontakt->result as $row) { + if($row->kontakttyp == 'hidden') + continue; echo ' @@ -65,4 +67,4 @@ else } ?> - \ No newline at end of file + diff --git a/system/checksystem.php b/system/checksystem.php index 6bdd83f54..5e4daa1d4 100644 --- a/system/checksystem.php +++ b/system/checksystem.php @@ -62,6 +62,18 @@ echo '
    '; require_once($dbupdStr); echo '
    '; + +// ******** phrasenupdate ************/ +echo '

    Phrasen-Updates!

    '; + +echo '
    '; + echo 'phrasesupdate.php wird aufgerufen...'; +echo '
    '; +echo '
    '; + require_once('phrasesupdate.php'); +echo '
    '; + + // ******** Berechtigungen Prüfen ************/ echo '

    Berechtigungen pruefen

    '; $neue=false; diff --git a/system/dbupdate_3.3.php b/system/dbupdate_3.3.php index 344517e83..d3cf9eb7c 100755 --- a/system/dbupdate_3.3.php +++ b/system/dbupdate_3.3.php @@ -2247,6 +2247,20 @@ if($result = $db->db_query("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE } } +// Berechtigungen fuer vilesci User erteilen auf system.tbl_log +if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_log' AND table_schema='system' AND grantee='vilesci' AND privilege_type='DELETE'")) +{ + if($db->db_num_rows($result)==0) + { + $qry = "GRANT DELETE ON system.tbl_log TO vilesci;"; + + if(!$db->db_query($qry)) + echo 'Permission Log: '.$db->db_last_error().'
    '; + else + echo 'Loeschrechte auf system.tbl_log für Vilesci User hinzugefügt'; + } +} + // Delete-Berechtigungen fuer web User erteilen auf system.tbl_log if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants WHERE table_name='tbl_log' AND table_schema='system' AND grantee='web' AND privilege_type='DELETE'")) { diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php new file mode 100644 index 000000000..585830b9d --- /dev/null +++ b/system/phrasesupdate.php @@ -0,0 +1,2692 @@ + + * + * Beschreibung: + * The script checks phrases and phrase-texts for actuality in the database. + * Missing attributes are inserted. + */ + +//flag for at least one new phrase +$new = false; + + +$phrases = array( + //******************* CORE/global + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'alle', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'alle', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'all', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'titel', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Titel', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'title', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'uebersicht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Übersicht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'overview', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'details', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Details', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'details', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'waehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'wählen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'select', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'vollstaendig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'vollständig', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'complete', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'unvollstaendig', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'unvollständig', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'incomplete', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'betreff', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Betreff', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'subject', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'sender', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sender', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'sender', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'empfaenger', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Empfänger', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'receiver', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'gesendetAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'gesendet am', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'sent on', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'gelesenAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'gelesen am', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'read on', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'datum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Datum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'freigeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'freigeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'approve', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'letzterBearbeiter', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'letzter Bearbeiter', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => 'last editor', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'letzteAktion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'letzte Aktion', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'last action', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'gesperrtVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'gesperrt von', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'locked by', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'sperrdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'sperrdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'locking date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'anzahl', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anzahl', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'amount', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'abgeschickt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'abgeschickt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'sent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'inaktiv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'inaktiv', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'inactive', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'aktiv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'aktiv', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'active', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'gesendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'gesendet', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'sent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'nichtGesendet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nicht gesendet', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'not sent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'kontakt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Kontakt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'contact', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'typ', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Typ', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'type', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'anmerkung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anmerkung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'name', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Name', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'name', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'stammdaten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Stammdaten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'master data', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'uploaddatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Uploaddatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'upload date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'letzterStatus', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'letzter Status', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'last status', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'nachrichten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachrichten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'messages', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'aktivitaeten', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aktivitäten', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'activities', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'notizen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Notizen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'notes', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'notiz', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Notiz', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'aktivitaet', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Aktivität', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'activity', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'hinzufuegen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'hinzufügen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'add', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'wirdBearbeitetVon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'wird bearbeitet von', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'nichtAbgeschickt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nicht abgeschickt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'not sent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'anStudiengangFreigegeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'an Studiengang freigegeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'nachricht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachricht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'message', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'vorschau', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorschau', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'preview', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'vorlage', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorlage', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'template', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'bis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'bis', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'until', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + + //******************************* CORE/ui + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'speichern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Speichern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Save', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'abbrechen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Abbrechen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Break', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'loeschen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Löschen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Delete', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'entfernen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Entfernen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Remove', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'freigeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Freigeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'freigabeAnStudiengang', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Freigabe an Studiengang', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'nachrichtSenden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachricht senden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Send message', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'senden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Senden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Send', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'anwenden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anwenden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Apply', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'hinzufuegen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Hinzufügen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Add', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'absagen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Absagen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'bitteWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte wählen...', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please select...', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'bitteEintragWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bitte Eintrag wählen...', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Please select entry...', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'keineEintraegeGefunden', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Keine Einträge gefunden', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'No entries found', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'felder', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Felder', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'fields', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'ui', + 'phrase' => 'vorlageWaehlen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorlage wählen...', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Select template', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + + //*************************** CORE/filter + array( + 'app' => 'core', + 'category' => 'filter', + 'phrase' => 'filterEinstellungen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Filter Einstellungen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'filter settings', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + + + //**************************** CORE/person + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'student', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Student', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'student', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'vorname', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Vorname', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'first name', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'nachname', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachname', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'last name', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'username', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Username', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'username', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'anrede', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anrede', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'uid', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'UID', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'UID', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'mann', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Mann', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'frau', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Frau', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'staatsbuergerschaft', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Staatsbürgerschaft', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'citizenship', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'geburtsdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Geburtsdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'date of birth', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'svnr', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Sozialversicherungsnummer', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => 'social security number', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'geschlecht', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Geschlecht', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'gender', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'geburtsnation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Geburtsnation', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'country of birth', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'geburtsort', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Geburtsort', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'place of birth', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'email', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'eMail', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'email', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'telefon', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Telefon', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'phone', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'adresse', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Adresse', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'address', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'nation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nation', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'nation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'person', + 'phrase' => 'ort', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ort', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'place', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + //**************** CORE/lehre + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'studiensemester', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studiensemester', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'semester', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'ausbildungssemester', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ausbildungssemester', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'organisationsform', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Organisationsform', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'organisational form', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'organisationseinheit', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Organisationseinheit', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'organisation unit', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'studiengang', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studiengang', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'degree-program', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'studienrichtung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Studienrichtung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'degree-program', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'pruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'examination', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'lehre', + 'phrase' => 'master', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Master', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Master', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + + + + //********************** INFOCENTER/infocenter + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'infocenter', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Infocenter', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Infocenter', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'dokumentenpruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Dokumentenprüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'document check', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvPruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Prüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvOrt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Ort', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvDatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Datum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgvNation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV Nation', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'bewerbung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bewerbung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'bewerber', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'BewerberIn', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'applicant', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'reifepruefung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reifeprüfung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'reifepruefungszeugnis', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Reifeprüfungszeugnis', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'bewerbungAbgeschickt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bewerbung abgeschickt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'application sent', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'ausstellungsnation', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Ausstellungsnation', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'issuing country', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'formalGeprueft', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'formal geprüft', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'formally checked', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'nachzureichendeDokumente', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nachzureichende Dokumente', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'documents to be hand in later', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'nachzureichenAm', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'nachzureichen am', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'to be delivered on', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'anmerkungenZurBewerbung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Anmerkungen zur Bewerbung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => 'notes on the application', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zugangBewerbung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugang Bewerbung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Access application', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zgv', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ZGV', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'zugangsvoraussetzung', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Zugangsvoraussetzung', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'letzteZgvUebernehmen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'letzte ZGV übernehmen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'absagegrund', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Absagegrund', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'reason for cancellation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'absage', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Absage', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Cancellation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'absageBestaetigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Absage bestätigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirm cancellation', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'absageBestaetigenTxt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bei Absage von InteressentInnen erhalten diese den Status "Abgewiesener" und deren ' + . 'ZGV-Daten können im Infocenter nicht mehr bearbeitet oder freigegeben werden. ' + . 'Alle nicht gespeicherten ZGV-Daten gehen verloren. Fortfahren?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'notizHinzufuegen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Notiz hinzufügen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Add note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'tageKeineAktion', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Tage keine Aktion', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'days no action', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'anAusgewaehlte', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'an Ausgewählte', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'to selected ones', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'interessentAbweisen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'InteressentIn abweisen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'interessentFreigeben', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'InteressentIn freigeben', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'interessentFreigebenTxt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bei Freigabe von InteressentInnen wird deren Interessentenstatus bestätigt + und deren Zgvdaten können im Infocenter nicht mehr bearbeitet oder freigegeben werden.
    + Alle nicht gespeicherten Zgvdaten gehen verloren.
    + Fortfahren?', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => '', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'freigabeBestaetigen', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Freigabe bestätigen', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'Confirm approval', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'nachfrist', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Nachfrist', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'extended deadline', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'bewerbungsfrist', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Bewerbungsfrist', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'application deadline', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'notizAendern', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'Notiz ändern', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'change note', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'parken', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'parken', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'park', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'ausparken', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'ausparken', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'unpark', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'infocenter', + 'category' => 'infocenter', + 'phrase' => 'geparkt', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'geparkt', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'parked', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ), + array( + 'app' => 'core', + 'category' => 'global', + 'phrase' => 'parkdatum', + 'insertvon' => 'system', + 'phrases' => array( + array( + 'sprache' => 'German', + 'text' => 'parkdatum', + 'description' => '', + 'insertvon' => 'system' + ), + array( + 'sprache' => 'English', + 'text' => 'parking date', + 'description' => '', + 'insertvon' => 'system' + ) + ) + ) +); + + +//***** CHECK PHRASES & PHRASENTEXTE in German and English. +//***** INSERT into phrase_tbl if new app + category + phrase found in phrasen-array. +//***** INSERT into phrasentext_tbl if new text found in phrasen-phrases-array, conciders every language apart. + +foreach ($phrases as $phrase) +{ + $qry = "SELECT phrase_id + FROM system.tbl_phrase + WHERE + app=" . $db->db_add_param($phrase['app']) . " AND + category=" . $db->db_add_param($phrase['category']) . " AND + phrase=" . $db->db_add_param($phrase['phrase']); + + //*** CHECK PHRASE + if ($result = $db->db_query($qry)) + { + $phrase_id = ''; + + //phrase not existing -> insert phrase and get last inserted phrase_id + if ($db->db_num_rows($result) === 0) + { + $qry_insert = "INSERT INTO system.tbl_phrase( + app, + phrase, + insertamum, + insertvon, + category) + VALUES(". + $db->db_add_param($phrase['app']) . ','. + $db->db_add_param($phrase['phrase']) . ','. + ' now(),'. + $db->db_add_param($phrase['insertvon']) . ','. + $db->db_add_param($phrase['category']) . ');'; + + if ($db->db_query($qry_insert)) + { + $new = true; + + $qry_lastId = "SELECT currval('system.tbl_phrase_phrase_id_seq') as id"; + if ($db->db_query($qry_lastId)) + { + if ($obj = $db->db_fetch_object()) + { + $phrase_id = $obj->id; + } + } + echo 'Kategorie/Phrase: ' . $phrase['category'] . '/' . $phrase['phrase'] . ' hinzugefügt
    '; + } + else + echo 'Fehler: ' . $phrase['category'] . '/' . $phrase['phrase'] . ' hinzufügen nicht möglich
    '; + + } + //phrase existing -> get phrase_id + else + { + if ($obj = $db->db_fetch_object($result)) + { + $phrase_id = $obj->phrase_id; + } + echo 'Kategorie/Phrase: ' . $phrase['category'] . '/' . $phrase['phrase'] . ' vorhanden.
    '; + } + + + //*** CHECK PHRASENTEXT + //loop through languages + foreach ($phrase['phrases'] as $phrase_phrases) + { + $language = $phrase_phrases['sprache']; + + //query phrasentext in certain language + $qry_language = + "SELECT * + FROM system.tbl_phrasentext + WHERE + phrase_id=" . $phrase_id . " AND + sprache='" . $language . "'"; + + + if ($result_language = $db->db_query($qry_language)) + { + //if phrasentext not existing in certain language -> insert + if ($db->db_num_rows($result_language) === 0 && !empty($phrase_phrases['text'])) + { + $qry_insert = "INSERT INTO system.tbl_phrasentext( + phrase_id, + sprache, + orgeinheit_kurzbz, + orgform_kurzbz, + text, + description, + insertamum, + insertvon) + VALUES(". + $db->db_add_param($phrase_id, FHC_INTEGER) . ','. + $db->db_add_param($phrase_phrases['sprache']) . ','. + ' NULL,'. + ' NULL,'. + $db->db_add_param($phrase_phrases['text']) . ','. + $db->db_add_param($phrase_phrases['description']) . ','. + ' now(),'. + $db->db_add_param($phrase_phrases['insertvon']) . ');'; + + if ($db->db_query($qry_insert)) + { + echo '-- Phrasentext ' . strtoupper(substr($phrase_phrases['sprache'], 0, 3)) . ': ' . $phrase_phrases['text'] . ' hinzugefügt
    '; + } + else + { + echo 'Fehler: Phrasentext ' . strtoupper(substr($phrase_phrases['sprache'], 0, 3)) . ': '. $phrase_phrases['text'] . ' hinzufügen nicht möglich
    '; + } + } + } + } + } +} + +if(!$new) + echo 'Keine neuen Phrasen
    ';
    SelectSelect" + th + "" + th + "
    '; + strHtml += ''; + strHtml += '' + record[data.selectedFields[i]] + '' + record[additionalColumn] + '