aboutsummaryrefslogtreecommitdiff
path: root/app/views/online/user-row.php
blob: f63d5a02fbbd8369a02460aba3b0b49877ecaa8a (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<tr>
    <td>
        <a href="<?= $controller->url_for('profile?username=' . $user['username']) ?>">
            <?= Avatar::getAvatar($user['user_id'], $user['username'])->getImageTag(Avatar::SMALL, [
                'title' => $user['name']
            ]) ?>
        </a>
    </td>
    <td>
        <a href="<?= $controller->url_for('profile?username=' . $user['username']) ?>">
            <?= htmlReady($user['name']) ?>
        </a>
    <? foreach (StudipKing::is_king($user['user_id'], true) as $text) : ?>
        <?= Icon::create('crown', 'sort', ['title' => $text]) ?>
    <? endforeach ?>
    </td>
    <td style="white-space: nowrap;">
        <?= ucfirst(reltime(time() - $user['last_action'])) ?>
    </td>
    <td class="actions" nowrap="nowrap">
        <? $actionMenu = ActionMenu::get()->setContext($user['name']) ?>
        <? if (Config::get()->BLUBBER_GLOBAL_MESSENGER_ACTIVATE) : ?>
            <? $actionMenu->addLink(
                URLHelper::getURL('dispatch.php/blubber/write_to/'.$user['user_id']),
                _('Blubber diesen Nutzer an'),
                Icon::create('blubber'),
                ['data-dialog' => '']
            ) ?>
        <? endif ?>
        <? $actionMenu->addLink(
            URLHelper::getURL('dispatch.php/messages/write', ['rec_uname' => $user['username']]),
            _('Nachricht an Benutzer verschicken'),
            Icon::create('mail', 'clickable'),
            ['data-dialog' => 'size=50%']
        ) ?>

        <? if ($user['is_buddy']): ?>
            <? $actionMenu->addLink(
                $controller->url_for('online/buddy/remove?username=' . $user['username']),
                _('Aus den Kontakten entfernen'),
                Icon::create('trash', 'clickable')
            ) ?>
        <? else: ?>
            <? $actionMenu->addLink(
                $controller->url_for('online/buddy/add?username=' . $user['username']),
                _('Zu den Kontakten hinzufügen'),
                Icon::create('add', 'clickable')
            ) ?>
        <? endif; ?>
        <?= $actionMenu->render() ?>
    </td>
</tr>