diff --git a/application/controllers/Cis/Profil.php b/application/controllers/Cis/Profil.php index 687f2becc..9f692b0a9 100644 --- a/application/controllers/Cis/Profil.php +++ b/application/controllers/Cis/Profil.php @@ -17,7 +17,6 @@ class Profil extends Auth_Controller { parent::__construct([ 'index' => ['student/anrechnung_beantragen:r', 'user:r'], // TODO(chris): permissions? - 'View' => ['student/anrechnung_beantragen:r', 'user:r'], 'foto_sperre_function' => ['student/anrechnung_beantragen:r', 'user:r'], 'getView' => ['student/anrechnung_beantragen:r', 'user:r'], 'editProfil' => ['student/anrechnung_beantragen:r', 'user:r'], @@ -35,7 +34,7 @@ class Profil extends Auth_Controller $this->load->model('person/Kontakt_model', 'KontaktModel'); $this->load->model('person/Profil_change_model', 'ProfilChangeModel'); - //? put the uid and pid inside the controller for further usage in views + //? put the uid and pid inside the controller to reuse in controller $this->uid = getAuthUID(); $this->pid = getAuthPersonID(); diff --git a/application/controllers/Cis/ProfilUpdate.php b/application/controllers/Cis/ProfilUpdate.php new file mode 100644 index 000000000..5e410bace --- /dev/null +++ b/application/controllers/Cis/ProfilUpdate.php @@ -0,0 +1,42 @@ + ['student/anrechnung_beantragen:r', 'user:r'], // TODO(chris): permissions? + 'getAllRequests' => ['student/anrechnung_beantragen:r', 'user:r'], + + ]); + //? put the uid and pid inside the controller to reuse in controller + $this->uid = getAuthUID(); + $this->pid = getAuthPersonID(); + + $this->load->model('person/Profil_change_model','ProfilChangeModel'); + } + + + public function index(){ + $this->load->view('Cis/ProfilUpdate'); + } + + public function getAllRequests(){ + + $res = $this->ProfilChangeModel->load(); + if(isError($res)){ + // catch exception + echo $res->retval->data; + return; + }else{ + $res = hasData($res)? getData($res) : null; + } + echo json_encode($res); + } +} \ No newline at end of file diff --git a/application/views/Cis/ProfilUpdate.php b/application/views/Cis/ProfilUpdate.php new file mode 100644 index 000000000..f55fd4dc1 --- /dev/null +++ b/application/views/Cis/ProfilUpdate.php @@ -0,0 +1,15 @@ + 'Profil Änderungen', + 'customJSModules'=> ['public/js/apps/Cis/ProfilUpdateRequests.js'], + 'tabulator5'=> true, + 'customCSSs'=>['public/css/components/FilterComponent.css'], + ]; + +$this->load->view('templates/CISHTML-Header',$includesArray); +?> + +