Error executing template "Designs/Kwpn/_parsed/HorsePage.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_1af12297f1704826bcbd2730d3330926.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\_parsed\HorsePage.parsed.cshtml:line 787
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 598 @using Kwpn.Models.Constants 599 @using Kwpn.Models.Enumerations 600 @using Kwpn.Repository.Helpers 601 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 602 @{ 603 var animalCode = GetString("Item.AnimalCode.Value"); 604 var culture = GetGlobalValue("Global:Area.LongLang"); 605 var horse = Kwpn.Repository.Repositories.Horses.Get(animalCode, culture, true, true, true, true, true, true, true, true, true, false, false, false, false, false, true); 606 var showMemberContent = true; 607 <div id="pagecontent" class="container horse-page" data-showmembership='@GetBoolean("Item.Page.ShowMembership")' data-showgotonavigation='@GetBoolean("Item.Page.ShowGotoNavigation")' data-showpartnerlogos='@GetBoolean("Item.Page.ShowCustomerLogos")'> 608 <div class="break-grid content-container"> 609 <div class="break-grid-background"> 610 <div class="in-grid"> 611 @if (horse != null) 612 { 613 var horseHasMemberContentOverride = HorseHelper.HorseHasMemberContentOverride(animalCode); 614 var headerImage = GetString("Item.HeaderImage.Value"); 615 var introText = GetString("Item.IntroText.Value"); 616 617 // horse info 618 var horseName = HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, horse.DateOfBirth); 619 var breeders = horse.Breeders; 620 var register = horse.Register; 621 var lifeNumber = horse.Lifenumber; 622 var predicates = horse.Predicates; 623 624 // gender info 625 var genderClass = "fa-question"; 626 var genderAbbr = ""; 627 var gender = Gender.UNKNOWN; 628 Enum.TryParse(horse.Gender.ToUpper(), out gender); 629 switch (gender) 630 { 631 case Gender.HENGST: 632 genderClass = "fa-mars"; 633 genderAbbr = Translate("Stallion", "Stallion"); 634 break; 635 case Gender.MERRIE: 636 genderClass = "fa-venus"; 637 genderAbbr = Translate("Mare", "Mare"); 638 break; 639 case Gender.RUIN: 640 genderClass = "fa-mars"; //fa-mars-stroke-h 641 genderAbbr = Translate("Gelding", "Gelding"); 642 break; 643 } 644 645 // color info 646 var color = ""; 647 var colorInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Color); 648 if (colorInfo != null) { color = colorInfo.Description; } 649 650 // height info 651 var withers = ""; 652 var heightInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Height); 653 if (heightInfo != null) { withers = heightInfo.Description; } 654 if (!string.IsNullOrWhiteSpace(withers)) { withers = Kwpn.Repository.Helpers.HorseHelper.ConvertWithers(withers); } 655 656 // mother info 657 var motherName = ""; 658 var mother = horse.GetPredigreeByPrefix(StringConstants.PedigreePrefixes.Mother); 659 if (mother != null) { motherName = mother.AnimalName; } else { motherName = Translate("Unknown", "Unknown"); } 660 661 // father info 662 var fatherName = ""; 663 var father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 664 if (father != null) { fatherName = father.AnimalName; } else { fatherName = Translate("Unknown", "Unknown"); } 665 var fatherNameAbbr = Translate("FathersName", "Fathers name").JsEncode(); 666 667 // mothers father info 668 var mothersFatherName = ""; 669 var mothersFather = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather); 670 if (mothersFather != null) { mothersFatherName = mothersFather.AnimalName; } else { mothersFatherName = Translate("Unknown", "Unknown"); } 671 var mothersFatherNameAbbr = Translate("MothersFathersName", "Mothers fathers name").JsEncode(); 672 var horsePageLink = HorseHelper.GetHorseInfoPageUrl(GetGlobalValue("Global:Area.LongLang"), horse.AnimalCode); 673 674 <div class="row"> 675 <div class="col-xs-12"> 676 <h1>@horseName</h1> 677 </div> 678 </div> 679 680 <div class="row subtitle"> 681 <div class="col-xs-4 col-sm-2 gender"> 682 <i class="fa @genderClass" title='@genderAbbr.JsEncode()'></i> @genderAbbr.ToUpper() 683 </div> 684 <div class="col-xs-8 col-sm-10 pedigree"> 685 <abbr title='@fatherNameAbbr'>@fatherName</abbr> x <abbr title='@mothersFatherNameAbbr'>@mothersFatherName</abbr> 686 </div> 687 </div> 688 689 <div class="row"> 690 691 <article class="col-xs-12 col-md-7"> 692 @if (!string.IsNullOrWhiteSpace(headerImage)) 693 { 694 <div class="header-image"> 695 <img src='@headerImage'> 696 </div> 697 } 698 699 @if (!string.IsNullOrWhiteSpace(introText)) 700 { 701 if (!introText.StartsWith("<p>", StringComparison.InvariantCultureIgnoreCase)) 702 { 703 introText = string.Format("<p>{0}</p>", introText); 704 } 705 706 <div class="introText"> 707 @introText 708 </div> 709 } 710 711 <div class="details"> 712 <h2>@Translate("Details", "Details")</h2> 713 @if (!string.IsNullOrWhiteSpace(motherName)) 714 { 715 <div class="row"> 716 <div class="col-xs-12 col-md-4"> 717 <span class="label">@Translate("Mother", "Mother")</span> 718 </div> 719 <div class="col-xs-12 col-md-8"> 720 <span class="value">@motherName</span> 721 </div> 722 </div> 723 } 724 725 @if (breeders != null && breeders.Any()) 726 { 727 <div class="row"> 728 <div class="col-xs-12 col-md-4"> 729 <span class="label">@Translate("Breeders", "Breeders")</span> 730 </div> 731 <div class="col-xs-12 col-md-8"> 732 <span class="value"> 733 @foreach (var breeder in breeders) 734 { 735 var breederName = breeder.PersonName; 736 if (!string.IsNullOrWhiteSpace(breeder.Place)) 737 { 738 breederName = string.Format("{0} ({1})", breederName, breeder.Place); 739 } 740 <span class="breeder">@breederName</span> 741 } 742 </span> 743 </div> 744 </div> 745 } 746 747 @if (!string.IsNullOrWhiteSpace(register)) 748 { 749 <div class="row"> 750 <div class="col-xs-12 col-md-4"> 751 <span class="label">@Translate("Register", "Register")</span> 752 </div> 753 <div class="col-xs-12 col-md-8"> 754 <span class="value">@register</span> 755 </div> 756 </div> 757 } 758 759 @if (!string.IsNullOrWhiteSpace(lifeNumber)) 760 { 761 <div class="row"> 762 <div class="col-xs-12 col-md-4"> 763 <span class="label">@Translate("LifeNumber", "Life number")</span> 764 </div> 765 <div class="col-xs-12 col-md-8"> 766 <span class="value">@lifeNumber</span> 767 </div> 768 </div> 769 } 770 771 @if (!string.IsNullOrWhiteSpace(color)) 772 { 773 <div class="row"> 774 <div class="col-xs-12 col-md-4"> 775 <span class="label">@Translate("Color", "Color")</span> 776 </div> 777 <div class="col-xs-12 col-md-8"> 778 <span class="value">@color</span> 779 </div> 780 </div> 781 } 782 783 @if (!string.IsNullOrWhiteSpace(withers)) 784 { 785 <div class="row"> 786 <div class="col-xs-12 col-md-4"> 787 <span class="label">@Translate("Withers", "Withers")</span> 788 </div> 789 <div class="col-xs-12 col-md-8"> 790 <span class="value">@withers</span> 791 </div> 792 </div> 793 } 794 </div> 795 796 <div id="pagecontent-container-AbovePedigree" class="col-xs-12 no-padding">@GetValue("DwContent(pagecontentcontainerAbovePedigree)")</div> 797 798 <div class="details"> 799 <div class="row"> 800 <div class="col-xs-12"> 801 <br><br> 802 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 803 @*note: variables like "horse/culture" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 804 <div class="horse-detail-item" id="horse-detail-item-pedigree" data-content="tab_general"> 805 @{ 806 var pedigree_Me = Kwpn.Repository.Helpers.HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, DateTime.MinValue); 807 var pedigree_Father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 808 var pedigree_Mother = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Mother); 809 } 810 @if (pedigree_Father != null && pedigree_Mother != null) 811 { 812 <script type="text/javascript"> 813 814 $(document).ready(function () { 815 816 var jsGender = ''; 817 if ('@genderClass' == 'fa-mars') { 818 jsGender = 'male' 819 } else { 820 jsGender = 'female' 821 } 822 823 var datasource = { 824 'name': '@horse.Lifenumber.JsEncode()', 825 'title': '@horse.AnimalName.JsEncode()', 826 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.Register)) 827 { 828 <text>'subtext': '@horse.Register.JsEncode()',</text> 829 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode)',</text> 830 } 831 else 832 { 833 <text>'subtext': '-',</text> 834 <text>'link': '',</text> 835 } 836 'sex': jsGender, 837 'children': [ 838 { 839 'name': '@pedigree_Father.Lifenumber.JsEncode()', 840 'title': '@pedigree_Father.AnimalName.JsEncode()', 841 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Father.Register)) 842 { 843 <text>'subtext': '@pedigree_Father.Register.JsEncode()',</text> 844 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Father.AnimalCode)',</text> 845 } 846 else 847 { 848 <text>'subtext': '-',</text> 849 <text>'link': '',</text> 850 } 851 'sex': 'male', 852 'children': [ 853 { 854 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Lifenumber.JsEncode()', 855 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalName.JsEncode()', 856 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register)) 857 { 858 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register.JsEncode()',</text> 859 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalCode)',</text> 860 } 861 else 862 { 863 <text>'subtext': '-',</text> 864 <text>'link': '',</text> 865 } 866 'sex': 'male', 867 'children': [ 868 { 869 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Lifenumber.JsEncode()', 870 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalName.JsEncode()', 871 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register)) 872 { 873 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register.JsEncode()',</text> 874 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalCode)',</text> 875 } 876 else 877 { 878 <text>'subtext': '-',</text> 879 <text>'link': '',</text> 880 } 881 'sex': 'male' 882 }, { 883 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Lifenumber.JsEncode()', 884 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalName.JsEncode()', 885 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register)) 886 { 887 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register.JsEncode()',</text> 888 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalCode)',</text> 889 } 890 else 891 { 892 <text>'subtext': '-',</text> 893 <text>'link': '',</text> 894 } 895 'sex': 'female' 896 } 897 ] 898 }, { 899 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Lifenumber.JsEncode()', 900 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalName.JsEncode()', 901 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register)) 902 { 903 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register.JsEncode()',</text> 904 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalCode)',</text> 905 } 906 else 907 { 908 <text>'subtext': '-',</text> 909 <text>'link': '',</text> 910 } 911 'sex': 'female', 912 'children': [ 913 { 914 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Lifenumber.JsEncode()', 915 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalName.JsEncode()', 916 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register)) 917 { 918 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register.JsEncode()',</text> 919 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalCode)',</text> 920 } 921 else 922 { 923 <text>'subtext': '-',</text> 924 <text>'link': '',</text> 925 } 926 'sex': 'male' 927 }, { 928 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Lifenumber.JsEncode()', 929 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalName.JsEncode()', 930 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register)) 931 { 932 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register.JsEncode()',</text> 933 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalCode)',</text> 934 } 935 else 936 { 937 <text>'subtext': '-',</text> 938 <text>'link': '',</text> 939 } 940 'sex': 'female' 941 }] 942 }] 943 }, 944 { 945 'name': '@pedigree_Mother.Lifenumber.JsEncode()', 946 'title': '@pedigree_Mother.AnimalName.JsEncode()', 947 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Mother.Register)) 948 { 949 <text>'subtext': '@pedigree_Mother.Register.JsEncode()',</text> 950 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Mother.AnimalCode)',</text> 951 } 952 else 953 { 954 <text>'subtext': '-',</text> 955 <text>'link': '',</text> 956 } 957 'sex': 'female', 958 'children': [ 959 { 960 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Lifenumber.JsEncode()', 961 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalName.JsEncode()', 962 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register)) 963 { 964 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register.JsEncode()',</text> 965 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalCode)',</text> 966 } 967 else 968 { 969 <text>'subtext': '-',</text> 970 <text>'link': '',</text> 971 } 972 'sex': 'male', 973 'children': [ 974 { 975 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Lifenumber.JsEncode().JsEncode()', 976 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalName.JsEncode().JsEncode()', 977 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register)) 978 { 979 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register.JsEncode().JsEncode()',</text> 980 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalCode)',</text> 981 } 982 else 983 { 984 <text>'subtext': '-',</text> 985 <text>'link': '',</text> 986 } 987 'sex': 'male' 988 }, { 989 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Lifenumber.JsEncode()', 990 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalName.JsEncode()', 991 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register)) 992 { 993 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register.JsEncode()',</text> 994 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalCode)',</text> 995 } 996 else 997 { 998 <text>'subtext': '-',</text> 999 <text>'link': '',</text> 1000 } 1001 'sex': 'female' 1002 } 1003 ] 1004 }, { 1005 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Lifenumber.JsEncode()', 1006 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalName.JsEncode()', 1007 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register)) 1008 { 1009 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register.JsEncode()',</text> 1010 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalCode)',</text> 1011 } 1012 else 1013 { 1014 <text>'subtext': '-',</text> 1015 <text>'link': '',</text> 1016 } 1017 'sex': 'female', 1018 'children': [ 1019 { 1020 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Lifenumber.JsEncode()', 1021 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalName.JsEncode()', 1022 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register)) 1023 { 1024 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register.JsEncode()',</text> 1025 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalCode)',</text> 1026 } 1027 else 1028 { 1029 <text>'subtext': '-',</text> 1030 <text>'link': '',</text> 1031 } 1032 'sex': 'male' 1033 }, { 1034 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Lifenumber.JsEncode()', 1035 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalName.JsEncode()', 1036 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register)) 1037 { 1038 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register.JsEncode()',</text> 1039 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalCode)',</text> 1040 } 1041 else 1042 { 1043 <text>'subtext': '-',</text> 1044 <text>'link': '',</text> 1045 } 1046 'sex': 'female' 1047 } 1048 ] 1049 } 1050 ] 1051 }] 1052 }; 1053 1054 1055 $('#chart-container').orgchart({ 1056 data: datasource, 1057 direction: 'l2r', 1058 nodeContent: 'title', 1059 parentNodeSymbol: '', 1060 createNode: function ($node, data) { 1061 var icon = '<div class="imagecontainer"><i class="fa fa-' + (data.sex === 'male' ? 'mars' : 'venus') + '"></i></div>'; 1062 var subtext = '<div class="subtext">' + data.subtext + '</div></div>'; 1063 $node.find('i[class^="edge"], i[class^="fa"]').remove(); 1064 $node.prepend(icon); 1065 $node.append(subtext); 1066 $node.find('.imagecontainer').nextAll().wrapAll('<div class="contextcontainer"/>'); 1067 1068 if (data.link.length > 0) { 1069 $node.css('cursor', 'pointer'); 1070 $node.on('click', function (event) { 1071 location.href = data.link; 1072 }); 1073 } 1074 1075 $node.on('mouseenter', function () { 1076 $('#custom_tooltip').css('display', 'block'); 1077 $('#custom_tooltip').find('.title').text(data.title); 1078 $('#custom_tooltip').find('.subtext').text(data.subtext); 1079 }); 1080 1081 $node.on('mouseleave', function () { 1082 $('#custom_tooltip').css('display', 'none'); 1083 }); 1084 } 1085 }); 1086 1087 $('.tooltip').on('shown.bs.tooltip', function () { 1088 console.log('tooltip show'); 1089 }); 1090 1091 1092 }); 1093 1094 $(window).on('mousemove', function (e) { 1095 var mouseX = e.clientX + 10; 1096 var mouseY = e.clientY + 20; 1097 $('#custom_tooltip').css('left', mouseX); 1098 $('#custom_tooltip').css('top', mouseY); 1099 }); 1100 </script> 1101 <div class="pedigreetree"> 1102 <div id="custom_tooltip"> 1103 <div class="title"></div> 1104 <div class="subtext"></div> 1105 </div> 1106 <h2>@Translate("Pedigree", "Pedigree")</h2> 1107 <div id="chart-container"></div> 1108 </div> 1109 } 1110 </div> 1111 </div> 1112 </div> 1113 </div> 1114 1115 <div id="pagecontent-container-BelowPedigree" class="col-xs-12 no-padding">@GetValue("DwContent(pagecontentcontainerBelowPedigree)")</div> 1116 1117 </article> 1118 1119 <aside class="col-xs-12 col-md-4 col-md-offset-1 aside"> 1120 <div class="row"> 1121 <div class="col-xs-12"> 1122 <h2>@Translate("MoreInfoAboutThisHorse", "More info about this horse?")</h2> 1123 <ul> 1124 <li><a href='@horsePageLink'>@Translate("GoToDatabase", "To database")</a></li> 1125 </ul> 1126 </div> 1127 </div> 1128 <div id="asidecontent" class="col-xs-12">@GetValue("DwContent(asidecontent)")</div> 1129 </aside> 1130 </div> 1131 } 1132 else 1133 { 1134 <div class="row"> 1135 <div class="col-xs-12"> 1136 <p>@Translate("HorseNotFound", "Oops, something went wrong.<br>The requested horse info is not available.")</p> 1137 </div> 1138 </div> 1139 } 1140 </div> 1141 </div> 1142 </div> 1143 </div> 1144 } 1145 @using Kwpn.Models.Constants 1146 @using Kwpn.Repository.Helpers 1147 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1148 @{ 1149 var partnerLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.PartnerLogoParagraphId); 1150 var showPartnerLogos = !string.IsNullOrWhiteSpace(partnerLogosParagraphId) && Convert.ToInt32(partnerLogosParagraphId) > 0; 1151 var sponsorLogosParagraphId = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.SponsorLogoParagraphId); 1152 var showSponsorLogos = !string.IsNullOrWhiteSpace(sponsorLogosParagraphId) && Convert.ToInt32(sponsorLogosParagraphId) > 0; 1153 if (showPartnerLogos || showSponsorLogos) 1154 { 1155 <div class="container" id="footerlogos"> 1156 @if (showPartnerLogos) 1157 { 1158 <div class="row logolist logolist-blue" id="partner-logos"> 1159 <div class="col-xs-12 text-center"> 1160 @RenderParagraphContent(Convert.ToInt32(partnerLogosParagraphId)) 1161 </div> 1162 </div> 1163 } 1164 @if (showSponsorLogos) 1165 { 1166 <div class="row logolist" id="sponsor-logos"> 1167 <div class="col-xs-12 text-center"> 1168 @RenderParagraphContent(Convert.ToInt32(sponsorLogosParagraphId)) 1169 </div> 1170 </div> 1171 } 1172 </div> 1173 } 1174 } 1175 @using Kwpn.Models.Constants 1176 @using Kwpn.Repository.Helpers 1177 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1178 @{ 1179 var newsletterParagraphId = int.Parse(AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.ParagraphSystemNames.NewsletterParagraphId)); 1180 1181 var quickLinksColumn1Folder = Dynamicweb.Services.Pages.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.NavigationTags.InternalLinksColumn1); 1182 var quickLinksColumn1 = Dynamicweb.Services.Pages.GetPagesByParentID(quickLinksColumn1Folder?.ID ?? 0); 1183 1184 var quickLinksColumn2Folder = Dynamicweb.Services.Pages.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.NavigationTags.InternalLinksColumn2); 1185 var quickLinksColumn2 = Dynamicweb.Services.Pages.GetPagesByParentID(quickLinksColumn2Folder?.ID ?? 0); 1186 } 1187 <div class="container" id="footerlinks"> 1188 <div class="row" id="goto-navigation"> 1189 <div class="col-xs-12 col-sm-6 col-md-3"> 1190 <h3>@Translate("NavigationHeader_QuickLinksColumn1", "Directly to")</h3> 1191 <ul id="navigation_internallinks_column1"> 1192 @foreach (var ql1 in quickLinksColumn1) 1193 { 1194 <li><a href="@Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ql1.ID)">@ql1.MenuText</a></li> 1195 } 1196 </ul> 1197 </div> 1198 <div class="col-xs-12 col-sm-6 col-md-3"> 1199 <h3>@Translate("NavigationHeader_QuickLinksColumn2", "Our products")</h3> 1200 <ul id="navigation_internallinks_column2"> 1201 @foreach (var ql2 in quickLinksColumn2) 1202 { 1203 1204 // determine icon based on name ... not very pretty, but I don't have another way .... 1205 var listicon = ""; 1206 if (ql2.MenuText.IndexOf("database", StringComparison.OrdinalIgnoreCase) >= 0) { 1207 // KWPN Database 1208 listicon ="<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_Horse.svg'>"; 1209 } else if (ql2.MenuText.IndexOf(".tv", StringComparison.OrdinalIgnoreCase) >= 0) 1210 { 1211 // KWPN.tv 1212 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_TV.svg'>"; 1213 } 1214 else if (ql2.MenuText.IndexOf("mark", StringComparison.OrdinalIgnoreCase) >= 0 || ql2.MenuText.IndexOf("sale", StringComparison.OrdinalIgnoreCase) >= 0) 1215 { 1216 // KWPN Marktplaats, KWPN Market place, KWPN horses for sale 1217 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_ForSale.svg'>"; 1218 } 1219 else if (ql2.MenuText.IndexOf("shop", StringComparison.OrdinalIgnoreCase) >= 0) 1220 { 1221 // KWPN Webshop 1222 listicon = "<img src='/Files/Templates/Designs/Kwpn/Images/StyleElements/HomepageHeader_Webshop.svg'>"; 1223 } 1224 1225 var listclass = string.IsNullOrWhiteSpace(listicon) ? "" : " class='icon'"; 1226 var listitem = $"<li{listclass}><a href='{Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(ql2.ID)}'>{listicon}{ql2.MenuText}</a>"; 1227 @listitem 1228 } 1229 </li{listclass}></ul> 1230 </div> 1231 <a name="newsletter"></a> 1232 <div class="col-xs-12 col-sm-6 col-md-3"> 1233 @if (newsletterParagraphId > 0) 1234 { 1235 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1236 @*If not logged in or logged in and not subscribed to the monthly newsletter, then show newsletter subscription*@ 1237 <h3>@Translate("NewsletterSubscriptionHeader", "Stay informed")</h3> 1238 <p>@Translate("NewsletterSubscriptionIntro", "Receive our monthly newsletter filled with updates, events, tips and tricks!")</p> 1239 @*If logged in, then show button to profile page (with subscribe/unsubscribe checkbox)*@ 1240 1241 @RenderParagraphContent(newsletterParagraphId) 1242 } 1243 </div> 1244 <div class="col-xs-12 col-sm-6 col-md-3"> 1245 @using Kwpn.Models.Constants 1246 @using Kwpn.Repository.Helpers 1247 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1248 <h3>@Translate("NavigationHeader_SocialMedia", "Social media")</h3> 1249 <ul> 1250 @{ 1251 var facebookUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Facebook); 1252 if (!string.IsNullOrWhiteSpace(facebookUrl)) 1253 { 1254 <li class="facebook"><a href='@facebookUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Facebook", "Facebook")</a></li> 1255 } 1256 var instagramUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Instagram); 1257 if (!string.IsNullOrWhiteSpace(instagramUrl)) 1258 { 1259 <li class="instagram"><a href='@instagramUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Instagram", "Instagram")</a></li> 1260 } 1261 var linkedInUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.LinkedIn); 1262 if (!string.IsNullOrWhiteSpace(linkedInUrl)) 1263 { 1264 <li class="linkedIn"><a href='@linkedInUrl.JsEncode()' target="_blank">@Translate("SocialMedia_LinkedIn", "LinkedIn")</a></li> 1265 } 1266 var twitterUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Twitter); 1267 if (!string.IsNullOrWhiteSpace(twitterUrl)) 1268 { 1269 <li class="twitter"><a href='@twitterUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Twitter", "Twitter")</a></li> 1270 } 1271 var youtubeUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.YouTube); 1272 if (!string.IsNullOrWhiteSpace(youtubeUrl)) 1273 { 1274 <li class="youtube"><a href='@youtubeUrl.JsEncode()' target="_blank">@Translate("SocialMedia_YouTube", "YouTube")</a></li> 1275 } 1276 var vimeoUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.Vimeo); 1277 if (!string.IsNullOrWhiteSpace(vimeoUrl)) 1278 { 1279 <li class="vimeo"><a href='@vimeoUrl.JsEncode()' target="_blank">@Translate("SocialMedia_Vimeo", "Vimeo")</a></li> 1280 } 1281 var tiktokUrl = AreaHelper.GetAreaItemStringValueBySystemName(StringConstants.SocialMedia.TikTok); 1282 if (!string.IsNullOrWhiteSpace(tiktokUrl)) 1283 { 1284 <li class="tiktok"><a href='@tiktokUrl.JsEncode()' target="_blank">@Translate("SocialMedia_TikTok", "TikTok")</a></li> 1285 } 1286 } 1287 </ul> 1288 </div> 1289 </div> 1290 </div> 1291 </div> 1292 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1293 @{ 1294 var requestHostFooter = string.Format("{0}://{1}", GetGlobalValue("Global:Request.Scheme"), GetGlobalValue("Global:Request.Host")); 1295 var footerLogo = string.Format("{0}/Files/Templates/Designs/Kwpn/Images/kwpn-footer-logo.svg", requestHostFooter); 1296 <div id="footerwrapper"> 1297 <div class="container"> 1298 <div class="row"> 1299 <div class="col-xs-12 col-sm-12 col-md-10"> 1300 @GetValue("DwNavigation(navigationfooter)") 1301 </div> 1302 <div class="hidden-xs hidden-sm col-md-2"> 1303 <img src="@footerLogo" id="footer-logo"> 1304 </div> 1305 </div> 1306 </div> 1307 </div> 1308 } 1309 @using System.Web.Mvc; 1310 @using Kwpn.Core.Services.Abstract; 1311 1312 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1313 1314 @{ 1315 IKwpnTvService tvService = DependencyResolver.Current.GetService<IKwpnTvService>(); 1316 } 1317 1318 <div id="kwpnlink"> 1319 <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> 1320 </div> 1321 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1322 <div class="modal fade" id="equis-offline" tabindex="-1" role="dialog" aria-labelledby="equis-offline-modal" aria-hidden="true"> 1323 <div class="modal-dialog"> 1324 <div class="modal-content"> 1325 <div class="modal-header">@Translate("EquisOffline_Modal_HeaderText", "Back office offline")</div> 1326 <div class="modal-body"></div> 1327 <div class="modal-footer"> 1328 <a class="orange_balloon_link modal-ok" data-dismiss="modal" href="javascript:void(0);">@Translate("EquisOffline_Modal_OkButtonText", "Ok")</a> 1329 </div> 1330 </div> 1331 </div> 1332 </div> 1333 @RenderSnippet("JavascriptsBottom") 1334 <div class="overlay"></div> 1335 @{ 1336 var loginError = LoginHelper.GetLoginError(); 1337 if (!string.IsNullOrWhiteSpace(loginError)) 1338 { 1339 <script> 1340 $(document).ready(function () { 1341 $(".loginErrorMessage span").text('@Translate(loginError, "Incorrect membership number or password")'); 1342 $(".loginErrorMessage span").show(); 1343 }); 1344 </script> 1345 } 1346 <script> 1347 $(document).ready(function () { 1348 // note: prevent copying text by using right click function on master's body tag 1349 // check if page is market 1350 $(".marketplace-page")[0] ? localStorage.setItem("marketPlace", true) : localStorage.removeItem("marketPlace"); 1351 1352 // tooltip initializer 1353 $("[data-toggle='tooltip']").tooltip(); 1354 1355 // prevent right click on images 1356 $('img').on('contextmenu', function () { 1357 return false; 1358 }); 1359 $(".photo").on('contextmenu', function () { 1360 return false; 1361 }); 1362 $(".fancybox-image").on('contextmenu', function () { 1363 return false; 1364 }); 1365 1366 @{ 1367 // seo login, log when user logs in succesfully 1368 var loginStatus = System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus]; 1369 if (loginStatus != null && loginStatus.Equals(Kwpn.Models.Enumerations.LoginStatus.OK)) 1370 { 1371 System.Web.HttpContext.Current.Session[Kwpn.Models.Constants.StringConstants.SessionVariables.LoginStatus] = Kwpn.Models.Enumerations.LoginStatus.OKDone; 1372 var seoPageview = string.Format("/{0}/{1}", GetGlobalValue("Global:Area.LongLang").ToLower(), Translate("SEO_TrackPageviewPage_UserLoggedIn", "logged-in")); 1373 <Text> 1374 SEO.trackPageView("@seoPageview"); 1375 </Text> 1376 } 1377 } 1378 1379 // seo original pageview tracking 1380 SEO.trackOriginalView(); 1381 }); 1382 </script> 1383 } 1384 </body> 1385 </html>