Skip to content
Snippets Groups Projects
Commit c806c340 authored by David Siegfried's avatar David Siegfried
Browse files

hide booking-plan-icon if the user has no rights

parent 821e99df
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
Icon::create('info-circle'), Icon::create('info-circle'),
['data-dialog' => ''] ['data-dialog' => '']
); );
if ($room->userHasPermission($current_user, 'autor')) { if ($room->userHasPermission($current_user, 'autor') || $room->booking_plan_is_public) {
$actions->addLink( $actions->addLink(
$room->getActionLink('booking_plan'), $room->getActionLink('booking_plan'),
_('Wochenbelegung'), _('Wochenbelegung'),
...@@ -30,19 +30,12 @@ ...@@ -30,19 +30,12 @@
Icon::create('timetable'), Icon::create('timetable'),
['target' => '_blank'] ['target' => '_blank']
); );
} else {
$actions->addLink( $actions->addLink(
$room->getActionLink('booking_plan'), $room->getActionLink('booking_plan'),
_('Belegungsplan'), _('Belegungsplan'),
Icon::create('timetable'), Icon::create('timetable'),
['data-dialog' => 'size=big'] ['data-dialog' => 'size=big']
); );
$actions->addLink(
$room->getActionLink('semester_plan'),
_('Semesterbelegung'),
Icon::create('timetable'),
['data-dialog' => 'size=big']
);
} }
if ($room->requestable && $room->userHasRequestRights($current_user)) { if ($room->requestable && $room->userHasRequestRights($current_user)) {
$actions->addLink( $actions->addLink(
......
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