From de15e9d1ce3235a954abf75431b8ed2976a5c2da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 18 Nov 2020 14:55:46 +0100 Subject: [PATCH] render terms & policy under conidition --- .../components/general/footer.blade.php | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/resources/views/portal/ninja2020/components/general/footer.blade.php b/resources/views/portal/ninja2020/components/general/footer.blade.php index 662a467141..21f81c0cb9 100644 --- a/resources/views/portal/ninja2020/components/general/footer.blade.php +++ b/resources/views/portal/ninja2020/components/general/footer.blade.php @@ -3,11 +3,19 @@ {{ ctrans('texts.footer_label', ['year' => date('Y')]) }}
- {{ __('texts.privacy_policy')}} - - - - {{ __('texts.terms')}} + @if(strlen($client->getSetting('client_portal_privacy_policy')) > 1) + {{ __('texts.privacy_policy')}} + @endif + + @if(strlen($client->getSetting('client_portal_privacy_policy')) > 1 && strlen($client->getSetting('client_portal_terms')) > 1) + + + + @endif + + @if(strlen($client->getSetting('client_portal_terms')) > 1) + {{ __('texts.terms')}} + @endif
@@ -17,11 +25,15 @@ @endif - @component('portal.ninja2020.components.general.pop-up', ['title' => __('texts.privacy_policy') ,'show_property' => 'privacy']) - {!! $client->getSetting('client_portal_privacy_policy') !!} - @endcomponent + @if(strlen($client->getSetting('client_portal_privacy_policy')) > 1) + @component('portal.ninja2020.components.general.pop-up', ['title' => __('texts.privacy_policy') ,'show_property' => 'privacy']) + {!! $client->getSetting('client_portal_privacy_policy') !!} + @endcomponent + @endif - @component('portal.ninja2020.components.general.pop-up', ['title' => __('texts.terms') ,'show_property' => 'tos']) - {!! $client->getSetting('client_portal_terms') !!} - @endcomponent + @if(strlen($client->getSetting('client_portal_terms')) > 1) + @component('portal.ninja2020.components.general.pop-up', ['title' => __('texts.terms') ,'show_property' => 'tos']) + {!! $client->getSetting('client_portal_terms') !!} + @endcomponent + @endif