makes the pinboard link redirect to all news

This commit is contained in:
SimonGschnell
2024-07-10 11:35:36 +02:00
parent d364630d92
commit a83e07350e
5 changed files with 44 additions and 21 deletions
@@ -289,8 +289,8 @@ class LvMenu extends FHCAPI_Controller
// adds new key with modified link to the menu
if(array_key_exists("link",$menu[$key])){
// only replace the link key if the link has an old path
if(strpos($menu[$key]['link'],"../../..") != false){
$menu[$key]['cis4_link'] = base_url(str_replace("../../..","",$row['link']));
if(strpos($menu[$key]['link'],"../../..") !== false){
$menu[$key]['cis4_link'] = base_url(str_replace("../../..","",$menu[$key]['link']));
}else{
$menu[$key]['cis4_link'] = $menu[$key]['link'];
}
@@ -638,8 +638,20 @@ class LvMenu extends FHCAPI_Controller
$text='';
if($is_lector)
$text.= "<a href='../../../cms/newsverwaltung.php?studiengang_kz=$studiengang_kz&semester=$semester' class='Item'>".$p->t('profil/adminstration')."</a>";
// this is the new cis4 version
$menu[]=array
(
'id'=>'core_menu_pinboard',
'position'=>'110',
'name'=>$p->t('lehre/pinboard'),
'icon'=>'../../../skin/images/button_pinboard.png',
'link'=>base_url("CisHtml/Cms/news"),
'text'=>$text
);
// this is the old cis version
/* $menu[]=array
(
'id'=>'core_menu_pinboard',
'position'=>'110',
@@ -647,7 +659,7 @@ class LvMenu extends FHCAPI_Controller
'icon'=>'../../../skin/images/button_pinboard.png',
'link'=>'../../../cms/news.php?studiengang_kz='.urlencode($studiengang_kz).'&semester='.urlencode($semester),
'text'=>$text
);
); */
}
}
+7 -5
View File
@@ -7,13 +7,15 @@ $includesArray = array(
#'skin/style.css.php'
]
);
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
if(isset($template_kurzbz)){
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
}
}
$this->load->view('templates/CISVUE-Header', $includesArray);
?>
+7 -4
View File
@@ -8,12 +8,15 @@ $includesArray = array(
]
);
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
if(isset($template_kurzbz)){
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
}
}
$this->load->view('templates/CISVUE-Header', $includesArray);
?>
+7 -4
View File
@@ -8,12 +8,15 @@ $includesArray = array(
]
);
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
if(isset($template_kurzbz)){
switch($template_kurzbz){
case 'raum_contentmittitel':
$includesArray['tabulator5'] = true;
break;
}
}
$this->load->view('templates/CISVUE-Header', $includesArray);
?>
@@ -6,12 +6,14 @@ export default {
event:{
type:Object,
required:true,
default:null,
}
},
data(){
return {
result: false,
menu: [],
}
},
mixins:[BsModal],
@@ -20,6 +22,7 @@ export default {
},
methods:{
showModal: function(){
this.$fhcApi.factory.addons.getLvMenu(this.event.lehrveranstaltung_id, this.event.studiensemester_kurzbz).then(res =>{
//this.$fhcApi.factory.addons.getLvMenu(750, "WS2005").then(res =>{
this.menu = res.data;
@@ -32,14 +35,14 @@ export default {
template:/*html*/`
<bs-modal @showBsModal="showModal" ref="modalContainer" dialogClass="modal-lg">
<template #title>
<!--<span v-if="event.lv ">{{event.lv + (event.stg?' / ' + event.stg:'')}}</span>-->
<span >{{JSON.stringify(event,null,2)}}</span>
<!--Lehrveranstaltungs Übersicht-->
<span v-if="event?.lehrfach_bez ">{{event?.lehrfach_bez + (event?.stg_kurzbzlang?' / ' + event?.stg_kurzbzlang:'')}}</span>
<span v-else>Lehrveranstaltungs Übersicht</span>
</template>
<template #default>
<div :style="{'display':'grid', 'row-gap':'10px', 'column-gap':'10px', 'grid-template-columns':'repeat(3,minmax(100px,1fr))', 'grid-template-rows':'repeat('+Math.ceil(menu.length / 3)+',minmax(100px,1fr))'} ">
<div v-for="(menuItem, index) in menu" :key="index">
<a :onclick="menuItem.cis4_link_onclick?menuItem.cis4_link_onclick:null" class="d-flex flex-column align-items-center justify-content-center" :href="menuItem.cis4_link_onclick?'#':menuItem.cis4_link" :title="menuItem.name">
<a :onclick="menuItem.cis4_link_onclick?menuItem.cis4_link_onclick:null" class="d-flex flex-column align-items-center justify-content-center" target="_blank" :href="menuItem.cis4_link_onclick?'#':menuItem.cis4_link" :title="menuItem.name">
<span>{{menuItem.name}}</span>
<img :src="menuItem.cis4_icon" :alt="menuItem.name" ></img>
</a>