1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<? if (Request::get("allday")) {
$min_time = '00:00:00';
$max_time = '24:00:00';
} else {
$min_time = Config::get()->RESOURCES_BOOKING_PLAN_START_HOUR . ':00';
$max_time = Config::get()->RESOURCES_BOOKING_PLAN_END_HOUR . ':00';
} ?>
<section class="individual-booking-plan">
<?= \Studip\Fullcalendar::create(
_('Belegungsplan'),
[
'eventSources' => [
[
'url' => URLHelper::getURL(
'dispatch.php/resources/ajax/get_semester_booking_plan/' . $resource->id
),
'method' => 'GET',
'extraParams' => [
'booking_types' => [
ResourceBooking::TYPE_NORMAL,
ResourceBooking::TYPE_RESERVATION,
ResourceBooking::TYPE_LOCK,
],
]
]
],
'minTime' => ($min_time),
'maxTime' => ($max_time),
'allDaySlot' => false,
'defaultView' =>
in_array(Request::get("defaultView"), ['dayGridMonth','timeGridWeek','timeGridDay'])
? Request::get("defaultView")
: 'timeGridWeek',
'defaultDate' => Request::get("defaultDate"),
'editable' => false
],
['class' => 'individual-booking-plan'],
'resources-fullcalendar'
) ?>
</section>
|