aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/gradebook/lecturers/edit_custom_definitions.php
blob: 19012045ada0b98cc4499e2d3608ff49a8787fd1 (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
<table class="default">
    <caption>
        <?= _('Manuelle Leistungen definieren') ?>
    </caption>

    <thead>
        <tr class="tablesorter-ignoreRow">
            <th><?= _('Name') ?></th>
            <th class="actions"><?= _('Aktionen') ?></th>
        </tr>
    </thead>

    <? if (count($customDefinitions)) { ?>
        <tbody>
            <? foreach ($customDefinitions as $definition) { ?>
                <tr>
                    <td>
                        <?= htmlReady($definition->name) ?>
                    </td>
                    <td class="actions">
                        <?=
                        \ActionMenu::get()
                                   ->addLink(
                                       $controller->url_for(
                                           'course/gradebook/lecturers/edit_custom_definition',
                                           $definition->id
                                       ),
                                       _('Ändern'),
                                       Icon::create('edit'),
                                       ['data-dialog' => 'size=fit']
                                   )
                                   ->addLink(
                                       $controller->url_for(
                                           'course/gradebook/lecturers/delete_custom_definition',
                                           $definition->id
                                       ),
                                       _('Löschen'),
                                       Icon::create('trash'),
                                       ['onclick' => "return STUDIP.Dialog.confirmAsPost('" . _('Wollen Sie die Leistungsdefinition wirklich löschen?') . "', this.href);"]
                                   ) ?>
                    </td>
                </tr>
            <? } ?>
        </tbody>
    <? } ?>


    <tfoot class="gradebook-lecturer-custom-definitions-actions">
        <tr>
            <td colspan="2">
                <?= \Studip\LinkButton::createAdd(
                    count($customDefinitions) ? _('Weitere Leistung definieren') : _('Leistung definieren'),
                    $controller->url_for('course/gradebook/lecturers/new_custom_definition'),
                    ['data-dialog' => 'size=fit']
                ) ?>
            </td>
        </tr>
    </tfoot>
</table>