aboutsummaryrefslogtreecommitdiff
path: root/app/views/evaluation/_buttons.php
blob: b5a3b338284663c5c0a25a7486a0fd00370a4491 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<? if (!$controller->showResult($vote)): ?>
    <? if ($vote->isRunning() && !$nobody) : ?>
        <?= Studip\Button::create(_('Abstimmen'), 'vote', ['value' => $vote->id]) ?>
    <? endif ?>
    <?= Studip\LinkButton::create(_('Ergebnisse'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id])) ?>
<? else: ?>
    <?= Studip\LinkButton::create(_('Ergebnisse ausblenden'), ContentBoxHelper::href($vote->id, ['preview' => 0])) ?>
    <?= Request::get('sort')
        ? Studip\LinkButton::create(_('Nicht sortieren'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id, 'sort' => 0]))
        : Studip\LinkButton::create(_('Sortieren'), ContentBoxHelper::href($vote->id, ['preview[]' => $vote->id, 'sort' => 1]))
    ?>
    <? if ($vote->changeable && $vote->state == 'active' && !$nobody): ?>
        <?= Studip\LinkButton::create(_('Antwort ändern'), ContentBoxHelper::href($vote->id, ['change' => 1])) ?>
    <? endif; ?>
    <? if (!$vote->anonymous && ($admin || $vote->namesvisibility)): ?>
        <? if (Request::get('revealNames') === $vote->id) : ?>
            <?= Studip\LinkButton::create(_('Namen ausblenden'), ContentBoxHelper::href($vote->id, ['revealNames' => null])) ?>
        <? else : ?>
            <?= Studip\LinkButton::create(_('Namen zeigen'), ContentBoxHelper::href($vote->id, ['revealNames' => $vote->id])); ?>
        <? endif; ?>
    <? endif; ?>
<? endif; ?>