Error executing template "Designs/Kwpn/_parsed/PageWithHeaderAndAside.parsed.cshtml"
System.IO.IOException: The process cannot access the file 'D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Translations.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Dynamicweb.Rendering.Translation.Source.WriteDocument(XmlDocument document)
at Dynamicweb.Rendering.Translation.Source.Save()
at Dynamicweb.Rendering.Translation.Source.UpdateTranslationSource(Source source, IEnumerable`1 newKeys, String designName, IEnumerable`1 cultures)
at Dynamicweb.Rendering.Template.TranslateText(String text, String defaultValue, String cultureName)
at Dynamicweb.Rendering.TemplateBase`1.Translate(String text, String defaultValue)
at CompiledRazorTemplates.Dynamic.RazorEngine_cfaa1751c2c34a15bfa6244b61c31a30.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\_parsed\PageWithHeaderAndAside.parsed.cshtml:line 796
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()
1 @using System.Web
2 @using Kwpn.Repository.Helpers
3 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
4 <!DOCTYPE html>
5 <html lang='@GetString("Lang")'>
6 <head prefix="og: http://ogp.me/ns#">
7 <meta charset="UTF-8">
8 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
9 <meta name="apple-mobile-web-app-capable" content="yes">
10 <title>@GetValue("Title")</title>
11 @GetValue("MetaTags")
12 @GetValue("CopyRightNotice")
13
14 @using System
15 @using Kwpn.Models.Constants
16 @using Kwpn.Repository.Helpers
17 @using System.Globalization
18 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
19 @{
20 var urlSchemeHeadSection = HttpContext.Current.Request.Url.Scheme;
21 var urlHostHeadSection = HttpContext.Current.Request.Url.Host;
22 var requestHostHeadSection = $"{urlSchemeHeadSection}://{urlHostHeadSection}";
23 var iconsFolderHeadSection = $"{requestHostHeadSection}/Files/Templates/Designs/Kwpn/Images/SystemIcons";
24 var cultureHeadSection = GetGlobalValue("Global:Area.LongLang");
25 var pageIdHeadSection = Dynamicweb.Frontend.PageView.Current().Page.ID;
26 var newsPageIdHeadSection = AreaHelper.GetNewsPageId(cultureHeadSection);
27 var marketplacePageIdHeadSection = AreaHelper.GetMarketplacePageId(cultureHeadSection);
28 var customOgTagsHeadSection = (pageIdHeadSection == newsPageIdHeadSection || pageIdHeadSection == marketplacePageIdHeadSection);
29 var searchFriendlyUrlHeadSection = Dynamicweb.Frontend.PageView.Current().SearchFriendlyUrl;
30 var ogUrlHeadSection = requestHostHeadSection;
31 if (searchFriendlyUrlHeadSection != $"/{cultureHeadSection.ToLower()}/homepage")
32 {
33 ogUrlHeadSection = $"{urlSchemeHeadSection}://{urlHostHeadSection}/{cultureHeadSection}{searchFriendlyUrlHeadSection}";
34 }
35 var ogTitleHeadSection = GetString("Title");
36 var ogDescriptionHeadSection = GetString("Meta.Description");
37 var ogDefaultImageHeadSection = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.OpenGraphImage);
38 var ogImageHeadSection = $"{urlSchemeHeadSection}://{urlHostHeadSection}/{ogDefaultImageHeadSection}";
39 var ogLocaleHeadSection = "nl_NL";
40 var lastCssWriteTime = System.IO.File.GetLastWriteTime(HttpContext.Current.Server.MapPath("~/Files/Templates/Designs/Kwpn/Css/Custom.css")).Ticks;
41 var lastJsWriteTime = System.IO.File.GetLastWriteTime(HttpContext.Current.Server.MapPath("~/Files/Templates/Designs/Kwpn/Scripts/Custom.js")).Ticks;
42 var datePickerScript = $"datepicker-{GetGlobalValue("Global:Area.Lang")}.js";
43 }
44
45 <meta http-equiv="content-language" content="@GetString(" lang")"="">
46 <meta http-equiv="content-type" content="text/html; charset=UTF-8">
47 <meta http-equiv="imagetoolbar" content="no">
48 <meta http-equiv="x-dns-prefetch-control" content="on">
49 <meta http-equiv="x-ua-compatible" content="ie=edge">
50 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
51 <meta name="application-name" content="kwpn.nl">
52 <meta name="author" content="Innovadis BV, Enschede">
53 <meta name="copyright" content="Innovadis BV, Enschede, @DateTime.Now.Year">
54 <meta name="web_author" content="Innovadis BV, Enschede">
55 <meta name="msapplication-TileImage" content="@iconsFolderHeadSection/win8-tile-144x144.png">
56 <meta name="msapplication-TileColor" content="#ffffff">
57 <meta name="msapplication-navbutton-color" content="#ffffff">
58 <meta name="msapplication-square70x70logo" content="@iconsFolderHeadSection/win8-tile-70x70.png">
59 <meta name="msapplication-square144x144logo" content="@iconsFolderHeadSection/win8-tile-144x144.png">
60 <meta name="msapplication-square150x150logo" content="@iconsFolderHeadSection/win8-tile-150x150.png">
61 <meta name="msapplication-wide310x150logo" content="@iconsFolderHeadSection/win8-tile-310x150.png">
62 <meta name="msapplication-square310x310logo" content="@iconsFolderHeadSection/win8-tile-310x310.png">
63
64 @if (!customOgTagsHeadSection)
65 {
66 <meta property="og:url" content="@ogUrlHeadSection">
67 <meta property="og:title" content="@ogTitleHeadSection">
68 <meta property="og:description" content="@ogDescriptionHeadSection">
69 <meta property="og:image" content="@ogImageHeadSection">
70 <meta property="og:locale" content="@ogLocaleHeadSection">
71 <meta property="og:type" content="website">
72 <meta property="fb:app_id" content="234190117053664">
73 }
74
75 <link rel="dns-prefetch" href="@requestHostHeadSection">
76 <link rel="icon" href="/favicon.ico" type="image/x-icon">
77 <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">
78 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-57x57.png" sizes="57x57">
79 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-60x60.png" sizes="60x60">
80 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-72x72.png" sizes="72x72">
81 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-76x76.png" sizes="76x76">
82 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-114x114.png" sizes="114x114">
83 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-120x120.png" sizes="120x120">
84 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-128x128.png" sizes="128x128">
85 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-144x144.png" sizes="144x144">
86 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-152x152.png" sizes="152x152">
87 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-180x180.png" sizes="180x180">
88 <link rel="apple-touch-icon" href="@iconsFolderHeadSection/apple-touch-icon-precomposed.png">
89 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-16x16.png" sizes="16x16">
90 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-32x32.png" sizes="32x32">
91 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-96x96.png" sizes="96x96">
92 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-160x160.png" sizes="160x160">
93 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-192x192.png" sizes="192x192">
94 <link rel="icon" type="image/png" href="@iconsFolderHeadSection/favicon-196x196.png" sizes="196x196">
95
96 <link href="@requestHostHeadSection/Content/bootstrap.min.css" rel="stylesheet">
97 <link href="@requestHostHeadSection/Content/themes/base/jquery-ui.min.css" rel="stylesheet">
98 <link href="@requestHostHeadSection/Files/Templates/Designs/Kwpn/Css/Custom.css?@lastCssWriteTime" rel="stylesheet">
99 <link href="@requestHostHeadSection/Content/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet">
100 <link href="@requestHostHeadSection/Content/jquery.fancybox.css" type="text/css" rel="stylesheet" media="screen">
101
102
103 @*
104 COMMENTED OUT DUE TO KWPN-1742
105
106 <!-- Start cookieyes banner -->
107 @if (string.Equals(urlHostHeadSection, "kwpn.nl", StringComparison.OrdinalIgnoreCase))
108 {
109 <script id="cookieyes" type="text/javascript" src="https://cdn-cookieyes.com/client_data/d8bbdb71d673be6b76d639e6/script.js"></script>
110 }
111 else {
112 <!-- cookieyes script not loaded by the template because the domain is invalid -->
113 }
114 <!-- End cookieyes banner -->
115 *@
116
117 <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
118 <!--[if lt IE 9]>
119 <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
120 <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
121 <![endif]-->
122 <script src="@requestHostHeadSection/Scripts/jquery-3.1.0.min.js"></script>
123 <script src="@requestHostHeadSection/Scripts/jquery-ui-1.12.0.min.js"></script>
124 <script src="@requestHostHeadSection/Scripts/@datePickerScript"></script>
125 <script src="@requestHostHeadSection/Scripts/bootstrap.min.js"></script>
126 <script src="@requestHostHeadSection/Scripts/jquery.alphanumeric.js"></script>
127 <script src="@requestHostHeadSection/Scripts/jquery.fancybox.pack.js?v=2.1.5"></script>
128 <script src="@requestHostHeadSection/Scripts/jquery.touchSwipe.min.js"></script>
129 @*<script src="@requestHostHeadSection/Scripts/vue/vue.js"></script>*@
130 <script src="@requestHostHeadSection/Files/Templates/Designs/Kwpn/Scripts/jquery.tmpl.js"></script>
131 <script src="@requestHostHeadSection/Files/Templates/Designs/Kwpn/Scripts/Custom.js"></script>
132 <script src="@requestHostHeadSection/Files/Templates/Designs/Kwpn/Scripts/innovadis-seo.js"></script>
133 <script src="@requestHostHeadSection/Scripts/innovadis-checkbox-list.js"></script>
134 <script src="@requestHostHeadSection/Scripts/jquery.orgchart.js"></script>
135 @{
136 var reCaptchaSiteKey = Kwpn.Models.Constants.StringConstants.ApplicationVariables.RecaptchaSiteKey;
137 var useReCaptcha = !string.IsNullOrEmpty(reCaptchaSiteKey);
138 if (useReCaptcha)
139 {
140 //Note: the recaptcha js reference is added by the afteroutputobserver when the g-recaptcha class is in the output
141
142 var reCaptchaInvalidReason = System.Web.HttpContext.Current.Request.QueryString.Get("InvalidReason");
143 if (!string.IsNullOrEmpty(reCaptchaInvalidReason))
144 {
145 // returned to form from invalid recaptcha check
146 @SnippetStart("JavascriptsBottom")
147 <script>
148
149 function removeParams(sParam) {
150 var url = window.location.href.split('?')[0] + '?';
151 var sPageURL = decodeURIComponent(window.location.search.substring(1)),
152 sURLVariables = sPageURL.split('&'),
153 sParameterName,
154 i;
155
156 for (i = 0; i < sURLVariables.length; i++) {
157 sParameterName = sURLVariables[i].split('=');
158 if (sParameterName[0] != sParam) {
159 url = url + sParameterName[0] + '=' + sParameterName[1] + '&'
160 }
161 }
162 return url.substring(0, url.length - 1);
163 }
164
165 window.addEventListener('load', function () {
166
167 // show message
168 alert('@System.Web.HttpUtility.JavaScriptStringEncode(Translate($"RecaptchaInvalidReason_{reCaptchaInvalidReason}", reCaptchaInvalidReason))');
169
170 // remove invalid reason param from Url
171 var newUrl = removeParams("InvalidReason");
172 document.location = newUrl;
173
174 }, false);
175 </script>
176 @SnippetEnd("JavascriptsBottom")
177 }
178 }
179 }
180 @using Kwpn.Models.Constants
181 @using Kwpn.Repository.Helpers
182 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
183 @{
184 var googleTrackingCode = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTrackingCode);
185 if (!string.IsNullOrWhiteSpace(googleTrackingCode))
186 {
187 <script>
188
189 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function()
190 { (i[r].q=i[r].q||[]).push(arguments)}
191 ,i[r].l=1*new Date();a=s.createElement(o),
192 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
193 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
194
195 var virtualPageviewHasBeenSent = false; // this variable will be set to true in innovadis-seo.js when a virtual pageview has been fired and used to prevent double analytics tracking
196
197 ga('create', '@googleTrackingCode', 'auto');
198 // NOTE: the analytics tracking event 'send' code, ga('send', 'pageview'), which is located here in the Google code samples is moved to innovadis-seo.js and called at the bottom of the master to be able to prevent double analytics tracking when a virtual pageview has already been fired.
199 </script>
200 }
201 }
202 @using Kwpn.Models.Constants
203 @using Kwpn.Repository.Helpers
204 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
205 @{
206 var googleTagmanagerCodeHead = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTagManagerCode);
207 if (!string.IsNullOrWhiteSpace(googleTagmanagerCodeHead))
208 {
209 <!-- Google Tag Manager -->
210 <script>
211 (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
212 new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
213 j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
214 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
215 })(window, document, 'script', 'dataLayer', '@googleTagmanagerCodeHead');
216 </script>
217 <!-- End Google Tag Manager -->
218 }
219
220 // Google Adsense
221 <script data-ad-client="ca-pub-3169257067253610" async="" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
222 }
223 @RenderSnippet("HeaderContent")
224 @GoogleAdsHelper.GetGoogleAdsHeadScript(GetString("Item.Page.HeadScript"), GetString("Item.Page.HeadScript_2"))
225 <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
226 @GetValue("Stylesheets")
227 @GetValue("Javascripts")
228 </head>
229 @{
230 var bodyClass = (NavigationHelper.CurrentPageIsHomepage()) ? "homepage" : "";
231 var copyRightMessage = Translate("CopyrightNotifyText", "© KWPN ALL RIGHTS RESERVED").JsEncode();
232 var copyRightMessageTitle = Translate("CopyrightNotifyTitle", "Let op").JsEncode();
233 }
234 <body data-pageid='@GetValue("Global:Page.ID")' class='@bodyClass' oncut='Swal.fire({ title: "@copyRightMessageTitle" ,text: "@copyRightMessage", customClass: layout.notifyCopyrightMessageClass });' oncopy='Swal.fire({ title: "@copyRightMessageTitle" ,text: "@copyRightMessage", customClass: layout.notifyCopyrightMessageClass });'>
235 @if (Kwpn.Repository.Helpers.LoginHelper.MyKwpnIsOffline()) {
236
237 var currentAreaItem = Dynamicweb.Frontend.PageView.Current()?.Area.Item;
238 if (currentAreaItem != null) {
239 var message = Kwpn.Repository.Helpers.ItemHelper.GetItemValue<string>(currentAreaItem, Kwpn.Models.Constants.StringConstants.DynamicwebConstants.MyKwpnOfflineText);
240 if (!string.IsNullOrEmpty(message)) {
241 <div class="ticker-wrap">
242 <div class="ticker">
243 <div class="ticker__item">@Translate("Ticker_Announcement", "Announcement")</div>
244 <div class="ticker__item">@message</div>
245 </div>
246 </div>
247 }
248 }
249 }
250 @using Kwpn.Models.Constants
251 @using Kwpn.Repository.Helpers
252 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
253 @{
254 var googleTagmanagerCodeBody = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ThirdPartyConfiguration.GoogleTagManagerCode);
255 if (!string.IsNullOrWhiteSpace(googleTagmanagerCodeBody))
256 {
257 var googleTagmanagerIframe = string.Format("https://www.googletagmanager.com/ns.html?id={0}", googleTagmanagerCodeBody);
258 <!-- Google Tag Manager (noscript) -->
259 <noscript>
260 <iframe src="@googleTagmanagerIframe" height="0" width="0" style="display:none;visibility:hidden"></iframe>
261 </noscript>
262 <!-- End Google Tag Manager (noscript) -->
263 }
264 }
265 @using Dynamicweb.Frontend
266 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
267 @{
268 var ridingHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "RidingHorse");
269 var harnessHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "HarnessHorse");
270 var geldingHorseRegions = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "Geldinghorse");
271 var youngKwpn = Kwpn.Repository.Helpers.ContentFilterHelper.GetRegions(GetGlobalValue("Global:Area.LongLang"), "Young");
272 var actionUrl = SearchEngineFriendlyURLs.GetFriendlyUrl(string.Format("Default.aspx?ID={0}", GetGlobalValue("Global:Page.ID")));
273 <div class="content-filter" id="content-filter">
274
275 <button class="fa fa-close content-filter-close"></button>
276 <form method="post" action="@actionUrl" id="content-filter-form">
277 <input type="hidden" name="ID" value='@GetGlobalValue("Global:Page.ID")'>
278 <input type="hidden" name="ChangeContentFilter" value="true">
279 @if (ridingHorseRegions.Any())
280 {
281 <div class="content-filter-category ridingHorse">
282 <h3>@Translate("RidingHorse", "Riding horse")</h3>
283 @foreach (var ridingHorseRegion in ridingHorseRegions)
284 {
285 var checked_state = "data-x"; /*DW appends ="" to output @checked_state for some mysterious reason, dummy data-x to make output valid*/
286 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(ridingHorseRegion.Value))
287 {
288 checked_state = "checked=\"checked\" data-x";
289 }
290 <input type="checkbox" id='@ridingHorseRegion.Value' name="content-filter-value[]" value='@ridingHorseRegion.Value' @checked_state="">
291 <label for='@ridingHorseRegion.Value'>@ridingHorseRegion.Label</label><br>
292 }
293 </div>
294 }
295 @if (harnessHorseRegions.Any())
296 {
297 <div class="content-filter-category harnessHorse">
298 <h3>@Translate("HarnessHorse", "Harness horse")</h3>
299 @foreach (var harnessHorseRegion in harnessHorseRegions)
300 {
301 var checked_state = "data-x";
302 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(harnessHorseRegion.Value))
303 {
304 checked_state = "checked=\"checked\" data-x";
305 }
306 <input type="checkbox" id='@harnessHorseRegion.Value' name="content-filter-value[]" value='@harnessHorseRegion.Value' @checked_state="">
307 <label for='@harnessHorseRegion.Value'>@harnessHorseRegion.Label</label><br>
308 }
309 </div>
310 }
311 @if (geldingHorseRegions.Any())
312 {
313 <div class="content-filter-category geldingHorse">
314 <h3>@Translate("Geldinghorse", "Geldinghorse")</h3>
315 @foreach (var geldingHorseRegion in geldingHorseRegions)
316 {
317 var checked_state = "data-x";
318 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(geldingHorseRegion.Value))
319 {
320 checked_state = "checked=\"checked\" data-x";
321 }
322 <input type="checkbox" id='@geldingHorseRegion.Value' name="content-filter-value[]" value='@geldingHorseRegion.Value' @checked_state="">
323 <label for='@geldingHorseRegion.Value'>@geldingHorseRegion.Label</label><br>
324 }
325 </div>
326 }
327 @if (youngKwpn.Any())
328 {
329 <div class="content-filter-category youngKwpn">
330 <h3>@Translate("YoungKwpn", "Young KWPN")</h3>
331 @foreach (var young in youngKwpn)
332 {
333 var checked_state = "data-x";
334 if (Kwpn.Repository.Helpers.ContentFilterHelper.CookieContainsValue(young.Value))
335 {
336 checked_state = "checked=\"checked\" data-x";
337 }
338 <input type="checkbox" id='@young.Value' name="content-filter-value[]" value='@young.Value' @checked_state="">
339 <label for='@young.Value'>@young.Label</label><br>
340 }
341 </div>
342 }
343 <br style="clear: both;">
344 <a href="#" class="orange_arrow_link content-filter-submit" name="content-filter-apply">@Translate("Apply", "Apply")</a>
345 <i class="fa waitingSpinner fa-spinner fa-spin fa-2x fa-fw margin-bottom"></i>
346 </form>
347 </div>
348 }
349 <div id="pagewrapper">
350 @using Kwpn.Repository.Helpers
351 @using Kwpn.Models.Constants
352 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
353 @{
354 var requestHostSearchMobile = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"));
355 var searchResultsPageIdMobile = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.SearchResultsPageId);
356 }
357 <div class="header_top_mobile hidden-md hidden-lg">
358 <div class="mobile-logo">
359 <a href='@NavigationHelper.GetHomepageUrl()' title='@Translate("GoToHomepage", "Go to the homepage").JsEncode()'><img class="logo" src="/Files/Templates/Designs/Kwpn/images/kwpn-logo.svg"></a>
360 </div>
361 <div class="menuMobile">
362 <div class="hamburgerMenu"><i class="fa fa-reorder"></i></div>
363 <div class="mobile-flags">
364 @{
365 var mobileLanguages = GetLoop("Languages");
366 if (mobileLanguages.Count > 1)
367 {
368 foreach (var mobileLanguage in mobileLanguages)
369 {
370 var languageFlag = "";
371 var languageClass = "";
372 var languageCulture = mobileLanguage.GetString("Culture");
373 var languagePageId = mobileLanguage.GetString("PageID");
374 var languageFirstActivePageId = mobileLanguage.GetString("FirstActivePageID");
375
376 var mobileGotoPage = AreaHelper.ChangeLanguageUrl(
377 GetString("DwPageID"),
378 languagePageId,
379 GetString("DWExtranetAction"),
380 languageFirstActivePageId,
381 languageCulture
382 );
383
384 if (!string.IsNullOrWhiteSpace(languageCulture))
385 {
386 var languageCode = languageCulture.Split('-')[0];
387 if (languageCode.Equals("en", StringComparison.InvariantCultureIgnoreCase))
388 {
389 languageCode = "gb";
390 }
391 languageFlag = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/Flags/{1}.svg", requestHostSearchMobile, languageCode);
392 if (languageCulture.Equals(GetGlobalValue("Global:Area.LongLang"), StringComparison.InvariantCultureIgnoreCase))
393 {
394 languageClass = "active";
395 }
396 <a href="@mobileGotoPage" class="@languageClass"><img src='@languageFlag' class="switch-language"></a>
397 }
398 }
399 }
400 }
401 </div>
402
403 @if (!string.IsNullOrWhiteSpace(searchResultsPageIdMobile))
404 {
405 var searchQuery = GetString("Ecom:Search.Query");
406 <form class="search-form" action="default.aspx" method="get" name="GlobalSearchForm" id="mobileSearch" _lpchecked="1">
407 <input type="hidden" name="ID" value='@searchResultsPageIdMobile'>
408 <input type="text" name="q" class="form-control" required="required" autocomplete="off" maxlength="65" placeholder='@Translate("SearchPlaceholder", "Search")' value='@searchQuery' id="mobileSearchTerm">
409 <button class="btn btn-default" id="btn-mobile-search" type="submit"><i class="fa fa-search"></i></button>
410 </form>
411 }
412
413 @NavigationHelper.GetMainNavigationMobile(StringConstants.NavigationTags.Main, GetGlobalValue("Global:Page.ID"), Dynamicweb.Frontend.PageView.Current().Area.Culture)
414
415 @{ // ORANGE BUTTON
416 var orangeButtonLink = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.LoginPageId);
417 var orangeButtonText = Translate("LogIn", "Log in");
418
419 if (LoginHelper.CurrentUserIsLoggedIn())
420 {
421 orangeButtonLink = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.DashboardPageId);
422 orangeButtonText = Translate("MyDashboard", "My dashboard");
423
424 var currentPage = string.Format("/Default.aspx?{0}", System.Web.HttpContext.Current.Request.QueryString).UrlEncode();
425 var logOffLink = string.Format("/Admin/Public/ExtranetLogoff.aspx?redirect={0}", currentPage);
426 var seoPageview = string.Format("/{0}/{1}", GetGlobalValue("Global:Area.LongLang").ToLower(), TranslationHelper.Translate("SEO_TrackPageviewPage_UserLoggedOff", GetGlobalValue("Global:Area.LongLang").ToLower()));
427
428 // ADD Logoff to navigation
429 <script>
430 $(document).ready(function () {
431 // add logoff button
432 $(".menuMobile ul").append("<li><a href='@logOffLink' onclick=\"SEO.trackPageView('@seoPageview')\"><i class='fa fa-chevron-right'></i>@Translate("LogOff", "Log off")</a></li>");
433 });
434 </script>
435 }
436 <a href='@orangeButtonLink' class="inloggenMobielLink">
437 <div class="inloggenMobiel">
438 <div style="width:200px">
439 <i class='fa fa-chevron-right'></i>@orangeButtonText
440 </div>
441 </div>
442 </a>
443 }
444 </div>
445 </div>
446 <div class="container header_top hidden-xs hidden-sm">
447 <div class="row no-gutter">
448 <div class="col-xs-4 col-xs-offset-6">
449 @using System
450 @using Kwpn.Models.Constants
451 @using Kwpn.Repository.Helpers
452 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
453 @{
454 var searchResultsPageId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.SearchResultsPageId);
455 var requestHostSearch = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"));
456 <div class="searchwrapper well-sm">
457
458 <div class="row">
459 <div class="col-xs-3 text-center">
460 @{
461 var websiteLanguages = GetLoop("Languages");
462 if (websiteLanguages.Count > 1)
463 {
464 foreach (var websiteLanguage in websiteLanguages)
465 {
466 var languageFlag = "";
467 var languageClass = "";
468 var languageCulture = websiteLanguage.GetString("Culture");
469 var languagePageId = websiteLanguage.GetString("PageID");
470 var languageFirstActivePageId = websiteLanguage.GetString("FirstActivePageID");
471
472 var gotoPage = AreaHelper.ChangeLanguageUrl(
473 GetString("DwPageID"),
474 languagePageId,
475 GetString("DWExtranetAction"),
476 languageFirstActivePageId,
477 languageCulture
478 );
479
480 if (!string.IsNullOrWhiteSpace(languageCulture))
481 {
482 var languageCode = languageCulture.Split('-')[0];
483 if (languageCode.Equals("en", StringComparison.InvariantCultureIgnoreCase))
484 {
485 languageCode = "gb";
486 }
487 languageFlag = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/Flags/{1}.svg", requestHostSearch, languageCode);
488 if (languageCulture.Equals(GetGlobalValue("Global:Area.LongLang"), StringComparison.InvariantCultureIgnoreCase))
489 {
490 languageClass = "active";
491 }
492 <a href="@gotoPage" class="@languageClass"><img src='@languageFlag' class="switch-language"></a>
493 }
494 }
495 }
496
497 }
498 </div>
499 <div class="col-xs-9">
500 @if (!string.IsNullOrWhiteSpace(searchResultsPageId))
501 {
502 var searchQuery = GetString("Ecom:Search.Query");
503 <form class="search-form" action="default.aspx" method="get" name="GlobalSearchForm" id="desktopSearch">
504 <input type="hidden" name="ID" value='@searchResultsPageId'>
505 <div class="input-group">
506 <input type="text" name="q" autocomplete="off" class="form-control" required="required" maxlength="65" placeholder='@Translate("SearchPlaceholder", "Search")' value='@searchQuery' id="desktopSearchTerm">
507 <span class="input-group-addon" id="btn-search-visible">
508 <i class="fa fa-search"></i>
509 </span>
510 </div>
511 </form>
512 }
513 </div>
514 </div>
515 </div>
516 }
517 </div>
518 <div class="col-xs-2">
519 @using System
520 @using Kwpn.Repository.Helpers
521 @using Kwpn.Models.Constants
522 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
523 @if (LoginHelper.MyKwpnIsOffline())
524 {
525 <div class="offline-wrapper"></div>
526 }
527 else if (LoginHelper.CurrentUserIsLoggedIn())
528 {
529 var currentUser = Kwpn.Repository.Repositories.KwpnUsers.CurrentUser();
530 <div id="myaccountMenuWrapper">
531 <button class="btn-lg btn-primary login-button" id="myaccountButton">@Translate("MyAccount", "My account")</button>
532 <div class="myaccountMenu hidden-xs hidden-sm" id="myaccountMenu" style='display: none;'>
533 @NavigationHelper.GetAccountNavigation(
534 StringConstants.NavigationTags.Account,
535 GetGlobalValue("Global:Page.ID"),
536 Translate("GoToMyDashboard", "Go to my dashboard"),
537 Translate("LogOff", "Log off"),
538 currentUser.IsBlocked
539 )
540 </div>
541 </div>
542 }
543 else
544 {
545 var loginParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.LoginParagraphId);
546 if (!string.IsNullOrWhiteSpace(loginParagraphId) && Convert.ToInt32(loginParagraphId) > 0)
547 {
548 var loginPopupDisplay = "none";
549 if (!string.IsNullOrWhiteSpace(LoginHelper.GetLoginError()) &&
550 !GetGlobalValue("Global:Page.ID").Equals(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.PageIdSystemNames.LoginPageId)))
551 {
552 loginPopupDisplay = "block";
553 }
554
555 var loginAction = System.Web.HttpContext.Current.Request.QueryString.Get("LoginAction");
556 if (!string.IsNullOrWhiteSpace(loginAction) && loginAction.Equals("Recovery", StringComparison.InvariantCultureIgnoreCase))
557 {
558 // on password recovery the login module won't show. Probably due to duplicate input field names.
559 // in this case link to login page in stead of showing login form in layover
560 var loginPage = AreaHelper.CreateUrlBySystemName(StringConstants.PageIdSystemNames.LoginPageId);
561 var clickText = string.Format("{0} <i class='fa fa-spinner fa-spin'></i>", Translate("LogIn", "Log in")).JsEncode();
562 <button class="btn-lg btn-primary login-button link" onclick="$(this).html('@clickText');window.location.href='@loginPage';">@Translate("LogIn", "Log in")</button>
563 }
564 else
565 {
566 <button class="btn-lg btn-primary login-button" onclick="$('.inloggenMenu').toggle();">@Translate("LogIn", "Log in")</button>
567 }
568
569 <div class="inloggenMenu hidden-xs hidden-sm" style='display: @loginPopupDisplay;'>
570 <a href="javascript:void(0);" class="close-login" onclick="$('.inloggenMenu').toggle();"><i class="fa fa-close"></i></a>
571 @RenderParagraphContent(Convert.ToInt32(loginParagraphId))
572 </div>
573 }
574 }
575 </div>
576 </div>
577 </div>
578 @using Kwpn.Repository.Helpers
579 @using Kwpn.Models.Constants
580 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
581 <div class="container header_content hidden-xs hidden-sm">
582 <div class="row">
583 <div class="col-md-3 col-lg-4">
584 <div class="logo">
585 <a href='@NavigationHelper.GetHomepageUrl()' title='@Translate("GoToHomepage", "Go to the homepage").JsEncode()'><img src="/Files/Templates/Designs/Kwpn/images/kwpn-logo.svg"></a>
586 </div>
587 </div>
588 <div class="col-md-9 col-lg-8">
589 <div class="row">
590 <div class="header col-lg-12 visible-lg visible-md visible-sm">
591 @NavigationHelper.GetMainNavigation(StringConstants.NavigationTags.Main, GetGlobalValue("Global:Page.ID"), Dynamicweb.Frontend.PageView.Current().Area.Culture)
592 </div>
593 </div>
594 </div>
595 </div>
596 </div>
597 @using Kwpn.Models.Constants
598 @using Kwpn.Repository.Helpers
599 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
600
601 @SnippetStart("HeaderContent")
602 <script src="/scripts/jquery.waypoints.min.js"></script>
603 <script src="/scripts/sticky.min.js"></script>
604 @SnippetEnd("HeaderContent")
605 <div id="pagecontent" class="container page-with-header-and-aside" data-showmembership='@GetBoolean("Item.Page.ShowMembership")' data-showgotonavigation='@GetBoolean("Item.Page.ShowGotoNavigation")' data-showpartnerlogos='@GetBoolean("Item.Page.ShowCustomerLogos")'>
606
607 <div id="header-image-row" class="row">
608 <div class="col-xs-12">
609 <div id="headercontent" class="col-xs-12 no-padding">@GetValue("DwContent(headercontent)")</div>
610 </div>
611 </div>
612
613 <div class="break-grid content-container">
614 <div class="break-grid-background">
615 <div class="in-grid">
616 <div class="row">
617 <div class="col-xs-12 col-md-2 col-md-push-10 aside-page">
618 <div class="bg_aside closed">
619 <div class="aside_pullLabel">Menu<i class="fa fa-bars" aria-hidden="true"></i></div>
620 <aside>
621
622 <div id="asidecontent" class="col-xs-12">@GetValue("DwContent(asidecontent)")</div>
623
624 </aside>
625 </div>
626 </div>
627 <article class="col-xs-12 col-md-10 page-content">
628 <div id="page-title" class="row hidden">@GetString("Title")</div>
629 <div class="row">
630 <div id="pagecontent-container" class="col-xs-12 no-padding">@GetValue("DwContent(pagecontentcontainer)")</div>
631 </div>
632 </article>
633 </div>
634 </div>
635 </div>
636 </div>
637 </div>
638
639 <script>
640 var pageId = '@Dynamicweb.Frontend.PageView.Current().Page.ID';
641 var _mx = 991;
642 var screenWidth = window.innerWidth;
643 checkWidth();
644
645 $(window).on('resize', function () {
646 screenWidth = window.innerWidth
647 checkWidth();
648 openAsideOnFirstPagevisit();
649 })
650
651 function enable_menu_slide() {
652 $(".aside-page").on('click', function () {
653 $(this).find('.bg_aside').toggleClass("closed")
654 $(this).find('.bg_aside').toggleClass("open")
655 })
656 }
657
658 function checkWidth() {
659 if (screenWidth > _mx) {
660 enable_menu_slide()
661 } else {
662 $(".aside-page").unbind();
663 }
664 }
665
666 // Open and close tabs
667 $('i.fa-chevron-down').on('click', function () {
668 if ($(this).hasClass('fa-rotate-180')) {
669 $(this).removeClass('fa-rotate-180')
670 } else {
671 $(this).addClass('fa-rotate-180')
672 }
673 if ($(this).parent().next().hasClass('open_tab')) {
674 $(this).parent().next().removeClass('open_tab')
675 } else {
676 $(this).parent().next().addClass('open_tab')
677 }
678 });
679
680 $(document).ready(function () {
681 // reset content block width
682 $(".container", "article.page-content").css("width", "auto");
683 // Open aside menu on first page visit
684 openAsideOnFirstPagevisit();
685 });
686
687 function openAsideOnFirstPagevisit() {
688 if (sessionStorage.getItem('popState' + pageId) != 'shown' && screenWidth > _mx && screenWidth <= '1346') {
689 $(".bg_aside").delay(2000).toggleClass("closed open")
690 sessionStorage.setItem('popState' + pageId, 'shown')
691 }
692 }
693 </script>
694 @{
695 if (!LoginHelper.CurrentUserIsLoggedIn())
696 {
697 var membershipParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.MembershipParagraphId);
698 if (!string.IsNullOrWhiteSpace(membershipParagraphId) && Convert.ToInt32(membershipParagraphId) > 0)
699 {
700 <div id="membershipwrapper">@RenderParagraphContent(Convert.ToInt32(membershipParagraphId))</div>
701 }
702 }
703 }
704 @using Kwpn.Models.Constants
705 @using Kwpn.Repository.Helpers
706 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
707 @{
708 var partnerLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.PartnerLogoParagraphId);
709 var showPartnerLogos = !string.IsNullOrWhiteSpace(partnerLogosParagraphId) && Convert.ToInt32(partnerLogosParagraphId) > 0;
710 var sponsorLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.SponsorLogoParagraphId);
711 var showSponsorLogos = !string.IsNullOrWhiteSpace(sponsorLogosParagraphId) && Convert.ToInt32(sponsorLogosParagraphId) > 0;
712 if (showPartnerLogos || showSponsorLogos)
713 {
714 <div class="container" id="footerlogos">
715 @if (showPartnerLogos)
716 {
717 <div class="row logolist logolist-blue" id="partner-logos">
718 <div class="col-xs-12 text-center">
719 @RenderParagraphContent(Convert.ToInt32(partnerLogosParagraphId))
720 </div>
721 </div>
722 }
723 @if (showSponsorLogos)
724 {
725 <div class="row logolist" id="sponsor-logos">
726 <div class="col-xs-12 text-center">
727 @RenderParagraphContent(Convert.ToInt32(sponsorLogosParagraphId))
728 </div>
729 </div>
730 }
731 </div>
732 }
733 }
734 @using Kwpn.Models.Constants
735 @using Kwpn.Repository.Helpers
736 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
737 @{
738 var newsletterParagraphId = int.Parse(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.NewsletterParagraphId));
739
740 var quickLinksColumn1Folder = Dynamicweb.Services.Pages.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.NavigationTags.InternalLinksColumn1);
741 var quickLinksColumn1 = Dynamicweb.Services.Pages.GetPagesByParentID(quickLinksColumn1Folder?.ID ?? 0);
742
743 var quickLinksColumn2Folder = Dynamicweb.Services.Pages.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.NavigationTags.InternalLinksColumn2);
744 var quickLinksColumn2 = Dynamicweb.Services.Pages.GetPagesByParentID(quickLinksColumn2Folder?.ID ?? 0);
745 }
746 <div class="container" id="footerlinks">
747 <div class="row" id="goto-navigation">
748 <div class="col-xs-12 col-sm-6 col-md-3">
749 <h3>@Translate("NavigationHeader_QuickLinksColumn1", "Directly to")</h3>
750 <ul id="navigation_internallinks_column1">
751 @foreach (var ql1 in quickLinksColumn1)
752 {
753 <li><a href="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ql1.ID)">@ql1.MenuText</a></li>
754 }
755 </ul>
756 </div>
757 <div class="col-xs-12 col-sm-6 col-md-3">
758 <h3>@Translate("NavigationHeader_QuickLinksColumn2", "Our products")</h3>
759 <ul id="navigation_internallinks_column2">
760 @foreach (var ql2 in quickLinksColumn2)
761 {
762
763 // determine icon based on name ... not very pretty, but I don't have another way ....
764 var listicon = "";
765 if (ql2.MenuText.IndexOf("database", StringComparison.OrdinalIgnoreCase) >= 0) {
766 // KWPN Database
767 listicon ="<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_Horse.svg'>";
768 } else if (ql2.MenuText.IndexOf(".tv", StringComparison.OrdinalIgnoreCase) >= 0)
769 {
770 // KWPN.tv
771 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_TV.svg'>";
772 }
773 else if (ql2.MenuText.IndexOf("mark", StringComparison.OrdinalIgnoreCase) >= 0 || ql2.MenuText.IndexOf("sale", StringComparison.OrdinalIgnoreCase) >= 0)
774 {
775 // KWPN Marktplaats, KWPN Market place, KWPN horses for sale
776 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_ForSale.svg'>";
777 }
778 else if (ql2.MenuText.IndexOf("shop", StringComparison.OrdinalIgnoreCase) >= 0)
779 {
780 // KWPN Webshop
781 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_Webshop.svg'>";
782 }
783
784 var listclass = string.IsNullOrWhiteSpace(listicon) ? "" : " class='icon'";
785 var listitem = $"<li{listclass}><a href='{Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ql2.ID)}'>{listicon}{ql2.MenuText}</a>";
786 @listitem
787 }
788 </li{listclass}></ul>
789 </div>
790 <a name="newsletter"></a>
791 <div class="col-xs-12 col-sm-6 col-md-3">
792 @if (newsletterParagraphId > 0)
793 {
794 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
795 @*If not logged in or logged in and not subscribed to the monthly newsletter, then show newsletter subscription*@
796 <h3>@Translate("NewsletterSubscriptionHeader", "Stay informed")</h3>
797 <p>@Translate("NewsletterSubscriptionIntro", "Receive our monthly newsletter filled with updates, events, tips and tricks!")</p>
798 @*If logged in, then show button to profile page (with subscribe/unsubscribe checkbox)*@
799
800 @RenderParagraphContent(newsletterParagraphId)
801 }
802 </div>
803 <div class="col-xs-12 col-sm-6 col-md-3">
804 @using Kwpn.Models.Constants
805 @using Kwpn.Repository.Helpers
806 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
807 <h3>@Translate("NavigationHeader_SocialMedia", "Social media")</h3>
808 <ul>
809 @{
810 var facebookUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Facebook);
811 if (!string.IsNullOrWhiteSpace(facebookUrl))
812 {
813 <li class="facebook"><a href='@facebookUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Facebook", "Facebook")</a></li>
814 }
815 var instagramUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Instagram);
816 if (!string.IsNullOrWhiteSpace(instagramUrl))
817 {
818 <li class="instagram"><a href='@instagramUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Instagram", "Instagram")</a></li>
819 }
820 var linkedInUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.LinkedIn);
821 if (!string.IsNullOrWhiteSpace(linkedInUrl))
822 {
823 <li class="linkedIn"><a href='@linkedInUrl.JsEncode()' target="_blank">@Translate("SocialMedia_LinkedIn", "LinkedIn")</a></li>
824 }
825 var twitterUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Twitter);
826 if (!string.IsNullOrWhiteSpace(twitterUrl))
827 {
828 <li class="twitter"><a href='@twitterUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Twitter", "Twitter")</a></li>
829 }
830 var youtubeUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.YouTube);
831 if (!string.IsNullOrWhiteSpace(youtubeUrl))
832 {
833 <li class="youtube"><a href='@youtubeUrl.JsEncode()' target="_blank">@Translate("SocialMedia_YouTube", "YouTube")</a></li>
834 }
835 var vimeoUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Vimeo);
836 if (!string.IsNullOrWhiteSpace(vimeoUrl))
837 {
838 <li class="vimeo"><a href='@vimeoUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Vimeo", "Vimeo")</a></li>
839 }
840 var tiktokUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.TikTok);
841 if (!string.IsNullOrWhiteSpace(tiktokUrl))
842 {
843 <li class="tiktok"><a href='@tiktokUrl.JsEncode()' target="_blank">@Translate("SocialMedia_TikTok", "TikTok")</a></li>
844 }
845 }
846 </ul>
847 </div>
848 </div>
849 </div>
850 @SnippetStart("JavascriptsBottom")
851 <script>
852 $(document).ready(function () {
853 var pageHasTopImage = $("#top-banner")[0];
854 if (pageHasTopImage) {
855 // add class to in-grid to remove extra padding
856 $("#start-article").addClass("hasHeader");
857 } else {
858 // remove header image container
859 $("#header-image-row").remove();
860
861 // show page title
862 $("#page-title").removeClass("hidden");
863 }
864 });
865 </script>
866 @SnippetEnd("JavascriptsBottom")
867 </div>
868 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
869 @{
870 var requestHostFooter = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host"));
871 var footerLogo = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/kwpn-footer-logo.svg", requestHostFooter);
872 <div id="footerwrapper">
873 <div class="container">
874 <div class="row">
875 <div class="col-xs-12 col-sm-12 col-md-10">
876 @GetValue("DwNavigation(navigationfooter)")
877 </div>
878 <div class="hidden-xs hidden-sm col-md-2">
879 <img src="@footerLogo" id="footer-logo">
880 </div>
881 </div>
882 </div>
883 </div>
884 }
885 @using System.Web.Mvc;
886 @using Kwpn.Core.Services.Abstract;
887
888 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
889
890 @{
891 IKwpnTvService tvService = DependencyResolver.Current.GetService<IKwpnTvService>();
892 }
893
894 <div id="kwpnlink">
895 <a href="@tvService.GetKwpnTvLink()" target="_blank"><i class="fa fa-television" aria-hidden="true"></i><span>@Translate("KwnpTvLinkText", "Go to: KWPN TV")</span> <i class="fa fa-chevron-right"></i></a>
896 </div>
897 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>>
898 <div class="modal fade" id="equis-offline" tabindex="-1" role="dialog" aria-labelledby="equis-offline-modal" aria-hidden="true">
899 <div class="modal-dialog">
900 <div class="modal-content">
901 <div class="modal-header">@Translate("EquisOffline_Modal_HeaderText", "Back office offline")</div>
902 <div class="modal-body"></div>
903 <div class="modal-footer">
904 <a class="orange_balloon_link modal-ok" data-dismiss="modal" href="javascript:void(0);">@Translate("EquisOffline_Modal_OkButtonText", "Ok")</a>
905 </div>
906 </div>
907 </div>
908 </div>
909 @RenderSnippet("JavascriptsBottom")
910 <div class="overlay"></div>
911 @{
912 var loginError = LoginHelper.GetLoginError();
913 if (!string.IsNullOrWhiteSpace(loginError))
914 {
915 <script>
916 $(document).ready(function () {
917 $(".loginErrorMessage span").text('@Translate(loginError, "Incorrect membership number or password")');
918 $(".loginErrorMessage span").show();
919 });
920 </script>
921 }
922 <script>
923 $(document).ready(function () {
924 // note: prevent copying text by using right click function on master's body tag
925 // check if page is market
926 $(".marketplace-page")[0] ? localStorage.setItem("marketPlace", true) : localStorage.removeItem("marketPlace");
927
928 // tooltip initializer
929 $("[data-toggle='tooltip']").tooltip();
930
931 // prevent right click on images
932 $('img').on('contextmenu', function () {
933 return false;
934 });
935 $(".photo").on('contextmenu', function () {
936 return false;
937 });
938 $(".fancybox-image").on('contextmenu', function () {
939 return false;
940 });
941
942 @{
943 // seo login, log when user logs in succesfully
944 var loginStatus = System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus];
945 if (loginStatus != null && loginStatus.Equals(Kwpn.Models.Enumerations.LoginStatus.OK))
946 {
947 System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus] = Kwpn.Models.Enumerations.LoginStatus.OKDone;
948 var seoPageview = string.Format("/{0}/{1}", GetGlobalValue("Global:Area.LongLang").ToLower(), Translate("SEO_TrackPageviewPage_UserLoggedIn", "logged-in"));
949 <Text>
950 SEO.trackPageView("@seoPageview");
951 </Text>
952 }
953 }
954
955 // seo original pageview tracking
956 SEO.trackOriginalView();
957 });
958 </script>
959 }
960 </body>
961 </html>