aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/courses/notice-action.php
blob: 3d32fb6f27e7803b5d7e96b7136e9de16e518ac8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * @var array $action
 * @var Course $course
 * @var string $action
 */
?>
<?php
    $notice = $course->config->COURSE_ADMIN_NOTICE;
    $method = $notice ? 'createHasNotice' : 'createHasNoNotice';
?>

<?= Studip\LinkButton::$method(
    _('Notiz'),
    URLHelper::getURL(
        sprintf($action['url'], $course->id),
        $action['params'] ?? []
    ),
    array_merge($action['attributes'] ?? [], [
        'class' => 'admin-courses-action-button',
        'title' => $notice,
    ])
) ?>