aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/user/_institute_files.php
blob: 78085dfb855fca019825d58c3da8993a300b3cfd (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
<?php
/**
 * @var Admin_UserController $controller
 * @var Institute[] $institutes
 * @var User $user
 * @var array $params
 */
?>
<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()->setContext($institute['Name']);
                                $actionMenu->addLink($controller->url_for('admin/user/list_files/' . $user['user_id'] . '/' . $institute['Institut_id'] , $params),
                                    _('Dateien auflisten'),
                                    Icon::create('folder-full'),
                                    ['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'));

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