aboutsummaryrefslogtreecommitdiff
path: root/templates/wiki/list.php
blob: 9db04f4f0a5fff1cf82a41e5587b5b88c60306c8 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
<div id="main_content">
<table class="default">
    <colgroup>
        <col>
        <col style="width: 10%;">
        <col style="width: 15%;">
        <col style="width: 35%;">
    </colgroup>
    <thead>
        <tr>
            <th>
                <a href="<?= URLHelper::getLink($url, ['sortby' => $titlesortlink]) ?>">
                    <?= _('Titel') ?>
                </a>
            </th>
            <th>
                <a href="<?= URLHelper::getLink($url, ['sortby' => $versionsortlink]) ?>">
                    <?= _('Änderungen') ?>
                </a>
            </th>
            <th>
                <a href="<?= URLHelper::getLink($url, ['sortby' => $changesortlink]) ?>">
                    <?= _('Letzte Änderung') ?>
                </a>
            </th>
            <th>
                <?= _('Von') ?>
            </th>
        </tr>
    </thead>
    <tbody>
    <? foreach ($pages as $page): ?>
        <tr>
            <td>
                <a href="<?=URLHelper::getLink('wiki.php', ['keyword' => $page->keyword])?>">
                    <?= htmlReady($page->keyword === 'WikiWikiWeb' ? _('Wiki-Startseite') : $page->keyword) ?>
                </a>
            </td>
            <td>
                <?= htmlReady($page->version) ?>
            </td>
            <td>
                <?= date('d.m.Y H:i', $page->chdate) ?>
            <? if ($mode === 'new' && $page->isVisibleTo($GLOBALS['user']) && $page->version > 1): ?>
                <br>
                <a href="<?= URLHelper::getLink('', ['view' => 'diff', 'keyword' => $page->keyword, 'versionssince' => $lastlogindate]) ?>">
                    <?= _('Änderungen') ?>
                </a>
            <? endif; ?>
            </td>
            <td>
                <? if (isset($page->author)) : ?>
                    <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $page->author->username]) ?>">
                        <?= Avatar::getAvatar($page->author->id, $page->author->username)->getImageTag(Avatar::SMALL, ['title' => $page->author->getFullName()]) ?>
                        <?= htmlReady($page->author->getFullName()) ?>
                    </a>
                <? else : ?>
                    <?= Avatar::getNobody()->getImageTag(Avatar::SMALL) ?>
                    <?= _('unbekannt') ?>
                <? endif ?>
            </td>
        </tr>
    <? endforeach; ?>
    </tbody>
</table>