mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
added Menu link and Profile pop up link
This commit is contained in:
@@ -79,13 +79,12 @@ class Profil extends Auth_Controller
|
||||
|
||||
public function View($uid){
|
||||
|
||||
//? get the personID of the uid
|
||||
isSuccess($this->BenutzerModel->addSelect(["person_id"]));
|
||||
$personID_res = $this->BenutzerModel->load([$uid]);
|
||||
$personID_res = hasData($personID_res) ? getData($personID_res)[0] : null;
|
||||
if($uid === getAuthUID()){
|
||||
$this->index();
|
||||
}else{
|
||||
$this->load->view('Cis/Profil', ["uid" => $uid,"view"=>true]);
|
||||
}
|
||||
|
||||
$this->load->view('Cis/Profil', ["uid" => $uid,"pid" => $personID_res->person_id,"view"=>true]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -99,6 +99,15 @@ class Content_model extends DB_Model
|
||||
{
|
||||
"content_id": 1000002,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Profil",
|
||||
"content": "<content><url><![CDATA[' . site_url('/Cis/Profil') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
"aktiv": true,
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000003,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "COVID-19",
|
||||
"content": "<content><url><![CDATA[' . site_url('/CisHtml/Cms/content/10012') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
"menu_open": false,
|
||||
@@ -106,7 +115,7 @@ class Content_model extends DB_Model
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000003,
|
||||
"content_id": 1000004,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Meine LV",
|
||||
"content": "<content><url><![CDATA[' . site_url('/Cis/MyLv') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
@@ -115,7 +124,7 @@ class Content_model extends DB_Model
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000004,
|
||||
"content_id": 1000005,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Stundenplan",
|
||||
"content": "<content><url><![CDATA[' . site_url('/Cis/Stundenplan') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
@@ -124,7 +133,7 @@ class Content_model extends DB_Model
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000005,
|
||||
"content_id": 1000006,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Dokumente",
|
||||
"content": "<content><url><![CDATA[' . site_url('/Cis/Documents') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
@@ -133,7 +142,7 @@ class Content_model extends DB_Model
|
||||
"childs": []
|
||||
},
|
||||
{
|
||||
"content_id": 1000006,
|
||||
"content_id": 1000007,
|
||||
"template_kurzbz": "redirect",
|
||||
"titel": "Studierendenstatus",
|
||||
"content": "<content><url><![CDATA[' . site_url('/lehre/Studierendenantrag') . ']]></url><target><![CDATA[]]></target></content>",
|
||||
|
||||
@@ -3,7 +3,8 @@ $includesArray = array(
|
||||
'title' => 'Stundenplan',
|
||||
'customJSModules' => ['public/js/apps/Cis/ProfilApp.js'],
|
||||
'tabulator5' => true,
|
||||
'customCSSs' => ['public/css/components/calendar.css', 'public/css/components/FilterComponent.css']
|
||||
'customCSSs' => ['public/css/components/calendar.css', 'public/css/components/FilterComponent.css'],
|
||||
'childs' => ['test1','test2','test3','test4']
|
||||
);
|
||||
|
||||
$this->load->view('templates/CISHTML-Header', $includesArray);
|
||||
@@ -15,7 +16,7 @@ $this->load->view('templates/CISHTML-Header', $includesArray);
|
||||
<hr>
|
||||
|
||||
<!-- we can pass information from the php view file to the public js file throughz interpolating data from php into vue props -->
|
||||
<Profil <?php echo "uid=$uid" ?> <?php echo "pid=$pid" ?> view=<?php echo $view? boolval(1): boolval(0); ?>></Profil>
|
||||
<Profil <?php echo "uid=$uid" ?> view=<?php echo $view? boolval(1): boolval(0); ?>></Profil>
|
||||
</div>
|
||||
|
||||
<?php $this->load->view('templates/CISHTML-Footer', $includesArray); ?>
|
||||
|
||||
@@ -46,7 +46,7 @@ if (!isset($menu)) {
|
||||
<img src="<?= site_url('Cis/Pub/bild/person/' . getAuthPersonId()); ?>" class="avatar rounded-circle"/>
|
||||
</button>
|
||||
<ul id="nav-user-menu" class="collapse list-unstyled" aria-labelledby="nav-user-btn">
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="#" id="menu-profil">Profil</a></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="/cis.php/Cis/Profil" id="menu-profil">Profil</a></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="#">Ampeln</a></li>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
<li><a class="btn btn-level-2 rounded-0 d-block" href="<?= site_url('Cis/Auth/logout'); ?>">Logout</a></li>
|
||||
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
},
|
||||
|
||||
//? this props were passed in the Profil.php view file
|
||||
props:['uid','pid','view'],
|
||||
props:['uid','view'],
|
||||
methods: {
|
||||
|
||||
concatenate_addresses(address_array){
|
||||
@@ -155,7 +155,6 @@ export default {
|
||||
mounted(){
|
||||
|
||||
console.log(this.uid);
|
||||
console.log(this.pid);
|
||||
console.log(this.view);
|
||||
console.log(typeof this.view);
|
||||
if(this.view){console.log("view is true")}else{ console.log("view is false")}
|
||||
|
||||
Reference in New Issue
Block a user