From fa3daa7a577f751ec24fbf2fad45ae372af59ce6 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 18 Dec 2017 14:01:42 +0100 Subject: [PATCH] Created infocenter details page showing Person Stammdaten, Dokumente, Prestudent ZGVs, Logs and Notizen. --- .../system/infocenter/InfocenterDetails.php | 456 ++++++++++++++++++ application/libraries/DmsLib.php | 4 + application/libraries/PersonLogLib.php | 16 + application/models/person/Notiz_model.php | 37 ++ application/models/system/PersonLog_model.php | 26 + .../system/infocenter/infocenterDetails.php | 269 +++++++++++ application/widgets/Nation_widget.php | 22 + application/widgets/Statusgrund_widget.php | 22 + application/widgets/Zgv_widget.php | 22 + application/widgets/Zgvmaster_widget.php | 22 + 10 files changed, 896 insertions(+) create mode 100644 application/controllers/system/infocenter/InfocenterDetails.php create mode 100644 application/views/system/infocenter/infocenterDetails.php create mode 100644 application/widgets/Nation_widget.php create mode 100644 application/widgets/Statusgrund_widget.php create mode 100644 application/widgets/Zgv_widget.php create mode 100644 application/widgets/Zgvmaster_widget.php diff --git a/application/controllers/system/infocenter/InfocenterDetails.php b/application/controllers/system/infocenter/InfocenterDetails.php new file mode 100644 index 000000000..f65efea77 --- /dev/null +++ b/application/controllers/system/infocenter/InfocenterDetails.php @@ -0,0 +1,456 @@ +load->model('person/person_model', 'PersonModel'); + $this->load->model('person/kontakt_model', 'KontaktModel'); + $this->load->model('person/adresse_model', 'AdresseModel'); + $this->load->model('person/notiz_model', 'NotizModel'); + $this->load->model('person/notizzuordnung_model', 'NotizzuordnungModel'); + $this->load->model('crm/prestudent_model', 'PrestudentModel'); + $this->load->model('crm/prestudentstatus_model', 'PrestudentstatusModel'); + $this->load->model('crm/akte_model', 'AkteModel'); + $this->load->model('crm/statusgrund_model', 'StatusgrundModel'); + $this->load->model('codex/nation_model', 'NationModel'); + $this->load->model('codex/zgv_model', 'ZgvModel'); + $this->load->model('codex/zgvmaster_model', 'ZgvmasterModel'); + $this->load->model('organisation/studiengang_model', 'StudiengangModel'); + + $this->load->library('DmsLib'); + $this->load->library('WidgetLib'); + $this->load->library('PersonLogLib'); + + $this->load->helper('fhcauth'); + $this->load->helper('url'); + + $this->app = 'aufnahme'; + $this->uid = getAuthUID(); + if(!$this->uid) + show_error('user authentification failed'); + } + + public function index() + { + //TODO error page + } + + private function __loadPersonData($person_id) + { + $person = $this->PersonModel->load($person_id); + + if ($person->error) + { + show_error($person->retval); + } + + $staatsbuergerschaft = $this->NationModel->load($person->retval[0]->staatsbuergerschaft); + if ($staatsbuergerschaft->error) + { + show_error($staatsbuergerschaft->retval); + } + + $geburtsnation = $this->NationModel->load($person->retval[0]->geburtsnation); + if ($geburtsnation->error) + { + show_error($geburtsnation->retval); + } + + $this->KontaktModel->addDistinct(); + $this->KontaktModel->addSelect('kontakttyp, kontakt'); + $kontakte = $this->KontaktModel->loadWhere(array('person_id' => $person_id)); + + if ($kontakte->error) + { + show_error($kontakte->retval); + } + + $adresse = $this->AdresseModel->loadWhere(array('person_id' => $person_id)); + + if ($adresse->error) + { + show_error($adresse->retval); + } + + $dokumente = $this->AkteModel->loadWhere(array('person_id' => $person_id)); + + if ($dokumente->error) + { + show_error($dokumente->retval); + } + + $logs = $this->personloglib->getLogs($person_id, $this->app); + + foreach($logs as $log) + $log->logdata = json_decode($log->logdata); + + $this->NotizzuordnungModel->addSelect('notiz_id'); + $notizzuordnung = $this->NotizzuordnungModel->loadWhere(array('person_id' => $person_id)); + + if ($notizzuordnung->error) + { + show_error($notizzuordnung->retval); + } + + $notizen = array(); + + foreach ($notizzuordnung->retval as $notiz_id) + { + $notiz = $this->NotizModel->load($notiz_id->notiz_id); + $notizen[] = $notiz->retval[0]; + } + + $data = array ( + 'person' => $person->retval[0], + 'staatsbuergerschaft' => $staatsbuergerschaft->retval[0], + 'geburtsnation' => $geburtsnation->retval[0], + 'kontakte' => $kontakte->retval, + 'adresse' => isset($adresse->retval[0]) ? $adresse->retval[0] : null, + 'dokumente' => $dokumente->retval, + 'logs' => $logs, + 'notizen' => $notizen + ); + + return $data; + } + + private function __loadPrestudentData($person_id) + { + $zgvpruefungen = []; + + $prestudenten = $this->PrestudentModel->loadWhere(array('person_id' => $person_id)); + + if ($prestudenten->error) + { + show_error($prestudenten->retval); + } + + foreach ($prestudenten->retval as $prestudent) + { + $zgvpruefung = new stdClass(); + $zgvpruefung->prestudent_id = $prestudent->prestudent_id; + + //Prestudentstatus + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent->prestudent_id); + + if ($lastStatus->error) + { + show_error($lastStatus->retval); + } + + $zgvpruefung->prestudentstatus = $lastStatus->retval[0]; + + // Studiengang + $this->StudiengangModel->addSelect('kurzbzlang, bezeichnung, typ');//TODO need bezeichnung? + $studiengang = $this->StudiengangModel->load($prestudent->studiengang_kz); + + if ($studiengang->error) + { + show_error($studiengang->retval); + } + + $zgvpruefung->studiengang = $studiengang->retval[0]->kurzbzlang; + $zgvpruefung->studiengangtyp = $studiengang->retval[0]->typ; + + // Zgv + if (isset($prestudent->zgv_code)) + { + $this->ZgvModel->addSelect('zgv_code, zgv_bez'); + $zgv = $this->ZgvModel->load($prestudent->zgv_code); + + if ($zgv->error) + { + show_error($zgv->retval); + } + + $zgvpruefung->zgv_code = $zgv->retval[0]->zgv_code; + $zgvpruefung->zgv_bez = $zgv->retval[0]->zgv_bez; + } + else + { + $zgvpruefung->zgv_code = null; + $zgvpruefung->zgv_bez = null; + } + $zgvpruefung->zgvort = $prestudent->zgvort; + $zgvpruefung->zgvdatum = $prestudent->zgvdatum; + + // Zgv Nation + if (isset($prestudent->zgvnation)) + { + $this->NationModel->addSelect('nation_code, kurztext'); + $zgvnation = $this->NationModel->load($prestudent->zgvnation); + + if ($zgvnation->error) + { + show_error($zgvnation->retval); + } + + $zgvpruefung->zgvnation_code = $zgvnation->retval[0]->nation_code; + $zgvpruefung->zgvnation_bez = $zgvnation->retval[0]->kurztext; + } + else + { + $zgvnation = null; + $zgvpruefung->zgvnation_code = null; + $zgvpruefung->zgvnation_bez = null; + } + + // Zgv Master + if (isset($prestudent->zgvmas_code)) + { + $this->ZgvmasterModel->addSelect('zgvmas_code, zgvmas_bez'); + $zgvmas = $this->ZgvmasterModel->load($prestudent->zgvmas_code); + + if ($zgvmas->error) + { + show_error($zgvmas->retval); + } + $zgvpruefung->zgvmas_code = $zgvmas->retval[0]->zgvmas_code; + $zgvpruefung->zgvmas_bez = $zgvmas->retval[0]->zgvmas_bez; + } + else + { + $zgvpruefung->zgvmas_code = null; + $zgvpruefung->zgvmas_bez = null; + } + $zgvpruefung->zgvmaort = $prestudent->zgvmaort; + $zgvpruefung->zgvmadatum = $prestudent->zgvmadatum; + + // Zgv Master Nation + if (isset($prestudent->zgvmanation)) + { + $this->NationModel->addSelect('nation_code, kurztext'); + $zgvmanation = $this->NationModel->load($prestudent->zgvmanation); + + if ($zgvmanation->error) + { + show_error($zgvmanation->retval); + } + + $zgvpruefung->zgvmanation_code = $zgvmanation->retval[0]->nation_code; + $zgvpruefung->zgvmanation_bez = $zgvmanation->retval[0]->kurztext; + } + else + { + $zgvmanation = null; + $zgvpruefung->zgvmanation_code = null; + $zgvpruefung->zgvmanation_bez = null; + } + + $zgvpruefungen[] = $zgvpruefung; + } + + //TODO replace with widget + $statusgruende = $this->StatusgrundModel->load()->retval; + + $data = array ( + 'zgvpruefungen' => $zgvpruefungen, + 'statusgruende' => $statusgruende + ); + + return $data; + } + + public function showDetails($person_id) + { + $persondata = $this->__loadPersonData($person_id); + $prestudentdata = $this->__loadPrestudentData($person_id); + $this->load->view('system/infocenter/infocenterDetails.php', array_merge($persondata, $prestudentdata)); + } + + public function saveFormalGeprueft() + { + $akte_id = $this->input->get('akte_id'); + $formalgeprueft = $this->input->get('formal_geprueft'); + $person_id = $this->input->get('person_id'); + + $akte = $this->AkteModel->load($akte_id); + + if ($akte->error) + { + show_error($akte->retval); + } + + $timestamp = (isset($formalgeprueft) && $formalgeprueft === 'true')? date('Y-m-d H:i:s') : null; + $this->AkteModel->update($akte_id, array('formal_geprueft_amum' => $timestamp)); + + //write person log + $this->personloglib->log($person_id, 'Action', array('name' => 'Dokument formal geprüft', 'message' => 'Dokument'.$akte->titel.' formal geprüft, gesetzt auf '.(is_null($timestamp) ? 'NULL' : $timestamp), 'success' => 'true'), $this->app, null, $this->uid); + + redirect('/system/infocenter/InfocenterDetails/showDetails/'.$person_id); + } + + public function saveZgvPruefung($prestudent_id) + { + // prestudentdata + $studiensemester = $this->input->post('studiensemester') === 'null' ? null : $this->input->post('studiensemester'); + $ausbildungssemester = $this->input->post('ausbildungssemester'); + + // zgvdata + $zgv_code = $this->input->post('zgv') === 'null' ? null : $this->input->post('zgv'); + $zgvort = $this->input->post('zgvort'); + $zgvdatum = $this->input->post('zgvdatum'); + $zgvdatum = empty($zgvdatum) ? null : date_format(date_create($zgvdatum), 'Y-m-d'); + $zgvnation_code = $this->input->post('zgvnation') === 'null' ? null : $this->input->post('zgvnation'); + + //zgvmasterdata + $zgvmas_code = $this->input->post('zgvmas') === 'null' ? null : $this->input->post('zgvmas'); + $zgvmaort = $this->input->post('zgvmaort'); + $zgvmadatum = $this->input->post('zgvmadatum'); + $zgvmadatum = empty($zgvmadatum) ? null : date_format(date_create($zgvmadatum), 'Y-m-d'); + $zgvmanation_code = $this->input->post('zgvmanation') === 'null' ? null : $this->input->post('zgvmanation'); + + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); + + if ($lastStatus->error) + { + show_error($lastStatus->retval); + } + + $result = $this->PrestudentstatusModel->update(array('prestudent_id' => $prestudent_id, 'studiensemester_kurzbz' => $lastStatus->retval[0]->studiensemester_kurzbz, 'ausbildungssemester' => $lastStatus->retval[0]->ausbildungssemester), array('studiensemester_kurzbz' => $studiensemester, 'ausbildungssemester' => $ausbildungssemester)); + + if ($result->error) + { + show_error($result->retval); + } + + $result = $this->PrestudentModel->update($prestudent_id, array('zgv_code' => $zgv_code, 'zgvort' => $zgvort, 'zgvdatum' => $zgvdatum, 'zgvnation' => $zgvnation_code, + 'zgvmas_code' => $zgvmas_code, 'zgvmaort' => $zgvmaort, 'zgvmadatum' => $zgvmadatum, 'zgvmanation' => $zgvmanation_code)); + + if ($result->error) + { + show_error($result->retval); + } + + $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); + + $this->personloglib->log($logdata['person_id'], 'Action', array('name' => 'Zgv gespeichert', 'message' => 'Zgv für Studiengang '.$logdata['studiengang_kurzbz'].' wurde gespeichert ', 'success' => 'true'), $this->app, null, $this->uid); + + $this->__redirectToStart($prestudent_id); + } + + public function saveAbsage($prestudent_id) + { + $statusgrund = $this->input->post('statusgrund'); + + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); + + if ($lastStatus->error) + { + show_error($lastStatus->retval); + } + + $result = $this->PrestudentstatusModel->insert(array('prestudent_id' => $prestudent_id, 'studiensemester_kurzbz' => $lastStatus->retval[0]->studiensemester_kurzbz, 'ausbildungssemester' => $lastStatus->retval[0]->ausbildungssemester, 'datum' => date('Y-m-d'), 'orgform_kurzbz' => $lastStatus->retval[0]->orgform_kurzbz, 'studienplan_id' => $lastStatus->retval[0]->studienplan_id, 'status_kurzbz' => 'Abgewiesener', 'statusgrund_id' => $statusgrund, 'insertvon' => $this->uid, 'insertamum' => date('Y-m-d H:i:s'))); + + if ($result->error) + { + show_error($result->retval); + } + + $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); + + $this->personloglib->log($logdata['person_id'], 'Processstate', array('name' => 'Interessent abgewiesen', 'message' => 'Interessent wurde für Studiengang '.$logdata['studiengang_kurzbz'].' abgewiesen', 'success' => 'true'), $this->app, null, $this->uid); + + $this->__redirectToStart($prestudent_id); + } + + public function saveFreigabe($prestudent_id) + { + $lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id); + + if (count($lastStatus->retval) > 0) + { + $lastStatus = $lastStatus->retval[0]; + + $result = $this->PrestudentstatusModel->update(array('prestudent_id' => $prestudent_id, 'status_kurzbz' => $lastStatus->status_kurzbz, 'studiensemester_kurzbz' => $lastStatus->studiensemester_kurzbz, 'ausbildungssemester' => $lastStatus->ausbildungssemester), + array('bestaetigtvon' => $this->uid, 'bestaetigtam' => date('Y-m-d'), 'updatevon' => $this->uid, 'updateamum' => date('Y-m-d H:i:s'))); + + if ($result->error) + { + show_error($result->retval); + } + } + + $logdata = $this->__getPersonAndStudiengangFromPrestudent($prestudent_id); + + $this->personloglib->log($logdata['person_id'], 'Processstate', array('name' => 'Interessent freigegeben', 'message' => 'Interessent wurde für Studiengang '.$logdata['studiengang_kurzbz'].' freigegeben', 'success' => 'true'), $this->app, null, $this->uid); + + $this->__redirectToStart($prestudent_id); + } + + public function saveNotiz($person_id) + { + $titel = $this->input->post('notiztitel'); + $text = $this->input->post('notiz'); + $erledigt = false; + + $this->NotizModel->addNotizForPerson($person_id, $titel, $text, $erledigt, $this->uid); + + $this->personloglib->log($person_id, 'Action', array('name' => 'Notiz hinzugefügt', 'message' => 'Notiz mit Titel '.$titel.' wurde hinzugefügt', 'success' => 'true'), $this->app, null, $this->uid); + + redirect('/system/infocenter/InfocenterDetails/showDetails/'.$person_id); + } + + public function outputAkteContent($akte_id) + { + $akte = $this->AkteModel->load($akte_id); + + if ($akte->error) + { + show_error($akte->retval); + } + + $aktecontent = $this->dmslib->getAkteContent($akte_id); + + if($aktecontent->error) + { + show_error($aktecontent->retval); + } + + header("Content-type: ".$akte->retval[0]->mimetype); + header('Content-Disposition: attachment; filename="'.$akte->retval[0]->titel.'"'); + echo $aktecontent->retval; + } + + private function __redirectToStart($prestudent_id) + { + $this->PrestudentModel->addSelect('person_id'); + $person_id = $this->PrestudentModel->load($prestudent_id)->retval[0]->person_id; + redirect('/system/infocenter/InfocenterDetails/showDetails/'.$person_id); + } + + private function __getPersonAndStudiengangFromPrestudent($prestudent_id) + { + $this->PrestudentModel->addSelect('person_id, studiengang_kz'); + $prestudent = $this->PrestudentModel->load($prestudent_id); + + if ($prestudent->error) + { + show_error($prestudent->retval); + } + + $person_id = $prestudent->retval[0]->person_id; + + $this->StudiengangModel->addSelect('kurzbzlang');//TODO need bezeichnung? + $studiengang = $this->StudiengangModel->load($prestudent->retval[0]->studiengang_kz); + + if ($studiengang->error) + { + show_error($studiengang->retval); + } + + $studiengang_kurzbz = $studiengang->retval[0]->kurzbzlang; + + return array('person_id' => $person_id, 'studiengang_kurzbz' => $studiengang_kurzbz); + } + +} \ No newline at end of file diff --git a/application/libraries/DmsLib.php b/application/libraries/DmsLib.php index f592eaa0e..7b5eeb62e 100644 --- a/application/libraries/DmsLib.php +++ b/application/libraries/DmsLib.php @@ -250,6 +250,10 @@ class DmsLib { return success(base64_decode($dmscontent->retval[0]->file_content)); } + else + { + return error($dmscontent->retval); + } } else { diff --git a/application/libraries/PersonLogLib.php b/application/libraries/PersonLogLib.php index 5eb8013f2..34bde6145 100644 --- a/application/libraries/PersonLogLib.php +++ b/application/libraries/PersonLogLib.php @@ -44,4 +44,20 @@ class PersonLogLib else show_error($result->retval); } + + /** + * Gets Logs for a Person, filtered by Parameters + * @param int $person_id ID of the Person. + * @param string $app Name of the App. + * @param string $oe_kurzbz Organisations Unit. + * @return object $result + */ + public function getLogs($person_id, $app = null, $oe_kurzbz = null) + { + $result = $this->ci->PersonLogModel->filterLog($person_id, $app, $oe_kurzbz); + if (isSuccess($result)) + return $result->retval; + else + show_error($result->retval); + } } diff --git a/application/models/person/Notiz_model.php b/application/models/person/Notiz_model.php index fc41c9e40..37581def1 100644 --- a/application/models/person/Notiz_model.php +++ b/application/models/person/Notiz_model.php @@ -94,5 +94,42 @@ class Notiz_model extends DB_Model return $result; } + + /** + * Add a Notiz for a given person + */ + public function addNotizForPerson($person_id, $titel, $text, $erledigt, $verfasser_uid) + { + // Loads model Notizzuordnung_model + $this->load->model('person/Notizzuordnung_model', 'NotizzuordnungModel'); + + // Start DB transaction + $this->db->trans_start(false); + + $result = $this->insert(array('titel' => $titel, 'text' => $text, 'erledigt' => $erledigt, 'verfasser_uid' => $verfasser_uid, + "insertvon" => $verfasser_uid)); + $notiz_id = $result->retval; + if (isSuccess($result)) + { + $result = $this->NotizzuordnungModel->insert(array('notiz_id' => $notiz_id, 'person_id' => $person_id)); + } + + // Transaction complete! + $this->db->trans_complete(); + + // Check if everything went ok during the transaction + if ($this->db->trans_status() === false || isError($result)) + { + $this->db->trans_rollback(); + $result = error($result->msg, EXIT_ERROR); + } + else + { + $this->db->trans_commit(); + $result = success($notiz_id); + } + + return $result; + } // ------------------------------------------------------------------------------------------------------ } \ No newline at end of file diff --git a/application/models/system/PersonLog_model.php b/application/models/system/PersonLog_model.php index 2d7ff15cc..4725815f3 100644 --- a/application/models/system/PersonLog_model.php +++ b/application/models/system/PersonLog_model.php @@ -58,4 +58,30 @@ class PersonLog_model extends CI_Model return success($result->result()); } + + /** + * Load logs for a person, filtered by parameters + * @param int $person_id ID of the Person. + * @param string $app Name of the App. + * @param string $oe_kurzbz Organisations Unit. + * @return object $result + */ + public function filterLog($person_id, $app = null, $oe_kurzbz = null) + { + // Check Permissions + $this->load->library('PermissionLib'); + if(!$this->permissionlib->isEntitled('system.tbl_log',PermissionLib::SELECT_RIGHT)) + show_error('Permission denied - You need Access to system.tbl_log'); + + $this->db->order_by('zeitpunkt', 'DESC'); + $this->db->order_by('log_id', 'DESC'); + if (!is_null($app)) + $this->db->where('app='.$this->db->escape($app)); + if (!is_null($oe_kurzbz)) + $this->db->where('oe_kurzbz='.$this->db->escape($oe_kurzbz)); + + $result = $this->db->get_where($this->dbTable, "person_id=".$this->db->escape($person_id)); + + return success($result->result()); + } } diff --git a/application/views/system/infocenter/infocenterDetails.php b/application/views/system/infocenter/infocenterDetails.php new file mode 100644 index 000000000..b663094c7 --- /dev/null +++ b/application/views/system/infocenter/infocenterDetails.php @@ -0,0 +1,269 @@ +load->view('templates/header', array('title' => 'InfocenterDetails', 'datepicker' => true, 'datepickerclass' => 'dateinput'/*, 'tablesort' => true, 'tableid' => 't1'*/)); +?> + +

Infocenter - Person Details

+ +
+ Stammdaten + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Vorname: vorname ?>
Nachname: nachname ?>
Geburtsdatum: gebdatum), 'd.m.Y') ?>
Sozialversicherungsnr: svnr ?>
Staatsbürgerschaft: kurztext ?>
Geschlecht: geschlecht ?>
Geburtsnation: kurztext ?>
Geburtsort: gebort ?>
Kontaktdaten
kontakttyp).': '; + if ($kontakt->kontakttyp == 'email'): + ?> + + kontakt; + if ($kontakt->kontakttyp == 'email'): + ?> + + +
+ Adresse: strasse.", ".$adresse->plz." ".$adresse->ort : "" ?> +
+
+
+ Dokumentenprüfung + + + + + + + + + formal_geprueft_amum)) ? "checked" : ""; + ?> + + + + + + + + +
NameTypUploaddatumformal geprüft
titel ?> + dokument_kurzbz ?>erstelltam), 'd.m.Y') ?> + + onclick="onFormalGeprueftChange(this.checked, akte_id ?>, person_id ?>)"/> + formal_geprueft_amum; + ?> +
+
+ +
+
+ ZGV Prüfung - Studiengang studiengang ?> + + + + + + + + + + + + + + studiengangtyp === 'm') :?> + + + + + + + + + + + + + + + + +
+ + prestudentstatus->status_kurzbz?> + + + prestudentstatus->bestaetigtam) ? "ja" : "nein" ?> + + + widgetlib->widget( + 'Studiensemester_widget', + array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->prestudentstatus->studiensemester_kurzbz), + array('name' => 'studiensemester', 'id' => 'studiensemester') + ); ?> + + + prestudentstatus->ausbildungssemester ?> +
+ + widgetlib->widget( + 'Zgv_widget', + array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgv_code), + array('name' => 'zgv', 'id' => 'zgv') + ); ?> + + + + + + zgvdatum), 'd.m.Y') ?>" + name="zgvdatum"> + + + widgetlib->widget( + 'Nation_widget', + array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvnation_code), + array('name' => 'zgvnation', 'id' => 'zgvnation') + ); ?> +
+ + widgetlib->widget( + 'Zgvmaster_widget', + array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmas_code), + array('name' => 'zgvmas', 'id' => 'zgvmas') + ); ?> + + + + + + zgvmadatum), 'd.m.Y') ?>" + name="zgvmadatum"> + + + widgetlib->widget( + 'Nation_widget', + array(DropdownWidget::SELECTED_ELEMENT => $zgvpruefung->zgvmanation_code), + array('name' => 'zgvmanation', 'id' => 'zgvmanation') + ); ?> +
+ +
+
+
+ + widgetlib->widget( + 'Statusgrund_widget', + array(), + array('name' => 'absage', 'id' => 'absage') + ); */ + //Prestudenten cannot be abgewiesen or freigegeben if already done + if(!isset($zgvpruefung->prestudentstatus->bestaetigtam) && $zgvpruefung->prestudentstatus->status_kurzbz != 'Abgewiesener') : + ?> +
+ + + +
+ + + + + + + + + + + + + + + + + + + + +
DatumAktivitätUser
zeitpunkt), 'd.m.Y H:i:s') ?>logdata->name ?>insertvon ?>
+ + + + + + + + + + + + + + + + + +
DatumNotizUser
insertamum), 'd.m.Y H:i:s') ?>titel ?>verfasser_uid ?>
+
+ +
+ Titel: +
+ Text: + +
+ + + diff --git a/application/widgets/Nation_widget.php b/application/widgets/Nation_widget.php new file mode 100644 index 000000000..2c20b8691 --- /dev/null +++ b/application/widgets/Nation_widget.php @@ -0,0 +1,22 @@ +load->model('codex/nation_model', 'NationModel'); + $this->NationModel->addOrder('nation_code'); + + $this->addSelectToModel($this->NationModel, 'nation_code', 'kurztext'); + + $this->setElementsArray( + $this->NationModel->load(), + true, + 'Select a nation...', + 'No nation found' + ); + + $this->loadDropDownView($widgetData); + } +} \ No newline at end of file diff --git a/application/widgets/Statusgrund_widget.php b/application/widgets/Statusgrund_widget.php new file mode 100644 index 000000000..d0f9d2f58 --- /dev/null +++ b/application/widgets/Statusgrund_widget.php @@ -0,0 +1,22 @@ +load->model('crm/statusgrund_model', 'StatusgrundModel'); + $this->StatusgrundModel->addOrder('statusgrund_id'); + + $this->addSelectToModel($this->StatusgrundModel, 'statusgrund_id', 'bezeichnung_mehrsprachig[1]'); + + $this->setElementsArray( + $this->StatusgrundModel->load(), + true, + 'Select a Statusgrund...', + 'No Statusgrund found' + ); + + $this->loadDropDownView($widgetData); + } +} \ No newline at end of file diff --git a/application/widgets/Zgv_widget.php b/application/widgets/Zgv_widget.php new file mode 100644 index 000000000..8858d3206 --- /dev/null +++ b/application/widgets/Zgv_widget.php @@ -0,0 +1,22 @@ +load->model('codex/zgv_model', 'ZgvModel'); + $this->ZgvModel->addOrder('zgv_bez'); + + $this->addSelectToModel($this->ZgvModel, 'zgv_code', 'zgv_bez'); + + $this->setElementsArray( + $this->ZgvModel->load(), + true, + 'Select a zgv...', + 'No zgv found' + ); + + $this->loadDropDownView($widgetData); + } +} \ No newline at end of file diff --git a/application/widgets/Zgvmaster_widget.php b/application/widgets/Zgvmaster_widget.php new file mode 100644 index 000000000..8ac331109 --- /dev/null +++ b/application/widgets/Zgvmaster_widget.php @@ -0,0 +1,22 @@ +load->model('codex/zgvmaster_model', 'ZgvmasterModel'); + $this->ZgvmasterModel->addOrder('zgvmas_bez'); + + $this->addSelectToModel($this->ZgvmasterModel, 'zgvmas_code', 'zgvmas_bez'); + + $this->setElementsArray( + $this->ZgvmasterModel->load(), + true, + 'Select a zgv...', + 'No zgv found' + ); + + $this->loadDropDownView($widgetData); + } +} \ No newline at end of file