aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/dates/details.php
blob: 5a772682a6cd47696c6df232a54164a1d53ac7c3 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<table class="default nohover">
    <colgroup>
        <col width="25%">
        <col width="75%">
    </colgroup>
    <tbody>
    <? if (count($date->topics) > 0): ?>
        <tr>
            <td><strong><?= _('Thema') ?></strong></td>
            <td>
                <ul class="themen_list">
                <? foreach ($date->topics as $topic) : ?>
                    <?= $this->render_partial('course/dates/_topic_li', compact('topic')) ?>
                <? endforeach ?>
                </ul>
            </td>
        </tr>
    <? endif; ?>
        <tr>
            <td><strong><?= _("Art des Termins") ?></strong></td>
            <td>
                <?= htmlReady($GLOBALS['TERMIN_TYP'][$date['date_typ']]['name']) ?>
            </td>
        </tr>
    <? if (count($date->dozenten) > 0): ?>
        <tr>
            <td><strong><?= _('Durchführende Lehrende') ?></strong></td>
            <td>
                <ul class="dozenten_list clean">
                <? foreach ($date->dozenten as $teacher): ?>
                    <li>
                        <a href="<?= $controller->link_for('profile?username=' . $teacher->username) ?>">
                            <?= Avatar::getAvatar($teacher->user_id)->getImageTag(Avatar::SMALL) ?>
                            <?= htmlReady($teacher->getFullname()) ?>
                        </a>
                    </li>
                <? endforeach ?>
                </ul>
            </td>
        </tr>
    <? endif; ?>
    <? if (count($date->statusgruppen) > 0): ?>
        <tr>
            <td><strong><?= _('Beteiligte Gruppen') ?></strong></td>
            <td>
                <ul>
                <? foreach ($date->statusgruppen as $group): ?>
                    <li><?= htmlReady($group->name) ?></li>
                <? endforeach ;?>
                </ul>
            </td>
        </tr>
    <? endif; ?>
    </tbody>
</table>

<? extract($date->getAccessibleFolderFiles($GLOBALS['user']->id))?>
<? if (count($files) > 0): ?>
    <? $one_folder = current($folders); ?>
    <form method="post" action="<?= $controller->link_for('file/bulk/' . $one_folder->id) ?>">
        <?= CSRFProtection::tokenTag() ?>
        <article class="studip">
            <header>
                <h1><?= _('Dateien') ?></h1>
            </header>
            <section>
                <table id="course_date_files" class="default sortable-table documents" data-sortlist="[[2, 0]]">
                    <?= $this->render_partial('files/_files_thead', ['show_bulk_checkboxes' => true]) ?>
                    <? foreach($files as $file): ?>
                        <? if ($file->isVisible($GLOBALS['user']->id)) : ?>
                            <?= $this->render_partial('files/_fileref_tr', [
                                'file'       => $file,
                                'current_folder' => $folders[$file->getFolderType()->getId()],
                                'last_visitdate' => time(),
                                'show_bulk_checkboxes' => true
                            ]) ?>
                        <? endif ?>
                    <? endforeach ?>
                    <tfoot>
                        <tr>
                            <td colspan="7">
                                <span class="multibuttons">
                                <?= Studip\Button::create(_('Herunterladen'), 'download', [
                                    'data-activates-condition' => 'table.documents tr[data-permissions*=d] :checkbox:checked'
                                ]) ?>
                                <?= Studip\Button::create(_('Kopieren'), 'copy', ['data-dialog' => '']) ?>
                                 </span>
                            </td>
                        </tr>
                    </tfoot>
                </table>
            </section>
        </article>
    </form>
    <script>
        STUDIP.Table.enhanceSortableTable($('#course_date_files'));
    </script>
<? endif; ?>