aboutsummaryrefslogtreecommitdiff
path: root/app/views/profile/public_files.php
blob: eb87b1ae576342271c1ae5957780706d7ed2018f (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
<article class="studip">
    <header>
        <h1>
            <?= _('Freigegebene Dateien') ?>
        </h1>
    </header>

    <section>
        <? $folder = current($public_folders); ?>
        <form method="post" action="<?= $controller->link_for('file/bulk/' . $folder->id) ?>">
            <?= CSRFProtection::tokenTag() ?>
            <table class="default sortable-table documents" data-sortlist="[[2, 0]]">
                <?= $this->render_partial('files/_files_thead', ['show_bulk_checkboxes' => true]) ?>
                <? foreach ($public_files as $file): ?>
                    <? if ($file->isVisible($GLOBALS['user']->id)) : ?>
                        <?= $this->render_partial(
                            'files/_fileref_tr',
                            [
                                'file'           => $file,
                                'current_folder' => $public_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>
        </form>
    </section>
</article>