diff options
Diffstat (limited to 'app/views')
150 files changed, 813 insertions, 1547 deletions
diff --git a/app/views/accessibility/forms/report_barrier.php b/app/views/accessibility/forms/report_barrier.php index 5dd8d7d..51ca079 100644 --- a/app/views/accessibility/forms/report_barrier.php +++ b/app/views/accessibility/forms/report_barrier.php @@ -1,2 +1,2 @@ -<?= MessageBox::info(_('Auf dieser Seite können Sie eine Barriere melden, die die Nutzbarkeit von Stud.IP für Sie einschränkt. Füllen Sie dazu das untenstehende Formular aus.'))->hideClose() ?></p> +<?= MessageBox::info(_('Auf dieser Seite können Sie eine Barriere melden, die die Nutzbarkeit von Stud.IP für Sie einschränkt. Füllen Sie dazu das folgende Formular aus.'))->hideClose() ?></p> <?= $form->render() ?> diff --git a/app/views/activityfeed/configuration.php b/app/views/activityfeed/configuration.php index ceb87eb..9161db0 100644 --- a/app/views/activityfeed/configuration.php +++ b/app/views/activityfeed/configuration.php @@ -15,7 +15,7 @@ <? foreach ($provider as $prv_id => $prv_name) : ?> <label> <input type="checkbox" name="provider[<?= $context ?>][]" value="<?= htmlReady($prv_id) ?>" - <?= empty($config) || (is_array($config[$context]) && in_array($prv_id, $config[$context])) ? 'checked' : ''?>> + <?= empty($config) || (isset($config[$context]) && is_array($config[$context]) && in_array($prv_id, $config[$context])) ? 'checked' : ''?>> <?= htmlReady($prv_name) ?> </label> <? endforeach ?> diff --git a/app/views/admin/api/config.php b/app/views/admin/api/config.php deleted file mode 100644 index 83d2ae5..0000000 --- a/app/views/admin/api/config.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** - * @var Admin_ApiController $controller - * @var array $config - */ -use Studip\Button, Studip\LinkButton; -?> - -<form class="default" action="<?= $controller->url_for('admin/api/config') ?>" method="post"> - <fieldset> - <legend><?= _('Konfiguration') ?></legend> - - <input type="hidden" name="active" value="0"> - <label> - <input type="checkbox" name="active" value="1" <? if ($config['API_ENABLED']) echo 'checked'; ?>> - <?= _('REST-API aktiviert') ?> - </label> - - - <label class="caption" for="auth"> - <?= _('Standard-Authentifizierung beim Login') ?> - <select name="auth" id="auth"> - <? foreach ($GLOBALS['STUDIP_AUTH_PLUGIN'] as $plugin): ?> - <option <? if ($config['API_OAUTH_AUTH_PLUGIN'] === $plugin) echo 'selected'; ?>> - <?= $plugin ?> - </option> - <? endforeach; ?> - </select> - </label> - </fieldset> - <footer> - <?= Button::createAccept(_('Speichern')) ?> - <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('admin/api')) ?> - </footer> -</form> diff --git a/app/views/admin/api/edit.php b/app/views/admin/api/edit.php deleted file mode 100644 index f1c7e03..0000000 --- a/app/views/admin/api/edit.php +++ /dev/null @@ -1,136 +0,0 @@ -<?php -/** - * @var Admin_ApiController $controller - * @var RESTAPI\Consumer\Base $consumer - * @var array $types - */ -use Studip\Button, Studip\LinkButton; -?> - -<? if ($consumer->id): ?> - <h1> - <?= sprintf( - _('Registrierte Applikation "%s" bearbeiten'), - htmlReady($consumer->title) - ) ?> - </h1> -<? else: ?> - <h1 class="hide-in-dialog"> - <?= _('Neue Applikation registrieren') ?> - </h1> -<? endif; ?> - -<form class="settings default" - action="<?= $controller->url_for('admin/api/edit', $consumer->id) ?>" method="post"> - <?= CSRFProtection::tokenTag() ?> - - <fieldset> - <legend><?= _('Grundeinstellungen') ?></legend> - - <label for="active"> - <input type="checkbox" class="switch" id="active" name="active" value="1" - <?= $consumer->active ? 'checked' : '' ?>> - <?= _('Aktiviert') ?> - </label> - - - <label for="title"> - <?= _('Titel') ?> - <input required type="text" id="title" name="title" - placeholder="<?= _('Beispiel-Applikation') ?>" - value="<?= htmlReady($consumer->title) ?>" - maxlength="128"> - </label> - - <label for="contact"> - <?= _('Kontaktperson') ?> - <input required type="text" id="contact" name="contact" - placeholder="John Doe" - value="<?= htmlReady($consumer->contact) ?>" - maxlength="255"> - </label> - - <label for="email"> - <?= _('Kontaktadresse') ?> - <input required type="text" id="email" name="email" - placeholder="support@appsite.tld" - value="<?= htmlReady($consumer->email) ?>" - maxlength="255"> - </label> - - <label for="callback"> - <?= _('Callback URL') ?> - <input required type="text" id="callback" name="callback" - placeholder="http://appsite.tld/auth" - value="<?= htmlReady($consumer->callback) ?>" - maxlength="255"> - </label> - - <? if ($consumer->id): ?> - <label for="consumer_key"> - <?= _('Consumer Key') ?> - <input readonly type="text" id="consumer_key" - value="<?= htmlReady($consumer->auth_key) ?>"> - </label> - - <label for="consumer_secret"> - <?= _('Consumer Secret') ?> - <input readonly type="text" id="consumer_secret" - value="<?= htmlReady($consumer->auth_secret) ?>"> - </label> - - <div class="centered"> - <?= strftime(_('Erstellt am %d.%m.%Y %H:%M:%S'), $consumer->mkdate) ?><br> - <? if ($consumer->mkdate != $consumer->chdate): ?> - <?= strftime(_('Zuletzt geändert am %d.%m.%Y %H:%M:%S'), $consumer->chdate) ?> - <? endif; ?> - </div> - <? endif; ?> - </fieldset> - - <fieldset> - <legend><?= _('Applikation-Details') ?></legend> - - <label for="commercial"> - <input type="checkbox" class="switch" id="commercial" name="commercial" value="1" - <?= $consumer->commercial ? 'checked' : '' ?>> - <?= _('Kommerziell') ?> - </label> - - <label for="description"> - <?= _('Beschreibung') ?> - <textarea id="description" name="description" maxlength="65535"><?= htmlReady($consumer->description) ?></textarea> - </label> - - <label for="url"> - <?= _('URL') ?> - <input type="text" id="url" name="url" - placeholder="http://appsite.tld" - value="<?= htmlReady($consumer->url) ?>" - maxlength="255"> - </label> - - <label for="type"> - <?= _('Typ') ?> - <select name="type" id="type"> - <option value="">- <?= _('Keine Angabe') ?> -</option> - <? foreach ($types as $type => $label): ?> - <option value="<?= $type ?>" <?= $consumer->type == $type ? 'selected' : '' ?>> - <?= $label ?> - </option> - <? endforeach; ?> - </select> - </label> - - - <label for="notes"> - <?= _('Notizen') ?> - <textarea id="notes" name="notes" maxlength="65535"><?= htmlReady($consumer->notes) ?></textarea> - </label> - </fieldset> - - <footer data-dialog-button> - <?= Button::createAccept(_('Speichern'), 'store') ?> - <?= LinkButton::createCancel(_('Abbrechen'), $controller->url_for('admin/api')) ?> - </footer> -</form> diff --git a/app/views/admin/api/index.php b/app/views/admin/api/index.php deleted file mode 100644 index 132deac..0000000 --- a/app/views/admin/api/index.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** - * @var Admin_ApiController $controller - * @var RESTAPI\Consumer\Base[] $consumers - * @var array $types - */ -?> -<? if (!empty($consumers)): ?> -<form action="#" method="post" class="default"> -<table class="default"> - <caption><?= _('Registrierte Applikationen') ?></caption> - <thead> - <tr> - <th><?= ('Aktiv') ?></th> - <th><?= _('Name') ?></th> - <th><?= _('Typ') ?></th> - <th><?= _('Kontakt') ?></th> - <th><?= _('Kommerziell') ?></th> - <th> </th> - </tr> - </thead> - <tbody> -<? foreach ($consumers as $consumer): ?> - <tr> - <td id="<?= $consumer->id ?>"> - <a href="<?= $controller->url_for('admin/api/toggle', $consumer->id, $consumer->active ? 'off' : 'on') ?>"> - <?= Icon::create('checkbox-' . ($consumer->active ? '' : 'un') . 'checked', 'clickable')->asImg() ?> - </a> - </td> - <td> - <? if ($consumer->url): ?> - <a href="<?= htmlReady($consumer->url) ?>" target="_blank" rel="noopener noreferrer"> - <?= htmlReady($consumer->title) ?> - </a> - <? else: ?> - <?= htmlReady($consumer->title) ?> - <? endif; ?> - </td> - <td><?= $types[$consumer->type] ?? ' ' ?></td> - <td> - <a href="mailto:<?= htmlReady($consumer->email) ?>"> - <?= htmlReady($consumer->contact) ?> - </a> - </td> - - <td><?= Icon::create('checkbox-' . ($consumer->commercial ? '' : 'un') . 'checked', 'clickable')->asImg() ?></td> - <td class="actions"> - <a href="<?= $controller->url_for('admin/api/keys', $consumer->id) ?>" - data-dialog="size=auto" - title="<?= htmlReady(sprintf(_('Schlüssel anzeigen für Applikation "%s"'), $consumer->title)) ?>"> - <?= Icon::create('info-circle', 'clickable')->asImg() ?> - </a> - <a href="<?= $controller->url_for('admin/api/edit', $consumer->id) ?>" title="<?= _('Applikation bearbeiten') ?>" data-dialog> - <?= Icon::create('edit', 'clickable')->asImg() ?> - </a> - <a href="<?= $controller->url_for('admin/api/permissions', $consumer->id) ?>" title="<?= _('Zugriffsberechtigungen verwalten') ?>"> - <?= Icon::create('admin', 'clickable')->asImg() ?> - </a> - <?= Icon::create('trash')->asInput([ - 'formaction' => $controller->url_for('admin/api/delete/', $consumer->id), - 'title' => sprintf(_('Applikation "%s" entfernen'), $consumer->title), - 'data-confirm' => '', - 'style' => 'vertical-align: middle' - ]) ?> - </td> - </tr> -<? endforeach; ?> - </tbody> -</table> -</form> - -<? else: ?> -<p> - <?= MessageBox::info(_('Es wurde noch keine Applikation registriert.'), - [sprintf(_('Klicken Sie <a href="%s">hier</a>, um eine Applikation zu registrieren.'), $controller->url_for('admin/api/edit'))]) ?> -</p> -<? endif; ?> diff --git a/app/views/admin/api/permissions.php b/app/views/admin/api/permissions.php deleted file mode 100644 index 9eb48e3..0000000 --- a/app/views/admin/api/permissions.php +++ /dev/null @@ -1,62 +0,0 @@ -<?php -/** - * @var Admin_ApiController $controller - * @var RESTAPI\ConsumerPermissions $permissions - * @var string $consumer_id - * @var array $routes - * @var bool $global - */ -?> -<form action="<?= $controller->url_for('admin/api/permissions', $consumer_id) ?>" method="post" class="default"> -<table class="default"> - <thead> - <tr> - <th><?= _('Zugriff') ?></th> - <th><?= _('Route') ?></th> - <th><?= _('Methoden') ?></th> - <th><?= _('Zugriff auf') ?></th> - <th><?= _('Quelle') ?></th> - </tr> - </thead> -<? foreach ($routes as $route => $methods): ?> - <tbody> - - <? $i = 0; ?> - <? foreach ($methods as $method => $info): ?> - <tr style="vertical-align: top;"> - <td> - <input type="hidden" name="permission[<?= urlencode($route) ?>][<?= urlencode($method) ?>]" value="0"> - <input type="checkbox" name="permission[<?= urlencode($route) ?>][<?= urlencode($method) ?>]" - <? if (!$global || $global->check($route, $method)): ?> - <? if ($permissions->check($route, $method)) echo 'checked'; ?> - <? else: ?> - disabled - <? endif; ?> - value="1"> - </td> - <? if ($i++): ?> - <td> </td> - <? else: ?> - <td><?= htmlReady($route) ?></td> - <? endif; ?> - <td><?= htmlReady($method) ?></td> - <td><?= htmlReady($info['description']) ?></td> - <td><?= $info['source'] ?></td> - </tr> - <? endforeach; ?> - </tbody> -<? endforeach; ?> - <tfoot> - <tr> - <td> - <label> - <input type="checkbox" data-proxyfor="[name^=permission]:checkbox"> <?= _('Alle') ?> - </label> - </td> - <td colspan="4"> - <?= Studip\Button::createAccept(_('Speichern'), 'store') ?> - </td> - </tr> - </tfoot> -</table> -</form> diff --git a/app/views/admin/autoinsert/manual.php b/app/views/admin/autoinsert/manual.php index dd0f834..a4f5f5e 100644 --- a/app/views/admin/autoinsert/manual.php +++ b/app/views/admin/autoinsert/manual.php @@ -114,14 +114,14 @@ <? foreach ($values[$type] as $key => $value): ?> <? if (is_array($value)): ?> <option value="<?= $key ?>" - class="nested-item-header" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value['name']) ?></option> + class="nested-item-header" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value['name']) ?></option> <? foreach ($value['values'] as $k => $v): ?> <option value="<?= $k ?>" - class="nested-item" <?= in_array($k, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($v) ?></option> + class="nested-item" <?= in_array($k, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($v) ?></option> <? endforeach; ?> <? else: ?> <option - value="<?= $key ?>" <?= in_array($key, (array)@$filter[$type]) ? 'selected="selected"' : '' ?>><?= htmlReady($value) ?></option> + value="<?= $key ?>" <?= in_array($key, $filter[$type] ?? []) ? 'selected' : '' ?>><?= htmlReady($value) ?></option> <? endif ?> <? endforeach; ?> </select> diff --git a/app/views/admin/configuration/table-row.php b/app/views/admin/configuration/table-row.php index 12769ed..a0725a5 100644 --- a/app/views/admin/configuration/table-row.php +++ b/app/views/admin/configuration/table-row.php @@ -9,12 +9,16 @@ ?> <tr id="field-<?= htmlReady($field) ?>"> <td> + <? if (!Config::get()->fromEnv($field)): ?> <a data-dialog href="<?= $controller->link_for($linkchunk, compact('field')) ?>"> <?= htmlReady($field) ?> </a> - <? if (!empty($description)): ?> - <br><small><?= htmlReady($description) ?></small> - <? endif; ?> + <? else: ?> + <?= htmlReady($field) ?> + <? endif; ?> + <? if (!empty($description)): ?> + <br><small><?= htmlReady($description) ?></small> + <? endif; ?> </td> <td class="wrap-content"> <? if ($type === 'string' || $type === 'i18n'): ?> @@ -31,8 +35,14 @@ </td> <td><?= htmlReady($type) ?></td> <td class="actions"> + <? if (!Config::get()->fromEnv($field)): ?> <a data-dialog="size=auto" href="<?= $controller->link_for($linkchunk, compact('field')) ?>"> <?= Icon::create('edit')->asImg(['title' => _('Konfigurationsparameter bearbeiten')]) ?> </a> + <? else: ?> + <?= Icon::create('ufo', Icon::ROLE_INFO)->asImg([ + 'title' => _('Wert wurde über eine Umgebungsvariable gesetzt und kann an dieser Stelle nicht verändert werden.'), + ]) ?> + <? endif; ?> </td> </tr> diff --git a/app/views/admin/configuration/type-edit.php b/app/views/admin/configuration/type-edit.php index 9fddb45..1cec3f0 100644 --- a/app/views/admin/configuration/type-edit.php +++ b/app/views/admin/configuration/type-edit.php @@ -16,7 +16,7 @@ <input name="value" type="number" id="item-value" value="<?= htmlReady($value) ?>"> <? elseif ($type === 'array') : ?> - <?php $v = version_compare(PHP_VERSION, '5.4.0', '>=') ? json_encode($value, JSON_UNESCAPED_UNICODE) : json_encode($value) ?> + <?php $v = json_encode($value, JSON_UNESCAPED_UNICODE) ?> <textarea cols="80" rows="5" name="value" id="item-value"><?= htmlReady($v, true, true) ?></textarea> <? elseif ($type === 'i18n'): ?> <?= I18N::textarea('value', $value, [ diff --git a/app/views/admin/courseplanning/pick_color.php b/app/views/admin/courseplanning/pick_color.php index dbd93a8..61cc7fc 100644 --- a/app/views/admin/courseplanning/pick_color.php +++ b/app/views/admin/courseplanning/pick_color.php @@ -13,10 +13,12 @@ <div id="event-color-picker"></div> +<? if (!empty($semtype)): ?> <label> <input name="event_color_semtype" type="checkbox" value="1"> <?= sprintf(_('Farbtyp für alle VA dieses Typs (%s) übernehmen'), htmlReady($semtype)) ?> </label> +<? endif; ?> <div data-dialog-button> <?= Studip\Button::createAccept(_('Speichern'), 'save') ?> diff --git a/app/views/admin/courses/courses.php b/app/views/admin/courses/courses.php deleted file mode 100644 index d225270..0000000 --- a/app/views/admin/courses/courses.php +++ /dev/null @@ -1,270 +0,0 @@ -<?php -/** - * @var string $selected_action - * @var array $view_filter - * @var Semester $semester - * @var int $count_courses - * @var string $sortby - * @var string $sortFlag - * @var int $nav_elements - * @var array $courses - */ - -$colspan = 2 -?> - -<? if (!empty($actions[$selected_action]['multimode'])) : ?> - <form action="<?= URLHelper::getLink($actions[$selected_action]['url']) ?>" method="post" - <?= !empty($actions[$selected_action]['dialogform']) ? ' data-dialog="auto"' : '' ?>> -<? endif ?> -<?= CSRFProtection::tokenTag() ?> -<table class="default course-admin"> - <colgroup> - <col style="width: 2%"> - <? if (in_array('number', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 8%"> - <? endif ?> - <? if (in_array('name', $view_filter)) : ?> - <? $colspan++ ?> - <col> - <? endif ?> - <? if (in_array('type', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 10%"> - <? endif ?> - <? if (in_array('room_time', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 30%"> - <? endif ?> - <? if (in_array('semester', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 10%"> - <? endif ?> - <? if (in_array('institute', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 10%"> - <? endif ?> - <? if (in_array('requests', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 5%"> - <? endif ?> - <? if (in_array('teachers', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 10%"> - <? endif ?> - <? if (in_array('members', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 3%"> - <? endif ?> - <? if (in_array('waiting', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 5%"> - <? endif ?> - <? if (in_array('preliminary', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 5%"> - <? endif ?> - <? if (in_array('contents', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 8%"> - <? endif ?> - <? if (in_array('last_activity', $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 8%"> - <? endif ?> - <? foreach (PluginManager::getInstance()->getPlugins("AdminCourseContents") as $plugin) : ?> - <? foreach ($plugin->adminAvailableContents() as $index => $label) : ?> - <? if (in_array($plugin->getPluginId()."_".$index, $view_filter)) : ?> - <? $colspan++ ?> - <col style="width: 8%"> - <? endif ?> - <? endforeach ?> - <? endforeach ?> - <col style="width: 15%"> - - </colgroup> - <caption> - <? if (!$GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE) : ?> - <?= _('Veranstaltungen') ?> - <? else : ?> - <?= htmlReady(sprintf(_('Veranstaltungen im %s'), $semester->name)) ?> - <? endif ?> - <span class="actions"> - <?= sprintf('%u %s', $count_courses, $count_courses > 1 ? _('Veranstaltungen') : _('Veranstaltung')) ?> - </span> - </caption> - <thead> - <tr class="sortable"> - <? if (Config::get()->ADMIN_COURSES_SHOW_COMPLETE): ?> - <th <? if ($sortby === 'completion') printf('class="sort%s"', mb_strtolower($sortFlag)) ?>> - <a href="<?= URLHelper::getLink('', ['sortby' => 'completion', 'sortFlag' => mb_strtolower($sortFlag)]) ?>" class="course-completion" title="<?= _('Bearbeitungsstatus') ?>"> - <?= _('Bearbeitungsstatus') ?> - </a> - </th> - <? else: ?> - <th> - - </th> - <? endif; ?> - <? if (in_array('number', $view_filter)) : ?> - <th <?= ($sortby == 'VeranstaltungsNummer') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= - URLHelper::getLink('', ['sortby' => 'VeranstaltungsNummer', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _('Nr.') ?> - </a> - </th> - <? endif ?> - <? if (in_array('name', $view_filter)) : ?> - <th <?= ($sortby == 'Name') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= - URLHelper::getLink('', ['sortby' => 'Name', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _('Name') ?> - </a> - </th> - <? endif ?> - <? if (in_array('type', $view_filter)) : ?> - <th <?= ($sortby == 'status') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= - URLHelper::getLink('', ['sortby' => 'status', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _("VA-Typ") ?> - </a> - </th> - <? endif ?> - <? if (in_array('room_time', $view_filter)) : ?> - <th><?= _('Raum/Zeit') ?></th> - <? endif ?> - <? if (in_array('semester', $view_filter)) : ?> - <th <?= ($sortby == 'start_time') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= URLHelper::getLink('', ['sortby' => 'start_time', 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _('Semester') ?> - </a> - </th> - <? endif ?> - <? if (in_array('institute', $view_filter)) : ?> - <th <?= ($sortby == 'institute') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= URLHelper::getLink('', ['sortby' => 'institute', 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _('Einrichtung') ?> - </a> - </th> - <? endif ?> - <? if (in_array('requests', $view_filter)) : ?> - <th <?= ($sortby == 'requests') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= - URLHelper::getLink('', ['sortby' => 'requests', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <abbr title="<?= _('Raumanfragen') ?>"> - <?= _('RA') ?> - </abbr> - </a> - </th> - <? endif ?> - <? if (in_array('teachers', $view_filter)) : ?> - <th><?= _('Lehrende') ?></th> - <? endif ?> - <? if (in_array('members', $view_filter)) : ?> - <th <?= ($sortby == 'teilnehmer') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= URLHelper::getLink('', ['sortby' => 'teilnehmer', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <abbr title="<?= _('Teilnehmende') ?>"> - <?= _('TN') ?> - </abbr> - </a> - </th> - <? endif ?> - <? if (in_array('waiting', $view_filter)) : ?> - <th <? if ($sortby == 'waiting') printf('class="sort%s"', mb_strtolower($sortFlag)); ?>> - <a href="<?= URLHelper::getLink('', ['sortby' => 'waiting', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"> - <?= _('Warteliste') ?> - </a> - </th> - <? endif ?> - <? if (in_array('preliminary', $view_filter)) : ?> - <th <?= ($sortby == 'prelim') ? sprintf('class="sort%s"', mb_strtolower($sortFlag)) : '' ?>> - <a href="<?= - URLHelper::getLink('', ['sortby' => 'prelim', - 'sortFlag' => mb_strtolower($sortFlag)]) ?>"><?= _('Vorläufig') ?></a> - </th> - <? endif ?> - <? if (in_array('contents', $view_filter)) : ?> - <th style="width: <?= $nav_elements * 27 ?>px"> - <?= _('Inhalt') ?> - </th> - <? endif ?> - <? if (in_array('last_activity', $view_filter)) : ?> - <th style="width: <?= $nav_elements * 27 ?>px"> - <?= _('letzte Aktivität') ?> - </th> - <? endif ?> - <? foreach (PluginManager::getInstance()->getPlugins("AdminCourseContents") as $plugin) : ?> - <? foreach ($plugin->adminAvailableContents() as $index => $label) : ?> - <? if (in_array($plugin->getPluginId()."_".$index, $view_filter)) : ?> - <th style="width: <?= $nav_elements * 27 ?>px"><?= htmlReady($label) ?></th> - <? endif ?> - <? endforeach ?> - <? endforeach ?> - <th style="text-align: center" class="actions"> - <?= _('Aktion') ?> - </th> - </tr> - <? if (!empty($actions[$selected_action]['multimode'])) : ?> - <?= $this->render_partial('admin/courses/additional_inputs.php', compact('colspan')) ?> - <? if (count($courses) > 10): ?> - <tr> - <th colspan="<?= $colspan ?>" style="text-align: right"> - <? if (is_a($actions[$selected_action]['multimode'], "\\Studip\\Button")) : ?> - <?= $actions[$selected_action]['multimode'] ?> - <? else : ?> - <?= Studip\Button::createAccept( - is_string($actions[$selected_action]['multimode']) - ? $actions[$selected_action]['multimode'] - : $actions[$selected_action]['title'], - 'save_action', - $selected_action == 16 ? ['data-dialog' => 1] : null) ?> - <? endif ?> - </th> - </tr> - <? endif; ?> - <? endif ?> - </thead> - <tbody> - <? foreach ($courses as $semid => $values) : ?> - <?= $this->render_partial('admin/courses/_course', - [ - 'semid' => $semid, - 'values' => $values, - 'view_filter' => $view_filter, - 'actions' => $actions, - 'selected_action' => $selected_action, - 'courses' => $courses, - 'parent' => $parent ?? null - ] - ) ?> - <? endforeach ?> - </tbody> -<? if (!empty($actions[$selected_action]['multimode'])) : ?> - <tfoot> - <tr> - <td colspan="<?= $colspan ?>" style="text-align: right"> - <? if (is_a($actions[$selected_action]['multimode'], "\\Studip\\Button")) : ?> - <?= $actions[$selected_action]['multimode'] ?> - <? else : ?> - <?= Studip\Button::createAccept( - is_string($actions[$selected_action]['multimode']) - ? $actions[$selected_action]['multimode'] - : $actions[$selected_action]['title'], - $actions[$selected_action]['name'], - $selected_action == 16 ? ['data-dialog' => 1] : null) ?> - <? endif ?> - </td> - </tr> - </tfoot> - <? endif ?> -</table> -<? if (!empty($actions[$selected_action]['multimode'])) : ?> -</form> -<? endif ?> diff --git a/app/views/admin/cronjobs/logs/index.php b/app/views/admin/cronjobs/logs/index.php index 1073d1b..d17a4a5 100644 --- a/app/views/admin/cronjobs/logs/index.php +++ b/app/views/admin/cronjobs/logs/index.php @@ -135,7 +135,7 @@ use Studip\Button, Studip\LinkButton; <tfoot> <tr> <td colspan="6"> - <select name="action" data-activates="button[name=bulk]"> + <select name="action" data-activates="button[name=bulk]" aria-label="<?= _('Aktion auswählen') ?>"> <option value="">- <?= _('Aktion auswählen') ?></option> <option value="delete"><?= _('Löschen') ?></option> </select> diff --git a/app/views/admin/cronjobs/schedules/display.php b/app/views/admin/cronjobs/schedules/display.php index 8eb9075..ddf1d21 100644 --- a/app/views/admin/cronjobs/schedules/display.php +++ b/app/views/admin/cronjobs/schedules/display.php @@ -16,9 +16,6 @@ <dt><?= _('Aktiv') ?></dt> <dd><?= $schedule->active ? _('Ja') : _('Nein') ?></dd> - <dt><?= _('Priorität') ?></dt> - <dd><?= CronjobSchedule::describePriority($schedule->priority) ?></dd> - <? if (count($schedule->parameters) > 0): ?> <dt><?= _('Parameter') ?></dt> <dd> @@ -33,23 +30,8 @@ <dt><?= _('Aufgabe') ?></dt> <dd><?= htmlReady($schedule->task->name) ?></dd> - <dt><?= _('Typ') ?></dt> -<? if ($schedule->type === 'once'): ?> - <dd> - <?= sprintf(_('Einmalig am %s um %s'), date('d.m.Y', $schedule->next_execution), date('H:i', $schedule->next_execution)) ?> - </dd> - - <dt><?= _('Ausgeführt') ?>?</dt> - <dd> - <? if ($schedule->execution_count > 0): ?> - <?= _('Ja') ?>, <?= sprintf(_('am %s um %s'), date('d.m.Y', $schedule->last_execution), date('H:i:s', $schedule->last_execution)) ?> - <? else: ?> - <?= _('Nein') ?> - <? endif; ?> - </dd> -<? else: ?> + <dt><?= _('Ausführungsrhytmus') ?></dt> <dd> - <?= _('Regelmässig') ?> <?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray()) ?> </dd> @@ -68,8 +50,6 @@ <dt><?= _('Letztes Ergebnis') ?></dt> <dd><code><?= htmlReady($schedule->last_result) ?></code></dd> <? endif; ?> - -<? endif; ?> </dl> <div data-dialog-button> diff --git a/app/views/admin/cronjobs/schedules/edit.php b/app/views/admin/cronjobs/schedules/edit.php index 96be249..8754510 100644 --- a/app/views/admin/cronjobs/schedules/edit.php +++ b/app/views/admin/cronjobs/schedules/edit.php @@ -42,17 +42,6 @@ $days_of_week = [ </label> <label> - <?= _('Priorität') ?> - <select name="priority" id="priority"> - <? foreach (CronjobSchedule::getPriorities() as $priority => $label): ?> - <option value="<?= $priority ?>" <? if ((!$schedule->priority && $priority === CronjobSchedule::PRIORITY_NORMAL) || $schedule->priority === $priority) echo 'selected'; ?>> - <?= htmlReady($label) ?> - </option> - <? endforeach; ?> - </select> - </label> - - <label> <?= _('Titel') ?> <input type="text" name="title" id="title" value="<?= htmlReady($schedule->title ?: '') ?>"> </label> @@ -118,14 +107,6 @@ $days_of_week = [ <fieldset> <legend><?= _('Zeitplan') ?></legend> - <label> - <input type="radio" name="type" value="periodic" - data-activates="[name^='periodic']" - data-deactivates="[name^='once']" - <? if ($schedule->type === 'periodic') echo 'checked'; ?>> - <?= _('Wiederholt') ?> - </label> - <section> <table class="default"> <colgroup> @@ -218,26 +199,6 @@ $days_of_week = [ </tbody> </table> </section> - - <label> - <input type="radio" name="type" value="once" - data-activates="input[name^='once']" - data-deactivates="[name^='periodic']" - <? if ($schedule->type === 'once') echo 'checked'; ?>> - <?= _('Einmalig') ?> - </label> - - <label class="col-1"> - <?= _('Datum') ?> - <input type="text" name="once[date]" data-date-picker class="size-s" - value="<? if ($schedule->type === 'once' && $schedule->next_execution) echo date('d.m.Y', $schedule->next_execution); ?>"> - </label> - - <label class="col-1"> - <?= _('Uhrzeit') ?> - <input type="text" name="once[time]" data-time-picker class="size-s" - value="<? if ($schedule->type === 'once' && $schedule->next_execution) echo date('H:i', $schedule->next_execution) ?>"> - </label> </fieldset> <footer class="buttons"> diff --git a/app/views/admin/cronjobs/schedules/index.php b/app/views/admin/cronjobs/schedules/index.php index 6160875..79a65be 100644 --- a/app/views/admin/cronjobs/schedules/index.php +++ b/app/views/admin/cronjobs/schedules/index.php @@ -18,30 +18,18 @@ use Studip\Button, Studip\LinkButton; <?= sprintf(_('Passend: %u von %u Cronjobs'), count($schedules), $total) ?> <? endif; ?> </legend> - <label class="col-2"> - <?= _('Typ') ?> - <select name="filter[type]" id="type" class="submit-upon-select"> - <option value=""><?= _('Alle Cronjobs anzeigen') ?></option> - <option value="once" <? if ($filter['type'] === 'once') echo 'selected'; ?>> - <?= _('Nur einmalige Cronjobs anzeigen') ?> - </option> - <option value="periodic" <? if ($filter['type'] === 'periodic') echo 'selected'; ?>> - <?= _('Nur regelmässige Cronjobs anzeigen') ?> - </option> - </select> - </label> - <label class="col-2"> + <label class="col-3"> <?= _('Aufgabe') ?> <select name="filter[task_id]" id="task_id" class="submit-upon-select"> <option value=""><?= _('Alle Cronjobs anzeigen') ?></option> <? foreach ($tasks as $task): ?> - <option value="<?= $task->task_id ?>" <? if ($filter['task_id'] === $task->task_id) echo 'selected'; ?>> + <option value="<?= $task->task_id ?>" <? if (isset($filter['task_id']) && $filter['task_id'] === $task->task_id) echo 'selected'; ?>> <?= htmlReady($task->name) ?> </option> <? endforeach; ?> </select> </label> - <label class="col-2"> + <label class="col-3"> <?= _('Status') ?> <select name="filter[status]" id="status" class="submit-upon-select"> <option value=""><?= _('Alle Cronjobs anzeigen') ?></option> @@ -74,7 +62,6 @@ use Studip\Button, Studip\LinkButton; <col style="width: 20px"> <col> <col style="width: 40px"> - <col style="width: 100px"> <col style="width: 30px"> <col style="width: 30px"> <col style="width: 30px"> @@ -91,7 +78,6 @@ use Studip\Button, Studip\LinkButton; </th> <th data-sort="text"><?= _('Cronjob') ?></th> <th data-sort="htmldata"><?= _('Aktiv') ?></th> - <th data-sort="text"><?= _('Typ') ?></th> <th colspan="5" data-sort="false"><?= _('Ausführung') ?></th> <th data-sort="false"><?= _('Optionen') ?></th> </tr> @@ -124,14 +110,7 @@ use Studip\Button, Studip\LinkButton; </a> <? endif; ?> </td> - <td><?= $schedule->type === 'once' ? _('Einmalig') : _('Regelmässig') ?></td> - <? if ($schedule->type === 'once'): ?> - <td colspan="5"> - <?= strftime('%x %R', $schedule->next_execution) ?> - </td> - <? else: ?> - <?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray() + ['display' => 'table-cells']) ?> - <? endif; ?> + <?= $this->render_partial('admin/cronjobs/schedules/periodic-schedule', $schedule->toArray() + ['display' => 'table-cells']) ?> <td style="text-align: right"> <a data-dialog href="<?= $controller->display($schedule) ?>"> <?= Icon::create('admin')->asImg(['title' => _('Cronjob anzeigen')]) ?> @@ -152,7 +131,7 @@ use Studip\Button, Studip\LinkButton; </tbody> <tfoot> <tr> - <td colspan="10"> + <td colspan="9"> <select name="action" data-activates=".cronjobs button[name=bulk]" aria-label="<?= _('Aktion auswählen')?>"> <option value="">- <?= _('Aktion auswählen') ?> -</option> <option value="activate"><?= _('Aktivieren') ?></option> diff --git a/app/views/admin/cronjobs/tasks/index.php b/app/views/admin/cronjobs/tasks/index.php index c39df93..0edd191 100644 --- a/app/views/admin/cronjobs/tasks/index.php +++ b/app/views/admin/cronjobs/tasks/index.php @@ -78,7 +78,7 @@ use Studip\Button; <tfoot> <tr> <td colspan="6"> - <select name="action" data-activates=".cronjobs button[name=bulk]"> + <select name="action" data-activates=".cronjobs button[name=bulk]" aria-label="<?= _('Aktion auswählen') ?>"> <option value="">- <?= _('Aktion auswählen') ?></option> <option value="activate"><?= _('Aktivieren') ?></option> <option value="deactivate"><?= _('Deaktivieren') ?></option> diff --git a/app/views/admin/datafields/new.php b/app/views/admin/datafields/new.php index 0c6f696..e64293f 100644 --- a/app/views/admin/datafields/new.php +++ b/app/views/admin/datafields/new.php @@ -45,7 +45,7 @@ use Studip\Button, Studip\LinkButton; <?= _('Veranstaltungskategorie') ?> <? elseif ($object_typ === 'inst'): ?> <?= _('Einrichtungstyp') ?> - <? elseif ($object_typ === 'moduldeskriptor' || $object_type === 'modulteildeskriptor') : ?> + <? elseif ($object_typ === 'moduldeskriptor' || $object_typ === 'modulteildeskriptor') : ?> <?= _('Sprache') ?> <? elseif ($object_typ === 'studycourse'): ?> <?= _('Typ/Abschnitt') ?> diff --git a/app/views/admin/lockrules/_form.php b/app/views/admin/lockrules/_form.php index c4ef111..b96c7b6 100644 --- a/app/views/admin/lockrules/_form.php +++ b/app/views/admin/lockrules/_form.php @@ -85,12 +85,14 @@ use Studip\Button; </td> <td> <input type="radio" - name="lockdata_attributes[<?= $attr ?>]" <?= ($lock_rule['attributes'][$attr] ? 'checked' : '') ?> - value="1"/> + name="lockdata_attributes[<?= $attr ?>]" + <?= !empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?> + value="1"> </td> <td> <input type="radio" - name="lockdata_attributes[<?= $attr ?>]" <?= (!$lock_rule['attributes'][$attr] ? 'checked' : '') ?> + name="lockdata_attributes[<?= $attr ?>]" + <?= empty($lock_rule['attributes'][$attr]) ? 'checked' : '' ?> value="0"/> </td> </tr> diff --git a/app/views/admin/plugin/edit_automaticupdate.php b/app/views/admin/plugin/edit_automaticupdate.php index 7e87c31..2feb1bc 100644 --- a/app/views/admin/plugin/edit_automaticupdate.php +++ b/app/views/admin/plugin/edit_automaticupdate.php @@ -46,7 +46,7 @@ if ($_SERVER['HTTPS'] == 'on' && $_SERVER['SERVER_PORT'] != 443 || <fieldset> <legend><?= _("Daten für das bereitstellende System") ?></legend> <p class="info"> - <?= _("Tragen Sie bei gitlab, github.com oder dem Pluginmarktplatz untenstehende URL ein, die der Webhook aufrufen soll.") ?> + <?= _("Tragen Sie bei gitlab, github.com oder dem Pluginmarktplatz die folgende URL ein, die der Webhook aufrufen soll.") ?> <? if ($plugin['automatic_update_secret']) : ?> <?= _("Dieser Aufruf muss noch mit dem Sicherheitstoken abgesichert werden.") ?> <? endif ?> diff --git a/app/views/admin/tree/create.php b/app/views/admin/tree/create.php index 027507a..55d26a5 100644 --- a/app/views/admin/tree/create.php +++ b/app/views/admin/tree/create.php @@ -20,8 +20,8 @@ <? foreach ($GLOBALS['SEM_TREE_TYPES'] as $index => $type) : ?> <option value="<?= htmlReady($index) ?>"> <?= $type['name'] ?: _('Standard') ?> - <?= !$type['editable'] ? _('(nicht mehr nachträglich änderbar)') : '' ?> - <?= $type['hidden'] ? _('(dieser Knoten ist versteckt)') : '' ?> + <?= empty($type['editable']) ? _('(nicht mehr nachträglich änderbar)') : '' ?> + <?= !empty($type['hidden']) ? _('(dieser Knoten ist versteckt)') : '' ?> </option> <? endforeach ?> </select> diff --git a/app/views/admin/user/edit.php b/app/views/admin/user/edit.php index 75ca932..47596a9 100644 --- a/app/views/admin/user/edit.php +++ b/app/views/admin/user/edit.php @@ -29,7 +29,10 @@ use Studip\Button, Studip\LinkButton; <? if ($user->locked): ?> <br> <span style="color: red"> - (<?= sprintf(_('gesperrt von %s'), htmlReady(get_fullname($user->locked_by))) ?> + (<?= htmlReady(sprintf( + _('gesperrt von %s'), + $user->locked_by ? get_fullname($user->locked_by) : _('unbekannt') + )) ?> <? if ($user->lock_comment): ?> , <?= _('Kommentar') ?>: <?= htmlReady($user->lock_comment) ?> <? endif; ?> @@ -341,7 +344,7 @@ use Studip\Button, Studip\LinkButton; <br> - <? if ($user->online->last_lifesign): ?> + <? if (!empty($user->online->last_lifesign)): ?> <abbr title="<?= strftime('%x %X', $user->online->last_lifesign) ?>"> <?= reltime($user->online->last_lifesign, true, 2) ?> </abbr> @@ -431,7 +434,7 @@ use Studip\Button, Studip\LinkButton; <?= sprintf( '%s, %s, %s. %s', htmlReady($usc->studycourse->name), - htmlReady($usc->degree->name), + htmlReady($usc->degree->name ?? _('Unbekannt')), htmlReady($usc->semester), _('Fachsemester') ) ?> diff --git a/app/views/admin/webservice_access/index.php b/app/views/admin/webservice_access/index.php index 07edb4c..223e5c3 100644 --- a/app/views/admin/webservice_access/index.php +++ b/app/views/admin/webservice_access/index.php @@ -28,7 +28,7 @@ </th> </tr> <? foreach ($ws_rules as $rule): ?> - <tr class="<?= TextHelper::cycle('table_row_even', 'table_row_odd') ?>"> + <tr> <? if (isset($edit) && $edit == $rule->id) :?> <td> <a name="edit"></a> diff --git a/app/views/api/authorizations/index.php b/app/views/api/authorizations/index.php deleted file mode 100644 index 95645f4..0000000 --- a/app/views/api/authorizations/index.php +++ /dev/null @@ -1,44 +0,0 @@ -<? use Studip\Button, Studip\LinkButton; ?> - -<? if (empty($consumers)): ?> -<?= MessageBox::info(_('Sie haben noch keinen Apps Zugriff auf Ihren Account gewährt.')) ?> -<? else: ?> -<table class="oauth-apps default"> - <caption><?= _('Applikationen') ?></caption> - <thead> - <tr> - <th><?= _('Name') ?></th> - <th> </th> - </thead> - <tbody> - <? foreach ($consumers as $consumer): ?> - <tr> - <td> - <h3> - <? if ($consumer->url): ?> - <a href="<?= htmlReady($consumer->url) ?>" target="_blank" rel="noopener noreferrer"> - <?= htmlReady($consumer->title) ?> - </a> - <? else: ?> - <?= htmlReady($consumer->title) ?> - <? endif; ?> - <? if (isset($types[$consumer->type])): ?> - <small>(<?= htmlReady($types[$consumer->type]) ?>)</small> - <? endif; ?> - </h3> - <? if ($consumer->description): ?> - <p><?= htmlReady($consumer->description) ?></p> - <? endif; ?> - </td> - <td class="actions"> - <?= LinkButton::createCancel( - _('App entfernen'), - $controller->url_for('api/authorizations/revoke', $consumer->id), - ['data-confirm' => _('Wollen Sie der App wirklich den Zugriff auf Ihre Daten untersagen?')] - ) ?> - </td> - </tr> -<? endforeach; ?> - </tbody> -</table> -<? endif; ?> diff --git a/app/views/api/oauth/authorize.php b/app/views/api/oauth/authorize.php deleted file mode 100644 index 6c66532..0000000 --- a/app/views/api/oauth/authorize.php +++ /dev/null @@ -1,34 +0,0 @@ -<section class="oauth authorize"> - <p> - <?= sprintf( - _('Die Applikation <strong>%s</strong> möchte auf Ihre Daten zugreifen.'), - htmlReady($consumer->title) - ) ?> - </p> - - <form action="<?= $controller->url_for('api/oauth/authorize?oauth_token=' . $token) ?>" method="post"> - <input type="hidden" name="oauth_callback" value="<?= htmlReady($oauth_callback) ?>"> - <p> - <?= Studip\Button::createAccept(_('Erlauben'), 'allow') ?> - <?= Studip\LinkButton::createCancel(_('Verweigern'), $consumer->callback) ?> - </p> - </form> - - <p> - <?= Avatar::getAvatar($GLOBALS['user']->id)->getImageTag(Avatar::SMALL) ?> - - <?= sprintf( - _('Angemeldet als <strong>%s</strong> (%s)'), - htmlReady($GLOBALS['user']->getFullName()), - htmlReady($GLOBALS['user']->username) - ) ?><br> - <small> - <a href="<?= URLHelper::getLink('logout.php') ?>"> - <?= sprintf( - _('Sind sie nicht <strong>%s</strong>, so melden Sie sich bitte ab und versuchen es erneut.'), - htmlReady($GLOBALS['user']->getFullName()) - ) ?> - </a> - </small> - </p> -</section> diff --git a/app/views/api/oauth/authorized.php b/app/views/api/oauth/authorized.php deleted file mode 100644 index e69de29..0000000 --- a/app/views/api/oauth/authorized.php +++ /dev/null diff --git a/app/views/blubber/compose.php b/app/views/blubber/compose.php index 3b8b2a0..3ea46c4 100644 --- a/app/views/blubber/compose.php +++ b/app/views/blubber/compose.php @@ -1,68 +1,79 @@ -<form class="default" action="<?= $controller->compose($thread ? $thread->getId() : null) ?>" method="post"> +<?php +/** + * @var BlubberController $controller + * @var BlubberThread $thread + * @var Contact[] $contacts + */ +?> - <?= CSRFProtection::tokenTag() ?> +<form class="default" action="<?= $controller->compose($thread ? $thread->getId() : null) ?>" method="post" data-dialog> - <div <?= !$thread ? "" : 'style="display: none;"' ?>> - <div class="file_select_possibilities"> + <?= CSRFProtection::tokenTag() ?> - <a href="#" onclick="jQuery('.file_select_possibilities').hide(); jQuery('.private_blubber_composer').show(); return false;"> + <div class="file_select_possibilities" <?= !$thread ? "" : 'style="display: none;"' ?>> + <div> + <a href="#" + onclick="$('.file_select_possibilities').hide(); $('.private_blubber_composer').show(); return false;"> <?= Icon::create('group3')->asImg(50) ?> <?= _('Kontakte') ?> </a> - <a href="<?= $controller->link_for("blubber/index/global") ?>"> + <a href="<?= $controller->link_for('blubber/index/global') ?>"> <?= Icon::create('globe')->asImg(50) ?> <?= _('Öffentlich') ?> </a> <? if (!$GLOBALS['perm']->have_perm('admin')) : ?> - <a href="#" onclick="jQuery('.file_select_possibilities').hide(); jQuery('.course_blubber_composer').show(); return false;"> + <a href="#" + onclick="$('.file_select_possibilities').hide(); $('.course_blubber_composer').show(); return false;"> <?= Icon::create('seminar')->asImg(50) ?> <?= _('Veranstaltung') ?> </a> <? endif ?> - </div> </div> <div class="course_blubber_composer" style="display: none;"> - <? if (!$GLOBALS['perm']->have_perm("admin")) : ?> - <ul class="clean"> - <? foreach (CourseMember::findBySQL("INNER JOIN seminare USING (Seminar_id) WHERE user_id = ? ORDER BY seminare.name ASC", [$GLOBALS['user']->id]) as $member) : ?> - <li> - <a href="<?= $controller->to_course($member['seminar_id']) ?>"> - <?= CourseAvatar::getAvatar($member['seminar_id'])->getImageTag(Avatar::SMALL) ?> - <?= htmlReady($member->course['name']) ?> - </a> - </li> - <? endforeach ?> - </ul> - <? endif ?> + <? if (!$GLOBALS['perm']->have_perm('admin')) : ?> + <ul class="clean"> + <? foreach (CourseMember::findBySQL("INNER JOIN seminare USING (Seminar_id) WHERE user_id = ? ORDER BY seminare.name ASC", [$GLOBALS['user']->id]) as $member) : ?> + <li> + <a href="<?= $controller->to_course($member['seminar_id']) ?>"> + <?= CourseAvatar::getAvatar($member['seminar_id'])->getImageTag(Avatar::SMALL) ?> + <?= htmlReady($member->course['name']) ?> + </a> + </li> + <? endforeach ?> + </ul> + <? endif ?> </div> <div class="private_blubber_composer" style="display: none;"> - <label for="blubber_contacts"> - <?= _('Kontakte') ?> - </label> - <div class="blubber_composer_select_container"> + + <? if (!empty($contacts)) : ?> + <div class="blubber_composer_select_container"> <span class="container"> - <select name="user_ids[]" class="select2" id="blubber_contacts" multiple> + <label> + <?= _('Kontakte') ?> + <select name="user_ids[]" class="select2" id="blubber_contacts" multiple> <? foreach ($contacts as $contact) : ?> - <option value="<?= htmlReady($contact['user_id']) ?>" data-avatar="<?= htmlReady(Avatar::getAvatar($contact['user_id'])->getImageTag(Avatar::SMALL)) ?>"> + <option value="<?= htmlReady($contact->user_id) ?>" + data-avatar="<?= htmlReady(Avatar::getAvatar($contact['user_id'])->getImageTag(Avatar::SMALL)) ?>"> <?= htmlReady($contact->friend->getFullName()) ?> </option> <? endforeach ?> </select> + </label> </span> - <a href="" onClick="$('#blubber_contacts').focus().select2('open'); return false;"> - <?= Icon::create("search", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> - </a> - <a href="" onClick="$('#blubber_contacts').val(null).trigger('change'); return false;"> - <?= Icon::create("decline", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> - </a> - </div> - + <a href="" onClick="$('#blubber_contacts').trigger('focus').select2('open'); return false;"> + <?= Icon::create('search')->asImg(['class' => 'text-bottom']) ?> + </a> + <a href="" onClick="$('#blubber_contacts').val(null).trigger('change'); return false;"> + <?= Icon::create('decline',)->asImg(['class' => "text-bottom"]) ?> + </a> + </div> + <? endif ?> <script> jQuery(function ($) { let format = function (state) { @@ -83,7 +94,6 @@ STUDIP.Blubber.Composer.init(); }); </script> - <div class=".more_persons"> <?= _('Weitere Personen') ?> @@ -92,19 +102,21 @@ <input type="hidden" name="user_ids[]" :value="user.user_id"> <span>{{ user.name }}</span> <a href="#" @click.prevent="removeUser"> - <studip-icon shape="trash" :size="20" role="clickable"></studip-icon> + <studip-icon shape="trash"></studip-icon> </a> </li> </ul> + <quicksearch :searchtype="quicksearch" name="qs" @input="addRange" :placeholder="$gettext('Suchen')"></quicksearch> <div class="blubber_composer_select_container"> <?= QuickSearch::get('search_user_id', new StandardSearch('user_id')) - ->fireJSFunctionOnSelect('STUDIP.Blubber.Composer.vue.addUser')->render() ?> + ->setInputStyle('width: 90%') + ->fireJSFunctionOnSelect('STUDIP.Blubber.Composer.vue.addUser')->render() ?> - <a href="" onClick="$('input[name=search_user_id_parameter]').focus(); return false;"> - <?= Icon::create("search", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> + <a href="" onClick="$('input[name=search_user_id_parameter]').trigger('focus'); return false;"> + <?= Icon::create('search')->asImg(['class' => "text-bottom"]) ?> </a> <a href="" onClick="STUDIP.Blubber.Composer.vue.clearUsers(); return false;"> - <?= Icon::create("decline", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> + <?= Icon::create('decline')->asImg(['class' => "text-bottom"]) ?> </a> </div> </div> diff --git a/app/views/calendar/calendar/export.php b/app/views/calendar/calendar/export.php index 3fa302e..b4171fe 100644 --- a/app/views/calendar/calendar/export.php +++ b/app/views/calendar/calendar/export.php @@ -7,8 +7,8 @@ * @var DateTimeImmutable $end */ ?> -<form class="default" method="post" - action="<?= $controller->link_for('calendar/calendar/export/' . $user_id) ?>"> +<form class="default" method="post" data-dialog="size=auto" + action="<?= $controller->link_for('calendar/calendar/export', $user_id ?? null) ?>"> <?= CSRFProtection::tokenTag() ?> <fieldset> <legend><?= _('Termine exportieren') ?></legend> diff --git a/app/views/calendar/contentbox/_termin.php b/app/views/calendar/contentbox/_termin.php index ded7d0b..3daf699 100644 --- a/app/views/calendar/contentbox/_termin.php +++ b/app/views/calendar/contentbox/_termin.php @@ -13,19 +13,19 @@ </span> <? if ($admin && $isProfile && $termin->getObjectClass() === 'CalendarDateAssignment') : ?> <a href="<?= URLHelper::getLink('dispatch.php/calendar/calendar') ?>" - title="<?= _('Zum Kalender') ?>"> + title="<?= _('Zum Kalender') ?>" aria-label="<?= _('Zum Kalender') ?>"> <?= Icon::create('schedule')->asImg(['class' => 'text-bottom']) ?> </a> <? if ($termin->calendar_date->isWritable($GLOBALS['user']->id)) : ?> <a href="<?= URLHelper::getLink('dispatch.php/calendar/date/edit/' . $termin->getPrimaryObjectId()) ?>" - title="<?= _('Termin bearbeiten') ?>" + title="<?= _('Termin bearbeiten') ?>" aria-label="<?= _('Termin bearbeiten') ?>" data-dialog> <?= Icon::create('edit')->asImg(['class' => 'text-bottom']) ?> </a> <? endif ?> <? elseif (!$course_range && in_array($termin->getObjectClass(), ['CourseDate', 'CourseExDate'])) : ?> <a href="<?= URLHelper::getLink('dispatch.php/course/dates', ['cid' => $termin->getPrimaryObjectId()]) ?>" - title="<?= _('Zur Veranstaltung') ?>"> + title="<?= _('Zur Veranstaltung') ?>" aria-label="<?= _('Zur Veranstaltung') ?>"> <?= Icon::create('seminar')->asImg(['class'=> 'text-bottom']) ?> </a> <? endif ?> diff --git a/app/views/calendar/contentbox/display.php b/app/views/calendar/contentbox/display.php index c0387fd..bd7b266 100644 --- a/app/views/calendar/contentbox/display.php +++ b/app/views/calendar/contentbox/display.php @@ -10,12 +10,12 @@ <? if ($isProfile) : ?> <a href="<?= URLHelper::getLink('dispatch.php/calendar/date/add') ?>" data-dialog="reload-on-close" - title="<?= _('Neuen Termin anlegen') ?>"> + title="<?= _('Neuen Termin anlegen') ?>" aria-label="<?= _('Neuen Termin anlegen') ?>"> <?= Icon::create('add', 'clickable')->asImg(['class' => 'text-bottom']) ?> </a> <? else: ?> <a href="<?= URLHelper::getLink("dispatch.php/course/timesrooms", ['cid' => $range_id]) ?>" - title="<?= _('Neuen Termin anlegen') ?>"> + title="<?= _('Neuen Termin anlegen') ?>" aria-label="<?= _('Neuen Termin anlegen') ?>"> <?= Icon::create('admin', 'clickable')->asImg(['class' => 'text-bottom']) ?> </a> <? endif ?> diff --git a/app/views/calendar/schedule/_colorpicker.php b/app/views/calendar/schedule/_colorpicker.php index 310c93a..20ef1a8 100644 --- a/app/views/calendar/schedule/_colorpicker.php +++ b/app/views/calendar/schedule/_colorpicker.php @@ -4,8 +4,11 @@ <? for ($index = 1; $index <= 18; $index++): ?> <span> <input type="radio" name="entry_color" value="<?= $index ?>" id="color-<?= $index ?>" - <? if ($index == $selected) echo 'checked'; ?>> - <label class="undecorated schedule-category<?= $index ?>" for="color-<?= $index ?>"></label> + <?= $index === $selected ? 'checked' : '' ?>> + <label class="undecorated schedule-category<?= $index ?> enter-accessible" + for="color-<?= $index ?>" + aria-label="<?= sprintf(_('Farbe %u zuordnen'), $index) ?>" + title="<?= sprintf(_('Farbe %u zuordnen'), $index) ?>"></label> </span> <? endfor; ?> </div> diff --git a/app/views/calendar/schedule/_semester_chooser.php b/app/views/calendar/schedule/_semester_chooser.php index 3af4018..a8a783e 100644 --- a/app/views/calendar/schedule/_semester_chooser.php +++ b/app/views/calendar/schedule/_semester_chooser.php @@ -1,7 +1,8 @@ <form method="post" class="default" action="<?= $controller->link_for( isset($inst_mode) && $inst_mode == true ? 'calendar/instschedule/index' : 'calendar/schedule/index' ) ?>"> - <select name="semester_id" class="submit-upon-select"> + <label for="semester_id" class="sr-only"><?= _('Angezeigtes Semester') ?></label> + <select name="semester_id" class="submit-upon-select" id="semester_id"> <? foreach ($semesters as $semester) : ?> <? if ($semester['ende'] > time() - strtotime('1year 1day')) : ?> <option diff --git a/app/views/calendar/schedule/settings.php b/app/views/calendar/schedule/settings.php index a9f24b2..0e2674e 100644 --- a/app/views/calendar/schedule/settings.php +++ b/app/views/calendar/schedule/settings.php @@ -2,10 +2,9 @@ <?= CSRFProtection::tokenTag() ?> <fieldset> <legend> - <?= _('Darstellung des Stundenplans ändern') ?> + <?= _('Angezeigter Zeitraum') ?> </legend> <section> - <?= _('Angezeigter Zeitraum') ?> <section class="hgroup"> <label> <?= _('von') ?> @@ -22,8 +21,12 @@ <?= _('Uhr') ?><br> </section> </section> - <section class='settings'> + </fieldset> + <fieldset> + <legend> <?= _('Angezeigte Wochentage') ?> + </legend> + <section class='settings'> <? foreach ([1, 2, 3, 4, 5, 6, 0] as $day) : ?> <label> <input type="checkbox" name="days[]" value="<?= $day ?>" diff --git a/app/views/consultation/admin/create.php b/app/views/consultation/admin/create.php index c973ccf..34385b5 100644 --- a/app/views/consultation/admin/create.php +++ b/app/views/consultation/admin/create.php @@ -1,252 +1,36 @@ <?php /** * @var Consultation_AdminController $controller - * @var Trails_Flash $flash + * @var Trails\Flash $flash * @var string|null $room * @var array $responsible * @var Range $range + * @var int $slot_count_threshold */ -$days_of_the_week = [ - _('Montag') => 1, - _('Dienstag') => 2, - _('Mittwoch') => 3, - _('Donnerstag') => 4, - _('Freitag') => 5, - _('Samstag') => 6, - _('Sonntag') => 0 -]; -$intervals = [ - _('wöchentlich') => 1, - _('zweiwöchentlich') => 2, - _('dreiwöchentlich') => 3, - _('monatlich') => 4, -]; -?> - -<form action="<?= $controller->store() ?>" method="post" class="default" data-dialog> - <?= CSRFProtection::tokenTag() ?> - -<? if ($flash['confirm-many']): ?> - <?= MessageBox::info( - _('Sie erstellen eine sehr große Anzahl an Terminen.') . ' ' . - _('Bitte bestätigen Sie diese Aktion.'), - [ - '<label><input type="checkbox" name="confirmed" value="1">' . - sprintf( - _('Ja, ich möchte wirklich %s Termine erstellen.'), - number_format($flash['confirm-many'], 0, ',', '.') - ) . - '</label>' - ] - )->hideClose() ?> -<? endif; ?> - - <fieldset> - <legend> - <?= _('Ort und Zeit') ?> - </legend> - - <label> - <span class="required"><?= _('Ort') ?></span> - - <input required type="text" name="room" - value="<?= htmlReady(Request::get('room', $room)) ?>" - placeholder="<?= _('Ort') ?>"> - </label> - - <label class="col-3"> - <span class="required"><?= _('Beginn') ?></span> - - <input required type="text" name="start-date" id="start-date" - value="<?= htmlReady(Request::get('start-date', strftime('%d.%m.%Y', strtotime('+7 days')))) ?>" - placeholder="<?= _('tt.mm.jjjj') ?>" - data-date-picker='{">=":"today","disable_holidays": true}'> - </label> - - <label class="col-3"> - <span class="required"><?= _('Ende') ?></span> - - <input required type="text" name="end-date" id="end-date" - value="<?= htmlReady(Request::get('end-date', strftime('%d.%m.%Y', strtotime('+4 weeks')))) ?>" - placeholder="<?= _('tt.mm.jjjj') ?>" - data-date-picker='{">=":"#start-date","disable_holidays": true}'> - </label> - - <label class="col-3"> - <span class="required"><?= _('Am Wochentag') ?></span> - - <select required name="day-of-week"> - <? foreach ($days_of_the_week as $day => $value): ?> - <option value="<?= $value ?>" <? if (Request::get('day-of-week', strftime('%w')) == $value) echo 'selected'; ?>> - <?= htmlReady($day) ?> - </option> - <? endforeach; ?> - </select> - </label> - - <label class="col-3"> - <span class="required"><?= _('Intervall') ?></span> - <select required name="interval"> - <? foreach ($intervals as $interval => $value): ?> - <option value="<?= $value ?>" <? if (Request::int('interval') == $value) echo 'selected'; ?>> - <?= htmlReady($interval) ?> - </option> - <? endforeach; ?> - </select> - </label> - - <label for="start-time" class="col-3"> - <span class="required"><?= _('Von') ?></span> - - <input required type="text" name="start-time" id="start-time" - value="<?= htmlReady(Request::get('start-time', '08:00')) ?>" - placeholder="<?= _('HH:mm') ?>" - data-time-picker='{"<":"#end-time"}'> - </label> - - <label for="ende_hour" class="col-3"> - <span class="required"><?= _('Bis') ?></span> - - <input required type="text" name="end-time" id="end-time" - value="<?= htmlReady(Request::get('end-time', '09:00')) ?>" - placeholder="<?= _('HH:mm') ?>" - data-time-picker='{">":"#start-time"}'> - </label> - - <label class="col-3"> - <span class="required"><?= _('Dauer eines Termins in Minuten') ?></span> - <input required type="text" name="duration" - value="<?= htmlReady(Request::int('duration', 15)) ?>" - maxlength="3" pattern="^\d+$"> - </label> +$convertResponsibilities = function ($input) { + if ($input === false) { + return json_encode(false); + } - <label class="col-3"> - <?= _('Maximale Teilnehmerzahl') ?> - <?= tooltipIcon(_('Falls Sie mehrere Personen zulassen wollen (wie z.B. zu einer Klausureinsicht), so geben Sie hier die maximale Anzahl an Personen an, die sich anmelden dürfen.')) ?> - <input required type="text" name="size" id="size" - min="1" max="50" value="<?= Request::int('size', 1) ?>"> - </label> + foreach ($input as $key => $values) { + $input[$key] = array_map( + fn($item) => ['id' => $item->id, 'label' => $item instanceof Statusgruppen ? $item->getName() : $item->getFullName()], + $values + ); + } - <label> - <input type="checkbox" name="pause" value="1" - data-shows=".pause-inputs" data-activates=".pause-inputs input" - <? if (Request::bool('pause')) echo 'checked'; ?>> - <?= _('Pausen zwischen den Terminen einfügen?') ?> - </label> + return json_encode($input); +} - <label class="col-3 pause-inputs"> - <?= _('Eine Pause nach wie vielen Minuten einfügen?') ?> - <input type="number" name="pause_time" - value="<?= htmlReady(Request::int('pause_time', 45)) ?>" - min="1"> - </label> - - <label class="col-3 pause-inputs"> - <?= _('Dauer der Pause in Minuten') ?> - <input type="number" name="pause_duration" - value="<?= Request::int('pause_duration', 15) ?>" - min="1"> - </label> - - <label> - <input type="checkbox" name="lock" value="1" data-shows=".lock-inputs" data-activates=".lock-inputs input"> - <?= _('Termine für Buchungen sperren?') ?> - </label> - - <label class="lock-inputs"> - <?= _('Wieviele Stunden vor Beginn des Blocks sollen die Termine für Buchungen gesperrt werden?') ?> - <input type="number" name="lock_time" - value="<?= htmlReady(Request::int('lock_time', 24)) ?>" - min="1"> - </label> - </fieldset> - -<? if ($responsible): ?> - <fieldset> - <legend><?= _('Durchführende Personen, Gruppen oder Einrichtungen') ?></legend> - - <? if ($range instanceof Institute): ?> - <p> - <?= _('Bei Einrichtungen muss mindestens eine durchführende Person, Gruppe oder Einrichtung zugewiesen ' - . 'werden.') ?> - </p> - <p> - <?= _('Bitte beachten Sie, dass bei Zuweisungen von Statusgruppen alle Personen der Gruppe mit dem Status ' - . '"tutor" und "dozent" als durchführende Personen zugewiesen werden und über alle Buchungen ' - . 'informiert werden.') ?> - <?= _('Gleiches gilt für eine zugewiesene Einrichtung. Bitte achten Sie darauf, dass Sie Ihre hier ' - . ' getroffene Auswahl in Absprache tätigen.') ?> - </p> - <? endif; ?> - - <?= $this->render_partial('consultation/admin/block-responsibilities.php', compact('responsible')) ?> - </fieldset> -<? endif; ?> - - <fieldset> - <legend><?= _('Weitere Einstellungen') ?></legend> - - <label> - <?= _('Information zu den Terminen in diesem Block') ?> - <textarea name="note"><?= htmlReady(Request::get('note')) ?></textarea> - </label> - - <label> - <input type="checkbox" name="calender-events" value="1" - <? if (Request::bool('calender-events')) echo 'checked'; ?>> - <?= _('Die freien Termine auch im Kalender markieren') ?> - </label> - - <? if ($range instanceof Course): ?> - <label> - <input type="checkbox" name="mail-to-tutors" value="1" checked> - <?= _('Tutor/innen beim Versand von Buchungsbenachrichtigungen berücksichtigen?') ?> - </label> - <? endif; ?> - - <label> - <input type="checkbox" name="show-participants" value="1" - <? if (Request::bool('show-participants')) echo 'checked'; ?>> - <?= _('Namen der buchenden Personen sind öffentlich sichtbar') ?> - </label> - - <label> - <?= _('Grund der Buchung abfragen') ?> - </label> - <div class="hgroup"> - <label> - <input type="radio" name="require-reason" value="yes" - <? if (Request::get('require-reason') === 'yes') echo 'checked'; ?>> - <?= _('Ja, zwingend erforderlich') ?> - </label> - - <label> - <input type="radio" name="require-reason" value="optional" - <? if (Request::get('require-reason', 'optional') === 'optional') echo 'checked'; ?>> - <?= _('Ja, optional') ?> - </label> - - <label> - <input type="radio" name="require-reason" value="no" - <? if (Request::get('require-reason') === 'no') echo 'checked'; ?>> - <?= _('Nein') ?> - </label> - </div> - - <label> - <?= _('Bestätigung für folgenden Text einholen') ?> - (<?= _('optional') ?>) - <?= tooltipIcon(_('Wird hier ein Text eingegeben, so müssen Buchende bestätigen, dass sie diesen Text gelesen haben.')) ?> - <textarea name="confirmation-text"><?= htmlReady(Request::get('confirmation-text')) ?></textarea> - </label> - </fieldset> - - <footer data-dialog-button> - <?= Studip\Button::createAccept(_('Termin speichern')) ?> - <?= Studip\LinkButton::createCancel( - _('Abbrechen'), - $controller->indexURL() - ) ?> - </footer> -</form> +?> +<div data-vue-app="<?= htmlReady(json_encode(['components' => ['ConsultationCreator']])) ?>" + is="ConsultationCreator" + cancel-url="<?= $controller->indexURL() ?>" + store-url="<?= $controller->storeURL() ?>" + :with-responsible="<?= htmlReady($convertResponsibilities($responsible)) ?>" + range-type="<?= get_class($range) ?>" + default-room="<?= htmlReady($room) ?>" + :slot-count-threshold="<?= htmlReady($slot_count_threshold) ?>" + :as-dialog="<?= json_encode(Request::isXhr()) ?>" +></div> diff --git a/app/views/consultation/admin/edit.php b/app/views/consultation/admin/edit.php index 347a05a..f9b416a 100644 --- a/app/views/consultation/admin/edit.php +++ b/app/views/consultation/admin/edit.php @@ -41,8 +41,8 @@ </label> <? if ($responsible): ?> - <?= $this->render_partial('consultation/admin/block-responsibilities.php', compact('responsible', 'block')) ?> - <? endif; ?> + <?= $this->render_partial('consultation/admin/block-responsibilities.php', compact('responsible', 'block')) ?> + <? endif; ?> <label> <?= _('Maximale Teilnehmerzahl') ?> @@ -72,6 +72,12 @@ </label> <label> + <input type="checkbox" name="consecutive" value="1" + <? if ($block->consecutive) echo 'checked'; ?>> + <?= _('Termine innerhalb dieses Blocks nur fortlaufend vergeben') ?> + </label> + + <label> <?= _('Grund der Buchung abfragen') ?> </label> <div class="hgroup"> diff --git a/app/views/consultation/admin/index.php b/app/views/consultation/admin/index.php index 52a352c..43cd5bf 100644 --- a/app/views/consultation/admin/index.php +++ b/app/views/consultation/admin/index.php @@ -13,7 +13,7 @@ <?= MessageBox::info(sprintf( implode('<br>', [ _('Derzeit sind keine Termine eingetragen.'), - '<a href="%s" class="button" data-dialog="size=auto">%s</a>', + '<a href="%s" class="button" data-dialog="size=big">%s</a>', ]), $controller->create(), _('Terminblöcke anlegen') diff --git a/app/views/consultation/admin/ungrouped.php b/app/views/consultation/admin/ungrouped.php index d41d43d..1796e31 100644 --- a/app/views/consultation/admin/ungrouped.php +++ b/app/views/consultation/admin/ungrouped.php @@ -14,7 +14,7 @@ <?= MessageBox::info(sprintf( implode('<br>', [ _('Derzeit sind keine Termine eingetragen.'), - '<a href="%s" class="button" data-dialog="size=auto">%s</a>', + '<a href="%s" class="button" data-dialog="size=big">%s</a>', ]), $controller->create(), _('Terminblöcke anlegen') @@ -183,9 +183,7 @@ </div> <? endif; ?> </td> - <td> - <?= htmlReady($block->room) ?> - </td> + <td><?= htmlReady($slot->block->room) ?></td> <td> <?= $this->render_partial('consultation/slot-occupation.php', compact('slot')) ?> </td> diff --git a/app/views/consultation/overview/ungrouped.php b/app/views/consultation/overview/ungrouped.php index b4d5c62..147f588 100644 --- a/app/views/consultation/overview/ungrouped.php +++ b/app/views/consultation/overview/ungrouped.php @@ -1,3 +1,14 @@ +<?php +/** + * @var ConsultationBlock[] $blocks + * @var Consultation_OverviewController $controller + * @var int $count + * @var int $limit + * @var int $page + * + * @var callable $displayNote + */ +?> <? if (count($blocks) === 0): ?> <?= MessageBox::info(_('Aktuell werden keine Termine angeboten.'))->hideClose() ?> diff --git a/app/views/contact/index.php b/app/views/contact/index.php index a988191..81f5004 100644 --- a/app/views/contact/index.php +++ b/app/views/contact/index.php @@ -106,7 +106,7 @@ <tfoot> <tr> <td colspan="5"> - <select name="action_contact" id="contact_action" aria-label="<?= _('Aktion ausführen') ?>"> + <select name="action_contact" id="contact_action" aria-label="<?= _('Aktion auswählen') ?>"> <option value="">- <?= _('Aktion auswählen') ?></option> <option value="remove"><?= $filter ? _('Kontakte aus Gruppe entfernen') : _('Kontakte entfernen') ?></option> </select> diff --git a/app/views/course/basicdata/view.php b/app/views/course/basicdata/view.php index 9f7b5b3..9438aeb 100644 --- a/app/views/course/basicdata/view.php +++ b/app/views/course/basicdata/view.php @@ -12,19 +12,14 @@ use Studip\Button, Studip\LinkButton; */ $dialog_attr = Request::isXhr() ? ' data-dialog="size=50%"' : ''; - -$message_types = ['msg' => "success", 'error' => "error", 'info' => "info"]; ?> -<? if (is_array($flash['msg'])) foreach ($flash['msg'] as $msg) : ?> - <?= MessageBox::{$message_types[$msg[0]]}($msg[1]) ?> -<? endforeach ?> - <form name="course-details" name="details" method="post" action="<?= $controller->link_for('course/basicdata/set', $course_id) ?>" <?= $dialog_attr ?> class="default collapsable"> <?= CSRFProtection::tokenTag() ?> <input id="open_variable" type="hidden" name="open" value="<?= $flash['open'] ?>"> <?= Studip\Button::createAccept(_('Speichern'), 'store', ['style' => 'display: none;']) ?> - <fieldset <?= isset($flash['open']) && $flash['open'] != 'bd_basicsettings' ? 'class="collapsed"' : ''?> data-open="bd_basicsettings"> + <fieldset <?= isset($flash['open']) && $flash['open'] != 'bd_basicsettings' ? 'class="collapsed"' : ''?> data-open="bd_basicsettings" + aria-expanded="<?= isset($flash['open']) && $flash['open'] === 'bd_basicsettings' ? 'true' : 'false' ?>"> <legend><?= _('Grundeinstellungen') ?></legend> <? if (!$attributes): ?> @@ -55,7 +50,8 @@ $message_types = ['msg' => "success", 'error' => "error", 'info' => "info"]; </label> </fieldset> - <fieldset <?= !isset($flash['open']) || $flash['open'] != 'inset' ? 'class="collapsed"' : ''?> data-open="bd_inst"> + <fieldset <?= !isset($flash['open']) || $flash['open'] != 'inset' ? 'class="collapsed"' : ''?> data-open="bd_inst" + aria-expanded="<?= isset($flash['open']) && $flash['open'] === 'inset' ? 'true' : 'false' ?>"> <legend><?= _('Einrichtungen') ?></legend> <? if (!$institutional): ?> @@ -78,7 +74,8 @@ $message_types = ['msg' => "success", 'error' => "error", 'info' => "info"]; <? endif; ?> </fieldset> - <fieldset <?= !isset($flash['open']) || $flash['open'] != 'bd_personal' ? 'class="collapsed"' : ''?>> + <fieldset <?= !isset($flash['open']) || $flash['open'] != 'bd_personal' ? 'class="collapsed"' : ''?> + aria-expanded="<?= isset($flash['open']) && $flash['open'] === 'bd_personal' ? 'true' : 'false' ?>"> <legend><?= _('Personal') ?></legend> <table class="default"> @@ -293,7 +290,8 @@ $message_types = ['msg' => "success", 'error' => "error", 'info' => "info"]; </tbody> </table> </fieldset> - <fieldset <?= !isset($flash['open']) || $flash['open'] != 'bd_description' ? 'class="collapsed"' : ''?> data-open="bd_description"> + <fieldset <?= !isset($flash['open']) || $flash['open'] != 'bd_description' ? 'class="collapsed"' : ''?> data-open="bd_description" + aria-expanded="<?= isset($flash['open']) && $flash['open'] === 'bd_description' ? 'true' : 'false' ?>"> <legend><?= _('Weitere Angaben') ?></legend> <? if (!$descriptions): ?> diff --git a/app/views/course/cancel_dates/index.php b/app/views/course/cancel_dates/index.php index 3c092bc..4f3e297 100644 --- a/app/views/course/cancel_dates/index.php +++ b/app/views/course/cancel_dates/index.php @@ -20,7 +20,7 @@ <?= _('Benachrichtigung über ausfallende Termine an alle Teilnehmenden verschicken') ?> </label> </fieldset> - <? if ($issue_id) : ?> + <? if (!empty($issue_id)) : ?> <input type="hidden" name="issue_id" value="<?= $issue_id ?>"> <? else : ?> <input type="hidden" name="termin_id" value="<?= $dates[0]->getTerminId() ?>"> diff --git a/app/views/course/contentmodules/info.php b/app/views/course/contentmodules/info.php index 11bf9dc..93d3ad9 100644 --- a/app/views/course/contentmodules/info.php +++ b/app/views/course/contentmodules/info.php @@ -5,27 +5,17 @@ <div class="main_part"> <div class="header"> <div class="image"> - <? - if ($metadata['icon']) { - $icon = $metadata['icon'] instanceof Icon - ? $metadata['icon']->asImagePath() - : Icon::create($plugin->getPluginURL().'/'.$metadata['icon'])->asImagePath(); - } else { - $icon = null; - } - if ($icon && !is_a($icon, 'Icon')) { - $icon = Icon::create($icon); - } - ?> - <? if ($icon) : ?> - <?= $icon->asImg(100) ?> - <? endif ?> + <? if ($metadata['icon']): ?> + <?= $metadata['icon']->copyWithRole(Icon::ROLE_INFO)->asImg(100) ?> + <? endif; ?> </div> <div class="text"> <h1><?= htmlReady($metadata['displayname'] ?? $plugin->getPluginName()) ?></h1> + <? if (!empty($metadata['summary'])): ?> <strong> <?= htmlReady($metadata['summary']) ?> </strong> + <? endif; ?> </div> </div> <div class="content-modules-controls-vue-app" is="ContentModulesControl" module_id="<?= htmlReady($plugin->getPluginId()) ?>"></div> diff --git a/app/views/course/dates/_date_row.php b/app/views/course/dates/_date_row.php index 0246455..b10deac 100644 --- a/app/views/course/dates/_date_row.php +++ b/app/views/course/dates/_date_row.php @@ -1,10 +1,21 @@ <?php +/** + * @var bool $show_raumzeit + * @var bool $has_access + * @var bool $is_next_date + * @var bool $cancelled_dates_locked + * @var Course_DatesController $controller + * @var CourseDate $date + * @var Course $course + */ +?> +<?php $icon = 'date'; $dialog_url = $show_raumzeit ? $controller->url_for('course/dates/details/' . $date->id) : $controller->url_for('course/dates/singledate/' . $date->id); ?> -<tr id="date_<?= $date->id ?>" <? if ($is_next_date) echo 'class="nextdate" title="' . _('Der nächste Termin') . '"'; ?> data-termin-id="<?= htmlReady($date->id) ?>"> +<tr id="date_<?= $date->id ?>" <? if (!empty($is_next_date)) echo 'class="nextdate" title="' . _('Der nächste Termin') . '"'; ?> data-termin-id="<?= htmlReady($date->id) ?>"> <td data-sort-value="<?= htmlReady($date->date) ?>" class="date_name"> <a href="<?= $dialog_url ?>" data-dialog> <?= Icon::create($icon)->asImg(['class' => 'text-bottom']) ?> @@ -30,7 +41,11 @@ $dialog_url = $show_raumzeit <? if (count($date->statusgruppen) > 0) : ?> <ul class="clean"> <? foreach ($date->statusgruppen as $statusgruppe) : ?> - <li><?= htmlReady($statusgruppe->name) ?></li> + <li> + <a href="<?= $controller->link_for('course/statusgroups/details', $statusgruppe) ?>" data-dialog="size=default"> + <?= htmlReady($statusgruppe->name) ?> + </a> + </li> <? endforeach ?> </ul> <? else : ?> diff --git a/app/views/course/details/index.php b/app/views/course/details/index.php index eb7da10..545454a 100644 --- a/app/views/course/details/index.php +++ b/app/views/course/details/index.php @@ -496,7 +496,7 @@ if (!empty($mvv_tree)) : ?> </article> <? endif ?> -<? foreach (PluginManager::getInstance()->getPlugins('DetailspagePlugin') as $plugin) : ?> +<? foreach (PluginManager::getInstance()->getPlugins(DetailspagePlugin::class) as $plugin) : ?> <? $template = $plugin->getDetailspageTemplate($course) ?> <? if ($template) : ?> <article class="studip"> diff --git a/app/views/course/enrolment/_priocourses.php b/app/views/course/enrolment/_priocourses.php index 749a19c..a1e1bce 100644 --- a/app/views/course/enrolment/_priocourses.php +++ b/app/views/course/enrolment/_priocourses.php @@ -36,15 +36,15 @@ asort($user_prio); <? endif; ?> <p class="hidden-medium-down"> - <?= _('Ziehen Sie die in Frage kommenden Veranstaltungen auf die rechte Seite ' + <?= _('Ziehen Sie die in Frage kommenden Veranstaltungen in den Bereich für ausgewählte Veranstaltungen ' . 'und ordnen Sie sie dort in der Reihenfolge der von Ihnen gewünschten ' - . 'Priorität an. Sie können mehr Veranstaltungen nach rechts ziehen als Sie ' + . 'Priorität an. Sie können mehr Veranstaltungen ziehen als Sie ' . 'tatsächlich belegen wollen.') ?> </p> <p class="hidden-medium-up"> - <?= _('Sortieren Sie die in Frage kommenden Veranstaltungen auf die rechte Seite ' + <?= _('Sortieren Sie die in Frage kommenden Veranstaltungen im Bereich für ausgewählte Veranstaltungen ' . 'und ordnen Sie sie dort in der Reihenfolge der von Ihnen gewünschten ' - . 'Priorität an. Sie können mehr Veranstaltungen nach rechts zuweisen als Sie ' + . 'Priorität an. Sie können mehr Veranstaltungen zuweisen als Sie ' . 'tatsächlich belegen wollen.') ?> </p> @@ -79,7 +79,7 @@ asort($user_prio); <ul id="selected-courses"> <li class="empty"> <span class="hidden-medium-up"> - <?= _('Die gewünschten Veranstaltungen links auswählen') ?> + <?= _('Die gewünschten Veranstaltungen aus der Liste der verfügbaren Veranstaltungen auswählen') ?> </span> <span class="hidden-medium-down"> <?= _('Gewünschte Veranstaltungen hierhin ziehen') ?> diff --git a/app/views/course/forum/area/add.php b/app/views/course/forum/area/add.php index 881c122..1449a5d 100644 --- a/app/views/course/forum/area/add.php +++ b/app/views/course/forum/area/add.php @@ -7,7 +7,7 @@ <? else : ?> <? $num_postings = ForumVisit::getCount($entry['topic_id'], $visitdate) ?> <?= Icon::create('forum', $num_postings > 0 ? Icon::ROLE_ATTENTION : Icon::ROLE_INFO)->asImg([ - 'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id'], $constraint['depth']), + 'title' => ForumHelpers::getVisitText($num_postings, $entry['topic_id']), ]) ?> <? endif ?> </td> @@ -36,7 +36,7 @@ </td> <td class="postings"> - <?= number_format(max($entry['num_postings'] - 1, 0), 0, ',', '.') ?> + <?= number_format(max(($entry['num_postings'] ?? 0) - 1, 0), 0, ',', '.') ?> </td> <td class="answer hidden-tiny-down"> diff --git a/app/views/course/forum/index/_areas.php b/app/views/course/forum/index/_areas.php index 11f32be..4f4fa0f 100644 --- a/app/views/course/forum/index/_areas.php +++ b/app/views/course/forum/index/_areas.php @@ -46,17 +46,18 @@ <col> <col> <col class="hidden-tiny-down"> - <col> + <col style="width: 20px"> </colgroup> <thead> <tr> - <th colspan="2"> <?= _('Name des Bereichs') ?></th> + <th></th> + <th> <?= _('Name des Bereichs') ?></th> <th data-type="answers"><?= _("Beiträge") ?></th> <th data-type="last_posting" class="hidden-tiny-down"> <?= _("letzte Antwort") ?> </th> - <th></th> + <th> <?= _('Aktionen') ?> </th> </tr> </thead> diff --git a/app/views/course/forum/index/_last_post.php b/app/views/course/forum/index/_last_post.php index 3532d40..b5d854a 100644 --- a/app/views/course/forum/index/_last_post.php +++ b/app/views/course/forum/index/_last_post.php @@ -1,4 +1,4 @@ -<? if (is_array($entry['last_posting']) && count($entry['last_posting'])) : ?> +<? if (!empty($entry['last_posting']) && is_array($entry['last_posting'])) : ?> <?= _('von') ?> <? if (!empty($entry['last_posting']['anonymous'])): ?> <?= _('Anonym') ?> diff --git a/app/views/course/forum/index/_post.php b/app/views/course/forum/index/_post.php index 7b6aaa0..192a414 100644 --- a/app/views/course/forum/index/_post.php +++ b/app/views/course/forum/index/_post.php @@ -91,7 +91,7 @@ <span data-show-topic="<?= $post['topic_id'] ?>" data-topic-content="<?= $post['topic_id'] ?>" <?= $edit_posting != $post['topic_id'] ? '' : 'style="display: none;"' ?>> <?= ForumHelpers::highlight($post['content'], $highlight) ?> - <?= OpenGraph::extract(formatReady(ForumEntry::removeQuotes($post['content_raw'])))->render() ?> + <?= OpenGraph::extract(ForumEntry::removeQuotes($post['content_raw']))->render() ?> </span> </div> diff --git a/app/views/course/lvgselector/form.php b/app/views/course/lvgselector/form.php index 86e2af9..a1ae506 100644 --- a/app/views/course/lvgselector/form.php +++ b/app/views/course/lvgselector/form.php @@ -48,12 +48,12 @@ <em><?= sprintf(_("Der Suchbegriff '%s' lieferte kein Ergebnis."), htmlReady($selection->getSearchKey())) ?></em> <? else : ?> <h3><?= _('Suchergebnisse') ?>:</h3> - <? TextHelper::reset_cycle(); $show_path = TRUE; $show_link = FALSE; ?> + <? $show_path = TRUE; $show_link = FALSE; ?> <? foreach ($selection->getSearchResult() as $area) : ?> <? // MVV: show LvGruppen with complete trails only ?> <? $pathes = ModuleManagementModelTreeItem::getPathes($area->getTrails(['Modulteil', 'StgteilabschnittModul', 'StgteilAbschnitt', 'StgteilVersion', 'Studiengang'])); ?> <? if (count($pathes)) : ?> - <div class="<?= TextHelper::cycle('odd', 'even') ?>"> + <div> <?= $this->render_partial('course/lvgselector/entry', compact('area', 'show_path', 'show_link', 'pathes')); ?> </div> <? endif; ?> diff --git a/app/views/course/lvgselector/subtree.php b/app/views/course/lvgselector/subtree.php index f61463f..b8e05d4 100644 --- a/app/views/course/lvgselector/subtree.php +++ b/app/views/course/lvgselector/subtree.php @@ -8,7 +8,7 @@ $has_children = $child->hasChildren(); ?> - <div class="<?= TextHelper::cycle('odd', 'even') ?>"> + <div> <?= $this->render_partial('course/lvgselector/entry', ['area' => $child, 'show_link' => $has_children]) ?> diff --git a/app/views/course/members/accepted_list.php b/app/views/course/members/accepted_list.php index 7b34ef3..39cdca7 100644 --- a/app/views/course/members/accepted_list.php +++ b/app/views/course/members/accepted_list.php @@ -39,7 +39,7 @@ type="checkbox" name="all" value="1" data-proxyfor=":checkbox[name^=accepted]"> </th> <? endif ?> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <?if ($sort_by === 'nachname' && $sort_status === 'accepted') printf('class="sort%s"', $order); ?>> <? $order = $sort_status !== 'accepted' ? 'desc' : $order; ?> <a href="<?= URLHelper::getLink(sprintf( @@ -153,7 +153,7 @@ <tfoot> <tr> <td class="printhead" colspan="6"> - <select name="action_accepted" id="action_accepted" aria-label="<?= _('Aktion ausführen') ?>"> + <select name="action_accepted" id="action_accepted" aria-label="<?= _('Aktion wählen') ?>"> <option value="">- <?= _('Aktion wählen') ?></option> <option value="upgrade"><?= _('Akzeptieren') ?></option> <option value="remove"><?= _('Austragen') ?></option> diff --git a/app/views/course/members/autor_list.php b/app/views/course/members/autor_list.php index 0464d47..31ed8fa 100644 --- a/app/views/course/members/autor_list.php +++ b/app/views/course/members/autor_list.php @@ -48,7 +48,7 @@ type="checkbox" name="all" value="1" data-proxyfor=":checkbox[name^=autor]"> </th> <? endif ?> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <? if ($sort_by === 'nachname' && $sort_status === 'autor') printf('class="sort%s"', $order); ?>> <? $order = $sort_status !== 'autor' ? 'desc' : $order; ?> <a href="<?= URLHelper::getLink(sprintf( @@ -183,8 +183,8 @@ <tfoot> <tr> <td colspan="<?= $cols_foot ?>"> - <select name="action_autor" id="action_autor" aria-label="<?= _('Aktion ausführen') ?>"> - <option value="">- <?= _('Aktion wählen') ?></option> + <select name="action_autor" id="action_autor" aria-label="<?= _('Aktion auswählen') ?>"> + <option value="">- <?= _('Aktion auswählen') ?></option> <? if($is_dozent) : ?> <option value="upgrade"> <?= sprintf(_('Zu %s hochstufen'), htmlReady($status_groups['tutor'])) ?> diff --git a/app/views/course/members/awaiting_list.php b/app/views/course/members/awaiting_list.php index b8c1e08..c57bd2d 100644 --- a/app/views/course/members/awaiting_list.php +++ b/app/views/course/members/awaiting_list.php @@ -36,7 +36,7 @@ data-activates="#action_awaiting,button[name='submit_awaiting']"> </th> <? endif ?> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <? if ($sort_by === 'nachname' && $sort_status === $waiting_type) printf('class="sort%s"', $order); ?>> <a href="<?= URLHelper::getLink(sprintf( "?sortby=nachname&sort_status={$waiting_type}&order=%s&toggle=%s#awaiting", @@ -139,8 +139,8 @@ <tfoot> <tr> <td colspan="6"> - <select name="action_awaiting" id="action_awaiting" aria-label="<?= _('Aktion ausführen') ?>"> - <option value="">- <?= _('Aktion wählen') ?></option> + <select name="action_awaiting" id="action_awaiting" aria-label="<?= _('Aktion auswählen') ?>"> + <option value="">- <?= _('Aktion auswählen') ?></option> <option value="upgrade_autor"> <?= sprintf(_('Zu %s hochstufen'), htmlReady($status_groups['autor'])) ?> </option> diff --git a/app/views/course/members/dozent_list.php b/app/views/course/members/dozent_list.php index 9b11d07..a2bae4e 100644 --- a/app/views/course/members/dozent_list.php +++ b/app/views/course/members/dozent_list.php @@ -25,7 +25,7 @@ </colgroup> <thead> <tr class="sortable"> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <? if ($sort_by === 'nachname' && $sort_status === 'dozent') printf('class="sort%s"', $order); ?>> <? $order = $sort_status !== 'dozent' ? 'desc' : $order; ?> <a href="<?= URLHelper::getLink(sprintf( diff --git a/app/views/course/members/tutor_list.php b/app/views/course/members/tutor_list.php index 6af208c..350d83d 100644 --- a/app/views/course/members/tutor_list.php +++ b/app/views/course/members/tutor_list.php @@ -43,7 +43,7 @@ type="checkbox" name="all" value="1" data-proxyfor=":checkbox[name^=tutor]"> </th> <? endif ?> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <? if ($sort_by === 'nachname' && $sort_status === 'tutor') printf('class="sort%s"', $order); ?>> <? $order = $sort_status !== 'tutor' ? 'desc' : $order; ?> <a href="<?= URLHelper::getLink(sprintf( @@ -163,7 +163,7 @@ <tfoot> <tr> <td colspan="6"> - <select name="action_tutor" id="tutor_action" aria-label="<?= _('Aktion ausführen') ?>"> + <select name="action_tutor" id="tutor_action" aria-label="<?= _('Aktion auswählen') ?>"> <option value="">- <?= _('Aktion auswählen') ?></option> <option value="downgrade"><?= sprintf(_('Zu %s herunterstufen'), htmlReady($status_groups['autor'])) ?></option> <option value="remove"><?= _('Austragen') ?></option> diff --git a/app/views/course/members/user_list.php b/app/views/course/members/user_list.php index 9b2acea..21409b5 100644 --- a/app/views/course/members/user_list.php +++ b/app/views/course/members/user_list.php @@ -43,7 +43,7 @@ type="checkbox" name="all" value="1" data-proxyfor=":checkbox[name^=user]"> </th> <? endif ?> - <th></th> + <th><p class="sr-only"><?= _('Nummer') ?></p></th> <th <? if ($sort_by === 'nachname' && $sort_status === 'user') printf('class="sort%s"', $order); ?>> <? $order = $sort_status !== 'user' ? 'desc' : $order; ?> <a href="<?= URLHelper::getLink(sprintf( @@ -154,7 +154,7 @@ <tfoot> <tr> <td colspan="6"> - <select name="action_user" id="user_action" aria-label="<?= _('Aktion ausführen') ?>"> + <select name="action_user" id="user_action" aria-label="<?= _('Aktion auswählen') ?>"> <option value="">- <?= _('Aktion auswählen') ?></option> <option value="upgrade"> <?= sprintf(_('Zu %s hochstufen'), htmlReady($status_groups['autor'])) ?> diff --git a/app/views/course/overview/index.php b/app/views/course/overview/index.php index 39d801d..b238740 100644 --- a/app/views/course/overview/index.php +++ b/app/views/course/overview/index.php @@ -64,11 +64,6 @@ if (!empty($dates)) { echo $dates; } -// Anzeige von Umfragen -if (!empty($evaluations)) { - echo $evaluations; -} - if (!empty($questionnaires)) { echo $questionnaires; } @@ -81,7 +76,7 @@ if (!empty($plugins)) { $template = $plugin->getInfoTemplate($course_id); if ($template) { - echo $template->render(null, $layout); + echo $template->render(layout: $layout); $layout->clear_attributes(); } } diff --git a/app/views/course/room_requests/_new_request_form_footer.php b/app/views/course/room_requests/_new_request_form_footer.php index 4b84790..0d50467 100644 --- a/app/views/course/room_requests/_new_request_form_footer.php +++ b/app/views/course/room_requests/_new_request_form_footer.php @@ -16,13 +16,21 @@ <? endif ?> <? if ($step === 1 || $step === 2) : ?> - <? if ($_SESSION[$request_id]['search_by'] !== 'category') : ?> - <? \Studip\Button::create(_('Raum auswählen'), 'select_room') ?> + <? if ( + !isset($_SESSION[$request_id]['search_by']) + || $_SESSION[$request_id]['search_by'] !== 'category' + ) : ?> + <? \Studip\Button::create(_('Raum auswählen'), 'select_room') ?> <? endif ?> <? endif ?> - <? if (($step === 1 && $_SESSION[$request_id]['room_category_id'] !== '0') - || $step === 2) : ?> + <? if ( + ( + $step === 1 + && !empty($_SESSION[$request_id]['room_category_id']) + ) + || $step === 2 + ) : ?> <?= \Studip\Button::create(_('Weiter'), 'show_summary') ?> <? endif ?> diff --git a/app/views/course/room_requests/request_find_matching_rooms.php b/app/views/course/room_requests/request_find_matching_rooms.php index 01f42a4..ce24e0f 100644 --- a/app/views/course/room_requests/request_find_matching_rooms.php +++ b/app/views/course/room_requests/request_find_matching_rooms.php @@ -41,7 +41,7 @@ ] ) ?> - <? if ($category) : ?> + <? if (!empty($category)) : ?> <?= Icon::create('decline')->asInput( [ 'title' => _('alle Angaben zurücksetzen'), @@ -85,7 +85,7 @@ <label> <?= _('Raumname') ?> <span class="flex-row"> - <input type="text" name="room_name" value="<?= htmlReady($_SESSION[$request_id]['room_name']) ?>"> + <input type="text" name="room_name" value="<?= htmlReady($_SESSION[$request_id]['room_name'] ?? '') ?>"> <?= Icon::create('search')->asInput( [ 'title' => _('Räume suchen'), @@ -107,7 +107,7 @@ <input type="radio" name="selected_room_id" data-activates="button[type='submit'][name='select_room']" value="<?= htmlReady($room->id) ?>" - <? if ($_SESSION[$request_id]['room_id'] === $room->id) echo 'checked' ?>> + <? if (isset($_SESSION[$request_id]['room_id']) && $_SESSION[$request_id]['room_id'] === $room->id) echo 'checked' ?>> <?= htmlReady(mila($room->name, 60)) . ' (' . $room['category']->name . ')'?> <? if ($room->properties): ?> <? $property_names = $room->getInfolabelProperties() diff --git a/app/views/course/statusgroups/batch_action.php b/app/views/course/statusgroups/batch_action.php index 10bec38..5600d3a 100644 --- a/app/views/course/statusgroups/batch_action.php +++ b/app/views/course/statusgroups/batch_action.php @@ -1,26 +1,26 @@ <?php - if ($edit_size) { + if (!empty($edit_size)) { echo $this->render_partial('course/statusgroups/_edit_groups_size', compact('groups')); - } elseif ($edit_selfassign) { + } elseif (!empty($edit_selfassign)) { echo $this->render_partial('course/statusgroups/_edit_groups_selfassign', compact('groups')); - } elseif ($askdelete) { + } elseif (!empty($askdelete)) { echo $this->render_partial('course/statusgroups/_askdelete_groups', compact('groups')); - } elseif ($movemembers) { + } elseif (!empty($movemembers)) { echo $this->render_partial( 'course/statusgroups/_move_members', compact('target_groups', 'members', 'source_group') ); - } elseif ($copymembers) { + } elseif (!empty($copymembers)) { echo $this->render_partial( 'course/statusgroups/_copy_members', compact('target_groups', 'members', 'source_group') ); - } elseif ($deletemembers) { + } elseif (!empty($deletemembers)) { echo $this->render_partial( 'course/statusgroups/_askdelete_members', compact('members', 'source_group') ); - } elseif ($cancelmembers) { + } elseif (!empty($cancelmembers)) { echo $this->render_partial( 'course/statusgroups/_askcancel_members', compact('members') diff --git a/app/views/course/statusgroups/details.php b/app/views/course/statusgroups/details.php new file mode 100644 index 0000000..db80777 --- /dev/null +++ b/app/views/course/statusgroups/details.php @@ -0,0 +1,30 @@ +<?php +/** + * @var Statusgruppen $group + */ +?> +<table class="default"> + <caption class="hide-in-dialog"> + <?= sprintf(_('Gruppe %s'), htmlReady($group->name)) ?> + </caption> + <colgroup> + <col style="width: 32px"> + <col> + </colgroup> + <tbody> + <? foreach ($group->members as $member): ?> + <tr> + <td> + <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $member->user->username], true) ?>"> + <?= $member->avatar() ?> + </a> + </td> + <td> + <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $member->user->username], true) ?>"> + <?= htmlReady($member->user->getFullname()) ?> + </a> + </td> + </tr> + <? endforeach; ?> + </tbody> +</table> diff --git a/app/views/course/timesrooms/_cycleRow.php b/app/views/course/timesrooms/_cycleRow.php index 71a5085..5a5f60b 100644 --- a/app/views/course/timesrooms/_cycleRow.php +++ b/app/views/course/timesrooms/_cycleRow.php @@ -82,8 +82,8 @@ $is_exTermin = $termin instanceof CourseExDate; <?= $room_holiday ?: '' ?> <? endif ?> - <? $room_request_exists = RoomRequest::existsByDate($termin->id, true) ?> - <? if ($room_request_exists): ?> + <? $room_request = RoomRequest::findByDate($termin->id) ?> + <? if ($room_request && $room_request->closed == ResourceRequest::STATE_OPEN): ?> <? $msg_info = _('Für diesen Termin existiert eine Raumanfrage.') ?> <?= tooltipIcon($msg_info) ?> <? endif ?> @@ -123,9 +123,33 @@ $is_exTermin = $termin instanceof CourseExDate; <? $actionMenu->addLink( $controller->url_for('course/timesrooms/editDate/' . $termin->id, $linkAttributes), _('Termin bearbeiten'), - Icon::create('edit', Icon::ROLE_CLICKABLE, ['title' => _('Diesen Termin bearbeiten')]), + Icon::create('edit'), ['data-dialog' => ''] ) ?> + <? $actionMenu + ->conditionAll(Config::get()->RESOURCES_ENABLE && Config::get()->RESOURCES_ALLOW_ROOM_REQUESTS) + ->condition((bool) $room_request) + ->addLink( + $controller->url_for( + 'course/room_requests/request_show_summary', + $room_request + ), + _('Raumanfrage bearbeiten'), + Icon::create('room-occupied'), + ['data-dialog' => 'size=big'] + ) + ->condition(!$room_request) + ->addLink( + $controller->url_for( + 'course/room_requests/new_request', + ['range_str' => 'date', 'range_id' => $termin->id] + ), + _('Neue Raumanfrage'), + Icon::create('room-request'), + ['data-dialog' => 'size=big'] + ) + ->conditionAll(true) + ?> <? $actionMenu->addLink( $controller->url_for( diff --git a/app/views/course/timesrooms/_roomRequest.php b/app/views/course/timesrooms/_roomRequest.php index 989fccb..ffa72b0 100644 --- a/app/views/course/timesrooms/_roomRequest.php +++ b/app/views/course/timesrooms/_roomRequest.php @@ -93,8 +93,7 @@ ), _('Diese Anfrage selbst auflösen'), Icon::create('admin'), - ['title' => _('Diese Anfrage selbst auflösen')], - ['data-dialog' => '1'] + ['title' => _('Diese Anfrage selbst auflösen'), 'data-dialog' => ''] ) ?> <? endif ?> <? $actionMenu->addLink( diff --git a/app/views/course/timesrooms/editDate.php b/app/views/course/timesrooms/editDate.php index c4bd405..3fbae99 100644 --- a/app/views/course/timesrooms/editDate.php +++ b/app/views/course/timesrooms/editDate.php @@ -1,3 +1,18 @@ +<?php +/** + * @var Course_TimesroomsController $controller + * @var CourseDate $date + * @var Room[] $selectable_rooms + * @var QuickSearch|null $room_search + * @var bool $only_bookable_rooms + * @var int $preparation_time + * @var int $max_preparation_time + * @var CourseMember[] $teachers + * @var User[] $assigned_teachers + * @var Statusgruppen[] $groups + * @var Statusgruppen[] $assigned_groups + */ +?> <form action="<?= $controller->link_for('course/timesrooms/saveDate/' . $date->termin_id) ?>" method="post" class="default collapsable" <?= Request::int('fromDialog') ? 'data-dialog="size=big"' : '' ?>> <?= CSRFProtection::tokenTag() ?> @@ -177,7 +192,7 @@ <ul> <? foreach ($assigned_groups as $group) : ?> <li data-selection-id="<?= htmlReady($group->id) ?>"> - <input type="hidden" name="assigned_groups[]" + <input type="hidden" name="assigned-groups[]" value="<?= htmlReady($group->id) ?>"> <span class="studip-selection-label"> @@ -223,21 +238,5 @@ ), ['data-dialog' => 'size=big']) ?> <? endif ?> - <? if (Request::isXhr() && !$locked && Config::get()->RESOURCES_ENABLE && Config::get()->RESOURCES_ALLOW_ROOM_REQUESTS): ?> - <? ?> - <?= Studip\LinkButton::create( - (isset($request_id) ? _('Zur Raumanfrage wechseln') : _('Raumanfrage erstellen')), - ( - isset($request_id) - ? $controller->url_for( - 'course/room_requests/request_show_summary/' . $request_id - ) - : $controller->url_for( - 'course/room_requests/new_request/' . $request_id, - array_merge($params, ['range_str' => 'date', 'range_id' => $date->id]) - ) - ), - ['data-dialog' => 'size=big']) ?> - <? endif ?> </footer> </form> diff --git a/app/views/course/wiki/ask_deleting.php b/app/views/course/wiki/ask_deleting.php new file mode 100644 index 0000000..5afd19f --- /dev/null +++ b/app/views/course/wiki/ask_deleting.php @@ -0,0 +1,31 @@ +<form action="" method="post"> + <?= CSRFProtection::tokenTag() ?> + <div class="file_select_possibilities"> + <div> + <div class="clickable"> + <?= Icon::create('archive2')->asInput(50, [ + 'formaction' => $controller->deleteversionURL($page, ['redirect_to' => 'page']), + 'data-confirm' => _('Wirklich die letzte Änderung löschen?') + ]) ?> + <button + class="undecorated" + data-confirm="<?= _('Wirklich die letzte Änderung löschen?') ?>" + formaction="<?= $controller->deleteversionURL($page, ['redirect_to' => 'page']) ?>"> + <?= _('Nur die letzte Änderung löschen') ?> + </button> + </div> + <div class="clickable"> + <?= Icon::create('wiki')->asInput(50, [ + 'formaction' => $controller->deleteURL($page), + 'data-confirm' => _('Wollen Sie wirklich die komplette Seite löschen?') + ]) ?> + <button + class="undecorated" + data-confirm="<?= _('Wollen Sie wirklich die komplette Seite löschen?') ?>" + formaction="<?= $controller->deleteURL($page) ?>"> + <?= _('Ganze Wikiseite löschen') ?> + </button> + </div> + </div> + </div> +</form> diff --git a/app/views/course/wiki/history.php b/app/views/course/wiki/history.php index 81fde59..cbd324d 100644 --- a/app/views/course/wiki/history.php +++ b/app/views/course/wiki/history.php @@ -45,6 +45,16 @@ <a href="<?= $controller->versiondiff($page) ?>" data-dialog> <?= Icon::create('log')->asImg(['class' => 'text-bottom']) ?> </a> + <? if ($page->isEditable()) : ?> + <form action="<?= $controller->deleteversion($page) ?>" + method="post" + class="inline" + title="<?= _('Version löschen') ?>" + data-confirm="<?= _('Wirklich diese Version löschen?') ?>"> + <?= CSRFProtection::tokenTag() ?> + <?= Icon::create('trash')->asInput() ?> + </form> + <? endif ?> </td> </tr> <? foreach ($page->versions as $i => $version) : ?> @@ -69,6 +79,16 @@ <a href="<?= $controller->versiondiff($page, $version->id) ?>" data-dialog> <?= Icon::create('log')->asImg(['class' => 'text-bottom']) ?> </a> + <? if ($page->isEditable()) : ?> + <form action="<?= $controller->deleteversion($page, $version->id) ?>" + method="post" + class="inline" + title="<?= _('Version löschen') ?>" + data-confirm="<?= _('Wirklich diese Version löschen?') ?>"> + <?= CSRFProtection::tokenTag() ?> + <?= Icon::create('trash')->asInput() ?> + </form> + <? endif ?> </td> </tr> <? endforeach ?> diff --git a/app/views/course/wiki/newpages.php b/app/views/course/wiki/newpages.php index d9e0dce..99e0f29 100644 --- a/app/views/course/wiki/newpages.php +++ b/app/views/course/wiki/newpages.php @@ -55,36 +55,41 @@ <td> <? $authors = [$page->user_id => $page->user]; + $versions = [$page]; $oldcontent = ""; $oldversion = $page; while ($oldversion = $oldversion->predecessor) { if ($oldversion->mkdate >= $last_visit && $oldversion->user_id !== User::findCurrent()->id) { $oldcontent = $oldversion->content; if (!isset($authors[$oldversion->user_id])) { + $versions[] = $oldversion; $authors[$oldversion->user_id] = $oldversion->user; } } else { break; } } + if ($oldversion) { + $oldcontent = $oldversion->content; + } $oldcontent = strip_tags(wikiReady($oldcontent)); $content = strip_tags(wikiReady($page->content)); $commonFromStart = $controller->findLongestCommonSubstring($content, $oldcontent); $commonFromEnd = $controller->findLongestCommonSubstring($content, $oldcontent, true); - $content = mb_substr($content, $commonFromStart, $commonFromEnd); - $oldcontent = mb_substr($oldcontent, $commonFromStart, $commonFromEnd); + $oldcontent = mb_substr($oldcontent, $commonFromStart, mb_strlen($oldcontent) - mb_strlen($content)); + $content = mb_substr($content, $commonFromStart, $commonFromEnd - $commonFromStart); if ($content) { echo htmlReady(mila($content, 300), true, true); } elseif ($oldcontent) { - echo _('Gelöscht') . ': ' . htmlReady($oldcontent, true, true); + echo _('Gelöscht') . ': ' . htmlReady(mila($oldcontent, 300), true, true); } ?> </td> <td> <ul class="wiki_authors"> - <? foreach ($authors as $user) : ?> + <? foreach ($authors as $user_id => $user) : ?> <li> <? if ($user): ?> <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $user->username]) ?>" @@ -95,6 +100,15 @@ <? else: ?> <?= _('unbekannt') ?> <? endif; ?> + <? foreach ($versions as $version) : ?> + <? if ($version->user_id === $user_id) : ?> + <a href="<?= $controller->versiondiff($page, is_a($version, 'WikiVersion') ? $version->id : null) ?>" + title="<?= _('Einzelne Änderung anzeigen') ?>" + data-dialog> + <?= Icon::create('log')->asImg(['class' => 'text-bottom']) ?> + </a> + <? endif ?> + <? endforeach ?> </li> <? endforeach ?> </ul> diff --git a/app/views/course/wiki/search.php b/app/views/course/wiki/search.php index 27811eb..8ef886a 100644 --- a/app/views/course/wiki/search.php +++ b/app/views/course/wiki/search.php @@ -10,7 +10,7 @@ <table class="default"> <caption> - <?= sprintf(_('Treffer für Suche nach <em>%s</em> in allen Versionen'), htmlReady(Request::get('search'))) ?> + <?= sprintf(_('Treffer für Suche nach <em>%s</em>'), htmlReady(Request::get('search'))) ?> </caption> <thead> <tr> @@ -45,6 +45,7 @@ <td> <? $content = Studip\Markup::removeHtml($content); + $ignore_next_hits = 0; $offset = 0; $output = []; @@ -55,7 +56,7 @@ break; } $offset = $pos + 1; - if (($ignore_next_hits--) > 0) { + if ($ignore_next_hits-- > 0) { // if more than one occurence is found // in a fragment to be displayed, // the fragment is only shown once @@ -95,6 +96,20 @@ <? endif ?> </td> </tr> + <? if ($pagedata['is_in_history'] && count($pagedata['versions']) > 1 || ($pagedata['is_in_content'] && count($pagedata['versions']) > 0)) : ?> + <tr> + <td colspan="3"> + <a href="<?= $controller->searchpage($page_id, ['search' => Request::get('search')]) ?>"> + <?= Icon::create('add')->asImg(['class' => 'text-bottom']) ?> + <? if (count($pagedata['versions']) === 1) : ?> + <?= _('Weiterer Treffer in einer älteren Version.') ?> + <? else : ?> + <?= sprintf(_('Weitere Treffer in %d älteren Versionen.'), count($pagedata['versions'])) ?> + <? endif ?> + </a> + </td> + </tr> + <? endif ?> <? endforeach ?> </tbody> </table> diff --git a/app/views/course/wiki/searchpage.php b/app/views/course/wiki/searchpage.php new file mode 100644 index 0000000..95b6ff4 --- /dev/null +++ b/app/views/course/wiki/searchpage.php @@ -0,0 +1,48 @@ +<table class="default"> + <caption> + <?= sprintf(_('Treffer für Suche nach <em>%s</em> auf Seite %s'), htmlReady(Request::get('search')), htmlReady($page->name)) ?> + </caption> + <thead> + <tr> + <th><?= _('Seite') ?></th> + <th><?= _('Treffer') ?></th> + <th><?= _('Datum') ?></th> + </tr> + </thead> + <tbody> + <? $pos_name = mb_stripos($page->name, Request::get('search')) ?> + <? $pos_content = mb_stripos($page->content, Request::get('search')) ?> + <? if ($pos_name !== false || $pos_content !== false) : ?> + <tr> + <td> + <a href="<?= $controller->page($page) ?>"> + <?= htmlReady($page->name) ?> + </a> + </td> + <td> + <?= $controller->findTextualHits($page->content, Request::get('search'), 200) ?> + </td> + <td> + <?= $page->chdate > 0 ? date('d.m.Y H:i:s', $page->chdate) : _('unbekannt') ?> + (<?= _('Version').' '.htmlReady($page->versionnumber) ?>) + </td> + </tr> + <? endif ?> + <? foreach ($versions as $version) : ?> + <tr> + <td> + <a href="<?= $controller->version($version) ?>"> + <?= htmlReady($version->name) ?> + </a> + </td> + <td> + <?= $controller->findTextualHits($version->content, Request::get('search'), 200) ?> + </td> + <td> + <?= $version->mkdate > 0 ? date('d.m.Y H:i:s', $version->mkdate) : _('unbekannt') ?> + (<?= _('Version').' '.htmlReady($version->versionnumber) ?>) + </td> + </tr> + <? endforeach ?> + </tbody> +</table> diff --git a/app/views/course/wizard/steps/basicdata/index.php b/app/views/course/wizard/steps/basicdata/index.php index e1f10a4..f19643a 100644 --- a/app/views/course/wizard/steps/basicdata/index.php +++ b/app/views/course/wizard/steps/basicdata/index.php @@ -123,7 +123,7 @@ </div> </section> -<?php if ($dsearch) : ?> +<?php if (isset($dsearch)) : ?> <section> <label for="deputy_id_3"> <?= _('Vertretungen') ?> diff --git a/app/views/course/wizard/steps/lvgroups/_node.php b/app/views/course/wizard/steps/lvgroups/_node.php index 8b159bd..78db2f1 100644 --- a/app/views/course/wizard/steps/lvgroups/_node.php +++ b/app/views/course/wizard/steps/lvgroups/_node.php @@ -1,4 +1,4 @@ -<? if (!$search_result || in_array($node->id, $search_result)) : ?> +<? if (empty($search_result) || in_array($node->id, $search_result)) : ?> <? $id = $node->id . '-' . $pos_id; ?> <? if (!count($children)) : ?> <li><?= _('Keine Module verfügbar') ?></li> diff --git a/app/views/course/wizard/steps/lvgroups/index.php b/app/views/course/wizard/steps/lvgroups/index.php index 744cc94..0d8e196 100644 --- a/app/views/course/wizard/steps/lvgroups/index.php +++ b/app/views/course/wizard/steps/lvgroups/index.php @@ -17,25 +17,33 @@ </li> </ul> </div> -<? if (!$values['locked']) : ?> +<? if (empty($values['locked'])) : ?> - <div id="lvgroup-tree-open-nodes"> - <? foreach ($open_lvg_nodes as $opennode) : ?> - <input type="hidden" name="open_lvg_nodes[]" value="<?= $opennode; ?>"> - <? endforeach; ?> - </div> + <div id="lvgroup-tree-open-nodes"> + <? foreach ($open_lvg_nodes as $opennode) : ?> + <input type="hidden" name="open_lvg_nodes[]" value="<?= $opennode; ?>"> + <? endforeach; ?> + </div> <div id="studyareas" data-ajax-url="<?= $ajax_url ?>" data-forward-url="<?= $no_js_url ?>" data-no-search-result="<?=_('Es wurde kein Suchergebnis gefunden.') ?>"> <h2><?= _('Lehrveranstaltungsgruppen Suche') ?></h2> <div> <input type="text" size="40" style="width: auto;" name="search" id="lvgroup-tree-search" - value="<?= $values['searchterm'] ?>"> + value="<?= htmlReady($values['searchterm'] ?? '') ?>"> <span id="lvgroup-tree-search-start"> - <?= Icon::create('search', 'clickable')->asInput(["name" => 'start_search', "onclick" => "return STUDIP.MVV.CourseWizard.searchTree()", "class" => $search_result?'hidden-no-js':'']) ?> + <?= Icon::create('search')->asInput([ + 'name' => 'start_search', + 'onclick' => 'return STUDIP.MVV.CourseWizard.searchTree()', + 'class' => !empty($search_result) ? 'hidden-no-js' : '', + ]) ?> </span> <span id="lvgroup-tree-search-reset" class="hidden-js"> - <?= Icon::create('refresh', 'clickable')->asInput(["name" => 'reset_search', "onclick" => "return STUDIP.MVV.CourseWizard.resetSearch()", "class" => $search_result?'':' hidden-no-js']) ?> + <?= Icon::create('refresh')->asInput([ + 'name' => 'reset_search', + 'onclick' => 'return STUDIP.MVV.CourseWizard.resetSearch()', + 'class' => !empty($search_result) ? '' : ' hidden-no-js', + ]) ?> </span> </div> @@ -56,23 +64,25 @@ <? $pos_id = 1; ?> <? foreach ((array) $tree as $node) : ?> <? $children = $node->getChildren() ?> - <? if (count($children)) : ?> - <?= $this->render_partial('lvgroups/_node', - ['node' => $node, 'pos_id' => $pos_id++, - 'open_nodes' => $open_lvg_nodes ?: [], - 'search_result' => $search_result ?: [], - 'children' => $node->getChildren()]) ?> + <? if (count($children) > 0) : ?> + <?= $this->render_partial('lvgroups/_node', [ + 'node' => $node, + 'pos_id' => $pos_id++, + 'open_nodes' => $open_lvg_nodes ?: [], + 'search_result' => $search_result ?? [], + 'children' => $node->getChildren(), + ]) ?> <? endif ?> <? endforeach; ?> </ul> </li> </ul> </div> - <? if ($values['open_lvg_nodes']) : ?> + <? if (!empty($values['open_lvg_nodes'])) : ?> <input type="hidden" name="open_nodes" value="<?= json_encode($values['open_lvg_nodes']) ?>"/> <? endif; ?> - <? if ($values['searchterm']) : ?> - <input type="hidden" name="searchterm" value="<?= $values['searchterm'] ?>"/> + <? if (!empty($values['searchterm'])) : ?> + <input type="hidden" name="searchterm" value="<?= htmlReady($values['searchterm']) ?>"> <? endif; ?> <script> //<!-- diff --git a/app/views/course/wizard/steps/lvgroups/lvgroup_entry.php b/app/views/course/wizard/steps/lvgroups/lvgroup_entry.php index 09d2405..a7e2cd0 100644 --- a/app/views/course/wizard/steps/lvgroups/lvgroup_entry.php +++ b/app/views/course/wizard/steps/lvgroups/lvgroup_entry.php @@ -2,7 +2,7 @@ # Lifter010: TODO $_id = htmlReady(implode('_', (array) $area->getId())); ?> -<li id="lvgroup-tree-assigned-<?= $_id ?>" class="<?= TextHelper::cycle('odd', 'even') ?>"> +<li id="lvgroup-tree-assigned-<?= $_id ?>"> <? if (!$locked) : ?> <?= Icon::create('trash', 'clickable')->asInput(["name" => 'lvgruppe_selection[remove]['.$_id.']', "onclick" => "return STUDIP.MVV.CourseWizard.removeLVGroup('".$_id."')", "class" => '', "data-id" => $_id, "data-course_id" => htmlReady($course_id)]) ?> diff --git a/app/views/course/wizard/steps/lvgroups/lvgroup_searchentry.php b/app/views/course/wizard/steps/lvgroups/lvgroup_searchentry.php index a6715da..7c51448 100644 --- a/app/views/course/wizard/steps/lvgroups/lvgroup_searchentry.php +++ b/app/views/course/wizard/steps/lvgroups/lvgroup_searchentry.php @@ -1,7 +1,7 @@ <?php $_id = htmlReady(implode('_', (array) $area->getId())); ?> -<li id="lvgruppe_search_<?= $_id ?>" class="<?= TextHelper::cycle('odd', 'even') ?>"> +<li id="lvgruppe_search_<?= $_id ?>"> <?= Icon::create('arr_2left', Icon::ROLE_SORT)->asInput([ 'name' => "assign[{$_id}]", diff --git a/app/views/course/wizard/steps/studyareas/_assigned_node.php b/app/views/course/wizard/steps/studyareas/_assigned_node.php index 459cddd..9525fc8 100644 --- a/app/views/course/wizard/steps/studyareas/_assigned_node.php +++ b/app/views/course/wizard/steps/studyareas/_assigned_node.php @@ -1,12 +1,12 @@ <li class="sem-tree-assigned-<?= $element['id'] ?>"> <?= htmlReady($element['name']) ?> - <?php if (!$values['locked'] && $element['assignable'] && in_array($element['id'], $studyareas ?: [])) : ?> - <?= Icon::create('trash', 'clickable')->asInput(["name" => 'unassign['.$element['id'].']', "onclick" => "return STUDIP.CourseWizard.unassignNode('".$element['id']."')"]) ?> - <input type="hidden" name="studyareas[]" value="<?= $element['id'] ?>"/> + <?php if (empty($values['locked']) && $element['assignable'] && in_array($element['id'], $studyareas ?: [])) : ?> + <?= Icon::create('trash')->asInput(["name" => 'unassign['.$element['id'].']', "onclick" => "return STUDIP.CourseWizard.unassignNode('".$element['id']."')"]) ?> + <input type="hidden" name="studyareas[]" value="<?= htmlReady($element['id']) ?>"/> <?php endif ?> <ul> <?php foreach ($element['children'] as $c) : ?> <?= $this->render_partial('studyareas/_assigned_node', ['element' => $c]) ?> <?php endforeach ?> </ul> -</li>
\ No newline at end of file +</li> diff --git a/app/views/course/wizard/summary.php b/app/views/course/wizard/summary.php index 5217bac..ec5a646 100644 --- a/app/views/course/wizard/summary.php +++ b/app/views/course/wizard/summary.php @@ -1,4 +1,13 @@ -<form class="default" action="<?= $controller->url_for('course/wizard/process', $stepnumber, $temp_id) ?>" method="post"> +<?php +/** + * @var Course_WikiController $controller + * @var int $stepnumber + * @var string $temp_id + * @var bool $dialog + * @var Course|null $source_course + */ +?> +<form class="default" action="<?= $controller->link_for('course/wizard/process', $stepnumber, $temp_id) ?>" method="post"> <fieldset> <legend><?= _('Anlegen der Veranstaltung') ?></legend> diff --git a/app/views/evaluation/_actions.php b/app/views/evaluation/_actions.php deleted file mode 100644 index e702ff2..0000000 --- a/app/views/evaluation/_actions.php +++ /dev/null @@ -1,4 +0,0 @@ -<?= Icon::create('pause', 'clickable')->asImg() ?> -<?= Icon::create('decline', 'clickable')->asImg() ?> -<?= Icon::create('admin', 'clickable')->asImg() ?> -<?= Icon::create('trash', 'clickable')->asImg() ?> diff --git a/app/views/evaluation/_admin_list_vote.php b/app/views/evaluation/_admin_list_vote.php deleted file mode 100644 index a98335b..0000000 --- a/app/views/evaluation/_admin_list_vote.php +++ /dev/null @@ -1,27 +0,0 @@ -<? foreach ($votes as $vote): ?> - <tr> - <td> - <?= htmlReady($vote->title) ?> - </td> - <td> - <?= ObjectdisplayHelper::link($vote->author) ?> - </td> - <td> - <?= strftime("%d.%m.%Y %T", $vote->startdate) ?> - </td> - <td> - <? if ($vote->stopdate): ?> - <?= strftime("%d.%m.%Y %T", $vote->stopdate) ?> - <? else: ?> - <? if ($vote->timespan): ?> - <?= strftime("%d.%m.%Y %T", $vote->startdate + $vote->timespan) ?> - <? else: ?> - <?= _('Unbegrenzt') ?> - <? endif; ?> - <? endif; ?> - </td> - <td class="actions"> - <?= $this->render_partial("vote/_actions.php", ['vote' => $vote]) ?> - </td> - </tr> -<? endforeach; ?>
\ No newline at end of file diff --git a/app/views/evaluation/_buttons.php b/app/views/evaluation/_buttons.php deleted file mode 100644 index b5a3b33..0000000 --- a/app/views/evaluation/_buttons.php +++ /dev/null @@ -1,22 +0,0 @@ -<? if (!$controller->showResult($vote)): ?> - <? if ($vote->isRunning() && !$nobody) : ?> - <?= Studip\Button::create(_('Abstimmen'), 'vote', ['value' => $vote->id]) ?> - <? endif ?> - <?= Studip\LinkButton::create(_('Ergebnisse'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id])) ?> -<? else: ?> - <?= Studip\LinkButton::create(_('Ergebnisse ausblenden'), ContentBoxHelper::href($vote->id, ['preview' => 0])) ?> - <?= Request::get('sort') - ? Studip\LinkButton::create(_('Nicht sortieren'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id, 'sort' => 0])) - : Studip\LinkButton::create(_('Sortieren'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id, 'sort' => 1])) - ?> - <? if ($vote->changeable && $vote->state == 'active' && !$nobody): ?> - <?= Studip\LinkButton::create(_('Antwort ändern'), ContentBoxHelper::href($vote->id, ['change' => 1])) ?> - <? endif; ?> - <? if (!$vote->anonymous && ($admin || $vote->namesvisibility)): ?> - <? if (Request::get('revealNames') === $vote->id) : ?> - <?= Studip\LinkButton::create(_('Namen ausblenden'), ContentBoxHelper::href($vote->id, ['revealNames' => null])) ?> - <? else : ?> - <?= Studip\LinkButton::create(_('Namen zeigen'), ContentBoxHelper::href($vote->id, ['revealNames' => $vote->id])); ?> - <? endif; ?> - <? endif; ?> -<? endif; ?>
\ No newline at end of file diff --git a/app/views/evaluation/_evaluation.php b/app/views/evaluation/_evaluation.php deleted file mode 100644 index 82c6fd1..0000000 --- a/app/views/evaluation/_evaluation.php +++ /dev/null @@ -1,57 +0,0 @@ -<? $is_new = ($evaluation->chdate >= object_get_visit($evaluation->id, 'eval', false, false)) && ($evaluation->author_id != $GLOBALS['user']->id); -?> -<article class="studip toggle <?=($is_new ? 'new' : '')?>" id="<?= $evaluation->id ?>" data-visiturl="<?=URLHelper::getScriptLink('dispatch.php/vote/visit')?>"> - <header> - <h1> - <a href="<?= ContentBoxHelper::switchhref($evaluation->id, ['contentbox_type' => 'eval']) ?>"> - <?= htmlReady($evaluation->title) ?> - </a> - </h1> - <nav> - <a href="<?= $evaluation->author ? URLHelper::getLink('dispatch.php/profile', ['username' => $evaluation->author->username]) : '' ?>"> - <?= $evaluation->author ? htmlReady($evaluation->author->getFullName()) : '' ?> - </a> | - <?= strftime("%d.%m.%Y", $evaluation->mkdate) ?> - <? if ($admin): ?> - <a title="<?= _("Evaluation bearbeiten") ?>" href="<?= URLHelper::getLink('admin_evaluation.php', ['openID' => $evaluation->id, 'rangeID' => $range_id]) ?>"> - <?= Icon::create('admin', 'clickable')->asImg() ?> - </a> - <? if (!$evaluation->enddate || $evaluation->enddate > time()): ?> - <a title="<?= _("Evaluation stoppen") ?>" href="<?= URLHelper::getLink('admin_evaluation.php', ['evalID' => $evaluation->id, 'evalAction' => 'stop']) ?>"> - <?= Icon::create('pause', 'clickable')->asImg() ?> - </a> - <? else: ?> - <a title="<?= _("Evaluation fortsetzen") ?>" href="<?= URLHelper::getLink('admin_evaluation.php', ['evalID' => $evaluation->id, 'evalAction' => 'continue']) ?>"> - <?= Icon::create('play', 'clickable')->asImg() ?> - </a> - <? endif; ?> - <a title="<?= _("Evaluation löschen") ?>" href="<?= URLHelper::getLink('admin_evaluation.php', ['evalID' => $evaluation->id, 'evalAction' => 'delete_request']) ?>"> - <?= Icon::create('trash', 'clickable')->asImg() ?> - </a> - <a title="<?= _("Evaluation exportieren") ?>" href="<?= URLHelper::getLink('admin_evaluation.php', ['evalID' => $evaluation->id, 'evalAction' => 'export_request']) ?>"> - <?= Icon::create('export', 'clickable')->asImg() ?> - </a> - <a title="<?= _("Evaluation auswerten") ?>" href="<?= URLHelper::getLink('eval_summary.php', ['eval_id' => $evaluation->id]) ?>"> - <?= Icon::create('vote', 'clickable')->asImg() ?> - </a> - <? endif; ?> - </nav> - </header> - <section> - <?= formatReady($evaluation->text); ?> - </section> - <section> - <?= \Studip\LinkButton::create(_('Anzeigen'), URLHelper::getURL('show_evaluation.php', ['evalID' => $evaluation->id]), ['data-dialog' => '', 'target' => '_blank']) ?> - </section> - <footer> - <p> - <?= _('Teilnehmende') ?>: <?= $evaluation->getNumberOfVotes() ?> - </p> - <p> - <?= _('Anonym') ?>: <?= $evaluation->anonymous ? _('Ja') : _('Nein') ?> - </p> - <p> - <?= _('Endzeitpunkt') ?>: <?= $evaluation->enddate ? strftime('%d.%m.%y, %H:%M', $evaluation->enddate) : _('Unbekannt') ?> - </p> - </footer> -</article> diff --git a/app/views/evaluation/display.php b/app/views/evaluation/display.php deleted file mode 100644 index 35d3178..0000000 --- a/app/views/evaluation/display.php +++ /dev/null @@ -1,27 +0,0 @@ -<? if ($admin || $evaluations): ?> -<article class="studip"> - <header> - <h1> - <?= Icon::create('vote', 'info')->asImg(); ?> - <?= _('Evaluationen') ?> - </h1> - <nav> - <? if ($admin): ?> - <a href="<?= URLHelper::getLink('admin_evaluation.php', ['rangeID' => $range_id]) ?>"> - <?= Icon::create('edit', 'clickable')->asImg(); ?> - </a> - <? endif; ?> - </nav> - </header> - - <? if (!$evaluations): ?> - <section> - <?= _('Keine Evaluationen vorhanden. Um neue Umfragen zu erstellen, klicken Sie rechts auf das Bearbeiten-Zeichen.') ?> - </section> - <? else: ?> - <? foreach ($evaluations as $evaluation): ?> - <?= $this->render_partial('evaluation/_evaluation.php', ['evaluation' => $evaluation]); ?> - <? endforeach; ?> - <? endif; ?> -</article> -<? endif; ?> diff --git a/app/views/fachabschluss/abschluesse/index.php b/app/views/fachabschluss/abschluesse/index.php index 6750a76..d650717 100644 --- a/app/views/fachabschluss/abschluesse/index.php +++ b/app/views/fachabschluss/abschluesse/index.php @@ -14,7 +14,7 @@ </tr> </thead> <? foreach ($abschluesse as $abschluss) : ?> - <tbody class="<?= $abschluss->count_faecher ? '' : 'empty' ?> <?= ($abschluss_id ? 'not-collapsed' : 'collapsed') ?>"> + <tbody class="<?= $abschluss->count_faecher ? '' : 'empty' ?> <?= !empty($abschluss_id) ? 'not-collapsed' : 'collapsed' ?>"> <tr class="header-row"> <td class="toggle-indicator"> <? if ($abschluss->count_faecher) : ?> @@ -62,7 +62,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_abschluesse=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> diff --git a/app/views/fachabschluss/faecher/fachbereiche.php b/app/views/fachabschluss/faecher/fachbereiche.php index 5a4f6f1..844440c 100644 --- a/app/views/fachabschluss/faecher/fachbereiche.php +++ b/app/views/fachabschluss/faecher/fachbereiche.php @@ -10,7 +10,7 @@ </thead> <? foreach ($fachbereiche as $fachbereich): ?> <? if ($fachbereich['faecher']) : ?> - <tbody class="<?= ($fachbereich_id === $fachbereich['institut_id'] ? 'not-collapsed' : 'collapsed') ?>"> + <tbody class="<?= isset($fachbereich_id) && $fachbereich_id === $fachbereich['institut_id'] ? 'not-collapsed' : 'collapsed' ?>"> <tr class="header-row"> <td class="toggle-indicator"> <a class="mvv-load-in-new-row" @@ -18,7 +18,7 @@ </td> <td style="text-align: center;" class="dont-hide"><?= htmlReady($fachbereich['faecher']) ?> </td> </tr> - <? if ($fachbereich_id === $fachbereich['institut_id']) : ?> + <? if (isset($fachbereich_id) && $fachbereich_id === $fachbereich['institut_id']): ?> <tr class="loaded-details nohover"> <?= $this->render_partial('fachabschluss/faecher/details_fachbereich', compact('fach')) ?> </tr> diff --git a/app/views/fachabschluss/faecher/index.php b/app/views/fachabschluss/faecher/index.php index 352dcb7..dcd9134 100644 --- a/app/views/fachabschluss/faecher/index.php +++ b/app/views/fachabschluss/faecher/index.php @@ -63,7 +63,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_faecher=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> diff --git a/app/views/file/_terms_of_use_select.php b/app/views/file/_terms_of_use_select.php index 59cb507..c1aae00 100644 --- a/app/views/file/_terms_of_use_select.php +++ b/app/views/file/_terms_of_use_select.php @@ -24,20 +24,20 @@ if (!$selected_terms_of_use_id) { aria-description="<?= htmlReady(kill_format($content_terms_of_use_entry->description)) ?>"> <label for="content_terms_of_use-<?= htmlReady($content_terms_of_use_entry->id) ?>"> - <div class="icon"> - <? if ($content_terms_of_use_entry['icon']) : ?> - <? if (filter_var($content_terms_of_use_entry['icon'], FILTER_VALIDATE_URL)): ?> - <img src="<?= htmlReady($content_terms_of_use_entry['icon']) ?>" width="32" height="32"> - <? else : ?> - <?= Icon::create($content_terms_of_use_entry['icon'], Icon::ROLE_CLICKABLE)->asImg(32) ?> - <? endif ?> - <? endif ?> - </div> + <?= Icon::create('radiobutton-unchecked')->asImg(24, ['class' => 'arrow']) ?> + <?= Icon::create('radiobutton-checked')->asImg(24, ['class' => 'check']) ?> <div class="text"> <?= htmlReady($content_terms_of_use_entry->name) ?> </div> - <?= Icon::create('arr_1down', Icon::ROLE_CLICKABLE)->asImg(24, ['class' => 'arrow']) ?> - <?= Icon::create('check-circle', Icon::ROLE_CLICKABLE)->asImg(32, ['class' => 'check']) ?> + <div class="icon"> + <? if ($content_terms_of_use_entry['icon']) : ?> + <? if (filter_var($content_terms_of_use_entry['icon'], FILTER_VALIDATE_URL)): ?> + <img src="<?= htmlReady($content_terms_of_use_entry['icon']) ?>" width="32" height="32"> + <? else : ?> + <?= Icon::create($content_terms_of_use_entry['icon'], Icon::ROLE_CLICKABLE)->asImg(32) ?> + <? endif ?> + <? endif ?> + </div> </label> <? if (trim($content_terms_of_use_entry->description)): ?> diff --git a/app/views/file/add_files_window.php b/app/views/file/add_files_window.php index 53a7b73..8b963e7 100644 --- a/app/views/file/add_files_window.php +++ b/app/views/file/add_files_window.php @@ -38,7 +38,7 @@ if ($folder_id) { <?= Icon::create('computer')->asImg(50) ?> <?= _('Mein Computer') ?> </a> - <a href="<?= $controller->link_for('file/add_url/' . $folder_id, array_merge($options, ['from_plugin' => ""])) ?>" data-dialog> + <a href="<?= $controller->link_for('file/add_url/' . $folder_id, array_merge($options, ['from_plugin' => ""])) ?>" data-dialog="size=medium"> <?= Icon::create('globe')->asImg(50) ?> <?= _('Webadresse') ?> </a> @@ -69,7 +69,7 @@ if ($folder_id) { <?= _('OER Campus') ?> </a> <? endif ?> - <? foreach (PluginManager::getInstance()->getPlugins('FilesystemPlugin') as $plugin) : ?> + <? foreach (PluginManager::getInstance()->getPlugins(FilesystemPlugin::class) as $plugin) : ?> <? if ($plugin->isSource()) : ?> <? $nav = $plugin->getFileSelectNavigation() ?> <? if ($nav): ?> diff --git a/app/views/file/add_url.php b/app/views/file/add_url.php index 1b7196b..8a172c9 100644 --- a/app/views/file/add_url.php +++ b/app/views/file/add_url.php @@ -13,25 +13,25 @@ value="<?= htmlReady(Request::get('name')) ?>"> </label> - <label> - <?= _('Zugriffsart') ?> - </label> + </fieldset> + <fieldset> + <legend><?= _('Zugriffsart') ?></legend> <label> <input type="radio" name="access_type" value="redirect" - <? if (Request::option('access_type') !== 'proxy') echo 'checked'; ?>> + <? if (Request::option('access_type') !== 'proxy') echo 'checked'; ?>> <?= _('Direktlink')?> </label> <label> <input type="radio" name="access_type" value="proxy" - <? if (Request::option('access_type') === 'proxy') echo 'checked'; ?>> + <? if (Request::option('access_type') === 'proxy') echo 'checked'; ?>> <?= _('Link über Proxy')?> </label> - <?= $this->render_partial('file/_terms_of_use_select.php', [ - 'content_terms_of_use_entries' => $content_terms_of_use_entries, - 'selected_terms_of_use_id' => $content_terms_of_use_id, - ]) ?> - </fieldset> + </fieldset> + <?= $this->render_partial('file/_terms_of_use_select.php', [ + 'content_terms_of_use_entries' => $content_terms_of_use_entries, + 'selected_terms_of_use_id' => $content_terms_of_use_id, + ]) ?> <footer data-dialog-button> <?= Studip\Button::createAccept(_('Speichern'), 'store') ?> <?= Studip\LinkButton::createCancel( diff --git a/app/views/file/choose_destination.php b/app/views/file/choose_destination.php index 49afe87..c71f072 100644 --- a/app/views/file/choose_destination.php +++ b/app/views/file/choose_destination.php @@ -33,7 +33,7 @@ $options = array_filter([ <?= Icon::create('folder-parent', Icon::ROLE_CLICKABLE)->asInput(50, ['formaction' => $controller->action_url('choose_folder/' . $parent_folder->getId()), 'to_plugin' => $options['from_plugin'] ?? null]) ?> <button class="undecorated" - formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if ($options['from_plugin']): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin'] ?? null) ?>"<? endif; ?> + formaction="<?= $controller->action_link('choose_folder/' . $parent_folder->getId()) ?>" <? if (!empty($options['from_plugin'])): ?> name="to_plugin" value="<?= htmlReady($options['from_plugin']) ?>"<? endif; ?> data-dialog="size=medium"> <?= _('Aktueller Ordner') ?> </button> @@ -64,7 +64,7 @@ $options = array_filter([ </button> </div> - <? foreach (PluginManager::getInstance()->getPlugins('FilesystemPlugin') as $plugin) : ?> + <? foreach (PluginManager::getInstance()->getPlugins(FilesystemPlugin::class) as $plugin) : ?> <? if ($plugin->isPersonalFileArea()) : ?> <? $nav = $plugin->getFileSelectNavigation() ?> <? if ($nav) : ?> diff --git a/app/views/file/file_details.php b/app/views/file/file_details.php index 76f996a..ddbd7e4 100644 --- a/app/views/file/file_details.php +++ b/app/views/file/file_details.php @@ -1,21 +1,21 @@ <?php /** - * @var Flexi_Template $this - * @var FileController $controller - * @var Flexi_Template|null $file_info_template - * @var array $fullpath - * @var FileType $file - * @var string|null $previous_file_ref_id - * @var string|null $next_file_ref_id - * @var string|null $from_plugin - * @var bool $include_navigation + * @var Flexi\Template $this + * @var FileController $controller + * @var Flexi\Template|null $file_info_template + * @var array $fullpath + * @var FileType $file + * @var string|null $previous_file_ref_id + * @var string|null $next_file_ref_id + * @var string|null $from_plugin + * @var bool $include_navigation */ ?> <div id="file_details_window"> <?= $this->render_partial('file/_file_aside.php') ?> <div id="preview_container"> - <? if ($file_info_template instanceof Flexi_Template) : ?> + <? if ($file_info_template instanceof Flexi\Template) : ?> <?= $file_info_template->render() ?> <? endif ?> <h3><?=_('Pfad')?></h3> diff --git a/app/views/file/folder_details.php b/app/views/file/folder_details.php index 5bd6574..7d1fe04 100644 --- a/app/views/file/folder_details.php +++ b/app/views/file/folder_details.php @@ -10,7 +10,7 @@ $folder_template = $folder->getDescriptionTemplate(); <? if (!empty($folder_template)) : ?> <h3><?= _('Beschreibung') ?></h3> <article> - <? if ($folder_template instanceof Flexi_Template): ?> + <? if ($folder_template instanceof Flexi\Template): ?> <?= $folder_template->render() ?> <? else: ?> <?= $folder_template ?> diff --git a/app/views/file/new_edit_folder_form.php b/app/views/file/new_edit_folder_form.php index c1301d4..32b9800 100644 --- a/app/views/file/new_edit_folder_form.php +++ b/app/views/file/new_edit_folder_form.php @@ -27,20 +27,19 @@ id="folder-type-<?= htmlReady($folder_type['class']) ?>" <? if ($folder_type['class'] === get_class($folder)) echo 'checked'; ?>> <label for="folder-type-<?= htmlReady($folder_type['class']) ?>"> + <?= Icon::create('radiobutton-unchecked')->asImg(24, ['class' => 'arrow']) ?> + <?= Icon::create('radiobutton-checked')->asImg(24, ['class' => 'check']) ?> + <div class="text"> + <?= htmlReady($folder_type['name']) ?> + <? if ($template = $folder_type['instance']->getDescriptionTemplate()): ?> + <?= tooltipIcon($template instanceof Flexi\Template ? $template->render() : $template, false, true) ?> + <? endif ?> + </div> <div class="icon"> <? if ($folder_type['icon']) : ?> <?= $folder_type['icon']->asImg(32) ?> <? endif ?> </div> - <div class="text"> - <?= htmlReady($folder_type['name']) ?> - <? if ($template = $folder_type['instance']->getDescriptionTemplate()): ?> - <?= tooltipIcon($template instanceof Flexi_Template ? $template->render() : $template, false, true) ?> - <? endif; ?> - - </div> - <?= Icon::create('arr_1down')->asImg(24, ['class' => 'arrow']) ?> - <?= Icon::create('check-circle')->asImg(32, ['class' => 'check']) ?> </label> <? if ($folder_type['class'] === get_class($folder)) : ?> <? $folder_template = $folder->getEditTemplate() ?> diff --git a/app/views/files/_fileref_tr.php b/app/views/files/_fileref_tr.php index f282f79..fc486ae 100644 --- a/app/views/files/_fileref_tr.php +++ b/app/views/files/_fileref_tr.php @@ -75,7 +75,7 @@ if ($file->isDownloadable($GLOBALS['user']->id)) { data-sort-value="<?= htmlReady($file->getAdditionalColumnOrderWeigh($index)) ?>"> <? $content = $file->getContentForAdditionalColumn($index) ?> <? if ($content) : ?> - <?= is_a($content, "Flexi_Template") ? $content->render() : $content ?> + <?= $content instanceof Flexi\Template ? $content->render() : $content ?> <? endif ?> </td> <? endforeach ?> diff --git a/app/views/files/_folder_tr.php b/app/views/files/_folder_tr.php index 09cd295..c3f77f6 100644 --- a/app/views/files/_folder_tr.php +++ b/app/views/files/_folder_tr.php @@ -61,7 +61,7 @@ if ($folder->isReadable($GLOBALS['user']->id)) { data-sort-value="<?= htmlReady($folder->getAdditionalColumnOrderWeigh($index)) ?>"> <? $content = $folder->getContentForAdditionalColumn($index) ?> <? if ($content) : ?> - <?= is_a($content, "Flexi_Template") ? $content->render() : $content ?> + <?= $content instanceof Flexi\Template ? $content->render() : $content ?> <? endif ?> </td> <? endforeach ?> diff --git a/app/views/files/flat.php b/app/views/files/flat.php index a7d0c93..1440117 100644 --- a/app/views/files/flat.php +++ b/app/views/files/flat.php @@ -13,7 +13,7 @@ $vue_topFolder = [ 'description' => $topFolder->getDescriptionTemplate(), 'additionalColumns' => $topFolder->getAdditionalColumns(), ]; -if (is_a($vue_topFolder['description'], "Flexi_Template")) { +if ($vue_topFolder['description'] instanceof Flexi\Template) { $vue_topFolder['description'] = $vue_topFolder['description']->render(); } $vue_topFolder['buttons'] = '<span class="multibuttons">'; diff --git a/app/views/files/index.php b/app/views/files/index.php index 94ae3f4..6bf28f7 100644 --- a/app/views/files/index.php +++ b/app/views/files/index.php @@ -23,7 +23,7 @@ 'additionalColumns' => $topFolder->getAdditionalColumns(), 'buttons' => null ]; - if (is_a($vue_topFolder['description'], "Flexi_Template")) { + if ($vue_topFolder['description'] instanceof Flexi\Template) { $vue_topFolder['description'] = $vue_topFolder['description']->render(); } $vue_files = []; diff --git a/app/views/institute/extern/extern_config/persondetails.php b/app/views/institute/extern/extern_config/persondetails.php index 311551d..897703d 100644 --- a/app/views/institute/extern/extern_config/persondetails.php +++ b/app/views/institute/extern/extern_config/persondetails.php @@ -85,7 +85,7 @@ <select class="nested-select" name="semclass[]" multiple> <? foreach ($GLOBALS['SEM_CLASS'] as $key => $sem_class) : ?> <? if ($sem_class['show_browse']) : ?> - <option value="<?= $key ?>"<?= in_array($key, $page->semclass) ? ' selected' : '' ?>> + <option value="<?= $key ?>"<?= in_array($key, $page->semclass ?? []) ? ' selected' : '' ?>> <?= htmlReady($sem_class['name']) ?> </option> <? endif ?> diff --git a/app/views/institute/extern/index.php b/app/views/institute/extern/index.php index 2fdf31e..a93d969 100644 --- a/app/views/institute/extern/index.php +++ b/app/views/institute/extern/index.php @@ -22,7 +22,7 @@ else : ?> </h1> </header> <? foreach ($config_types as $type_id => $config_type): ?> - <? if ($configs[$type_id]) : ?> + <? if (!empty($configs[$type_id])) : ?> <article id="<?= $type_id ?>" <? if (Request::option('open_type') === $type_id) echo 'class="open"'; ?>> <header> <h1> diff --git a/app/views/institute/extern/upload.php b/app/views/institute/extern/upload.php index 92b2894..675f31a 100644 --- a/app/views/institute/extern/upload.php +++ b/app/views/institute/extern/upload.php @@ -16,7 +16,7 @@ <div style="font-size: smaller;"> (<?= _('Ohne Angabe wird der Name aus den importierten Daten genommen.') ?>) </div> - <input type="text" name="config_name" value="<?= htmlReady($config_name) ?>"> + <input type="text" name="config_name" value="<?= htmlReady($config_name ?? '') ?>"> </label> <label> <?= _('Konfigurationsdatei') ?> diff --git a/app/views/institute/overview/index.php b/app/views/institute/overview/index.php index cb347b0..53b66a8 100644 --- a/app/views/institute/overview/index.php +++ b/app/views/institute/overview/index.php @@ -50,19 +50,18 @@ </article> <?= $news ?> -<?= $evaluations ?> <?= $questionnaires ?> <? // display plugins -$plugins = PluginEngine::getPlugins('StandardPlugin', $institute_id); +$plugins = PluginEngine::getPlugins(StandardPlugin::class, $institute_id); $layout = $GLOBALS['template_factory']->open('shared/index_box'); foreach ($plugins as $plugin) { $template = $plugin->getInfoTemplate($institute_id); if ($template) { - echo $template->render(NULL, $layout); + echo $template->render(layout: $layout); $layout->clear_attributes(); } } diff --git a/app/views/lvgruppen/lvgruppen/details.php b/app/views/lvgruppen/lvgruppen/details.php index 073d552..6a9c3af 100644 --- a/app/views/lvgruppen/lvgruppen/details.php +++ b/app/views/lvgruppen/lvgruppen/details.php @@ -92,7 +92,7 @@ <? else : ?> <ul style="list-style-type:none;" id="mvv-lvgruppen-semester"> <? foreach ($display_semesters as $semester) : ?> - <? if ($courses[$semester->id]) : ?> + <? if (!empty($courses[$semester->id])) : ?> <li> <strong><?= htmlReady($semester->name) ?></strong> <ul style="list-style-type:none;"> diff --git a/app/views/lvgruppen/lvgruppen/index.php b/app/views/lvgruppen/lvgruppen/index.php index d5ab6a8..2ce6014 100644 --- a/app/views/lvgruppen/lvgruppen/index.php +++ b/app/views/lvgruppen/lvgruppen/index.php @@ -91,7 +91,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_lvgruppen=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render("shared/pagechooser"); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/materialien/files/add_dokument.php b/app/views/materialien/files/add_dokument.php index e53d917..db6c7c6 100644 --- a/app/views/materialien/files/add_dokument.php +++ b/app/views/materialien/files/add_dokument.php @@ -1,21 +1,21 @@ -<form class="default" action="<?= $controller->action_link('add_dokument', $origin, $range_type, $range_id, $mvvfile_id) ?>" method="post" data-dialog="size=auto"> - <input type="hidden" name="mvvfile_id" id="mvvfile_id" value="<?= htmlReady($mvvfile_id) ?>"> - <input type="hidden" name="range_id" id="range_id" value="<?= htmlReady($range_id) ?>"> - <input type="hidden" name="range_type" id="range_type" value="<?= htmlReady($range_type) ?>"> - - +<form class="default" action="<?= $controller->action_link('add_dokument', $origin ?? null, $range_type ?? null, $range_id ?? null, $mvvfile_id ?? null) ?>" method="post" data-dialog="size=auto"> + <input type="hidden" name="mvvfile_id" id="mvvfile_id" value="<?= htmlReady($mvvfile_id ?? '') ?>"> + <input type="hidden" name="range_id" id="range_id" value="<?= htmlReady($range_id ?? null) ?>"> + <input type="hidden" name="range_type" id="range_type" value="<?= htmlReady($range_type ?? null) ?>"> <label> <?= _('Jahr') ?> - <input name="doc_year" type="text" value="<?= htmlReady($doc_year) ?>"<?= $perm->disable('year') ?>> + <input name="doc_year" type="text" value="<?= htmlReady($doc_year ?? '') ?>"<?= $perm->disable('year') ?>> </label> - <input type="hidden" name="doc_type" value="<?= $doc_type ?>"> + <input type="hidden" name="doc_type" value="<?= htmlReady($doc_type ?? '') ?>"> <label> <?= _('Art der Datei') ?> <select name="doc_type"<?= $perm->haveFieldPerm('type') ? '' : ' disable' ?>> <? foreach ($GLOBALS['MVV_DOCUMENTS']['TYPE']['values'] as $key => $entry) : ?> - <option value="<?= $key ?>"<?= $key == $doc_type ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option> + <option value="<?= htmlReady($key) ?>"<?= isset($doc_type) && $key == $doc_type ? ' selected' : '' ?>> + <?= htmlReady($entry['name']) ?> + </option> <? endforeach; ?> </select> </label> @@ -35,7 +35,7 @@ </tr> <tr> <td> - <div class="attachments" style="<?= (!$documents || !key_exists($key, $documents)) ? '' : 'display: none;'?>"> + <div class="attachments" style="<?= (empty($documents) || !array_key_exists($key, $documents)) ? '' : 'display: none;'?>"> <span style="cursor:pointer;" onClick="$('#fileselector_<?= $key; ?>').toggle();$(this).toggle();"> <?= Icon::create('add', Icon::ROLE_CLICKABLE, ['title' => _("Datei hinzufügen"), 'class' => 'text-bottom']); ?> <?= _("Datei hinzufügen") ?> @@ -43,11 +43,22 @@ <div id="fileselector_<?= $key; ?>" style="display:none;"> <ul class="stgfiles list-unstyled"> <li style="display: none;" class="stgfile"> - <input type="hidden" name="document_id" id="document_id" value="<?= htmlReady($document_id) ?>"> + <input type="hidden" name="document_id" id="document_id" value="<?= htmlReady($document_id ?? '') ?>"> <span class="icon"></span> <span class="name"></span> <span class="size"></span> - <a class="remove_attachment"><?= Icon::create('trash', 'clickable')->asImg(['class' => "text-bottom"]) ?></a> + <button class="refresh_attachment as-link" data-language="<?= htmlReady($key) ?>"> + <?= Icon::create('refresh')->asImg([ + 'class' => 'text-bottom', + 'title' => _('Datei aktualisieren'), + ]) ?> + </button> + <button class="remove_attachment as-link"> + <?= Icon::create('trash')->asImg([ + 'class' => 'text-bottom', + 'title' => _('Datei löschen'), + ]) ?> + </button> </li> </ul> <div id="statusbar_container"> @@ -79,7 +90,18 @@ <span class="icon"><?= Icon::create('file', Icon::ROLE_INFO, ['class' => 'text-bottom']); ?></span> <span class="name"><?= htmlReady($documents[$key]->filename) ?></span> <span class="size"></span> - <a class="remove_attachment"><?= Icon::create('trash', 'clickable')->asImg(['class' => "text-bottom"]) ?></a> + <button class="refresh_attachment as-link" data-language="<?= htmlReady($key) ?>"> + <?= Icon::create('refresh')->asImg([ + 'class' => 'text-bottom', + 'title' => _('Datei aktualisieren'), + ]) ?> + </button> + <button class="remove_attachment as-link"> + <?= Icon::create('trash')->asImg([ + 'class' => 'text-bottom', + 'title' => _('Datei löschen'), + ]) ?> + </button> </li> <? endif; ?> </ul> @@ -93,7 +115,9 @@ <?= _('Kategoriezuordnung') ?> <select name="doc_cat"> <? foreach ($GLOBALS['MVV_DOCUMENTS']['CATEGORY']['values'] as $key => $entry) : ?> - <option value="<?= $key ?>"<?= $key == $doc_cat ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option> + <option value="<?= htmlReady($key) ?>"<?= isset($doc_cat) && $key == $doc_cat ? ' selected' : '' ?>> + <?= htmlReady($entry['name']) ?> + </option> <? endforeach; ?> </select> </label> @@ -103,13 +127,15 @@ <select id="mvv-files-tags" multiple name="doc_tags[]"> <option value=""></option> <? foreach ($GLOBALS['MVV_DOCUMENTS']['TAG']['values'] as $key => $entry) : ?> - <option value="<?= $key ?>"<?= $key == in_array($key, explode(';', $doc_tags))? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option> + <option value="<?= htmlReady($key) ?>"<?= $key == in_array($key, explode(';', $doc_tags ?? ''))? ' selected' : '' ?>> + <?= htmlReady($entry['name']) ?> + </option> <? endforeach; ?> </select> </label> <label> - <input name="doc_extvisible" type="checkbox" value="1" <?= $doc_extvisible?'checked':''; ?>> + <input name="doc_extvisible" type="checkbox" value="1" <?= !empty($doc_extvisible) ? 'checked' : '' ?>> <?= _('Sichtbarkeit nach außen') ?> </label> diff --git a/app/views/materialien/files/index.php b/app/views/materialien/files/index.php index 1b00cec..6b89847 100644 --- a/app/views/materialien/files/index.php +++ b/app/views/materialien/files/index.php @@ -111,7 +111,7 @@ // ARGH! $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_files=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render("shared/pagechooser"); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/messages/write.php b/app/views/messages/write.php index 4117628..d344143 100644 --- a/app/views/messages/write.php +++ b/app/views/messages/write.php @@ -7,7 +7,11 @@ <fieldset> <legend><?= _('Neue Nachricht') ?></legend> <div class="message-user-list"> - <label><?= _("An") ?></label> + <label> + <span class="required"> + <?= _("An") ?> + </span> + </label> <ul class="list-csv" id="adressees"> <li id="template_adressee" style="display: none;" class="adressee"> <input type="hidden" name="message_to[]" value=""> @@ -32,9 +36,7 @@ ->render(); $mps = MultiPersonSearch::get('add_adressees') - ->setLinkText(_('Mehrere Adressaten hinzufügen')) - //->setDefaultSelectedUser($defaultSelectedUser) - ->setTitle(_('Mehrere Adressaten hinzufügen')) + ->setLinkText(_('Mehrere Adressaten hinzufügen')) ->setExecuteURL($controller->url_for('messages/write')) ->setJSFunctionOnSubmit('STUDIP.Messages.add_adressees') ->setSearchObject($this->mp_search_object); @@ -53,7 +55,9 @@ </div> <div> <label> - <?= _("Betreff") ?> + <span class="required"> + <?= _("Betreff") ?> + </span> <input type="text" name="message_subject" required value="<?= htmlReady($default_message['subject']) ?>"> </label> </div> @@ -67,22 +71,26 @@ <ul class="message-options"> <? if ($GLOBALS['ENABLE_EMAIL_ATTACHMENTS']): ?> <li> - <a href="" onClick="STUDIP.Messages.toggleSetting('attachments'); return false;"> - <?= Icon::create('staple', 'clickable')->asImg(40) ?> + <a href="" onClick="STUDIP.Messages.toggleSetting('attachments'); return false;" aria-expanded="false" + role="button" title="<?= _('Anhänge verwalten') ?>" aria-controls="attachments" + id="toggle-attachments"> + <?= Icon::create('staple')->asImg(40) ?> <br> <strong><?= _("Anhänge") ?></strong> </a> </li> <? endif; ?> <li> - <a href="" onClick="STUDIP.Messages.toggleSetting('tags'); return false;"> - <?= Icon::create('star', 'clickable')->asImg(40) ?> + <a href="" onClick="STUDIP.Messages.toggleSetting('tags'); return false;" aria-expanded="false" + role="button" title="<?= _('Schlagworte verwalten') ?>" aria-controls="tags" id="toggle-tags"> + <?= Icon::create('star')->asImg(40) ?> <br> <strong><?= _("Schlagworte") ?></strong> </a> </li> <li> - <a href="" onClick="STUDIP.Messages.toggleSetting('settings'); return false;"> + <a href="" onClick="STUDIP.Messages.toggleSetting('settings'); return false;" aria-expanded="false" + role="button" title="<?= _('Optionen') ?>" aria-controls="settings" id="toggle-settings"> <?= Icon::create('admin', 'clickable')->asImg(40) ?> <br> <strong><?= _("Optionen") ?></strong> diff --git a/app/views/module/module/index.php b/app/views/module/module/index.php index 7f3df8b..6cd63e9 100644 --- a/app/views/module/module/index.php +++ b/app/views/module/module/index.php @@ -29,7 +29,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/multipersonsearch/js_form.php b/app/views/multipersonsearch/js_form.php index ca1a1ab..1862c84 100644 --- a/app/views/multipersonsearch/js_form.php +++ b/app/views/multipersonsearch/js_form.php @@ -10,8 +10,12 @@ <span><?= htmlReady($description); ?></span> <input id="<?= $name . '_searchinput'; ?>" type="text" placeholder="<?= _("Suchen"); ?>" value="" name="<?= $name . '_searchinput'; ?>" style="width: 260px;" aria-label="<?= _("Suchen"); ?>"> - <?= Icon::create('search', 'clickable', ['title' => _('Suche starten')])->asImg(16, ['onclick' => 'STUDIP.MultiPersonSearch.search()']) ?> - <?= Icon::create('decline', 'clickable', ['title' => _('Suche zurücksetzen')])->asImg(16, ['onclick' => 'STUDIP.MultiPersonSearch.resetSearch()']) ?> + <button class="icon-button enter-accessible" onclick='STUDIP.MultiPersonSearch.search();return false' title="<?= _('Suche starten') ?>"> + <?= Icon::create('search')->asImg(['class' => 'text-bottom']) ?> + </button> + <button class="icon-button enter-accessible" onclick='STUDIP.MultiPersonSearch.resetSearch(); return false' title="<?= _('Suche zurücksetzen') ?>"> + <?= Icon::create('decline')->asImg(['class' => 'text-bottom']) ?> + </button> </label> <p><? foreach($quickfilter as $title => $users) : ?> <a href="#" class="quickfilter" data-quickfilter="<?= md5($title); ?>"><?= htmlReady($title); ?> (<?= count($users); ?>)</a> diff --git a/app/views/my_courses/courseexport.php b/app/views/my_courses/courseexport.php index d953187..b08c69d 100644 --- a/app/views/my_courses/courseexport.php +++ b/app/views/my_courses/courseexport.php @@ -1,3 +1,9 @@ +<?php +/** + * @var array|null $sem_courses + * @var array $sem_data + */ +?> <html> <head> <meta charset="UTF-8"> diff --git a/app/views/my_courses/groups.php b/app/views/my_courses/groups.php index 22628c5..4476aeb 100644 --- a/app/views/my_courses/groups.php +++ b/app/views/my_courses/groups.php @@ -25,7 +25,7 @@ <thead> <tr> <th><?= _('Veranstaltung') ?></th> - <th colspan="100%"><?= _('Gruppen/Farbe') ?></th> + <th colspan="100%"><?= _('Gruppe/Farbe') ?></th> </tr> </thead> <? foreach ($groups as $group_id => $group_members): ?> @@ -58,11 +58,14 @@ <? for ($i = 0; $i < 9; $i++): ?> <td class="gruppe<?= $i ?> mycourses-group-selector" onclick="this.querySelector('input').checked = true;"> <input type="radio" name="gruppe[<?= $member['seminar_id'] ?>]" value="<?= $i ?>" - aria-label="<?= _('Zugeordnet zu Gruppe ') . ($i + 1) ?>" + aria-label="<?= sprintf(_('Gruppe %u zuordnen'), $i + 1) ?>" id="course-group-<?= htmlReady($member['seminar_id']) ?>-<?= $i ?>" <? if ($my_sem[$member['seminar_id']]['gruppe'] == $i) echo 'checked'; ?>> <label for="course-group-<?= htmlReady($member['seminar_id']) ?>-<?= $i ?>"> - <?= sprintf(_('Gruppe %u zuordnen'), $i + 1) ?> + <span class="group-number"><?= $i + 1 ?></span> + <span class="checked-icon"> + <?= Icon::create('accept', Icon::ROLE_INFO)->asImg(20) ?> + </span> </label> </td> <? endfor; ?> diff --git a/app/views/my_studygroups/_course.php b/app/views/my_studygroups/_course.php index 93161e2..972a577 100644 --- a/app/views/my_studygroups/_course.php +++ b/app/views/my_studygroups/_course.php @@ -6,7 +6,7 @@ </td> <td style="text-align: left"> <a href="<?= URLHelper::getLink('seminar_main.php', ['auswahl' => $group['seminar_id']]) ?>" - <?= $group['last_visitdate'] >= $group['chdate'] ? 'style="color: red;"' : '' ?>> + <?= $group['last_visitdate'] < $group['chdate'] ? 'style="color: red;"' : '' ?>> <?= htmlReady($group['name']) ?> </a> <? if ($group['visible'] == 0) : ?> diff --git a/app/views/news/_actions.php b/app/views/news/_actions.php index 343cd10..d67de26 100644 --- a/app/views/news/_actions.php +++ b/app/views/news/_actions.php @@ -37,16 +37,19 @@ if ($new['allow_comments']) : <? if ($new->havePermission('edit')): ?> - <a href="<?= URLHelper::getLink('dispatch.php/news/edit_news/' . $new->id) ?>" data-dialog> + <a href="<?= URLHelper::getLink('dispatch.php/news/edit_news/' . $new->id) ?>" data-dialog + title="<?= _('Bearbeiten') ?>" aria-label="<?= _('Bearbeiten') ?>"> <?= Icon::create('edit') ?> </a> <? if ($new->havePermission('unassign', $range)): ?> - <a href=" <?= URLHelper::getLink('', ['remove_news' => $new->id, 'news_range' => $range]) ?>" > + <a href=" <?= URLHelper::getLink('', ['remove_news' => $new->id, 'news_range' => $range]) ?>" + title="<?= _('Nicht mehr abonnieren') ?>" aria-label="<?= _('Nicht mehr abonnieren') ?>"> <?= Icon::create('remove') ?> </a> <? endif; ?> <? if ($new->havePermission('delete')): ?> - <a href=" <?= URLHelper::getLink('', ['delete_news' => $new->id]) ?>" > + <a href=" <?= URLHelper::getLink('', ['delete_news' => $new->id]) ?>" + title="<?= _('Löschen') ?>" aria-label="<?= _('Löschen') ?>"> <?= Icon::create('trash') ?> </a> <? endif; ?> diff --git a/app/views/news/admin_news.php b/app/views/news/admin_news.php index 0376083..e12047a 100644 --- a/app/views/news/admin_news.php +++ b/app/views/news/admin_news.php @@ -1,24 +1,36 @@ -<? use Studip\Button, Studip\LinkButton; ?> +<?php +/** + * @var NewsController $controller + * @var string $area_type + * @var Trails\Flash $flash + * @var string $news_searchterm + * @var string $news_startdate + * @var string $news_enddate + * @var string|null $filter_text + * @var array<string, array<string, array{title: string, object: StudipNews}>> $news_items + * @var array $area_structure + */ +?> <? if (!empty($flash['question_text'])) : ?> -<?= QuestionBox::create( - htmlReady($flash['question_text']), - $controller->url_for('news/admin_news/' . $area_type, array_merge( - $flash['question_param'], - [ + <?= QuestionBox::create( + htmlReady($flash['question_text']), + $controller->url_for('news/admin_news/' . $area_type, array_merge( + $flash['question_param'], + [ + 'news_filter_term' => htmlReady($news_searchterm), + 'news_filter_start' => $news_startdate, + 'news_filter_end' => $news_enddate, + 'news_filter' => 'set' + ] + )), + $controller->url_for('news/admin_news/' . $area_type, [ 'news_filter_term' => htmlReady($news_searchterm), 'news_filter_start' => $news_startdate, 'news_filter_end' => $news_enddate, 'news_filter' => 'set' - ] - )), - $controller->url_for('news/admin_news/' . $area_type, [ - 'news_filter_term' => htmlReady($news_searchterm), - 'news_filter_start' => $news_startdate, - 'news_filter_end' => $news_enddate, - 'news_filter' => 'set' - ]) - ); -?> + ]) + ); + ?> <? endif ?> <form action="<?= $controller->link_for('news/admin_news/' . $area_type) ?>" id="admin_news_form" class="default" method="post"> @@ -52,9 +64,9 @@ </label> </fieldset> <footer> - <?= Button::create(_('Filter anwenden'), 'apply_news_filter', ['aria-label' => _('Liste mit Suchbegriff und/oder Zeitraum filtern')]) ?> + <?= Studip\Button::create(_('Filter anwenden'), 'apply_news_filter', ['aria-label' => _('Liste mit Suchbegriff und/oder Zeitraum filtern')]) ?> <? if ($filter_text) : ?> - <?= Button::create(_('Filter zurücksetzen'), 'reset_filter') ?> + <?= Studip\Button::create(_('Filter zurücksetzen'), 'reset_filter') ?> <? endif ?> </footer> <br> @@ -74,12 +86,13 @@ </caption> <? endif ?> <colgroup> - <col width="20"> + <col style="width: 20px"> <col> - <col width="25%"> - <col width="10%"> - <col width="10%"> - <col width="80"> + <col style="width: 25%"> + <col style="width: 10%"> + <col style="width: 10%"> + <col style="width: 5%"> + <col style="width: 80px"> </colgroup> <thead> <tr> @@ -88,6 +101,7 @@ <th><?= _('Autor') ?></th> <th><?= _('Einstelldatum') ?></th> <th><?= _('Ablaufdatum') ?></th> + <th><?= _('Aufrufe') ?></th> <th class="actions"><?= _('Aktion') ?></th> </tr> </thead> @@ -99,18 +113,18 @@ <tr> <th> <input type="checkbox" - data-proxyfor=".news_<?= $news['range_id'] ?>" + data-proxyfor=".news_<?= htmlReady($news['range_id']) ?>" aria-labelledby="<?= _('Alle auswählen') ?>"> </th> - <th colspan="5"><?= mila(htmlReady($news['title'] ?? '')) . ' ' . htmlReady($news['semester'] ?? '') ?></th> + <th colspan="6"><?= mila(htmlReady($news['title'] ?? '')) . ' ' . htmlReady($news['semester'] ?? '') ?></th> </tr> <? endif ?> <? $last_title = $title ?> <? endif ?> <tr> <td> - <input type="checkbox" class="news_<?= $news['range_id'] ?>" name="mark_news[]" - value="<?= $news['object']->news_id . '_' . $news['range_id'] ?>" + <input type="checkbox" class="news_<?= htmlReady($news['range_id']) ?>" name="mark_news[]" + value="<?= htmlReady($news['object']->news_id . '_' . $news['range_id']) ?>" aria-label="<?= _('Diese Ankündigung zum Entfernen vormerken') ?>" <?= tooltip(_("Diese Ankündigung zum Entfernen vormerken"), false) ?>> </td> <td><?= htmlReady($news['object']->topic) ?></td> @@ -119,9 +133,19 @@ $body = $parts[0]; $admin_msg = $parts[1] ?? ';' ?> - <td><?= htmlReady($news['object']->author) ?></td> + <td> + <? if ($news['object']->owner): ?> + <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $news['object']->owner->username]) ?>"> + <?= Avatar::getAvatar($news['object']->user_id)->getImageTag(Avatar::SMALL) ?> + <?= htmlReady($news['object']->owner->getFullName()) ?> + </a> + <? else: ?> + <?= htmlReady($news['object']->author) ?> + <? endif; ?> + </td> <td><?= strftime("%d.%m.%y", $news['object']->date) ?></td> <td><?= strftime("%d.%m.%y", $news['object']->date + $news['object']->expire) ?></td> + <td><?= $news['object']->views ?></td> <td class="actions"> <? $menu = ActionMenu::get()->setContext($news['object']->topic); @@ -158,8 +182,8 @@ </tbody> <tfoot> <tr> - <td colspan="6"> - <?= Button::create(_('Alle markierten Ankündigungen entfernen'), 'remove_marked_news') ?> + <td colspan="7"> + <?= Studip\Button::create(_('Alle markierten Ankündigungen entfernen'), 'remove_marked_news') ?> </td> </tr> </tfoot> diff --git a/app/views/news/display.php b/app/views/news/display.php index 356ec1f..5f62443 100644 --- a/app/views/news/display.php +++ b/app/views/news/display.php @@ -8,18 +8,22 @@ </h1> <nav> <? if ($perm): ?> - <a href="<?= $controller->link_for('news/edit_news/new/' . $range); ?>" data-dialog> + <a href="<?= $controller->link_for('news/edit_news/new/' . $range); ?>" data-dialog + title="<?= _('Hinzufügen') ?>" aria-label="<?= _('Hinzufügen') ?>"> <?= Icon::create('add') ?> </a> <? endif; ?> <? if ($perm && Config::get()->NEWS_RSS_EXPORT_ENABLE): ?> - <a data-dialog="size=auto;reload-on-close" title="<?=_('RSS-Feed konfigurieren') ?>" href="<?= $controller->link_for('news/rss_config/' . $range); ?>"> + <a data-dialog="size=auto;reload-on-close" title="<?=_('RSS-Feed konfigurieren') ?>" + aria-label="<?=_('RSS-Feed konfigurieren') ?>" + href="<?= $controller->link_for('news/rss_config/' . $range); ?>"> <?= Icon::create('admin') ?> </a> <? endif; ?> <? if ($rss_id): ?> - <a href="<?= URLHelper::getLink('rss.php', ['id' => $rss_id]) ?>"> - <?= Icon::create('rss')->asImg(['title' => _('RSS-Feed')]) ?> + <a href="<?= URLHelper::getLink('rss.php', ['id' => $rss_id]) ?>" + title="<?= _('RSS-Feed') ?>" aria-label="<?= _('RSS-Feed') ?>"> + <?= Icon::create('rss') ?> </a> <? endif; ?> </nav> @@ -49,7 +53,7 @@ <? endforeach; ?> <? if (!$news): ?> <section> - <?= _('Es sind keine aktuellen Ankündigungen vorhanden. Um neue Ankündigungen zu erstellen, klicken Sie rechts auf das Plus-Zeichen.') ?> + <?= _('Es sind aktuell keine Ankündigungen vorhanden. Nutzen Sie die Funktion „Hinzufügen“, um eine neue Ankündigung zu erstellen.') ?> </section> <? if ($perm && $count_all_news) : ?> <footer> diff --git a/app/views/oer/addfile/choose_file.php b/app/views/oer/addfile/choose_file.php index 6c896cf..feb5b0f 100644 --- a/app/views/oer/addfile/choose_file.php +++ b/app/views/oer/addfile/choose_file.php @@ -12,7 +12,7 @@ if ($best_nine_tags && count($best_nine_tags) > 0) { <form class="oer_search" action="<?= $controller->link_for("oer/market/search") ?>" method="GET" - data-searchresults="<?= htmlReady(json_encode($material_data)) ?>" + data-searchresults="<?= htmlReady(json_encode($material_data ?? [])) ?>" data-filteredtag="<?= htmlReady(Request::get("tag")) ?>" data-filteredcategory="<?= htmlReady(Request::get("category")) ?>" data-tags="<?= htmlReady(json_encode($tags)) ?>" diff --git a/app/views/oer/admin/hosts.php b/app/views/oer/admin/hosts.php index c60c937..0289d90 100644 --- a/app/views/oer/admin/hosts.php +++ b/app/views/oer/admin/hosts.php @@ -78,7 +78,7 @@ <form action="<?= $controller->link_for("oer/admin/add_new_host") ?>" method="post"> <h2><?= _('Werden Sie Teil des weltweiten Stud.IP Lernmarktplatzes!') ?></h2> <div> - <?= _('Der Lernmarktplatz ist ein Ort des Austauschs von kostenlosen und freien Lernmaterialien. Daher wäre es schade, wenn er nur auf Ihr einzelnes Stud.IP beschränkt wäre. Der Lernmarktplatz ist daher als dezentrales Netzwerk konzipiert, bei dem alle Nutzer aller Stud.IPs sich gegenseitig Lernmaterialien tauschen können und nach Lernmaterialien anderer Nutzer suchen können. <em>Dezentral</em> heißt dieses Netzwerk, weil es nicht einen einzigen zentralen Server gibt, der wie eine große Suchmaschine alle Informationen bereit hält. Stattdessen sind im besten Fall alle Stud.IPs mit allen anderen Stud.IPs direkt vernetzt. So ein dezentrales Netz ist sehr ausfallsicher und es passt zur Opensource-Idee von Stud.IP, weil man sich von keiner zentralen Institution abhängig macht. Aber Ihr Stud.IP muss irgendwo einen ersten Kontakt zum großen Netzwerk aller Lernmarktplätze finden, um loslegen zu können. Wählen Sie dazu irgendeinen der unten aufgeführten Server aus. Sie werden Index-Server genannt und bilden das Tor zum Rest des ganzen Netzwerks. Achten Sie darauf, dass Sie mit mindestens einem, aber auch nicht zu vielen Indexservern verbunden sind.') ?> + <?= _('Der Lernmarktplatz ist ein Ort des Austauschs von kostenlosen und freien Lernmaterialien. Daher wäre es schade, wenn er nur auf Ihr einzelnes Stud.IP beschränkt wäre. Der Lernmarktplatz ist daher als dezentrales Netzwerk konzipiert, bei dem alle Nutzer aller Stud.IPs sich gegenseitig Lernmaterialien tauschen können und nach Lernmaterialien anderer Nutzer suchen können. <em>Dezentral</em> heißt dieses Netzwerk, weil es nicht einen einzigen zentralen Server gibt, der wie eine große Suchmaschine alle Informationen bereit hält. Stattdessen sind im besten Fall alle Stud.IPs mit allen anderen Stud.IPs direkt vernetzt. So ein dezentrales Netz ist sehr ausfallsicher und es passt zur Opensource-Idee von Stud.IP, weil man sich von keiner zentralen Institution abhängig macht. Aber Ihr Stud.IP muss irgendwo einen ersten Kontakt zum großen Netzwerk aller Lernmarktplätze finden, um loslegen zu können. Wählen Sie dazu irgendeinen der folgenden Server aus. Sie werden Index-Server genannt und bilden das Tor zum Rest des ganzen Netzwerks. Achten Sie darauf, dass Sie mit mindestens einem, aber auch nicht zu vielen Indexservern verbunden sind.') ?> </div> <ul class="clean" style="text-align: center;"> diff --git a/app/views/oer/market/licenseinfo.php b/app/views/oer/market/licenseinfo.php index 4618027..eda2658 100644 --- a/app/views/oer/market/licenseinfo.php +++ b/app/views/oer/market/licenseinfo.php @@ -18,7 +18,7 @@ </p> <h2><?= _('Lizenzen auf dem Marktplatz') ?></h2> <p> - <?= _('Zum Glück gibt es kluge Menschen, die sich zum Thema <em>Lizenzen</em> kluge Gedanken gemacht haben. Daher gibt es die sogenannten CreativeCommons-Lizenzen. Die sind international gültig und besagen genau das, was oben gefordert ist. Damit haben alle, die den Marktplatz nutzen, absolute Rechtssicherheit. Diese Lizenzen kommen auch außerhalb des Marktplatzes sehr oft zum Einsatz. Musikerinnen und Musiker lizensieren ihre Musikrohdateien damit, Schriftsteller und Schriftstellerinnen ihre Gedichte und Lehrende auch ganz natürlich ihre Vorlesungsfolien. Die einzige echte Auflage ist, dass bei Weitergabe oder bei der Bearbeitung der Materialien alle Autorinnen und Autoren in irgendeiner Form transparent genannt werden müssen!') ?> + <?= _('Zum Glück gibt es kluge Menschen, die sich zum Thema <em>Lizenzen</em> kluge Gedanken gemacht haben. Daher gibt es die sogenannten CreativeCommons-Lizenzen. Die sind international gültig und besagen genau das, was im vorangegangenen Text gefordert ist. Damit haben alle, die den Marktplatz nutzen, absolute Rechtssicherheit. Diese Lizenzen kommen auch außerhalb des Marktplatzes sehr oft zum Einsatz. Musikerinnen und Musiker lizensieren ihre Musikrohdateien damit, Schriftsteller und Schriftstellerinnen ihre Gedichte und Lehrende auch ganz natürlich ihre Vorlesungsfolien. Die einzige echte Auflage ist, dass bei Weitergabe oder bei der Bearbeitung der Materialien alle Autorinnen und Autoren in irgendeiner Form transparent genannt werden müssen!') ?> </p> <p> <?= _('Dabei eine kleine Warnung: Wenn Sie vorhaben, mit ihren Vorlesungsfolien oder Übungsblättern und Musterlösungen noch Millionen Euro zu verdienen, dann stellen Sie diese Materialien nicht auf den Marktplatz, denn die Nutzung aller Materialien ist unentgeltlich (selbstverständlich verdienen auch wir nichts damit) und die Materialien können, wenn sie einmal heruntergeladen worden sind, auch noch beliebig weiter verteilt werden. Es gibt zwar eine CreativeCommons-Lizenz, die kommerzielle Nutzung ausschließt. Die ist aber explizit für den Marktplatz nicht praktikabel. Denn stellen Sie sich diese Frage: Wenn Lehrende Material vom Marktplatz innerhalb ihrer Veranstaltungen verwenden und zum Beispiel eine Infografik aus einer Präsentation an die Wand projizieren, ist das dann eine kommerzielle Nutzung? Ja, irgendwie schon, denn sie werden natürlich für ihre Lehrtätigkeit bezahlt. Wir legen besonderen Wert auf die Rechtssicherheit aller Nutzer und Nutzerinnen. Deswegen kommen auf unseren Marktplatz keine Materialien, die die kommerzielle Nutzung ausschließen. Nichtsdestotrotz haben Sie weiterhin alle Rechte, ihre Vorlesungsfolien auf anderem Wege über einen Verlag zu veröffentlichen und Tantiemen zu bekommen.') ?> diff --git a/app/views/profile/index.php b/app/views/profile/index.php index 82a001a..9b7cb4f 100644 --- a/app/views/profile/index.php +++ b/app/views/profile/index.php @@ -83,11 +83,9 @@ </section> -<?= $news ?> +<?= $news ?? '' ?> -<?= $dates ?> - -<?= $evaluations ?? '' ?> +<?= $dates ?? '' ?> <?= $questionnaires ?? '' ?> diff --git a/app/views/profile/seminare.php b/app/views/profile/seminare.php index b218eca..1d1c7c7 100644 --- a/app/views/profile/seminare.php +++ b/app/views/profile/seminare.php @@ -6,17 +6,20 @@ </header> <section> - <? foreach ($seminare as $semester => $seminar) :?> - <b><?= htmlReady($semester) ?></b><br> - - <? foreach ($seminar as $one) :?> - <a href="<?= URLHelper::getScriptLink('dispatch.php/course/details', ['sem_id' => $one->id])?>"> - <?= htmlReady($one->getFullName('number-name')) ?> - <? if ($one->start_semester !== $one->end_semester) : ?> - (<?= htmlReady($one->getFullName('sem-duration-name')) ?>) - <? endif ?> - </a><br> + <? foreach ($seminare as $semester => $seminar) : ?> + <b><?= htmlReady($semester) ?></b><br> + <ul class="clean"> + <? foreach ($seminar as $one) : ?> + <li> + <a href="<?= URLHelper::getScriptLink('dispatch.php/course/details', ['sem_id' => $one->id])?>"> + <?= htmlReady($one->getFullName('number-name')) ?> + <? if ($one->start_semester !== $one->end_semester) : ?> + (<?= htmlReady($one->getFullName('sem-duration-name')) ?>) + <? endif ?> + </a> + </li> <?endforeach?> + </ul> <?endforeach?> </section> -</article>
\ No newline at end of file +</article> diff --git a/app/views/questionnaire/_overview_questionnaire.php b/app/views/questionnaire/_overview_questionnaire.php index bb7586e..8b45d42 100644 --- a/app/views/questionnaire/_overview_questionnaire.php +++ b/app/views/questionnaire/_overview_questionnaire.php @@ -51,7 +51,7 @@ <?= htmlReady(Institute::find($assignment['range_id'])->name) ?> <? else : ?> <? - foreach (PluginManager::getInstance()->getPlugins("QuestionnaireAssignmentPlugin") as $plugin) { + foreach (PluginManager::getInstance()->getPlugins(QuestionnaireAssignmentPlugin::class) as $plugin) { $name = $plugin->getQuestionnaireAssignmentName($assignment); if ($name) { echo htmlReady($name); diff --git a/app/views/questionnaire/_widget_questionnaire.php b/app/views/questionnaire/_widget_questionnaire.php index 22ecf72..4f625c2 100644 --- a/app/views/questionnaire/_widget_questionnaire.php +++ b/app/views/questionnaire/_widget_questionnaire.php @@ -30,7 +30,7 @@ <span title="<?= _("Anzahl der Antworten") ?>"> <?= $questionnaire->countAnswers() ?> </span> - <span title="<?= _("QR-Code zu diesem Fragebogen anzeigen") ?>"> + <span> <? $oldbase = URLHelper::setBaseURL($GLOBALS['ABSOLUTE_URI_STUDIP']) ?> <a href="<?= URLHelper::getLink( @@ -38,7 +38,8 @@ compact('range_type', 'range_id') ) ?>" class="questionnaire-qr" - data-qr-code> + title="<?= _("QR-Code zu diesem Fragebogen anzeigen") ?>" aria-label="<?= _("QR-Code zu diesem Fragebogen anzeigen") ?>" + data-qr-code> <? URLHelper::setBaseURL($oldbase) ?> <?= Icon::create("code-qr", "clickable")->asImg(20, ['class' => "text-bottom"]) ?> </a> diff --git a/app/views/questionnaire/assign.php b/app/views/questionnaire/assign.php index 4bf7fc5..5299a83 100644 --- a/app/views/questionnaire/assign.php +++ b/app/views/questionnaire/assign.php @@ -10,8 +10,8 @@ <select name="semester_id"> <? foreach ($available_semesters as $available_semester): ?> <option value="<?= htmlReady($available_semester->id) ?>" - <?= ($available_semester->id == $semester_id) - ? 'selected="selected"' + <?= isset($semester_id) && $available_semester->id == $semester_id + ? 'selected' : '' ?>> <?= htmlReady($available_semester->name) ?> @@ -24,13 +24,13 @@ (<?= _('optional') ?>) <select name="institute_id"> <option value="" - <?= ($institute_id == '' ? 'selected="selected"' : '') ?>> + <?= empty($institute_id) ? 'selected' : '' ?>> <?= _('(bitte wählen)') ?> </option> <? foreach ($available_institutes as $available_institute): ?> <option value="<?= htmlReady($available_institute['Institut_id']) ?>" - <?= ($available_institute['Institut_id'] == $institute_id) - ? 'selected="selected"' + <?= isset($institute_id) && $available_institute['Institut_id'] == $institute_id + ? 'selected' : '' ?>> <?= htmlReady($available_institute['Name']) ?> @@ -43,13 +43,13 @@ (<?= _('optional') ?>) <select name="course_type_id"> <option value="" - <?= ($course_type_id == '' ? 'selected="selected"' : '') ?>> + <?= empty($course_type_id) ? 'selected' : '' ?>> <?= dgettext('AskALotPlugin', '(bitte wählen)') ?> </option> <? foreach ($available_course_types as $available_course_type): ?> <option value="<?= htmlReady($available_course_type['id']) ?>" - <?= ($available_course_type['id'] == $course_type_id) - ? 'selected="selected"' + <?= isset($course_type_id) && $available_course_type['id'] == $course_type_id + ? 'selected' : '' ?>> <?= htmlReady($available_course_type['name']) ?> diff --git a/app/views/questionnaire/context.php b/app/views/questionnaire/context.php index 3b601c1..98e08c0 100644 --- a/app/views/questionnaire/context.php +++ b/app/views/questionnaire/context.php @@ -6,6 +6,10 @@ <fieldset> <legend><?= _("URL zum Fragebogen") ?></legend> <input type="text" aria-label="<?= _("URL zum Fragebogen (nur lesbar)") ?>" readonly value="<?= htmlReady($GLOBALS['ABSOLUTE_URI_STUDIP']."dispatch.php/questionnaire/answer/".$questionnaire->getId()) ?>"> + <a href="<?= htmlReady($GLOBALS['ABSOLUTE_URI_STUDIP'] . "dispatch.php/questionnaire/answer/" . $questionnaire->id) ?>" + data-qr-code title="<?= _('QR-Code zum Link anzeigen') ?>"> + <?= Icon::create('code-qr')->asImg(['class' => 'text-bottom']) ?> + </a> </fieldset> <fieldset> <legend><?= _("Freigaben bearbeiten") ?></legend> @@ -89,7 +93,7 @@ <? endif ?> <? - foreach (PluginManager::getInstance()->getPlugins("QuestionnaireAssignmentPlugin") as $plugin) { + foreach (PluginManager::getInstance()->getPlugins(QuestionnaireAssignmentPlugin::class) as $plugin) { $template = $plugin->getQuestionnaireAssignmentEditTemplate($this->questionnaire); if ($template) { echo $template->render(); diff --git a/app/views/questionnaire/question_types/likert/likert_answer.php b/app/views/questionnaire/question_types/likert/likert_answer.php index 1847587..86ccc3e 100644 --- a/app/views/questionnaire/question_types/likert/likert_answer.php +++ b/app/views/questionnaire/question_types/likert/likert_answer.php @@ -25,7 +25,7 @@ $responseData = isset($response->answerdata['answers']) ? $response->answerdata[ <tr> <th><?= _('Aussage') ?></th> <? foreach ($answers as $answer) : ?> - <th><?= htmlReady($answer) ?></th> + <th class="option-cell"><?= htmlReady($answer) ?></th> <? endforeach ?> </tr> </thead> @@ -35,7 +35,7 @@ $responseData = isset($response->answerdata['answers']) ? $response->answerdata[ <? $html_id = md5(uniqid($index)) ?> <td id="<?= $html_id ?>"><?= htmlReady($statements[$index]) ?></td> <? foreach ($answers as $answer_index => $answer) : ?> - <td> + <td class="option-cell"> <input type="radio" title="<?= htmlReady($answer) ?>" aria-labelledby="<?= $html_id ?>" diff --git a/app/views/questionnaire/question_types/likert/likert_evaluation.php b/app/views/questionnaire/question_types/likert/likert_evaluation.php index fd4eb01..11ef4b4 100644 --- a/app/views/questionnaire/question_types/likert/likert_evaluation.php +++ b/app/views/questionnaire/question_types/likert/likert_evaluation.php @@ -27,7 +27,7 @@ $options = $vote->questiondata['options']; <tr> <th><?= _('Aussage') ?></th> <? foreach ($options as $option) : ?> - <th><?= htmlReady($option) ?></th> + <th class="option-cell"><?= htmlReady($option) ?></th> <? endforeach ?> </tr> </thead> diff --git a/app/views/questionnaire/question_types/rangescale/rangescale_answer.php b/app/views/questionnaire/question_types/rangescale/rangescale_answer.php index 3525b4c..4333689 100644 --- a/app/views/questionnaire/question_types/rangescale/rangescale_answer.php +++ b/app/views/questionnaire/question_types/rangescale/rangescale_answer.php @@ -25,7 +25,7 @@ $responseData = $response['answerdata'] && $response['answerdata']['answers'] ? <tr> <th><?= _('Aussage') ?></th> <? for ($i = $vote->questiondata['minimum'] ?? 1; $i <= $vote->questiondata['maximum']; $i++) : ?> - <th><?= htmlReady($i) ?></th> + <th class="option-cell"><?= htmlReady($i) ?></th> <? endfor ?> </tr> </thead> @@ -35,7 +35,7 @@ $responseData = $response['answerdata'] && $response['answerdata']['answers'] ? <? $html_id = md5(uniqid($index)) ?> <td id="<?= $html_id ?>"><?= htmlReady($statements[$index]) ?></td> <? for ($i = $vote->questiondata['minimum'] ?? 1; $i <= $vote->questiondata['maximum']; $i++) : ?> - <td> + <td class="option-cell"> <input type="radio" title="<?= htmlReady($i) ?>" aria-labelledby="<?= $html_id ?>" diff --git a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php index 2715934..6b75ea1 100644 --- a/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php +++ b/app/views/questionnaire/question_types/rangescale/rangescale_evaluation.php @@ -27,7 +27,7 @@ $options = range($vote->questiondata['minimum'], $vote->questiondata['maximum']) <tr> <th><?= _('Aussage') ?></th> <? for ($i = $vote->questiondata['minimum'] ?? 1; $i <= $vote->questiondata['maximum']; $i++) : ?> - <th class="rangescale_center"><?= htmlReady($i) ?></th> + <th class="option-cell"><?= htmlReady($i) ?></th> <? endfor ?> </tr> </thead> diff --git a/app/views/questionnaire/widget.php b/app/views/questionnaire/widget.php index 044f246..6d7f4b3 100644 --- a/app/views/questionnaire/widget.php +++ b/app/views/questionnaire/widget.php @@ -8,15 +8,18 @@ <nav> <? if ($allowed_to_add) : ?> <? if ($statusgruppen_ids): ?> - <a href="<?= $controller->link_for('questionnaire/add_to_context') ?>" data-dialog="size=auto" title="<?= _('Fragebogen hinzufügen') ?>"> + <a href="<?= $controller->link_for('questionnaire/add_to_context') ?>" data-dialog="size=auto" + title="<?= _('Fragebogen hinzufügen') ?>" aria-label="<?= _('Fragebogen hinzufügen') ?>"> <?= Icon::create("add", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> </a> <? else: ?> - <a href="<?= $controller->link_for('questionnaire/edit', compact('range_type', 'range_id')) ?>" data-dialog title="<?= _('Fragebogen hinzufügen') ?>"> + <a href="<?= $controller->link_for('questionnaire/edit', compact('range_type', 'range_id')) ?>" data-dialog + title="<?= _('Fragebogen hinzufügen') ?>" aria-label="<?= _('Fragebogen hinzufügen') ?>"> <?= Icon::create("add", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> </a> <? endif ?> - <a href="<?= URLHelper::getLink("dispatch.php/questionnaire/" . ($range_type == 'course' || $range_type == 'institute' ? 'course' : ''). "overview") ?>" title="<?= _('Fragebögen verwalten') ?>"> + <a href="<?= URLHelper::getLink("dispatch.php/questionnaire/" . ($range_type == 'course' || $range_type == 'institute' ? 'course' : ''). "overview") ?>" + title="<?= _('Fragebögen verwalten') ?>" aria-label="<?= _('Fragebögen verwalten') ?>"> <?= Icon::create("admin", "clickable")->asimg("16px", ['class' => "text-bottom"]) ?> </a> <? endif ?> @@ -31,7 +34,7 @@ <section class="noquestionnaires"> <?= _('Es sind keine Fragebögen vorhanden.') ?> <? if ($allowed_to_add) : ?> - <?= _("Um neue Fragebögen zu erstellen, klicken Sie rechts auf das Plus.") ?> + <?= _("Nutzen Sie die Aktion „Fragebogen hinzufügen“ um einen neuen Fragebogen hinzuzufügen.") ?> <? endif ?> </section> <? endif; ?> diff --git a/app/views/resources/_common/_grouped_room_list.php b/app/views/resources/_common/_grouped_room_list.php index f3d6b62..a27af17 100644 --- a/app/views/resources/_common/_grouped_room_list.php +++ b/app/views/resources/_common/_grouped_room_list.php @@ -64,7 +64,7 @@ <? if ($user) :?> <? $perms = [ - 'show_global_admin_actions' => $show_global_admin_actions, + 'show_global_admin_actions' => $show_global_admin_actions ?? false, 'show_admin_actions' => $resource->userHasPermission($user, 'admin'), 'show_tutor_actions' => $resource->userHasPermission($user, 'tutor'), 'show_autor_actions' => $resource->userHasPermission($user, 'autor'), diff --git a/app/views/resources/_common/_room_tr.php b/app/views/resources/_common/_room_tr.php index 37f26d1..1b9f46a 100644 --- a/app/views/resources/_common/_room_tr.php +++ b/app/views/resources/_common/_room_tr.php @@ -19,7 +19,7 @@ * Defaults to false (do not show actions). * $user_has_booking_rights: Boolean: Whether the user for which this template * is rendered has booking rights on the resource (true) or not (false). - * $show_room_picture: Boolean: Whether to display the room picture or not. + * $show_picture: Boolean: Whether to display the room picture or not. * Defaults to false (do not show picture). * $additional_properties: Array: Additional properties * that shall be displayed in extra columns. diff --git a/app/views/resources/booking/_add_edit_form.php b/app/views/resources/booking/_add_edit_form.php index 571ff63..f982c37 100644 --- a/app/views/resources/booking/_add_edit_form.php +++ b/app/views/resources/booking/_add_edit_form.php @@ -537,7 +537,7 @@ <label> <input type="checkbox" value="1" name="overwrite_bookings" - <?= $overwrite_bookings ? 'checked="checked"' : '' ?>> + <?= !empty($overwrite_bookings) ? 'checked' : '' ?>> <?= _('Vorhandene Buchungen überschreiben') ?> </label> </fieldset> diff --git a/app/views/resources/room_group/permissions.php b/app/views/resources/room_group/permissions.php index 17090ce..1dd970d 100644 --- a/app/views/resources/room_group/permissions.php +++ b/app/views/resources/room_group/permissions.php @@ -28,7 +28,7 @@ <?= $this->render_partial( 'resources/resource/permissions', [ - 'custom_empty_list_message' => _('Es sind keine gemeinsamen Rechte für die oben aufgeführten Räume vorhanden.'), + 'custom_empty_list_message' => _('Es sind keine gemeinsamen Rechte für die zuvor aufgelisteten Räume vorhanden.'), 'custom_save_button_text' => _('Zuweisen'), 'custom_form_action_link' => URLHelper::getLink('dispatch.php/resources/room_group/permissions/' . $clipboard->id), 'custom_hidden_fields' => [ diff --git a/app/views/resources/room_request/decline.php b/app/views/resources/room_request/decline.php index 188c4bb..2c02126 100644 --- a/app/views/resources/room_request/decline.php +++ b/app/views/resources/room_request/decline.php @@ -30,7 +30,7 @@ <? endif ?> <? endif ?> <footer data-dialog-button> - <? if ($prev_request) : ?> + <? if (!empty($prev_request)) : ?> <?= \Studip\LinkButton::create( _('Vorherige Anfrage'), $controller->declineURL($prev_request), @@ -45,7 +45,7 @@ <? if ($show_form) : ?> <?= \Studip\Button::createAccept($delete_mode ? _('Löschen') : _('Ablehnen'), 'confirm') ?> <? endif ?> - <? if ($next_request) : ?> + <? if (!empty($next_request)) : ?> <?= \Studip\LinkButton::create( _('Nächste Anfrage'), $controller->declineURL($next_request), @@ -53,4 +53,4 @@ ) ?> <? endif ?> </footer> -</form>
\ No newline at end of file +</form> diff --git a/app/views/room_management/overview/rooms.php b/app/views/room_management/overview/rooms.php index a6323dc..cdec83e 100644 --- a/app/views/room_management/overview/rooms.php +++ b/app/views/room_management/overview/rooms.php @@ -40,7 +40,7 @@ 'user_has_booking_rights' => $room->userHasBookingRights( $user ), - 'show_room_picture' => true, + 'show_picture' => true, 'additional_columns' => [ $room->category->name, ] diff --git a/app/views/search/module/index.php b/app/views/search/module/index.php index c072cf0..8eac916 100644 --- a/app/views/search/module/index.php +++ b/app/views/search/module/index.php @@ -53,7 +53,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_module=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> <? endif; ?> </td> diff --git a/app/views/settings/general.php b/app/views/settings/general.php index 4bd5433..32b1a6f 100644 --- a/app/views/settings/general.php +++ b/app/views/settings/general.php @@ -93,6 +93,21 @@ $start_pages = [ '- auch wenn Sie gerade einen anderen Browsertab anschauen. Der Plopp ist ' . 'nur zu hören, wenn Sie die Benachrichtigungen über Javascript aktiviert haben.')) ?> </label> + + <label> + <?= _('Platzierung von Systembenachrichtigungen im Browserfenster') ?> + <?= tooltipIcon(_('Sie können entscheiden, an welcher Stelle Ihres Browserfensters ' . + 'Systembenachrichtigungen erscheinen sollen: mittig am oberen Rand oder rechts unten.')) ?> + <select name="system_notifications_placement" + aria-describedby="system_notifications_notifications_placement_description"> + <option value="topcenter"<?= $notifications_placement === 'topcenter' ? ' selected' : '' ?>> + <?= _('zentriert am oberen Rand') ?> + </option> + <option value="bottomright"<?= $notifications_placement === 'bottomright' ? ' selected' : '' ?>> + <?= _('am rechten unteren Rand') ?> + </option> + </select> + </label> </fieldset> <fieldset> diff --git a/app/views/settings/notification.php b/app/views/settings/notification.php index b46ea45..2fd4f9c 100644 --- a/app/views/settings/notification.php +++ b/app/views/settings/notification.php @@ -24,7 +24,7 @@ </tr> <tr> <td colspan="2"> - <?= _('Benachrichtigung für unten aufgeführte Veranstaltungen:') ?> + <?= _('Benachrichtigungen für die folgenden Veranstaltungen:') ?> </td> <? $i = 0; ?> <? foreach ($modules as $index => $data): ?> diff --git a/app/views/shared/contacts/add_ranges_to_contact.php b/app/views/shared/contacts/add_ranges_to_contact.php index 389e72c..0f4ae3f 100644 --- a/app/views/shared/contacts/add_ranges_to_contact.php +++ b/app/views/shared/contacts/add_ranges_to_contact.php @@ -16,7 +16,7 @@ <select style="display: inline-block;" name="ansp_typ">
<option value=""<?= empty($ansp_typ) ? ' selected' : '' ?>></option>
<? foreach ($GLOBALS['MVV_CONTACTS']['TYPE']['values'] as $key => $entry) : ?>
- <option value="<?= $key ?>"<?= $key == $ansp_typ ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option>
+ <option value="<?= $key ?>"<?= isset($ansp_typ) && $key == $ansp_typ ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option>
<? endforeach; ?>
</select>
</label>
@@ -26,7 +26,7 @@ <?= _('Kategorie') ?>
<select style="display: inline-block;" name="ansp_kat">
<? foreach (MvvContactRange::getCategoriesByRangetype($range_type) as $key => $entry) : ?>
- <option value="<?= $key ?>"<?= $key == $ansp_kat ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option>
+ <option value="<?= $key ?>"<?= isset($ansp_kat) && $key == $ansp_kat ? ' selected' : '' ?>><?= htmlReady($entry['name']) ?></option>
<? endforeach; ?>
</select>
</label>
diff --git a/app/views/shared/contacts/details.php b/app/views/shared/contacts/details.php index f39d200..a4605ce 100644 --- a/app/views/shared/contacts/details.php +++ b/app/views/shared/contacts/details.php @@ -45,7 +45,7 @@ </td> <? if ($object_type === 'Studiengang') : ?> <td> - <?= htmlReady($GLOBALS['MVV_CONTACTS']['TYPE']['values'][$rel['type']]['name']); ?> + <?= htmlReady($GLOBALS['MVV_CONTACTS']['TYPE']['values'][$rel['type']]['name'] ?? ''); ?> </td> <? endif; ?> <td> diff --git a/app/views/shared/contacts/index.php b/app/views/shared/contacts/index.php index 6073574..6604263 100644 --- a/app/views/shared/contacts/index.php +++ b/app/views/shared/contacts/index.php @@ -84,7 +84,7 @@ $pagination->set_attribute('page', $page); $page_link = reset(explode('?', $controller->action_url('index'))) . '?page_contacts=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/shared/contacts/range.php b/app/views/shared/contacts/range.php index d66c494..f58b286 100644 --- a/app/views/shared/contacts/range.php +++ b/app/views/shared/contacts/range.php @@ -40,7 +40,7 @@ <td><?= htmlReady($mvv_contact->position); ?></td> <td><?= htmlReady($mvv_contact->name) ?></td> <? if($range_type !== 'Modul'): ?> - <td><?= htmlReady($GLOBALS['MVV_CONTACTS']['TYPE']['values'][$mvv_contact->type]['name']) ?></td> + <td><?= htmlReady($GLOBALS['MVV_CONTACTS']['TYPE']['values'][$mvv_contact->type]['name'] ?? '') ?></td> <? endif; ?> <td><?= htmlReady($mvv_contact->getCategoryDisplayname()); ?></td> <td ><?= htmlReady($mvv_contact->count_relations); ?></td> diff --git a/app/views/shared/log_event/show.php b/app/views/shared/log_event/show.php index ea96f89..eec2164 100644 --- a/app/views/shared/log_event/show.php +++ b/app/views/shared/log_event/show.php @@ -32,7 +32,7 @@ use Studip\Button, Studip\LinkButton; </th> </tr> <? foreach ($log_events as $log_event): ?> - <tr class="<?= TextHelper::cycle('table_row_even', 'table_row_odd') ?>"> + <tr> <td style="font-size: smaller; white-space: nowrap;"> <?= date('d.m.Y H:i:s', $log_event['time']) ?> </td> diff --git a/app/views/shared/modul/_modul.php b/app/views/shared/modul/_modul.php index c813c44..461e486 100644 --- a/app/views/shared/modul/_modul.php +++ b/app/views/shared/modul/_modul.php @@ -46,7 +46,7 @@ <td><strong><?= _('Semester der erstmaligen Durchführung') ?></strong></td> <td data-mvv-field="mvv_modul.start"><?= htmlReady($startSemester['name'] ?? '') ?></td> </tr> - <? if ($instituteName) : ?> + <? if (!empty($instituteName)) : ?> <tr> <td><strong><?= _('Fachbereich/Institut') ?></strong></td> <td data-mvv-field="mvv_modul_inst"><?= htmlReady($instituteName) ?></td> @@ -135,7 +135,7 @@ <td><strong><?= _('Modulinhalte') ?></strong></td> <td data-mvv-field="mvv_modul_deskriptor.inhalte"><?= formatReady($modulDeskriptor->inhalte) ?></td> </tr> - <? if ($type !== 3) : ?> + <? if (!isset($type) || $type !== 3) : ?> <tr> <td><strong><?= ngettext('Lehrveranstaltungsform', 'Lehrveranstaltungsformen', count($modul->modulteile)) ?></strong></td> <td data-mvv-field="mvv_modulteil_deskriptor.lernlehrform"> @@ -171,7 +171,7 @@ </tr> <tr> <td><strong><?= _('Prüfungsebene') ?></strong></td> - <td data-mvv-field="mvv_modul.pruef_ebene"><?= htmlReady($pruefungsEbene) ?></td> + <td data-mvv-field="mvv_modul.pruef_ebene"><?= htmlReady($pruefungsEbene ?? '') ?></td> </tr> <tr> <td><strong><?= _('Credit-Points') ?></strong></td> @@ -180,7 +180,7 @@ <tr> <td><strong><?= _('Modulabschlussnote') ?></strong></td> <td> - <? if ($type !== 3) : ?> + <? if (!isset($type) || $type !== 3) : ?> <? $nummer_modulteil = 1; ?> <? $note = []; ?> <? foreach ($modul->modulteile as $modulteil): ?> diff --git a/app/views/shared/modul/_modul_ohne_lv.php b/app/views/shared/modul/_modul_ohne_lv.php index 07e5310..f3c74ec 100644 --- a/app/views/shared/modul/_modul_ohne_lv.php +++ b/app/views/shared/modul/_modul_ohne_lv.php @@ -3,12 +3,12 @@ <? $modulSumme = $modul->wl_selbst + $modul->wl_pruef ?> <tr> <td style="width: 30%;"><strong><?= _('Workload selbstgestaltete Arbeit') ?></strong></td> - <td style="width: 70%;" data-mvv-field="mvv_modul.wl_selbst mvv_modul_deskriptor.kommentar_wl_selbst"><?= htmlReady($modul->wl_selbst) ?> <?= MVVController::trim($modulDeskriptor->kommentar_wl_selbst) ? sprintf(" (%s)", formatReady($modulDeskriptor->kommentar_wl_selbst)) : '' ?></td> + <td style="width: 70%;" data-mvv-field="mvv_modul.wl_selbst mvv_modul_deskriptor.kommentar_wl_selbst"><?= htmlReady($modul->wl_selbst) ?> <?= MVVController::trim($modulDeskriptor->kommentar_wl_selbst ?? '') ? sprintf(" (%s)", formatReady($modulDeskriptor->kommentar_wl_selbst)) : '' ?></td> </tr> <tr> <td style="width: 30%;"><strong><?= _('Workload Prüfung incl. Vorbereitung') ?></strong></td> - <td style="width: 70%;" data-mvv-field="mvv_modul.wl_pruef mvv_modul_deskriptor.kommentar_wl_pruef"><?= htmlReady($modul->wl_pruef) ?> <?= MVVController::trim($modulDeskriptor->kommentar_wl_pruef) ? sprintf(" (%s)", formatReady($modulDeskriptor->kommentar_wl_pruef)) : '' ?></td> + <td style="width: 70%;" data-mvv-field="mvv_modul.wl_pruef mvv_modul_deskriptor.kommentar_wl_pruef"><?= htmlReady($modul->wl_pruef) ?> <?= MVVController::trim($modulDeskriptor->kommentar_wl_pruef ?? '') ? sprintf(" (%s)", formatReady($modulDeskriptor->kommentar_wl_pruef)) : '' ?></td> </tr> <tr> @@ -17,21 +17,21 @@ </tr> </tbody> </table> -<table class="mvv-modul-details" data-mvv-id="<?= $modulDeskriptor?$modulDeskriptor->getId():''; ?>" data-mvv-type="moduldeskriptor"> +<table class="mvv-modul-details" data-mvv-id="<?= isset($modulDeskriptor) ? $modulDeskriptor->getId() : ''; ?>" data-mvv-type="moduldeskriptor"> <tbody> - <? if (trim($modulDeskriptor->pruef_vorleistung)) : ?> + <? if (trim($modulDeskriptor->pruef_vorleistung ?? '')) : ?> <tr> <td style="width: 30%;"><strong><?= _('Prüfungsvorleistung') ?></strong></td> - <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_vorleistung" ><?= formatReady($modulDeskriptor->pruef_vorleistung) ?></td> + <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_vorleistung" ><?= formatReady($modulDeskriptor->pruef_vorleistung ?? '') ?></td> </tr> <? endif; ?> <tr> <td style="width: 30%;"><strong><?= _('Prüfungsform') ?></strong></td> - <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_leistung"><?= formatReady($modulDeskriptor->pruef_leistung) ?></td> + <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_leistung"><?= formatReady($modulDeskriptor->pruef_leistung ?? '') ?></td> </tr> <tr> <td style="width: 30%;"><strong><?= _('Wiederholungsprüfung') ?></strong></td> - <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_wiederholung"><?= formatReady($modulDeskriptor->pruef_wiederholung) ?></td> + <td style="width: 70%;" data-mvv-field="mvv_modul_deskriptor.pruef_wiederholung"><?= formatReady($modulDeskriptor->pruef_wiederholung ?? '') ?></td> </tr> </tbody> </table> diff --git a/app/views/siteinfo/help.php b/app/views/siteinfo/help.php index 54d0d09..e2a6762 100644 --- a/app/views/siteinfo/help.php +++ b/app/views/siteinfo/help.php @@ -59,7 +59,6 @@ <li>news</li> <li>vote</li> <li>test</li> - <li>evaluation</li> <li>wiki_pages</li> <li>lernmodul</li> <li>resource</li> diff --git a/app/views/start/index.php b/app/views/start/index.php index f4e7fcc..6a177f6 100644 --- a/app/views/start/index.php +++ b/app/views/start/index.php @@ -1,6 +1,7 @@ <?php /** * @var array $columns + * @var Flexi\Template $widget_layout */ ?> <h1 class="sr-only"> @@ -29,7 +30,8 @@ if (Config::get()->BANNER_ADS_ENABLE) { <li class="studip-widget-wrapper" id="<?= $widget->getPluginId() ?>"> <div class="ui-widget-content studip-widget"> <? if ($template = $widget->getPortalTemplate()): ?> - <? $template->set_layout($this->_factory->open('start/_widget')) ?> + <? $widget_layout->clear_attributes() ?> + <? $template->set_layout($widget_layout) ?> <?= $this->render_partial($template, compact('widget')) ?> <? else: ?> <?= $this->render_partial('start/_widget', compact('widget')) ?> diff --git a/app/views/studiengaenge/faecher/index.php b/app/views/studiengaenge/faecher/index.php index 1b3f325..485d922 100644 --- a/app/views/studiengaenge/faecher/index.php +++ b/app/views/studiengaenge/faecher/index.php @@ -64,7 +64,7 @@ $parts = explode('?', $controller->action_url('index')); $page_link = reset($parts) . '?page_faecher=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render("shared/pagechooser"); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/studiengaenge/studiengaenge/index.php b/app/views/studiengaenge/studiengaenge/index.php index 26249d0..37d4d1d 100644 --- a/app/views/studiengaenge/studiengaenge/index.php +++ b/app/views/studiengaenge/studiengaenge/index.php @@ -42,7 +42,7 @@ $parts = explode('?', $controller->action_url('index')); $page_link = reset($parts) . '?page_studiengaenge=%s'; $pagination->set_attribute('pagelink', $page_link); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> diff --git a/app/views/studiengaenge/versionen/abschnitte.php b/app/views/studiengaenge/versionen/abschnitte.php index 1620450..83c1173 100644 --- a/app/views/studiengaenge/versionen/abschnitte.php +++ b/app/views/studiengaenge/versionen/abschnitte.php @@ -59,8 +59,7 @@ </tr> <? endif; ?> </tbody> - <? endforeach; - TextHelper::reset_cycle(); ?> + <? endforeach; ?> <? if (count($version->abschnitte) > 0 && MvvPerm::haveFieldPermModul_zuordnungen('StgteilAbschnitt', MvvPerm::PERM_CREATE) ) : ?> <tbody> diff --git a/app/views/studiengaenge/versionen/details_abschnitt.php b/app/views/studiengaenge/versionen/details_abschnitt.php index 3b1c0e7..79f8da7 100644 --- a/app/views/studiengaenge/versionen/details_abschnitt.php +++ b/app/views/studiengaenge/versionen/details_abschnitt.php @@ -59,7 +59,7 @@ </tr> <? endif; ?> </tbody> - <? endforeach; TextHelper::reset_cycle(); ?> + <? endforeach; ?> <? if (MvvPerm::haveFieldPermModul_zuordnungen($abschnitt, MvvPerm::PERM_CREATE)) : ?> <tbody> <tr> diff --git a/app/views/studiengaenge/versionen/index.php b/app/views/studiengaenge/versionen/index.php index ebf8fb1..6460a59 100644 --- a/app/views/studiengaenge/versionen/index.php +++ b/app/views/studiengaenge/versionen/index.php @@ -29,7 +29,7 @@ $pagination->set_attribute('num_postings', $count); $pagination->set_attribute('page', $page); $pagination->set_attribute('pagelink', '?page=%s'); - echo $pagination->render('shared/pagechooser'); + echo $pagination->render(); ?> </td> </tr> diff --git a/app/views/web_migrate/index.php b/app/views/web_migrate/index.php index b26b90c..589d50a 100644 --- a/app/views/web_migrate/index.php +++ b/app/views/web_migrate/index.php @@ -51,7 +51,7 @@ <?= htmlReady($number) ?> </td> <td> - <?= htmlReady(get_class($migration)) ?> + <?= htmlReady($migration->getName()) ?> </td> <td> <? if ($migration->description()): ?> |
