aboutsummaryrefslogtreecommitdiff
path: root/app/views/my_courses/archive.php
blob: e86537cf255099f8ffd3cf625271a2fe3cc9492d (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
66
67
68
69
70
71
72
73
74
75
76
<? if (empty($seminars)): ?>
    <?= MessageBox::info(_('Es befinden sich zur Zeit keine Veranstaltungen im Archiv, an denen Sie teilgenommen haben.')) ?>
<? else: ?>
    <? foreach ($seminars as $semester => $rows): ?>
        <table class="default">
            <? if ($semester): ?>
                <caption><?= htmlReady($semester) ?></caption>

            <? endif; ?>
            <colgroup>
                <col width="80%">
                <col width="10%">
                <col width="10%">
            </colgroup>
            <thead>
            <tr>
                <th>
                    <a href="<?= $controller->url_for('my_courses/archive?sortby=name') ?>">
                        <?= _('Name') ?>
                    </a>
                </th>
                <th style="text-align: center"><?= _('Inhalt') ?></th>
                <th style="text-align: center">
                    <a href="<?= $controller->url_for('my_courses/archive?sortby=status') ?>">
                        <?= _('Status') ?>
                    </a>
                </th>
            </tr>
            </thead>
            <tbody>
            <? foreach ($rows as $row): ?>
                <tr>
                    <td>
                        <a href="<?= URLHelper::getLink('dispatch.php/archive/overview/' . $row['seminar_id']) ?>" data-dialog>
                            <?= htmlReady($row['name']) ?>
                        </a>
                    </td>
                    <td align="center">
                        <? if ($row['forumdump'] and archiv_check_perm($row['seminar_id'])) : ?>
                            <a href="<?= URLHelper::getLink('dispatch.php/archive/forum/' . $row['seminar_id']) ?>" data-dialog>
                                <?= Icon::create('forum')->asSvg(['title' => _('Beiträge des Forums der Veranstaltung')]) ?>
                            </a>
                        <? else: ?>
                            <?= Icon::create('forum', Icon::ROLE_INACTIVE)->asSvg(['style' => 'visibility: hidden;']) ?>
                        <? endif; ?>


                        <? $course = ArchivedCourse::find($row['seminar_id']); ?>

                        <? if(($row['archiv_file_id']) and archiv_check_perm($row['seminar_id'])): ?>
                            <a href="<?= FileManager::getDownloadLinkForArchivedCourse($course, false) ?>">
                                <?= Icon::create('file-archive')->asSvg(['title' => _('Dateisammlung der Veranstaltung herunterladen')]) ?>
                            </a>
                        <? elseif(($row['archiv_protected_file_id']) and archiv_check_perm($row['seminar_id'] == 'admin')): ?>
                            <a href="<?= FileManager::getDownloadLinkForArchivedCourse($course, true) ?>">
                                <?= Icon::create('file-archive')->asSvg(['title' => _('Dateisammlung der Veranstaltung herunterladen')]) ?>
                            </a>
                        <? else: ?>
                            <?= Icon::create('file-archive', Icon::ROLE_INACTIVE)->asSvg(['style' => 'visibility: hidden;']) ?>
                        <? endif; ?>

                        <? if ($row['wikidump'] and archiv_check_perm($row['seminar_id'])) : ?>
                            <a href="<?= URLHelper::getLink('dispatch.php/archive/wiki/' . $row['seminar_id']) ?>" data-dialog>
                                <?= Icon::create('wiki')->asSvg(['title' => _('Beiträge des Wikis der Veranstaltung')]) ?>
                            </a>
                        <? else: ?>
                            <?= Icon::create('wiki', Icon::ROLE_INACTIVE)->asSvg(['style' => 'visibility: hidden;']) ?>
                        <? endif; ?>
                    </td>
                    <td style="text-align: center"><?= $row['status'] ?></td>
                </tr>
            <? endforeach; ?>
            </tbody>
        </table>
    <? endforeach; ?>
<? endif; ?>