Skip to content
Snippets Groups Projects
Commit 6a6ad415 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

put setting into it's own OptionsWidget, re #3109

Merge request studip/studip!2105
parent 9afcf337
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,7 @@ class Calendar_CalendarController extends AuthenticatedController ...@@ -101,6 +101,7 @@ class Calendar_CalendarController extends AuthenticatedController
$tmpl->action_url = $this->url_for(); $tmpl->action_url = $this->url_for();
$tmpl->category = $this->category; $tmpl->category = $this->category;
$filters->addElement(new WidgetElement($tmpl->render())); $filters->addElement(new WidgetElement($tmpl->render()));
Sidebar::get()->addWidget($filters);
if (Config::get()->CALENDAR_GROUP_ENABLE if (Config::get()->CALENDAR_GROUP_ENABLE
|| Config::get()->COURSE_CALENDAR_ENABLE) { || Config::get()->COURSE_CALENDAR_ENABLE) {
...@@ -109,14 +110,16 @@ class Calendar_CalendarController extends AuthenticatedController ...@@ -109,14 +110,16 @@ class Calendar_CalendarController extends AuthenticatedController
$tmpl->action_url = $this->url_for('calendar/group/switch'); $tmpl->action_url = $this->url_for('calendar/group/switch');
$tmpl->view = $this->action; $tmpl->view = $this->action;
$filters->addElement(new WidgetElement($tmpl->render())); $filters->addElement(new WidgetElement($tmpl->render()));
$filters->addCheckbox(
$settings = new OptionsWidget();
$settings->addCheckbox(
_('Abgelehnte Termine anzeigen'), _('Abgelehnte Termine anzeigen'),
$this->settings['show_declined'] ?? false, $this->settings['show_declined'] ?? false,
$this->url_for($this->base . 'show_declined', ['show_declined' => 1]), $this->url_for($this->base . 'show_declined', ['show_declined' => 1]),
$this->url_for($this->base . 'show_declined', ['show_declined' => 0]) $this->url_for($this->base . 'show_declined', ['show_declined' => 0])
); );
Sidebar::get()->addWidget($settings);
} }
Sidebar::get()->addWidget($filters);
} }
public function index_action() public function index_action()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment