aboutsummaryrefslogtreecommitdiff
path: root/templates/header.php
diff options
context:
space:
mode:
authorMoritz Strohm <strohm@data-quest.de>2022-10-19 13:09:10 +0000
committerMoritz Strohm <strohm@data-quest.de>2022-10-19 13:09:10 +0000
commit258732f52a2f157704e089ba365b42e9555f871d (patch)
tree048f880c89cdc5b8b4b151588e984af09fb0f364 /templates/header.php
parent1c55c6f41a32a1aa830b29798d9afd1fb9e3d8dc (diff)
fix for BIESt 109, closes #109
Closes #109 Merge request studip/studip!832
Diffstat (limited to 'templates/header.php')
-rw-r--r--templates/header.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/templates/header.php b/templates/header.php
index 63602b2..f07f765 100644
--- a/templates/header.php
+++ b/templates/header.php
@@ -85,11 +85,17 @@ if (isset($_COOKIE['navigation-length'])) {
$alert = true;
}
} ?>
- <div id="notification_marker"<?= !empty($alert) ? ' class="alert"' : "" ?> title="<?= _("Benachrichtigungen") ?>" data-lastvisit="<?= $lastvisit ?>">
- <?= count($notifications) ?>
- </div>
+ <button id="notification_marker" data-toggles="#notification_checkbox" <?= !empty($alert) ? ' class="alert"' : "" ?>
+ title="<?= sprintf(
+ ngettext('%u Benachrichtigung', '%u Benachrichtigungen', count($notifications)),
+ count($notifications)
+ ) ?>" data-lastvisit="<?= $lastvisit ?>"
+ <?= count($notifications) == 0 ? 'disabled' : '' ?>>
+ <span class="count" aria-hidden="true"><?= count($notifications) ?></span>
+ </button>
+ <input type="checkbox" id="notification_checkbox">
<div class="list below" id="notification_list">
- <a class="mark-all-as-read <? if (count($notifications) < 2) echo 'notification_hidden'; ?>" href="<?= URLHelper::getLink('dispatch.php/jsupdater/mark_notification_read/all', ['return_to' => $_SERVER['REQUEST_URI']]) ?>">
+ <a class="mark-all-as-read <? if (count($notifications) < 2) echo 'invisible'; ?>" href="<?= URLHelper::getLink('dispatch.php/jsupdater/mark_notification_read/all', ['return_to' => $_SERVER['REQUEST_URI']]) ?>">
<?= _('Alle Benachrichtigungen als gelesen markieren') ?>
</a>
<a class="enable-desktop-notifications" href="#" style="display: none;">