aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/sem_classes/overview.php
blob: 5cae59c4cab7fea30b3acf6394525b49085f9141 (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
<?php

/**
 *  Copyright (c) 2012  Rasmus Fuhse <fuhse@data-quest.de>
 *
 *  This program is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU General Public License as
 *  published by the Free Software Foundation; either version 2 of
 *  the License, or (at your option) any later version.
 *
 * @var Admin_SemClassesController $controller
 */
?>
<table class="default">
    <thead>
        <tr>
            <th><?= _("ID") ?></th>
            <th><?= _("Veranstaltungskategorie") ?></th>
            <th><?= _("Anzahl Veranstaltungstypen") ?></th>
            <th><?= _("Anzahl Veranstaltungen") ?></th>
            <th><?= _("Zuletzt geƤndert") ?></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <? foreach ($GLOBALS['SEM_CLASS'] as $id => $sem_class) : ?>
        <tr>
            <td class="id"><?= htmlReady($id) ?></td>
            <td><?= htmlReady($sem_class['name']) ?></td>
            <td><?= count($sem_class->getSemTypes()) ?></td>
            <td><?= $sem_class->countSeminars() ?></td>
            <td><?= date("j.n.Y H:i", $sem_class['chdate']) ?> <?= _("Uhr") ?></td>
            <td class="actions">
                <a href="<?= URLHelper::getLink('dispatch.php/admin/sem_classes/details', ['id' => $id]) ?>" title="<?= _('Editieren dieser Veranstaltungskategorie') ?>">
                <?= Icon::create('edit')->asSvg(['class' => 'text-bottom']) ?>
                </a>
            </td>
        </tr>
    <? endforeach ?>
    </tbody>
</table>

<?
$sidebar = Sidebar::Get();
$links = new ActionsWidget();
$links->addLink(
    _('Neue Kategorie anlegen'),
    $controller->url_for('admin/sem_classes/add_sem_type'),
    Icon::create('add'),
    [
        'onClick'     => 'STUDIP.sem_classes.add(); return false;',
        'data-dialog' => 'size=auto'
    ]
);
$sidebar->addWidget($links);