mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Merge remote-tracking branch 'origin/feature-25999/C4_cleanup' into feature-25999/C4_cleanup
This commit is contained in:
@@ -82,8 +82,9 @@ class Cms extends Auth_Controller
|
||||
* @return void
|
||||
*/
|
||||
public function news($infoscreen = false, $studiengang_kz = null, $semester = null, $mischen = true, $titel = '', $edit = false, $sichtbar = true)
|
||||
{
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['route' => 'News']);
|
||||
{
|
||||
$viewData = array();
|
||||
$this->load->view('CisRouterView/CisRouterView.php', ['viewData'=>$viewData, 'route' => 'News']);
|
||||
}
|
||||
|
||||
public function getRoomInformation($ort_kurzbz){
|
||||
|
||||
@@ -45,8 +45,9 @@ class Studgang extends FHCAPI_Controller
|
||||
|
||||
public function getStudiengangInfo(){
|
||||
$isMitarbeiter = $this->MitarbeiterModel->isMitarbeiter(getAuthUID());
|
||||
$isMitarbeiter = $this->getDataOrTerminateWithError($isMitarbeiter);
|
||||
if($isMitarbeiter) {
|
||||
$this->terminateWithSuccess();
|
||||
$this->terminateWithSuccess(null);
|
||||
}
|
||||
|
||||
// fetches the Studiengang Information which is used next to the news
|
||||
|
||||
@@ -117,7 +117,6 @@ const app = Vue.createApp({
|
||||
}
|
||||
}
|
||||
});
|
||||
app.use(FhcApi);
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
|
||||
@@ -266,7 +266,6 @@ const app = Vue.createApp({
|
||||
// kind of a bandaid for bad css on some pages to avoid horizontal scroll
|
||||
setScrollbarWidth();
|
||||
app.use(router);
|
||||
app.use(FhcApi);
|
||||
app.use(primevue.config.default, {
|
||||
zIndex: {
|
||||
overlay: 9000,
|
||||
|
||||
@@ -96,6 +96,7 @@ export default {
|
||||
'select:day',
|
||||
'select:event',
|
||||
'change:range',
|
||||
'change:mode',
|
||||
'update:minimized',
|
||||
'selectedEvent',
|
||||
'change:offset'
|
||||
|
||||
@@ -403,25 +403,29 @@ export default {
|
||||
<div class="all-day-event-container" >
|
||||
<div @wheel.stop class="all-day-event all-day-event-border" v-for="(day,dayindex) in eventsPerDayAndHour">
|
||||
<template v-for="(events,_day) in allDayEvents" :key="_day">
|
||||
|
||||
<div v-if="dayindex == _day" v-for="event in events" :key="event" class="d-grid m-1" style="top:0;" @click.prevent="eventClick(event)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<div class="d-none d-xl-block">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="false">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="d-block d-xl-none">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="true">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
v-if="dayindex == _day"
|
||||
v-for="event in events"
|
||||
:key="event"
|
||||
style="top:0;"
|
||||
@click.prevent="eventClick(event)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="d-grid m-1 small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<div class="d-none d-xl-block">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="false">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
<div class="d-block d-xl-none">
|
||||
<slot name="dayPage" :event="event" :day="day" :mobile="true">
|
||||
<p>this is a placeholder which means that no template was passed to the Calendar Page slot</p>
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -13,6 +13,9 @@ export default {
|
||||
BsModal,
|
||||
Months
|
||||
},
|
||||
emits: [
|
||||
"change:offset"
|
||||
],
|
||||
data() {
|
||||
return {
|
||||
syncOnNextChange: false
|
||||
|
||||
@@ -14,6 +14,9 @@ export default {
|
||||
BsModal,
|
||||
Weeks
|
||||
},
|
||||
emits: [
|
||||
"change:offset"
|
||||
],
|
||||
computed: {
|
||||
title() {
|
||||
return this.focusDate.wYear + ' KW ' + this.focusDate.w;
|
||||
@@ -28,7 +31,8 @@ export default {
|
||||
this.$refs.modalDatepickerContainer.hide()
|
||||
},
|
||||
handleHeaderClickWeek() {
|
||||
this.$refs.modalDatepickerContainer.show()
|
||||
this.$emit('updateMode', 'weeks');//
|
||||
//this.$refs.modalDatepickerContainer.show()
|
||||
},
|
||||
paneChanged(dir) {
|
||||
this.focusDate.d += dir * 7;
|
||||
|
||||
@@ -224,22 +224,7 @@ export default {
|
||||
return styleObj
|
||||
},
|
||||
eventGridStyle(day, event) {
|
||||
if (event.orig.allDayEvent)
|
||||
{
|
||||
return;
|
||||
return {
|
||||
'z-index': '2',
|
||||
'grid-column': '1 / -1',
|
||||
'background-color': 'rgb(204, 204, 204)',
|
||||
'max-height': '75px',
|
||||
color: 'black',
|
||||
position: 'sticky',
|
||||
top: '44px',
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
return {
|
||||
return {
|
||||
'z-index': 1,
|
||||
'grid-column-start': 1 + (event.lane - 1) * day.lanes / event.maxLane,
|
||||
'grid-column-end': 1 + event.lane * day.lanes / event.maxLane,
|
||||
@@ -247,8 +232,7 @@ export default {
|
||||
'grid-row-end': this.dateToMinutesOfDay(event.end),
|
||||
'background-color': event.orig.color,
|
||||
'max-height': '75px'
|
||||
};
|
||||
}
|
||||
};
|
||||
},
|
||||
calcHourPosition(event) {
|
||||
let height = this.$refs['eventsRef' + this.week].getBoundingClientRect().height;
|
||||
@@ -363,10 +347,15 @@ export default {
|
||||
<div @wheel.stop class="all-day-event all-day-event-border" v-for="(day,dayindex) in eventsPerDayAndHour">
|
||||
<template v-for="(events,_day) in allDayEvents" :key="_day">
|
||||
|
||||
<div v-if="dayindex == _day" v-for="event in events" :key="event" class="d-grid m-1" style="top:0;" @click.prevent="weekPageClick(event, _day)"
|
||||
<div
|
||||
v-if="dayindex == _day"
|
||||
v-for="event in events"
|
||||
:key="event"
|
||||
style="top:0;"
|
||||
@click.prevent="weekPageClick(event, _day)"
|
||||
:selected="event == selectedEvent"
|
||||
:style="{'background-color': event?.color, 'margin-bottom':'1px'}"
|
||||
class="small rounded overflow-hidden fhc-entry"
|
||||
class="d-grid m-1 small rounded overflow-hidden fhc-entry"
|
||||
v-contrast
|
||||
>
|
||||
<slot class="p-1" name="weekPage" :event="event" :day="day">
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
setWeek(week) {
|
||||
// TODO(chris): test is there a week jump on year select? => yes there is if the same month/day are in different weeks ... should we prevent that?
|
||||
this.focusDate.w = week;
|
||||
this.$emit('change', week);
|
||||
this.$emit('updateMode', 'week');
|
||||
},
|
||||
prev(){
|
||||
this.focusDate.y--;
|
||||
|
||||
@@ -31,11 +31,11 @@ template:/*html*/`
|
||||
<div class="card card-body mb-3">
|
||||
<div class="mb-1">
|
||||
<h2 class="mb-1 pb-0">{{$p.t('lehre','studiengang')}}:</h2>
|
||||
<span class="mb-1">{{studiengang.bezeichnung}}</span>
|
||||
<span class="mb-1">{{studiengang?.bezeichnung}}</span>
|
||||
</div>
|
||||
<div class="mb-1">
|
||||
<h2 class="mb-1 pb-0">Moodle:</h2>
|
||||
<a class="mb-1" target="_blank" :href="moodleLink">{{studiengang.kurzbzlang}}</a>
|
||||
<a class="mb-1" target="_blank" :href="moodleLink">{{studiengang?.kurzbzlang}}</a>
|
||||
</div>
|
||||
<div :class="{'mb-1':studiengang?.zusatzinfo_html}">
|
||||
<h2 class="mb-1 pb-0">{{$p.t('lehre','studiensemester')}}: </h2>
|
||||
|
||||
@@ -59,7 +59,7 @@ export default {
|
||||
}
|
||||
)
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.modal = this.$refs.modalContainer.modal;
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
return BsModal.popup.bind(this)(null, options);
|
||||
},
|
||||
template: /*html*/ `
|
||||
<bs-modal ref="modalContainer" @showBsModal="onModalShow" @hideBsModal="onModalHide" v-bind="$props" :bodyClass="''" dialogClass='modal-lg' class="bootstrap-alert" :backdrop="false" >
|
||||
<bs-modal ref="modalContainer" @showBsModal="onModalShow" v-bind="$props" :bodyClass="''" dialogClass='modal-lg' class="bootstrap-alert" :backdrop="false" >
|
||||
<template v-slot:title>
|
||||
<template v-if="event?.type=='moodle'">{{event.titel}}</template>
|
||||
<template v-else-if="event.titel">{{ event.titel + ' - ' + event.lehrfach_bez + ' [' + event.ort_kurzbz+']'}}</template>
|
||||
|
||||
@@ -62,10 +62,10 @@ export default {
|
||||
return !this.menu || !Array.isArray(this.menu) || Array.isArray(this.menu) && this.menu.length == 0;
|
||||
},
|
||||
bodyStyle() {return {};
|
||||
const bodyStyle = {};
|
||||
/*const bodyStyle = {};
|
||||
if (this.farbe)
|
||||
bodyStyle['background-color'] = '#' + this.farbe;
|
||||
return bodyStyle;
|
||||
return bodyStyle;*/
|
||||
},
|
||||
grade() {
|
||||
const languageIndex = this.$p.user_language.value === 'English' ? 1 : 0
|
||||
|
||||
@@ -26,6 +26,7 @@ const Stundenplan = {
|
||||
}
|
||||
},
|
||||
props: {
|
||||
viewData: Object, // NOTE(chris): this is inherited from router-view
|
||||
propsViewData: Object,
|
||||
rowMinHeight: {
|
||||
type: String,
|
||||
@@ -155,11 +156,13 @@ const Stundenplan = {
|
||||
},
|
||||
handleChangeMode(mode) {
|
||||
let m = mode[0].toUpperCase() + mode.slice(1)
|
||||
if(m === this.calendarMode) return
|
||||
if(m === this.calendarMode) return; // TODO(chris): check for date and lv_id too!
|
||||
const date = this.currentDay.getFullYear() + "-" +
|
||||
String(this.currentDay.getMonth() + 1).padStart(2, "0") + "-" +
|
||||
String(this.currentDay.getDate()).padStart(2, "0");
|
||||
|
||||
if (m == 'Weeks' || m == 'Years' || m == 'Months') return;
|
||||
|
||||
this.$router.push({
|
||||
name: "Stundenplan",
|
||||
params: {
|
||||
|
||||
@@ -169,14 +169,14 @@ export default {
|
||||
template: /*html*/ `
|
||||
<div ref="container" class="widgets-news h-100" :class="sizeClass" :style="getNewsWidgetStyle">
|
||||
<div class="d-flex flex-column h-100">
|
||||
<div class="h-100" style="overflow-y: auto" v-if="width == 1">
|
||||
<div class="h-100" style="overflow-y: auto" v-show="width == 1">
|
||||
<div v-for="(news, index) in newsList" :key="news.news_id" class="mt-2">
|
||||
<div v-if="index > 0 " class="fhc-seperator"></div>
|
||||
<a :href="contentURI(news.content_id)" >{{ news.content_obj.betreff?news.content_obj.betreff:getDate(news.insertamum) }}</a><br>
|
||||
<span class="small text-muted">{{ formatDateTime(news.insertamum) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="row h-100 g-0">
|
||||
<div v-show="width >1" class="row h-100 g-0">
|
||||
<div :class="'col-'+(width == 2? 6 : 4) + ' h-100 g-0'" style="overflow: auto;">
|
||||
<template v-for="news in newsList" :key="'menu-'+news.news_id">
|
||||
<div class="position-relative">
|
||||
|
||||
Reference in New Issue
Block a user