aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/user/_institute_files.php
blob: 9f17a08a48e0f5ed587e532c1c537ce14258a5aa (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
<section class="contentbox">
    <header>
        <h1>
            <a href="<?= ContentBoxHelper::href('institutes') ?>">
                <?= _('Dateiübersicht Einrichtungen') ?>
            </a>
        </h1>
    </header>
    <section>
        <table class="default">
            <colgroup>
                <col>
                <col style="width: 120px">
                <col style="width: 20px">
            </colgroup>
            <thead>
                <tr>
                    <th><?= _('Dateiname') ?></th>
                    <th><?= _('Anzahl') ?></th>
                    <th class="actions"><?= _('Aktionen') ?></th>
                </tr>
            </thead>
            <tbody>
                <? foreach ($institutes as $institute): ?>
                    <tr>
                        <td>
                            <?= htmlReady($institute['Name']) ?>
                        </td>
                        <td>
                            <? if ((int)$institute['files']) : ?>
                                <?= sprintf('%u %s', $institute['files'], _('Dokumente')) ?>
                            <? else : ?>
                                -
                            <? endif ?>
                        </td>
                        <td class="actions">
                            <? if ($institute['files']) : ?>
                                <?
                                $actionMenu = ActionMenu::get();
                                $actionMenu->addLink($controller->url_for('admin/user/list_files/' . $user['user_id'] . '/' . $institute['Institut_id'] , $params),
                                    _('Dateien auflisten'),
                                    Icon::create('folder-full', 'clickable'),
                                    ['data-dialog' => 'size=50%']);
                                $actionMenu->addLink($controller->url_for('admin/user/download_user_files/' . $user['user_id'] . '/' . $institute['Institut_id']),
                                    _('Dateien als ZIP herunterladen'),
                                    Icon::create('download', 'clickable'));

                                ?>
                                <?= $actionMenu->render() ?>
                            <? endif ?>
                        </td>
                    </tr>
                <? endforeach; ?>
            </tbody>
        </table>
    </section>
</section>