From 5278be1f0fb7dae6c4ad04935b93d97143a91bad Mon Sep 17 00:00:00 2001 From: msquare Date: Wed, 13 Dec 2017 12:53:07 +0100 Subject: [PATCH] add link to public dashboard from shift view --- includes/controller/public_dashboard_controller.php | 8 ++++++++ includes/pages/user_shifts.php | 1 + templates/user_shifts.html | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/includes/controller/public_dashboard_controller.php b/includes/controller/public_dashboard_controller.php index bf909bed..311db22d 100644 --- a/includes/controller/public_dashboard_controller.php +++ b/includes/controller/public_dashboard_controller.php @@ -19,4 +19,12 @@ function public_dashboard_controller() public_dashboard_view($stats, $free_shifts) ]; } + +/** + * Returns url to public dashboard + */ +function public_dashboard_link() +{ + return page_link_to('public-dashboard'); +} ?> \ No newline at end of file diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php index 2871ceb5..355a7bb6 100644 --- a/includes/pages/user_shifts.php +++ b/includes/pages/user_shifts.php @@ -250,6 +250,7 @@ function view_user_shifts() 'set_last_4h' => _('last 4h'), 'set_next_4h' => _('next 4h'), 'set_next_8h' => _('next 8h'), + 'buttons' => button(public_dashboard_link(), glyph('dashboard') . _('Public Dashboard')) ]) ]) ]); diff --git a/templates/user_shifts.html b/templates/user_shifts.html index 446c4b82..b1bbba56 100644 --- a/templates/user_shifts.html +++ b/templates/user_shifts.html @@ -54,6 +54,11 @@ %set_next_8h% +
+
+ %buttons% +
+
%room_select%
%type_select%