aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/wiki/ask_deleting.php
blob: 915e689199f3245d71ec237fb48e47c6f1da6259 (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
<?php
/**
 * @var Course_WikiController $controller
 * @var WikiPage $page
 */
?>
<form action="" method="post">
    <?= CSRFProtection::tokenTag() ?>
    <div class="file_select_possibilities">
        <div>
        <? if (count($page->versions) > 0 && $page->versions->first()->isDeletable()): ?>
            <div class="clickable">
                <button
                    class="as-link"
                    data-confirm="<?= _('Wirklich die letzte Änderung löschen?') ?>"
                    formaction="<?= $controller->deleteversionURL($page, ['redirect_to' => 'page']) ?>"
                >
                    <?= Icon::create('archive2')->asImg(50) ?>
                    <?= _('Nur die letzte Änderung löschen') ?>
                </button>
            </div>
        <? endif; ?>
        <? if ($page->isDeletable()): ?>
            <div class="clickable">
                <button
                    class="as-link"
                    data-confirm="<?= _('Wollen Sie wirklich die komplette Seite löschen?') ?>"
                    formaction="<?= $controller->deleteURL($page) ?>"
                >
                    <?= Icon::create('wiki')->asImg(50) ?>
                    <?= _('Ganze Wikiseite löschen') ?>
                </button>
            </div>
        <? endif; ?>
        </div>
    </div>
</form>