blob: b0f5f48aadb1e924fdf9c0adf5ebe1032f614747 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
<? if (count($topics) > 0) : ?>
<table class="default withdetails">
<colgroup>
<col width="50%">
<col>
</colgroup>
<thead>
<tr>
<th><?= _('Thema') ?></th>
<th><?= _('Termine') ?></th>
</tr>
</thead>
<tbody>
<? foreach ($topics as $key => $topic) : ?>
<tr class="<?= Request::get("open") === $topic->getId() ? "open" : "" ?>">
<td>
<a href="#" name="<?=$topic->getId()?>" onClick="jQuery(this).closest('tr').toggleClass('open'); return false;">
<? if ($topic->paper_related): ?>
<?= Icon::create('glossary')->asImg(array_merge(
['class' => 'text-top'],
tooltip2(_('Thema behandelt eine Hausarbeit oder ein Referat'))
)) ?>
<? endif; ?>
<?= htmlReady($topic['title']) ?>
</a>
</td>
<td>
<ul class="clean">
<? foreach ($topic->dates as $date) : ?>
<li>
<a href="<?= URLHelper::getLink("dispatch.php/course/dates/details/".$date->getId()) ?>" data-dialog="size=auto">
<?= Icon::create('date', 'clickable')->asImg(['class' => "text-bottom"]) ?>
<?= htmlReady($date->getFullName()) ?>
</a>
</li>
<? endforeach ?>
</ul>
</td>
</tr>
<tr class="details nohover">
<td colspan="2">
<div class="detailscontainer">
<table class="default nohover">
<tbody>
<tr>
<td><strong><?= _('Beschreibung') ?></strong></td>
<td><?= formatReady($topic['description']) ?></td>
</tr>
<tr>
<td><strong><?= _('Materialien') ?></strong></td>
<td>
<? $material = false ?>
<ul class="clean">
<? $folder = $topic->folders->first() ?>
<? if ($documents_activated && $folder) : ?>
<li>
<a href="<?= URLHelper::getLink(
'dispatch.php/course/files/index/' . $folder->id
) ?>">
<?= $folder->getTypedFolder()->getIcon('clickable')->asImg(['class' => "text-bottom"]) ?>
<?= _('Dateiordner') ?>
</a>
</li>
<? $material = true ?>
<? endif ?>
<? if ($forum_activated && ($link_to_thread = $topic->forum_thread_url)) : ?>
<li>
<a href="<?= URLHelper::getLink($link_to_thread) ?>">
<?= Icon::create('forum', 'clickable')->asImg(['class' => "text-bottom"]) ?>
<?= _('Thema im Forum') ?>
</a>
</li>
<? $material = true ?>
<? endif ?>
</ul>
<? if (!$material) : ?>
<?= _('Keine Materialien zu dem Thema vorhanden') ?>
<? endif ?>
</td>
</tr>
</tbody>
</table>
<div style="text-align: center;">
<? if ($GLOBALS['perm']->have_studip_perm("tutor", Context::getId())) : ?>
<?= Studip\LinkButton::createEdit(
_('Bearbeiten'),
$controller->editURL($topic),
['data-dialog' => '']
) ?>
<form action="<?= $controller->delete($topic) ?>" method="post" style="display: inline">
<?= Studip\Button::create(
_('Löschen'),
'delete',
['data-confirm' => _('Das Thema wirklich löschen?')]
) ?>
</form>
<? if (!$cancelled_dates_locked && $topic->dates->count()) : ?>
<?= \Studip\LinkButton::create(_('Alle Termine ausfallen lassen'), URLHelper::getURL("dispatch.php/course/cancel_dates", ['issue_id' => $topic->getId()]), ['data-dialog' => '']) ?>
<? endif ?>
<span class="button-group">
<? if ($key > 0) : ?>
<form action="<?= $controller->move_up($topic) ?>" method="post" style="display: inline;">
<?= Studip\Button::createMoveUp(_('nach oben verschieben')) ?>
</form>
<? endif ?>
<? if ($key < count($topics) - 1) : ?>
<form action="<?=$controller->move_down($topic)?>" method="post" style="display: inline;">
<?= Studip\Button::createMoveDown(_('nach unten verschieben')) ?>
</form>
<? endif ?>
</span>
<? endif ?>
</div>
</div>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
<? else : ?>
<? PageLayout::postInfo(_('Keine Themen vorhanden.')) ?>
<? endif ?>
|