diff --git a/app/controllers/consultation/admin.php b/app/controllers/consultation/admin.php index 47d2ecdda94ae323eff01a537de5ccdd3785b78b..b335e36040127a4e63f76c3371b75f80b5056558 100644 --- a/app/controllers/consultation/admin.php +++ b/app/controllers/consultation/admin.php @@ -17,7 +17,8 @@ class Consultation_AdminController extends ConsultationController parent::before_filter($action, $args); if (!$this->range->isEditableByUser()) { - throw new AccessDeniedException(); + $this->redirect('consultation/overview'); + return; } $this->activateNavigation('admin'); @@ -846,6 +847,18 @@ class Consultation_AdminController extends ConsultationController $this->url_for('consultation/export/all', $action === 'expired'), Icon::create('export') ); + + if ($action !== 'expired') { + $share = new ShareWidget(); + $share->addCopyableLink( + _('Link zur Terminübersicht kopieren'), + $this->url_for('consultation/overview', [ + 'again' => 'yes', + ]), + Icon::create('clipboard') + ); + $sidebar->addWidget($share); + } } private function getDateAndTime($index) diff --git a/app/controllers/consultation/overview.php b/app/controllers/consultation/overview.php index e7456da5d9a78cf778c9000b5595ab13f13eb5e9..c8085f2cd3a56d8e39bdacc1b7ceaed0a6dd5dcd 100644 --- a/app/controllers/consultation/overview.php +++ b/app/controllers/consultation/overview.php @@ -16,6 +16,7 @@ class Consultation_OverviewController extends ConsultationController if ($this->range->isEditableByUser()) { $this->redirect('consultation/admin'); + return; } PageLayout::setTitle(sprintf(