aboutsummaryrefslogtreecommitdiff
path: root/templates/personal_notifications/notification.php
blob: 20f1f9d1bc3929958428f411d04701ee948f133e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<li class="notification item" data-id="<?= $notification['personal_notification_id'] ?>" data-timestamp="<?= (int) $notification['mkdate'] ?>">
    <div class="main">
        <a class="content" href="<?= URLHelper::getLink('dispatch.php/jsupdater/mark_notification_read/' . $notification['personal_notification_id']) ?>"<?= $notification['dialog'] ? ' data-dialog' : '' ?>>
            <? if ($notification['avatar']): ?>
                <? if (filter_var($notification['avatar'], FILTER_VALIDATE_URL)): ?>
                    <div class="avatar" style="background-color: currentColor; mask: url(<?= $notification['avatar'] ?>) no-repeat center / contain;;"></div>
                <? else: ?>
                    <div class="emoji-icon">
                        <?= $notification['avatar'] ?>
                    </div>
                <? endif ?>
            <? endif ?>

            <?= htmlReady($notification['text']) ?>
        </a>
        <button class="options mark_as_read">
            <?= Icon::create('decline')->asSvg(16, ['title' => _('Als gelesen markieren')]) ?>
        </button>
    </div>
    <? if ($notification->more_unseen > 0): ?>
        <div class="more">
            <?= htmlReady(sprintf(_('... und %u weitere'), $notification->more_unseen)) ?>
        </div>
    <? endif ?>
</li>