Skip to content
Snippets Groups Projects
Commit e8b70555 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fixes #3354

Closes #3354

Merge request studip/studip!2281
parent 58b58094
No related branches found
No related tags found
No related merge requests found
......@@ -67,11 +67,11 @@ class Course_DetailsController extends AuthenticatedController
public function index_action()
{
$this->prelim_discussion = vorbesprechung($this->course->id);
$this->title = $this->course->getFullname();
$this->course_domains = UserDomain::getUserDomainsForSeminar($this->course->id);
$this->sem = new Seminar($this->course);
$this->links = [];
//public folders
$folders = Folder::findBySQL("range_type='course' AND range_id = ? AND folder_type = 'CoursePublicFolder'", [$this->course->id]);
......@@ -233,6 +233,12 @@ class Course_DetailsController extends AuthenticatedController
['data-dialog' => 'size=big']
);
$this->links[] = [
'label' => $abo_msg,
'url' => $this->url_for("course/enrolment/apply/{$this->course->id}"),
'attributes' => ['data-dialog' => 'size=big'],
];
}
if (Config::get()->SCHEDULE_ENABLE
......@@ -253,6 +259,12 @@ class Course_DetailsController extends AuthenticatedController
$this->url_for("calendar/schedule/addvirtual/{$this->course->id}"),
Icon::create('info')
);
$this->links[] = [
'label' => _('Nur im Stundenplan vormerken'),
'url' => $this->url_for("calendar/schedule/addvirtual/{$this->course->id}"),
'attributes' => [],
];
}
}
......
<?php
/**
* @var array<array{label: string, url: string, attributes: array}> $links
* @var Course $course
* @var Course[] $siblings
* @var Course_DetailsController $controller
* @var Seminar $sem
* @var string $prelim_discussion
* @var stdClass $id_sfx
*/
?>
<style>
/* This should be done by an own class (maybe not table? maybe dd?) */
#tablefix {
......@@ -498,9 +509,17 @@ if (!empty($mvv_tree)) : ?>
<? endforeach ?>
<? if (Request::get('from')) : ?>
<? if (count($links) > 0 || Request::get('from')) : ?>
<footer data-dialog-button>
<?= \Studip\LinkButton::createCancel(_('Zurück'), URLHelper::getURL(Request::get('from')))?>
<? foreach ($links as $link): ?>
<?= Studip\LinkButton::create(
$link['label'],
URLHelper::getURL($link['url'], $link['attributes'] ?? [])
) ?>
<? endforeach ?>
<? if (Request::get('from')): ?>
<?= Studip\LinkButton::createCancel(_('Zurück'), URLHelper::getURL(Request::get('from')))?>
<? endif ?>
</footer>
<? endif ?>
<?= Feedback::getHTML($course->id, 'Course'); ?>
<?= Feedback::getHTML($course->id, Course::class) ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment