aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/studygroup/_choose_founders.php
blob: ca47782ce7b6bcecd7ac844e66e2e80b63091eb5 (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
<?
# Lifter010: TODO
?>
<tr>
    <? if(empty($flash['founders']) && empty($founders)) :?>
        <td style='text-align:right; vertical-align:top;'><?= _("GruppengründerIn hinzufügen:") ?></td>
        <td nowrap>
            <div style="width: 49%; float: left;">
            <? if (is_array($results_choose_founders)) : ?>
                <select name="choose_founder">
                    <? foreach ($results_choose_founders as $user_id => $data) : ?>
                    <option value="<?= $user_id ?>"><?= htmlReady(my_substr($data['fullname']." (".$data['username'],0,35)) ?>) - <?= $data['perms'] ?></option>
                    <? endforeach; ?>
                </select>
                <?= Icon::create('accept')->asInput([
                    'title' => _('NutzerIn hinzufügen'),
                    'type'  => 'image',
                    'class' => 'middle',
                    'name' => 'add_founder'
                ]) ?>
                <?= Icon::create('refresh')->asInput([
                    'title' => _('neue Suche starten'),
                    'type'  => 'image',
                    'class' => 'middle',
                    'name' => 'new_search',
                ]) ?>
                <? if (sizeof($results_choose_founders) == 500) : ?>
                <br><span style="color:red"><?= sprintf(_("Es werden nur die ersten %s Treffer angezeigt!"), 500) ?></span>
                <? endif; ?>
            <? else : ?>
                <input type="text" name="search_for_founder">
                <?= Icon::create('search')->asInput([
                    'title' => _('Suchen'),
                    'type'  => 'image',
                    'class' => 'middle',
                    'name' => 'search_founder',
                ]) ?>
                <?= _('Geben Sie zur Suche den Vor-, Nach- oder Benutzernamen ein.') ?>
            <? endif; ?>
            </div>
        </td>
    <? else: ?>
        <td style='text-align:right; vertical-align:top;'><?= _("Gruppengründer:") ?></td>
        <td nowrap>
            <div style="width: 49%; float: left;">
            <? if (is_array($founders) && sizeof($founders) > 0) :
                foreach ($founders as $user_id) :?>

                    <?= htmlReady(get_fullname($user_id, 'full_rev')) ?> (<?= get_username($user_id) ?>)
                    <input type="hidden" name="founders[]" value="<?= $user_id ?>">
                    <?= Icon::create('refresh', 'clickable', ['title' => _('NutzerIn entfernen')])->asInput(["type" => "image", "class" => "middle", "name" => "remove_founder"]) ?>
                    <br>
                <? endforeach; ?>
            <? endif; ?>
            </div>
        </td>
    <? endif; ?>
</tr>