aboutsummaryrefslogtreecommitdiff
path: root/templates/blubber/course_context.php
blob: 0d6d2af62ca9d57f279ff0ea5f391b1890f2e881 (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
<div class="blubber_course_info indented">
    <div class="headline">
        <div class="side">
            <a href="<?= URLHelper::getLink("dispatch.php/course/go", ['to' => $course->getId()]) ?>">
                <?= htmlReady($course->name) ?>
            </a>
            <div class="icons">
                <ul class="my-courses-navigation">
                <? foreach ($icons as $icon) : ?>
                    <li class="my-courses-navigation-item <? if ($icon->getImage()->signalsAttention()) echo 'my-courses-navigation-important'; ?>">
                        <a href="<?= URLHelper::getLink("dispatch.php/course/go", ['to' => $course->getId(), 'redirect_to' => $icon->getURL()]) ?>"<?= $icon->getTitle() ? ' title="'.htmlReady($icon->getTitle()).'"' : "" ?>>
                            <?= $icon->getImage() ?>
                        </a>
                    </li>
                <? endforeach ?>
                </ul>
            </div>
        </div>
    </div>
    <? if ($nextdate) : ?>
        <div>
            <h4><?= _('Nächster Termin') ?></h4>
            <a href="<?= URLHelper::getLink("dispatch.php/course/dates/details/".$nextdate->getId(), ['cid' => $course->id]) ?>" data-dialog="size=auto">
                <?= Icon::create('date')->asImg(Icon::SIZE_INLINE, ['class' => 'text-bottom']) ?>
                <?= htmlReady($nextdate->getFullName()) ?>
            </a>
        </div>
    <? endif ?>
    <div>
        <? $sem_class = $course->getSemClass() ?>
        <h4><?= htmlReady($sem_class['title_dozent_plural'] ?: $GLOBALS['DEFAULT_TITLE_FOR_STATUS']['dozent'][1]) ?></h4>
        <ol class="clean members">
            <? foreach ($teachers as $teacher) : ?>
                <li>
                    <a href="<?= URLHelper::getLink("dispatch.php/profile", ['username' => $teacher['username']]) ?>">
                        <?= Avatar::getAvatar($teacher['user_id'])->getImageTag(Avatar::SMALL) ?>
                        <?= htmlReady($teacher->getUserFullname()) ?>
                    </a>
                </li>
            <? endforeach ?>
        </ol>
        <? if (count($tutors)) : ?>
            <h4><?= htmlReady($sem_class['title_tutor_plural'] ?: $GLOBALS['DEFAULT_TITLE_FOR_STATUS']['tutor'][1]) ?></h4>
            <ol class="clean members">
                <? foreach ($tutors as $tutor) : ?>
                    <li>
                        <a href="<?= URLHelper::getLink("dispatch.php/profile", ['username' => $tutor['username']]) ?>">
                            <?= Avatar::getAvatar($tutor['user_id'])->getImageTag(Avatar::SMALL) ?>
                            <?= htmlReady($tutor->getUserFullname()) ?>
                        </a>
                    </li>
                <? endforeach ?>
            </ol>
        <? endif ?>
        <h4>
            <?= sprintf(_("%s %s und %s"), $students_count, $sem_class['title_tutor_plural'] ?: $GLOBALS['DEFAULT_TITLE_FOR_STATUS']['autor'][1], $GLOBALS['DEFAULT_TITLE_FOR_STATUS']['user'][1]) ?>
        </h4>
    </div>
</div>
<?= $this->render_partial("blubber/_tagcloud") ?>
<?= $this->render_partial('blubber/disable-notifications', compact('thread', 'unfollowed')) ?>