From e319301b5182e8c24698ebc716b55a7811fd164d Mon Sep 17 00:00:00 2001 From: Julian Prieber Date: Sun, 20 Mar 2022 23:43:27 +0100 Subject: [PATCH] Added hide event option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added option to hide Events. Next to all event notifications, an "X" will now be displays, which hides the notification if clicked until a new event notification is shown. This works by setting a cookie with the ID of the event notification. Learn more about this on the Blog post here: https://blog.littlelink-custom.com/hide-event-option/ --- resources/views/layouts/sidebar.blade.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/resources/views/layouts/sidebar.blade.php b/resources/views/layouts/sidebar.blade.php index 13c3bc2..0dd06fb 100755 --- a/resources/views/layouts/sidebar.blade.php +++ b/resources/views/layouts/sidebar.blade.php @@ -197,11 +197,26 @@ @if(auth()->user()->role == 'admin' and strtotime(date("d-m-Y")) < strtotime($EventJson['enddate'])) + @if(isset($_COOKIE['HideEvent']) and $_COOKIE['HideEvent'] != $EventJson['id']) @endif @@ -215,6 +230,7 @@ if(localStorage.getItem("firstTime")==null){ } @endif +@endif @yield('content') @@ -226,4 +242,4 @@ if(localStorage.getItem("firstTime")==null){ - \ No newline at end of file +