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
127
128
129
130
131
132
133
134
135
136
137
138
139
|
<? if ($participation_message) : ?>
<?= $participation_message ?>
<article class="studip">
<header><h1><?= _('Neuen Teilnahmestatus wählen') ?></h1></header>
<section>
<form class="default" method="post" data-dialog="reload-on-close"
action="<?= $controller->link_for('calendar/date/participation/' . $date->id) ?>">
<?= CSRFProtection::tokenTag() ?>
<fieldset>
<? if ($user_participation_status) : ?>
<label>
<input type="radio" name="participation" value=""
data-activates="button[name='update_participation']">
<?= _('Abwartend') ?>
</label>
<? endif ?>
<? if ($user_participation_status !== 'ACCEPTED') : ?>
<label>
<input type="radio" name="participation" value="ACCEPTED"
data-activates="button[name='update_participation']">
<?= _('Angenommen') ?>
</label>
<? endif ?>
<? if ($user_participation_status !== 'DECLINED') : ?>
<label>
<input type="radio" name="participation" value="DECLINED"
data-activates="button[name='update_participation']">
<?= _('Abgelehnt') ?>
</label>
<? endif ?>
<? if ($user_participation_status !== 'ACKNOWLEDGED') : ?>
<label>
<input type="radio" name="participation" value="ACKNOWLEDGED"
data-activates="button[name='update_participation']">
<?= _('Angenommen (keine Teilnahme)') ?>
</label>
<? endif ?>
</fieldset>
<div data-dialog-button>
<?= \Studip\Button::create(_('Teilnahmestatus ändern'), 'update_participation') ?>
</div>
</form>
</section>
</article>
<? endif ?>
<? if ($date->description) : ?>
<article class="studip">
<header><h1><?= _('Beschreibung') ?></h1></header>
<section><?= formatReady($date->description) ?></section>
</article>
<? endif ?>
<article class="studip">
<header><h1><?= _('Informationen') ?></h1></header>
<section>
<dl>
<dt><?= _('Zeit') ?></dt>
<dd><?= date('d.m.Y H:i', $date->begin) ?> - <?= date('d.m.Y H:i', $date->end) ?></dd>
<? if ($date->location) : ?>
<dt><?= _('Ort') ?></dt>
<dd><?= formatLinks($date->location) ?></dd>
<? endif ?>
<dt><?= _('Kategorie') ?></dt>
<dd><?= htmlReady($date->getCategoryAsString()) ?></dd>
<dt><?= _('Zugriff') ?></dt>
<dd><?= htmlReady($date->getAccessAsString()) ?></dd>
<? if ($date->repetition_type) : ?>
<dt><?= _('Wiederholung') ?></dt>
<dd><?= htmlReady($date->getRepetitionAsString()) ?></dd>
<? endif ?>
<? if (
$date->author && $date->editor
&& (
($date->author_id !== User::findCurrent()->id)
|| ($date->editor_id !== User::findCurrent()->id)
)
) : ?>
<dt><?= _('Bearbeitung') ?></dt>
<dd>
<? if ($date->author->id === $date->editor->id) : ?>
<? if ($date->mkdate === $date->chdate) : ?>
<?= sprintf(
_('Erstellt von %s'),
htmlReady($date->author->getFullName())
) ?>
<? else : ?>
<?= sprintf(
_('Erstellt und zuletzt bearbeitet von %s'),
htmlReady($date->author->getFullName())
) ?>
<? endif ?>
<? else : ?>
<?= sprintf(
_('Erstellt von %1$s, zuletzt bearbeitet von %2$s'),
htmlReady($date->author->getFullName()),
htmlReady($date->editor->getFullName())
) ?>
<? endif ?>
</dd>
<? endif ?>
</dl>
</section>
</article>
<? if ($is_group_date) : ?>
<article class="studip">
<header><h1><?= _('Teilnahmen') ?></h1></header>
<section>
<table class="default">
<body>
<? foreach ($user_calendar_assignments as $assignment) : ?>
<tr>
<td><?= htmlReady($assignment->getRangeName()) ?></td>
<td><?= htmlReady($assignment->getParticipationAsString()) ?></td>
</tr>
<? endforeach ?>
</body>
</table>
</section>
</article>
<? endif ?>
<div data-dialog-button>
<? if ($date->isWritable(User::findCurrent()->id) && $all_assignments_writable) : ?>
<?
$button_params = [];
if ($selected_date) {
$button_params['selected_date'] = $selected_date;
}
?>
<?= Studip\LinkButton::create(
_('Bearbeiten'),
$controller->url_for('calendar/date/edit/' . $date->id, array_merge($button_params, ['return_path' => '/calendar/calendar'])),
['data-dialog' => 'size=auto']
) ?>
<?= \Studip\LinkButton::create(
_('Löschen'),
$controller->url_for('calendar/date/delete/' . $date->id, $button_params),
['data-dialog' => 'reload-on-close']
) ?>
<? endif ?>
</div>
|