From 69e91a5ba7f2c61a6e477825fb246a3e5149191c Mon Sep 17 00:00:00 2001 From: rafsanulhasan Date: Sat, 1 Sep 2018 02:01:15 +0600 Subject: [PATCH] 1. Added _CookieConsentPartial.cshtml file for cookie privacy policy consent 2. Used "_CookieConsentPartial" partial page into Layout page to support GDPR Cookie private policy --- .../Views/Shared/_CookieConsentPartial.cshtml | 41 +++++++++++++++++++ src/Web/WebMVC/Views/Shared/_Layout.cshtml | 1 + 2 files changed, 42 insertions(+) create mode 100644 src/Web/WebMVC/Views/Shared/_CookieConsentPartial.cshtml diff --git a/src/Web/WebMVC/Views/Shared/_CookieConsentPartial.cshtml b/src/Web/WebMVC/Views/Shared/_CookieConsentPartial.cshtml new file mode 100644 index 000000000..bbfbb09ac --- /dev/null +++ b/src/Web/WebMVC/Views/Shared/_CookieConsentPartial.cshtml @@ -0,0 +1,41 @@ +@using Microsoft.AspNetCore.Http.Features + +@{ + var consentFeature = Context.Features.Get(); + var showBanner = !consentFeature?.CanTrack ?? false; + var cookieString = consentFeature?.CreateConsentCookie(); +} + +@if (showBanner) +{ + + +} \ No newline at end of file diff --git a/src/Web/WebMVC/Views/Shared/_Layout.cshtml b/src/Web/WebMVC/Views/Shared/_Layout.cshtml index 7d932770a..091695d19 100644 --- a/src/Web/WebMVC/Views/Shared/_Layout.cshtml +++ b/src/Web/WebMVC/Views/Shared/_Layout.cshtml @@ -49,6 +49,7 @@ + @RenderBody()