diff options
| author | Ron Lucke <lucke@elan-ev.de> | 2024-12-04 13:03:14 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-12-04 13:03:14 +0000 |
| commit | 715fa1881de122b7101091dd13affe0f6a17c429 (patch) | |
| tree | ef99bcef6616893920e593158884693212928dc5 /templates | |
| parent | 278270b3f55f83593b7c07e206fe5edb6ebc121e (diff) | |
Polishing TIC: Avatarmenu
Closes #4935
Merge request studip/studip!3718
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/header.php | 19 | ||||
| -rw-r--r-- | templates/personal_notifications/notification.php | 2 |
2 files changed, 12 insertions, 9 deletions
diff --git a/templates/header.php b/templates/header.php index 7cb271c..64d1c3c 100644 --- a/templates/header.php +++ b/templates/header.php @@ -123,18 +123,21 @@ if ($navigation) { && Navigation::getItem('/profile')->isActive(); ?> - <!-- User-Avatar --> - <li class="header_avatar_container <? if ($active) echo 'active'; ?>" id="avatar-menu-container"> + <? if (is_object($GLOBALS['perm']) && PersonalNotifications::isActivated() && $GLOBALS['perm']->have_perm('autor')) : ?> + <? $notifications = PersonalNotifications::getMyNotifications() ?> <? $lastvisit = (int)UserConfig::get($GLOBALS['user']->id)->getValue('NOTIFICATIONS_SEEN_LAST_DATE') ?> - <div id="notification-container"<?= count($notifications) > 0 ? ' class="hoverable"' : '' ?>> - <? foreach ($notifications as $notification) { - if ($notification['mkdate'] > $lastvisit) { - $alert = true; - } - } ?> + <? foreach ($notifications as $notification) { + if ($notification['mkdate'] > $lastvisit) { + $alert = true; + } + } ?> + <!-- User-Avatar --> + <li class="header_avatar_container <?= !empty($alert) ? 'alert' : '' ?> <? if ($active) echo 'active'; ?>" id="avatar-menu-container"> + <div id="notification-container" <?= count($notifications) > 0 ? ' class="hoverable"' : '' ?>> + <button id="notification_marker" data-toggles="#notification_checkbox" <?= !empty($alert) ? ' class="alert"' : "" ?> title="<?= sprintf( ngettext('%u Benachrichtigung', '%u Benachrichtigungen', count($notifications)), diff --git a/templates/personal_notifications/notification.php b/templates/personal_notifications/notification.php index 8a10ae9..2f86a50 100644 --- a/templates/personal_notifications/notification.php +++ b/templates/personal_notifications/notification.php @@ -7,7 +7,7 @@ <?= htmlReady($notification['text']) ?> </a> <button class="options mark_as_read"> - <?= Icon::create('decline')->asImg(12, ['title' => _('Als gelesen markieren')]) ?> + <?= Icon::create('decline')->asImg(14, ['title' => _('Als gelesen markieren')]) ?> </button> </div> <? if ($notification->more_unseen > 0): ?> |
