mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 14:32:18 +00:00
Merge remote-tracking branch 'origin/feature-25999/C4_cleanup' into feature-25999/C4_cleanup
This commit is contained in:
@@ -464,6 +464,19 @@ html {
|
||||
margin-inline-start: 0.5rem;
|
||||
}
|
||||
|
||||
[disabled="true"].fhc-entry {
|
||||
pointer-events: none;
|
||||
cursor: default;
|
||||
background-color: #dadada !important;
|
||||
color: black !important;
|
||||
-webkit-touch-callout: none; /* iOS Safari */
|
||||
-webkit-user-select: none;/* Safari */
|
||||
-khtml-user-select: none;/* Konqueror HTML */
|
||||
-moz-user-select: none;/* Old versions of Firefox */
|
||||
-ms-user-select: none;/* Internet Explorer/Edge */
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.fhc-entry:hover{
|
||||
background-color:#0088d6 !important;
|
||||
color:white !important;
|
||||
|
||||
@@ -33,6 +33,17 @@ export default {
|
||||
|
||||
|
||||
},
|
||||
c4_link(menuItem) {
|
||||
if (!menuItem) return null;
|
||||
if (Array.isArray(menuItem.c4_moodle_links) && menuItem.c4_moodle_links.length)
|
||||
{
|
||||
return '#';
|
||||
}
|
||||
else
|
||||
{
|
||||
return menuItem.c4_link ?? null;
|
||||
}
|
||||
},
|
||||
},
|
||||
template:/*html*/`
|
||||
<div v-if="!menu">No Menu available</div>
|
||||
@@ -40,12 +51,16 @@ export default {
|
||||
<div class="container" :class="containerStyles">
|
||||
<div class="row g-2 justify-content-center" :class="rowStyles">
|
||||
<div style="min-height:150px; min-width:150px;" class="col-12 col-lg-6 col-xl-4" v-for="(menuItem, index) in menu" :key="index">
|
||||
<a :title="menuItem.name" :target="menuItem.c4_target ?? null" role="button" :href="menuItem.c4_link"
|
||||
class="fhc-entry p-2 w-100 text-wrap border border-1 rounded-3 d-flex flex-column align-items-center justify-content-center text-center text-decoration-none link-dark h-100">
|
||||
<a :id="menuItem.name" :class="{'dropdown-toggle':menuItem.c4_moodle_links?.length }" :target="menuItem.c4_target ?? null" role="button" :href="c4_link(menuItem)"
|
||||
:disabled="!c4_link(menuItem)?true:null"
|
||||
class="fhc-entry p-2 w-100 text-wrap border border-1 rounded-3 d-flex flex-column align-items-center justify-content-center text-center text-decoration-none link-dark h-100">
|
||||
<img :src="menuItem.c4_icon" :alt="menuItem.name" />
|
||||
<p @click="selectMenu(menuItem)" class="w-100 mt-2">{{menuItem.name}}</p>
|
||||
<p v-for="([text,link],index) in menuItem.c4_linkList" @click.stop="selectMenu(menuItem,index)" class="mt-1 w-100" :index="index">{{text}}</p>
|
||||
</a>
|
||||
<ul v-if="menuItem.c4_moodle_links?.length" class="dropdown-menu p-0" :aria-labelledby="menuItem.name">
|
||||
<li v-for="item in menuItem.c4_moodle_links"><a class="dropdown-item border-bottom" :href="item.url">{{item.lehrform}}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -50,6 +50,15 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
c4_link(menuItem) {
|
||||
if (!menuItem) return null;
|
||||
if (Array.isArray(menuItem.c4_moodle_links) && menuItem.c4_moodle_links.length) {
|
||||
return '#';
|
||||
}
|
||||
else {
|
||||
return menuItem.c4_link ?? null;
|
||||
}
|
||||
},
|
||||
openLvOption(menuItem){
|
||||
if (menuItem.id == "core_menu_mailanstudierende"){
|
||||
window.location.href = menuItem.c4_link;
|
||||
@@ -128,7 +137,7 @@ export default {
|
||||
<div class="mx-4">
|
||||
<i :class="[menuItem.c4_icon2 ? menuItem.c4_icon2 : 'fa-solid fa-pen-to-square', !menuItem.c4_link ? 'unavailable' : null ]"></i>
|
||||
</div>
|
||||
<a class="text-decoration-none text-truncate" :id="'moodle_links_'+lehrveranstaltung_id" :class="{'link-dark':menuItem.c4_link, 'unavailable':!menuItem.c4_link, 'dropdown-toggle':menuItem.c4_moodle_links?.length }" :target="menuItem.c4_target" :href="menuItem.c4_link ? !menuItem.c4_moodle_links?.length && menuItem.c4_link : null">
|
||||
<a class="text-decoration-none text-truncate" :id="'moodle_links_'+lehrveranstaltung_id" :class="{'link-dark':menuItem.c4_link, 'unavailable':!menuItem.c4_link, 'dropdown-toggle':menuItem.c4_moodle_links?.length }" :target="menuItem.c4_target" :href="c4_link(menuItem) ? c4_link(menuItem) : null">
|
||||
{{menuItem.name}}
|
||||
</a>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user