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
|
<table class="default collapsable ">
<caption>
<? if ($is_tutor) : ?>
<span class="actions">
<a href="<?= URLHelper::getLink('dispatch.php/messages/write', [
'filter' => 'send_sms_to_all',
'emailrequest' => 1,
'who' => 'dozent',
'course_id' => $course_id,
'default_subject' => $subject
]) ?>" data-dialog title="<?= sprintf(
_('Nachricht mit Mailweiterleitung an alle %s versenden'),
htmlReady($status_groups['dozent'])
) ?>">
<?= Icon::create('inbox') ?>
</a>
</span>
<? endif ?>
<?= htmlReady($status_groups['dozent']) ?>
</caption>
<colgroup>
<col width="<?= $is_tutor ? 40 : 20 ?>">
<col>
<col width="80">
</colgroup>
<thead>
<tr class="sortable">
<th><p class="sr-only"><?= _('Nummer') ?></p></th>
<th <? if ($sort_by === 'nachname' && $sort_status === 'dozent') printf('class="sort%s"', $order); ?>>
<? $order = $sort_status !== 'dozent' ? 'desc' : $order; ?>
<a href="<?= URLHelper::getLink(sprintf(
'?sortby=nachname&sort_status=dozent&order=%s&toggle=%s',
$order, $sort_by === 'nachname'
)) ?>">
<?= _('Nachname, Vorname') ?>
</a>
</th>
<th class="actions"><?= _('Aktion') ?></th>
</tr>
</thead>
<tbody>
<? $nr = 0?>
<? foreach($dozenten as $dozent) : ?>
<? $fullname = $dozent['fullname'];?>
<tr>
<td style="text-align: right"><?= (++$nr < 10) ? sprintf('%02d', $nr) : $nr ?></td>
<td>
<a href="<?= $controller->url_for(sprintf('profile?username=%s',$dozent['username'])) ?>" <? if ($dozent['mkdate'] >= $last_visitdate) echo 'class="new-member"'; ?>>
<?= Avatar::getAvatar($dozent['user_id'], $dozent['username'])->getImageTag(Avatar::SMALL, [
'style' => 'margin-right: 5px'
]) ?>
<?= htmlReady($fullname) ?>
</a>
<? if ($is_tutor && $dozent['comment']) : ?>
<?= tooltipHtmlIcon(sprintf(
'<strong>%s</strong><br>%s',
_('Bemerkung'),
htmlReady($dozent['comment'])
)) ?>
<? endif ?>
</td>
<td class="actions">
<? $actionMenu = ActionMenu::get()->setContext($fullname) ?>
<? if ($is_tutor) : ?>
<? $actionMenu->addLink(
$controller->url_for('course/members/add_comment/' . $dozent['user_id']),
_('Bemerkung hinzufügen'),
Icon::create('comment'),
['data-dialog' => 'size=auto']
) ?>
<? endif ?>
<? if($user_id !== $dozent['user_id']) : ?>
<? $actionMenu->addLink(
URLHelper::getURL('dispatch.php/messages/write',[
'filter' => 'send_sms_to_all',
'emailrequest' => 1,
'rec_uname' => $dozent['username'],
'default_subject' => $subject,
]),
_('Nachricht mit Mailweiterleitung senden'),
Icon::create(
'mail',
Icon::ROLE_CLICKABLE,
['title' => sprintf('Nachricht mit Weiterleitung an %s senden', $fullname)]
),
['data-dialog' => '1']
) ?>
<? else: ?>
<? $actionMenu->addLink(
'#',
_('Nachricht mit Mailweiterleitung senden'),
Icon::create('mail', Icon::ROLE_INACTIVE),
['disabled' => true]
) ?>
<? endif ?>
<? if (!$dozent_is_locked && $is_dozent && $user_id !== $dozent['user_id'] && count($dozenten) > 1) : ?>
<? $actionMenu->addLink(
$controller->url_for('course/members/cancel_subscription/singleuser/dozent/' . $dozent['user_id']),
_('Aus Veranstaltung austragen'),
Icon::create(
'door-leave',
Icon::ROLE_CLICKABLE,
['title' => sprintf(_('%s austragen'), $fullname)]
)
) ?>
<? endif ?>
<?= $actionMenu->render() ?>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
|