aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/courseplanning
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:07:19 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2021-07-22 16:19:12 +0200
commita3da1483a9e689846179159355badfec8073dbec (patch)
tree770dcca6bdf5f6f2a11b0e7fcbbeda6919a3fc52 /app/views/admin/courseplanning
current code from svn, revision 62608
Diffstat (limited to 'app/views/admin/courseplanning')
-rw-r--r--app/views/admin/courseplanning/index.php53
-rw-r--r--app/views/admin/courseplanning/nonconform.php28
-rw-r--r--app/views/admin/courseplanning/pick_color.php14
-rw-r--r--app/views/admin/courseplanning/rename_column.php10
-rw-r--r--app/views/admin/courseplanning/viewcolumns.php46
-rw-r--r--app/views/admin/courseplanning/weekday.php63
6 files changed, 214 insertions, 0 deletions
diff --git a/app/views/admin/courseplanning/index.php b/app/views/admin/courseplanning/index.php
new file mode 100644
index 0000000..1b0b5e9
--- /dev/null
+++ b/app/views/admin/courseplanning/index.php
@@ -0,0 +1,53 @@
+<?
+ $min_time = Config::get()->INSTITUTE_COURSE_PLAN_START_HOUR . ':00';
+ $max_time = Config::get()->INSTITUTE_COURSE_PLAN_END_HOUR . ':00';
+?>
+
+<?= Studip\Fullcalendar::create($plan_title, [
+ 'editable' => true,
+ 'minTime' => $min_time,
+ 'maxTime' => $max_time,
+ 'allDaySlot' => false,
+ 'nowIndicator' => false,
+ 'slotDuration' => '01:00:00',
+ 'slotLabelInterval' => '01:00',
+ 'slotLabelFormat' => ['hour' => '2-digit', 'minute' => '2-digit'],
+ 'timeZone' => 'UTC',
+ 'header' => [
+ 'left' => '',
+ 'right' => ''
+ ],
+ 'columnHeaderFormat' => ['weekday' => 'long'],
+ 'defaultView' => 'timeGridWeek',
+ 'eventSources' => [compact('events')],
+ 'slotEventOverlap' => false,
+ 'displayEventTime' => false,
+ 'editable' => true,
+ 'droppable' => true, // this allows things to be dropped onto the calendar
+ 'actionCalled' => 'index'
+], [
+ 'class' => 'institute-plan'
+]) ?>
+
+<br>
+
+<? if (count($eventless_courses)) : ?>
+<table class="default" id="external-events">
+ <tr>
+ <th><?= _('Veranstaltungen ohne Termine') ?></th>
+ </tr>
+ <tr>
+ <? foreach ($eventless_courses as $cid => $cname): ?>
+ <td class="fc-event"
+ data-event-course="<?= $cid ?>"
+ data-event-title="<?= htmlReady($cname) ?>"
+ data-event-duration="02:00"
+ data-event-drop-url="<?= $controller->link_for('admin/courseplanning/add_event') ?>"
+ data-event-tooltip=""
+ >
+ <?= htmlReady($cname) ?>
+ </td>
+ <? endforeach; ?>
+ </tr>
+</table>
+<? endif; ?>
diff --git a/app/views/admin/courseplanning/nonconform.php b/app/views/admin/courseplanning/nonconform.php
new file mode 100644
index 0000000..5a7aed4
--- /dev/null
+++ b/app/views/admin/courseplanning/nonconform.php
@@ -0,0 +1,28 @@
+<table class="default">
+ <caption>
+ <?= _('Folgende regelmäßige Termine von Veranstaltungen passen nicht in das vorgegebene Zeitraster:') ?>
+ </caption>
+ <thead>
+ <tr>
+ <th><?= _('Nr.') ?></th>
+ <th><?= _('Name') ?></th>
+ <th><?= _('Start') ?></th>
+ <th><?= _('Ende') ?></th>
+ </tr>
+ </thead>
+ <tbody>
+ <? foreach ($non_conform_dates as $ncd): ?>
+ <tr>
+ <td><?= htmlReady($ncd['nr']) ?></td>
+ <td>
+ <?= htmlReady($ncd['name']) ?>
+ <a href="<?= $controller->link_for('course/details/index/' . $ncd['cid']) ?>" data-dialog="size=auto">
+ <?= Icon::create('info-circle')->asImg(['class' => 'text-bottom']) ?>
+ </a>
+ </td>
+ <td><?= htmlReady($ncd['start']) ?></td>
+ <td><?= htmlReady($ncd['end']) ?></td>
+ </tr>
+ <? endforeach; ?>
+ </tbody>
+</table>
diff --git a/app/views/admin/courseplanning/pick_color.php b/app/views/admin/courseplanning/pick_color.php
new file mode 100644
index 0000000..2606041
--- /dev/null
+++ b/app/views/admin/courseplanning/pick_color.php
@@ -0,0 +1,14 @@
+<form class="default" method="post" action="<?= $controller->pick_color($metadate_id, $from_action, $weekday) ?>" data-dialog="size=auto">
+ <input type="hidden" id="selected-color" name="selected-color" value="<?= $color ?>">
+
+ <div id="event-color-picker"></div>
+
+ <input id="semtype-checkbox" name="event_color_semtype" type="checkbox" class="studip-checkbox" value="1">
+ <label for="semtype-checkbox">
+ <?= sprintf(_('Farbtyp für alle VA dieses Typs (%s) übernehmen'), htmlReady($semtype)) ?>
+ </label>
+
+ <div data-dialog-button>
+ <?= Studip\Button::createAccept(_('Speichern'), 'save') ?>
+ </div>
+</form>
diff --git a/app/views/admin/courseplanning/rename_column.php b/app/views/admin/courseplanning/rename_column.php
new file mode 100644
index 0000000..41400ae
--- /dev/null
+++ b/app/views/admin/courseplanning/rename_column.php
@@ -0,0 +1,10 @@
+<form class="default" method="post" action="<?= $controller->link_for('admin/courseplanning/rename_column/' . $column_id . '/' . $week_day) ?>" data-dialog="size=auto">
+ <label>
+ <?= _('Spaltenname') ?>
+ <input name="column_name" type="text" value="<?= htmlReady($column_name) ?>">
+ </label>
+
+ <div data-dialog-button>
+ <?= Studip\Button::createAccept(_('Speichern'), 'save') ?>
+ </div>
+</form>
diff --git a/app/views/admin/courseplanning/viewcolumns.php b/app/views/admin/courseplanning/viewcolumns.php
new file mode 100644
index 0000000..da1abfa
--- /dev/null
+++ b/app/views/admin/courseplanning/viewcolumns.php
@@ -0,0 +1,46 @@
+<form class="default" method="POST" action="<?= $controller->url_for('admin/courseplanning/viewcolumns/' . $week_day) ?>" data-dialog="size=auto">
+
+ <table class="default">
+ <caption><?= _('Sichtbarkeit') ?></caption>
+ <thead>
+ <tr>
+ <th><?= _('Name') ?></th>
+ <th ></th>
+ </tr>
+ </thead>
+ <tbody>
+ <? foreach ($columns as $col): ?>
+ <? if($col['id'] == '0') continue; ?>
+ <tr>
+ <td>
+ <input id="column_view_<?= $col['id'] ?>" name="column_view[]"
+ class="studip-checkbox" type="checkbox"
+ value="<?= $col['id'] ?>"
+ <?= $col['visible'] ? 'checked' : '' ?>>
+ <label for="column_view_<?= $col['id'] ?>"><?= htmlReady($col['title']) ?></label>
+ </td>
+ <td class="actions">
+ <?= ActionMenu::get()->addLink(
+ $controller->url_for('admin/courseplanning/remove_column', $institute_id, $col['id'], $week_day),
+ _('Spalte löschen'),
+ Icon::create('trash'),
+ [
+ 'data-confirm' => _('Wollen Sie die Spalte wirklich entfernen?'),
+ 'data-dialog' => 'size=auto',
+ ]
+ ) ?>
+ </td>
+ </tr>
+ <? endforeach; ?>
+ </tbody>
+ </table>
+
+ <label>
+ <?= _('Zusätzliche Spalte') ?>
+ <input name="column_name" type="text" value="">
+ </label>
+
+ <div data-dialog-button>
+ <?= Studip\Button::createAccept(_('Speichern'), 'save') ?>
+ </div>
+</form>
diff --git a/app/views/admin/courseplanning/weekday.php b/app/views/admin/courseplanning/weekday.php
new file mode 100644
index 0000000..a0e15c7
--- /dev/null
+++ b/app/views/admin/courseplanning/weekday.php
@@ -0,0 +1,63 @@
+<?
+ $min_time = Config::get()->INSTITUTE_COURSE_PLAN_START_HOUR . ':00';
+ $max_time = Config::get()->INSTITUTE_COURSE_PLAN_END_HOUR . ':00';
+?>
+
+<? $days = ['Sonntag', 'Montag','Dienstag','Mittwoch','Donnerstag','Freitag','Samstag']; ?>
+<div class="calendar-caption">
+ <?= $days[$cal_date->format('w')] ?>
+ <a href="<?= $controller->link_for('admin/courseplanning/index') ?>">
+ (<?= _('zurück zur Übersicht'); ?>)
+ </a>
+</div>
+
+<?= Studip\Fullcalendar::create($plan_title, [
+ 'editable' => true,
+ 'minTime' => $min_time,
+ 'maxTime' => $max_time,
+ 'allDaySlot' => false,
+ 'nowIndicator' => false,
+ 'header' => [
+ 'left' => '',
+ 'right' => ''
+ ],
+ 'slotDuration' => '01:00:00',
+ 'slotLabelInterval' => '01:00',
+ 'slotLabelFormat' => ['hour' => '2-digit', 'minute' => '2-digit'],
+ 'timeZone' => 'UTC',
+ 'defaultDate' => $cal_date->format('Y-m-d'),
+ 'defaultView' => 'resourceTimeGridDay',
+ 'eventSources' => [compact('events')],
+ 'slotEventOverlap' => false,
+ 'displayEventTime' => false,
+ 'editable' => true,
+ 'droppable' => true, // this allows things to be dropped onto the calendar
+ 'resources' => $columns,
+ 'actionCalled' => 'weekday/' . $cal_date->format('w')
+], [
+ 'class' => 'institute-plan'
+]) ?>
+
+<br>
+
+<? if (count($eventless_courses)) : ?>
+<table class="default" id="external-events">
+ <tr>
+ <th><?= _('Veranstaltungen ohne Termine') ?></th>
+ </tr>
+ <tr>
+ <? foreach ($eventless_courses as $cid => $cname): ?>
+ <td
+ class="fc-event"
+ data-event-course="<?= $cid ?>"
+ data-event-title="<?= htmlReady($cname) ?>"
+ data-event-duration="02:00"
+ data-event-drop-url="<?= $controller->link_for('admin/courseplanning/add_event') ?>"
+ data-event-tooltip=""
+ >
+ <?= htmlReady($cname) ?>
+ </td>
+ <? endforeach; ?>
+ </tr>
+</table>
+<? endif; ?>