Error executing template "Designs/Bolind/_parsed/basic_Page.parsed.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_9daf6d459ed048c792aef35be2418679.Execute() in E:\Solutions\Bolind\Web\Live\Files\Templates\Designs\Bolind\_parsed\Basic_Page.parsed.cshtml:line 398
   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.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using Bolind.Web.CustomCode 2 @using Bolind.Web.CustomCode.CDN 3 @using Bolind.Web.CustomCode.Impersonation 4 @using Bolind.Web.CustomCode.Licitation 5 @using Bolind.Web.CustomCode.LWI.Selections 6 @using Bolind.Web.CustomCode.SalesPerson 7 @using Dynamicweb.Content 8 @using System.Web 9 @using Bolind.Web.CustomCode.Items.Settings 10 @using Bolind.Web.CustomModules.BolindAccountingNumbers.CustomCode 11 @using Dynamicweb 12 @using Dynamicweb.Environment.Web 13 @using Dynamicweb.Frontend; 14 @using NLWI.Core.Factory 15 @using NORRIQ.Common8.Caching 16 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 17 @{ 18 bool Privat = Model.Area.Item.GetBoolean("Private"); 19 var partnersite = !string.IsNullOrEmpty(Model.Area.Item.GetString("PartnerSiteID")); 20 var partnersiteid = Model.Area.Item.GetString("PartnerSiteID"); 21 //var bgimage = (Model.Area.Item.GetFile("BackgroundImage") != null) ? "Model.Area.Item.GetFile(BackgroundImage).Path" : ""; 22 var bgimage = Model.Area.Item.GetFile("BackgroundImage")?.Path ?? ""; 23 24 var item = Pageview.Area.Item.ToCodeFirstItem<Websites>(); 25 if (!string.IsNullOrWhiteSpace(bgimage)) 26 { 27 bgimage = Pageview.CdnWrap(bgimage); 28 } 29 string centerHeaderPrefix = "Header "; 30 var isCurrentlyImpersonating = ObjectFactory.GetInstance<NORRIQ.SalesPersonLogin.Services.ImpersonationService>().IsCurrentlyImpersonating(); 31 var userDisplayName = Pageview.User?.Name ?? string.Empty; 32 if (isCurrentlyImpersonating) 33 { 34 string name2 = Pageview.User.CustomFieldValues.FirstOrDefault(x => x.CustomField.SystemName == "AccessUser_Name2")?.Value?.ToString(); 35 if (!string.IsNullOrEmpty(name2)) 36 { 37 userDisplayName = $"{Pageview.User.Name} - {name2}"; 38 } 39 } 40 } 41 42 <!DOCTYPE html> 43 <html lang="@Pageview.Area.Culture"> 44 <head> 45 <title>@Model.Title</title> 46 <meta charset='utf-8' /> 47 <meta name="description" content="@Model.Description" /> 48 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, user-scalable=yes, shrink-to-fit=no" /> 49 <meta http-equiv="x-ua-compatible" content="ie=edge"> 50 @if (Model.Area.Item.GetBoolean("NoIndex")) 51 { 52 <!-- TODO: remove on launch--> 53 <meta name="robots" content="noindex, nofollow" /> 54 } 55 @Model.MetaTags 56 @if (PageView.Current().IsB2C() && !partnersite) 57 { 58 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-b2c-min.css"))" as="style" /> 59 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-b2c-min.css"))" rel="stylesheet" media="screen" /> 60 } 61 else if (!PageView.Current().IsB2C() && !partnersite) 62 { 63 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-min.css"))" as="style" /> 64 65 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Bolind-min.css"))" rel="stylesheet" media="screen" /> 66 @*<link href="/Files/dist/css/Bolind-min.css" rel="stylesheet" />*@ 67 } 68 else if (partnersite) 69 { 70 <link rel="preload" href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/" + partnersiteid + "-min.css"))" as="style" /> 71 <link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/" + partnersiteid + "-min.css"))" rel="stylesheet" media="screen" /> 72 } 73 @*<link href="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/css/Print-min.css"))" rel="stylesheet" media="print" />*@ 74 <link href="/Files/dist/css/Print-min.css" rel="stylesheet" media="print" /> 75 <link rel="shortcut icon" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/favicon.ico")" /> 76 <!-- Apple --> 77 <link rel="apple-touch-icon" sizes="any" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-196.png")" /> 78 <link rel="apple-touch-icon" sizes="180x180" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-180.png")" /> 79 <!-- Windows --> 80 <meta name="application-name" content="@Model.Title" /> 81 <meta name="msapplication-TileColor" content="#020b10" /> 82 <meta name="msapplication-square150x150logo" content="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-150.png")" /> 83 <!-- Android --> 84 <link rel="icon" sizes="192x192" href="@Pageview.CdnWrap("/Files/Images/Graphics/icons/bl-icon-192.png")"> 85 86 @if (!string.IsNullOrWhiteSpace(item.HeaderScript)) 87 { 88 @item.HeaderScript 89 } 90 91 </head> 92 <body id="top"> 93 @if (Model.Area.Item.GetString("IeWarningText") != null) 94 { 95 <div class="alert alert-warning text-center ie-only" rel="noindex">@Model.Area.Item.GetString("IeWarningText")</div> 96 } 97 @if (!partnersite && Pageview.User != null && Pageview.User.GetNavAssociationGroup().ToUpper() == "KAB") 98 { 99 <div class="alert alert-warning text-center" rel="noindex">@Translate("UsePunchOut", "Benyt punchout løsningen")</div> 100 } 101 @if (partnersite && Pageview.User == null) 102 { 103 <div id="app" class="partnerlogin"> 104 <div class="partnerloginWrap"> 105 <div class="partnerLoginbox"> 106 <h1 class="page-header">@Model.Area.Item.GetString("PartnerSiteTitle")</h1> 107 @*@if (Model.Area.Item.GetFile("Logo") != null) 108 { 109 <picture> 110 @if (Model.Area.Item.GetFile("LogoMobile") != null) 111 { 112 <source media="(max-width:63.99875rem)" srcset="@Model.Area.Item.GetFile("LogoMobile").Path" /> 113 } 114 <img class="img-fluid" src="@Model.Area.Item.GetFile("Logo")" alt="@Translate(centerHeaderPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 115 </picture> 116 } 117 else 118 { 119 <i>@Translate(centerHeaderPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 120 }*@ 121 <p>@Translate("login_subline01", "Du skal være logget ind for at se denne side.")</p> 122 <p>@Translate("login_subline02", "Du er muligvis blevet logget ud af systemet. Du bedes gå tilbage til din handelsportal og foretage login der igennem.")</p> 123 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("PartnerLoginText"))) 124 { 125 <hr class="hr-light" /> 126 <h3>@Translate("login_headline", "Alternativ adgang")</h3> 127 <p> 128 @Model.Area.Item.GetString("PartnerLoginText") 129 </p> 130 } 131 <head-login-form inline-template> 132 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 133 <input type="hidden" name="ID" id="ID" value="@Pageview.Page.ID" /> 134 <div class="form-group"> 135 <label for="Username">@Translate("Username", "Username")</label> 136 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 137 </div> 138 <div class="form-group"> 139 <label for="Password">@Translate("Password", "Password")</label> 140 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 141 </div> 142 <div v-if="loginFailed"> 143 <p class="alert alert-warning"> 144 @Translate("Login failed", "Invalid credentials") 145 </p> 146 </div> 147 <div class="basic_login-buttons"> 148 <button type="submit" role="button" class="btn btn-dark btn-block btn-lg" v-bind:class='{"loading": loading}' v-on:click="loading=true" id="loginBtn"> 149 @Translate("Login", "Login") 150 </button> 151 </div> 152 </form> 153 </head-login-form> 154 </div> 155 </div> 156 </div> 157 } 158 else 159 { 160 <div id="app"> 161 <header class="center_header hide-print"> 162 <div class="center_header-top"> 163 <div class="center_header-container"> 164 @if (partnersite) 165 { 166 <div class="partnersite"> 167 @Model.Area.Item.GetString("PartnerSiteTitle") 168 </div> 169 } 170 else 171 { 172 <ul> 173 <li> 174 <a href="@Model.Area.Item.GetString("B2BLink")" class="@(!PageView.Current().IsB2C() ? "active" : "")">@Translate(centerHeaderPrefix + "Erhverv", "Erhverv")</a> 175 </li> 176 @*<li> 177 <a href="@Model.Area.Item.GetString("B2CLink")" class="@(PageView.Current().IsB2C() ? "active" : "")">@Translate(centerHeaderPrefix + "Privat", "Privat")</a> 178 </li>*@ 179 </ul> 180 } 181 <div class="center_header-userinfo"> 182 @if (Model.Area.Item.GetFile("HeaderGraphic") != null) 183 { 184 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("HeaderGraphic").Path)" class="img-fluid" alt="@Translate(centerHeaderPrefix + "Graphics Alt Text", "One Stop Shopping")" /> 185 } 186 @if (!PageView.Current().IsB2C()) 187 { 188 if (Pageview.User != null) 189 { 190 <p title="@userDisplayName" class="logged-in @(isCurrentlyImpersonating ? "is-sales-person" : "ae")"> 191 <span v-b-toggle.customer-center>@Pageview.User.UserName, @userDisplayName @Pageview.User.CustomFieldValues.FirstOrDefault(x => x.CustomField.SystemName == "AccessUser_Name2").Value</span><a v-clear-cache:click.cart.user href="/admin/public/extranetlogoff.aspx?ID=@(Model.Area.FirstActivePage.ID)">@Translate(centerHeaderPrefix + "Sign Out", "Sign Out")</a> 192 </p> 193 } 194 else 195 { 196 <p class="logged-out"> 197 <a href="javascript:void();" v-b-toggle.customer-center> 198 @Translate(centerHeaderPrefix + "Login", "Log ind") 199 </a> 200 </p> 201 } 202 } 203 </div> 204 </div> 205 </div> 206 <div class="center_header-main"> 207 <div class="logowrap"> 208 <a href="/" class="center_header-logo" title="@Translate(centerHeaderPrefix + "Go to frontpage", "Go to frontpage")"> 209 @if (Model.Area.Item.GetFile("Logo") != null) 210 { 211 <picture> 212 @if (Model.Area.Item.GetFile("LogoMobile") != null) 213 { 214 <source media="(max-width:63.99875rem)" srcset="@Pageview.CdnWrap(Model.Area.Item.GetFile("LogoMobile").Path)" /> 215 } 216 <img class="img-fluid" src="@Pageview.CdnWrap(Model.Area.Item.GetFile("Logo").Path)" alt="@Translate(centerHeaderPrefix + "Website Logo Alttext", "Website Logo Alttext")" /> 217 </picture> 218 } 219 else 220 { 221 <i>@Translate(centerHeaderPrefix + "No logo found", "No logo found, please configure it in the Dynamicweb Administration")</i> 222 } 223 </a> 224 </div> 225 <div class="center_header-container"> 226 <div class="center_header-burger"> 227 <button type="button" 228 aria-label="@Translate(centerHeaderPrefix + "Open main navigation", "Open main navigation")" 229 v-b-toggle.basic_navigation> 230 <span></span> 231 <span></span> 232 <span></span> 233 </button> 234 </div> 235 236 <instant-search base-class="center_header-search" :ajax-paragraph-id="@(ObjectFactory.GetInstance<NORRIQ.Common8.Context.ParagraphService>().GetParagraphId("instant-search-plp", 1))"></instant-search> 237 @*logo was here*@ 238 <ul class="center_header-functions"> 239 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroIcon")) 240 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroLabel")) 241 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderZeroLink"))) 242 { 243 <li> 244 <a href="@Model.Area.Item.GetString("HeaderZeroLink")"> 245 <svg> 246 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderZeroIcon")"></use> 247 </svg> 248 <span class="label">@Model.Area.Item.GetString("HeaderZeroLabel")</span> 249 </a> 250 </li> 251 } 252 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneIcon")) 253 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneLabel")) 254 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderOneLink"))) 255 { 256 <li> 257 <a href="@Model.Area.Item.GetString("HeaderOneLink")"> 258 <svg> 259 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderOneIcon")"></use> 260 </svg> 261 <span class="label">@Model.Area.Item.GetString("HeaderOneLabel")</span> 262 </a> 263 </li> 264 } 265 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoIcon")) 266 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoLabel")) 267 && !string.IsNullOrEmpty(Model.Area.Item.GetString("HeaderTwoLink"))) 268 { 269 <li class="center_header-contact"> 270 <a href="@Model.Area.Item.GetString("HeaderTwoLink")"> 271 <svg> 272 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#@Model.Area.Item.GetString("HeaderTwoIcon")"></use> 273 </svg> 274 <span class="label">@Model.Area.Item.GetString("HeaderTwoLabel")</span> 275 </a> 276 </li> 277 } 278 @if (!Privat) 279 { 280 <li class="@(Pageview.User != null ? "favorites-allowed" : "favorites-closed")"> 281 <a href="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("favoritlister")"> 282 283 <svg> 284 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#star"></use> 285 </svg> 286 <span class="label">@Translate(centerHeaderPrefix + "favoritliste", "favoritliste")</span> 287 288 </a> 289 </li> 290 <li class="center_header-customer"> 291 <button v-b-toggle.customer-center type="button" id="login-toggle" aria-label="@Translate("Show Webshop Login")" title="@(Pageview.User == null ? Translate("Login") : Translate("Account"))"> 292 <svg> 293 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 294 </svg> 295 @if (Pageview.User == null) 296 { 297 <span class="label"> 298 @Translate(centerHeaderPrefix + "Login", "Log ind") 299 </span> 300 } 301 else 302 { 303 <span class="label"> 304 @Translate(centerHeaderPrefix + "Customer center", "Kundecenter") 305 </span> 306 } 307 </button> 308 <b-collapse id="customer-center" class="head_login-dropmenu" accordion="basic_navigation" v-auto-close> 309 <div class="head_login-dropmenu--box"> 310 @if (Pageview.User == null) 311 { 312 <p class="h6"> 313 <svg class="icon icon-dark"> 314 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 315 </svg> 316 @Translate("Webshop Login", "Webshop Login") 317 </p> 318 <head-login-form inline-template> 319 <form name="ExtUserForm" id="loginForm" method="post" class="form" role="form" v-on:submit="submitLogin"> 320 <input type="hidden" name="ID" id="ID" value="@Pageview.Page.ID" /> 321 <div class="form-group"> 322 <label for="Username">@Translate("Username", "Username")</label> 323 <input id="Username" v-model="username" name="Username" type="text" value="" class="form-control" autocomplete="off"> 324 </div> 325 <div class="form-group"> 326 <label for="Password">@Translate("Password", "Password")</label> 327 <input id="Password" v-model="password" name="Password" type="password" value="" class="form-control" autocomplete="off"> 328 </div> 329 <div v-if="loginFailed"> 330 <p class="alert alert-warning"> 331 @Translate("Login failed", "Invalid credentials") 332 </p> 333 </div> 334 <div class="basic_login-buttons"> 335 <button type="submit" role="button" class="btn btn-primary btn-block" v-bind:class='{"loading": loading}' id="loginBtn"> 336 @Translate("Login", "Login") 337 </button> 338 </div> 339 </form> 340 </head-login-form> 341 <ul class="links"> 342 <li> 343 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("forgotpassword")&amp;LoginAction=Recovery"> 344 @Translate("Forgot password") 345 </a> 346 </li> 347 <li> 348 <a href="/Default.aspx?ID=@NORRIQ.Common8.Razor.Navigation.GetPageIdByNavigationTag("usercreate")"> 349 @Translate("Create User") 350 </a> 351 </li> 352 </ul> 353 } 354 else 355 { 356 <div> 357 <p class="h6"> 358 <svg class="icon icon-dark"> 359 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#user"></use> 360 </svg> 361 @Pageview.User.Name 362 </p> 363 <div class="navi"> 364 @DwCaching.CacheByPage("bolind_customer.xslt", () => RenderNavigation(new { Template = "bolind_customer.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4, parenttag = "customer-portal" })) 365 </div> 366 <p class="text-right"> 367 <a v-clear-cache:click.cart.user href='/admin/public/extranetlogoff.aspx?ID=@(Pageview.Page.ID)' class="text-sm text-danger"> 368 @Translate("Sign out") 369 </a> 370 </p> 371 </div> 372 } 373 </div> 374 </b-collapse> 375 </li> 376 } 377 <li class="center_header-checkout"> 378 <cart-icon cartlink="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("checkout")"></cart-icon> 379 </li> 380 </ul> 381 382 </div> 383 </div> 384 @DwCachingWithSelections.CacheByPage("center_Header.xslt", () => RenderNavigation(new { Template = "center_Header.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 4 })) 385 386 </header> 387 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 388 @using Bolind.Web.CustomCode.CDN 389 @using Dynamicweb.Frontend; 390 @using NORRIQ.Common8.Caching 391 392 @{ 393 string basicPagePrefix = "Page "; 394 var bg = Model.Item != null && Model.Item.GetBoolean("WhiteBackground") ? "whitebg" : ""; 395 } 396 @if (Pageview.IsCurrentUserAllowed) 397 { 398 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 399 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 400 bool isBanner = Model.Item.GetBoolean("isBanner"); 401 var isBottomRight = Model.Item.GetBoolean("isBottomRight") ? " bottom-right" : "top-left"; 402 var isWhite = Model.Item.GetBoolean("isWhite") ? "text-white" : "text-dark"; 403 var isFixedWidth = Model.Item.GetBoolean("isFixedWidth") ? " is-fixed" : ""; 404 var justifyBanner = Model.Item.GetBoolean("isBottomRight") ? "space-between" : "center"; 405 406 407 if (!Model.Item.GetBoolean("HideBreadcrumb")) 408 { 409 @DwCaching.CacheByPage("basic_Breadcrumb.xslt", () => RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 })) 410 } 411 <main class="@pageClass" id="main-element"> 412 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 413 { 414 <aside class="basic_page-sidebar"> 415 @*<div class="sidebar-toggle"> 416 <button type="button" 417 class="btn-toggle" 418 v-b-toggle.sidebar-navigation 419 aria-label="@Translate(basicPagePrefix + "Open sidebar","Open sidebar")"> 420 <svg class="icon-left"> 421 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-left"></use> 422 </svg> 423 <span>@Pageview.Page.MenuText</span> 424 </button> 425 </div>*@ 426 @DwCaching.CacheByPage("basic_Page.xslt", () => RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 })) 427 </aside> 428 <section class="basic_page-content @bg"> 429 @if (pageLayout == "content-page-sidebar" 430 && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) 431 || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) 432 || Model.Item.GetFile("Image") != null) 433 { 434 if (isBanner && Model.Item.GetFile("Image") != null) 435 { 436 <figure class="page-banner @isWhite" style="background-image:url(@Pageview.CdnWrap(Model.Item.GetFile("Image").Path);"> 437 <figcaption class="@justifyBanner"> 438 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 439 { 440 <h1 class="page-banner-title"> 441 @Model.Item.GetString("Title") 442 </h1> 443 } 444 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 445 { 446 <div class="@isBottomRight"> 447 <div class="page-banner-text@(isFixedWidth)"> 448 @Model.Item.GetString("Text") 449 </div> 450 </div> 451 452 } 453 </figcaption> 454 </figure> 455 } 456 else 457 { 458 if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 459 { 460 <header class="basic_page-header"> 461 <h1> 462 @Model.Item.GetString("Title") 463 </h1> 464 </header> 465 } 466 if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) || Model.Item.GetFile("Image") != null) 467 { 468 string ImagePosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue) ? Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue : "top"; 469 <div class="basic_page-@ImagePosition"> 470 @if (Model.Item.GetFile("Image") != null) 471 { 472 <figure> 473 <img src="@Pageview.CdnWrap(Model.Item.GetFile("Image").Path)" 474 alt="@(!string.IsNullOrEmpty(Model.Item.GetString("ImageText")) ? Model.Item.GetString("ImageText") : Model.Item.GetString("Title"))" 475 class="img-fluid" /> 476 @if (!string.IsNullOrEmpty(Model.Item.GetString("ImageText"))) 477 { 478 <figcaption>@Model.Item.GetString("ImageText")</figcaption> 479 } 480 </figure> 481 } 482 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 483 { 484 <div class="basic_page-text"> 485 @Model.Item.GetString("Text") 486 </div> 487 } 488 </div> 489 } 490 } 491 } 492 @RenderPlaceholder() 493 </section> 494 } 495 else 496 { 497 @RenderPlaceholder() 498 @RenderBoxedPlaceholder() 499 } 500 </main> 501 } 502 else 503 { 504 <main class="basic_page" id="main-element"> 505 @RenderPlaceholder() 506 @RenderBoxedPlaceholder() 507 </main> 508 } 509 @helper RenderPlaceholder() 510 { 511 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 512 } 513 514 @helper RenderBoxedPlaceholder() 515 { 516 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 517 { 518 <div class="basic_page-group"> 519 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 520 </div> 521 } 522 } 523 @*=== Footer Start ===*@ 524 @{ 525 string basicFooterPrefix = "Footer "; 526 } 527 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterGraphicsText")) || Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 528 { 529 <div class="basic_footer-graphics"> 530 <div class="basic_footer-wrap"> 531 <div class="basic_footer-box"> 532 @*@if (Pageview.User != null) 533 { 534 var salesPersonService = ObjectFactory.GetInstance<SalesPersonService>(); 535 var salesPerson = salesPersonService.GetPrimarySalesPerson(); 536 537 if (salesPerson != null) 538 { 539 <table class="table table-person"> 540 <tr> 541 <td class="img-cell"> 542 <img src="@Pageview.CdnWrap($"/Admin/Public/GetImage.ashx?Width=150&amp;Height=150&amp;Crop=5&amp;Compression=85&amp;Image={salesPerson.Image}")" /> 543 </td> 544 <td> 545 <p> 546 <strong>@Translate("contactperson_header", "Din kontaktperson")</strong><br /> 547 <span class="semibold">@salesPerson.Name</span> 548 <br /><span class="title">@salesPerson.Title</span><br /> 549 <span>@Translate("users_phone", "Tlf.")</span> <span>@salesPerson.Phone</span> 550 <br /> 551 <span>@Translate("users_email", "Email:")</span> <a href="mailto:@salesPerson.Email">@salesPerson.Email</a> 552 </p> 553 </td> 554 </tr> 555 </table> 556 } 557 else 558 { 559 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 560 } 561 } 562 else 563 { 564 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 565 }*@ 566 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 567 </div> 568 @if (Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 569 { 570 <div class="basic_footer-box"> 571 <figure> 572 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterGraphicsGraphic").Path)" class="img-fluid" alt="@Translate(basicFooterPrefix + "Graphics Alt Text", "City")" /> 573 </figure> 574 </div> 575 } 576 </div> 577 </div> 578 } 579 <div class="basic_footer-sup"> 580 <div class="basic_footer-wrap"> 581 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneText")) && Model.Area.Item.GetFile("FooterSubOneImage") != null) 582 { 583 <div class="basic_footer-box"> 584 <div class="basic_footer-text"> 585 <h3>@Model.Area.Item.GetString("FooterSubOneTitle")</h3> 586 @Model.Area.Item.GetString("FooterSubOneText") 587 </div> 588 <div class="basic_footer-image"> 589 <figure> 590 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubOneImage").Path)" alt="@Model.Title" class="img-fluid" /> 591 </figure> 592 </div> 593 </div> 594 } 595 596 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoText")) && Model.Area.Item.GetFile("FooterSubTwoImage") != null) 597 { 598 <div class="basic_footer-box"> 599 <div class="basic_footer-text"> 600 <h3>@Model.Area.Item.GetString("FooterSubTwoTitle")</h3> 601 @Model.Area.Item.GetString("FooterSubTwoText") 602 </div> 603 <div class="basic_footer-image"> 604 <figure> 605 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubTwoImage").Path)" alt="@Model.Title" class="img-fluid" /> 606 </figure> 607 </div> 608 </div> 609 } 610 </div> 611 </div> 612 <footer class="basic_footer"> 613 <div class="basic_footer-wrap"> 614 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 615 { 616 <div class="basic_footer-box"> 617 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 618 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 619 </div> 620 <b-collapse id="footer-one" class="basic_footer-collapse"> 621 <div class="basic_footer-body"> 622 @Model.Area.Item.GetString("FooterOneText") 623 </div> 624 </b-collapse> 625 </div> 626 } 627 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle"))) 628 { 629 var navitag = Model.Area.Item.GetString("FooterTwoNavigationtag"); 630 631 <div class="basic_footer-box"> 632 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 633 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 634 </div> 635 <b-collapse id="footer-two" class="basic_footer-collapse"> 636 <div class="basic_footer-body"> 637 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText"))) 638 { 639 @Model.Area.Item.GetString("FooterTwoText") 640 } 641 @if (!string.IsNullOrEmpty(navitag)) 642 { 643 @DwCaching.CacheByArea("basic_SubPage.xslt", () => RenderNavigation(new { Template = "basic_SubPage.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 2, NavigationTag = navitag })) 644 } 645 </div> 646 </b-collapse> 647 </div> 648 } 649 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText"))) 650 { 651 <div class="basic_footer-box"> 652 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 653 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 654 </div> 655 <b-collapse id="footer-three" class="basic_footer-collapse"> 656 <div class="basic_footer-body"> 657 @Model.Area.Item.GetString("FooterThreeText") 658 </div> 659 </b-collapse> 660 </div> 661 } 662 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 663 { 664 <div class="basic_footer-box"> 665 <div id="footer-four" class="basic_footer-logo"> 666 <div class="basic_footer-body"> 667 @Model.Area.Item.GetString("FooterFourText") 668 <p> 669 @Translate(basicFooterPrefix + "Copyright", "Copyright")&copy; @DateTime.Now.Year - @Model.Area.Item.GetString("FooterCopyright") 670 </p> 671 </div> 672 </div> 673 </div> 674 } 675 </div> 676 @if (Model.Area.Item.GetItems("PaymentCards") != null && Model.Area.Item.GetItems("PaymentCards").Any()) 677 { 678 <div class="basic_footer-wrap"> 679 <div class="basic_footer-box"> 680 <div class="basic_footer-icons"> 681 <ul class="list-inline payments"> 682 @foreach (var i in Model.Area.Item.GetItems("PaymentCards")) 683 { 684 var cardTitle = i.GetString("Title"); 685 var cardImage = i.GetFile("ImageFile"); 686 <li class="list-inline-item"> 687 <img src="@cardImage.Path" alt="@cardTitle" class="img-fluid" /> 688 </li> 689 } 690 </ul> 691 </div> 692 </div> 693 </div> 694 } 695 </footer> 696 @*=== Footer End ===*@ 697 </div> 698 } 699 <a href="#top" class="scroll-to-top" title="@Translate("Scroll to top", "Gå til toppen")"> 700 <svg class="icon"> 701 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#arrow-to-top"></use> 702 </svg><span class="sr-only">@Translate("Scroll to top", "Gå til toppen")</span> 703 </a> 704 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 705 706 <script type="text/x-template" id="add-to-basket-simple-template"> 707 @{ 708 string addToBasketSimplePrifix = "BuyButton "; 709 } 710 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 711 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 712 <input class="form-control" type="number" name="quantity" v-model="quantity" autocomplete="off" onclick="this.select()"> 713 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 714 <slot> 715 <svg> 716 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#shopping-cart"> 717 </use> 718 </svg> 719 <span v-if="isCoolDownProduct"> 720 @Translate(addToBasketSimplePrifix + "Add to basket udmeldt", "Udgået") 721 </span> 722 <span v-else> 723 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 724 </span> 725 </slot> 726 </button> 727 </div> 728 </script> 729 730 <script type="text/x-template" id="quick-add-template"> 731 @{ 732 string quickAddPrifix = "BuyButton "; 733 } 734 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]" v-if="!isCoolDownProduct"> 735 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 736 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 737 </div> 738 </script> 739 740 <script type="text/x-template" id="add-to-basket-button-only-template"> 741 @{ 742 string addToBasketPrefix = "BuyButton "; 743 } 744 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 745 <button :class="buttonCl" v-on:click="addToBasket()" :disbaled="isCoolDownProduct"> 746 <slot v-if="isCoolDownProduct"> 747 @Translate(addToBasketPrefix + "Add to basket udmeldt", "Udgået") 748 </slot> 749 <slot v-else> 750 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 751 </slot> 752 </button> 753 </div> 754 </script> 755 756 <script type="text/x-template" id="add-to-basket-rounding-template"> 757 @{ 758 string addToBasketRoundingPrifix = "BuyButton "; 759 } 760 <div v-bind:class="[{animated: true}, {added: IsAdded}, {adding: IsAdding}]" v-if="showBasket()"> 761 <p class="alert alert-warning" v-if="didRounding"> 762 <svg> 763 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"></use> 764 </svg> 765 @Translate("product_minPurchaseRoundingInfoText", "Vi har ændret antal ift. kolli-størrelse") 766 </p> 767 <div class="addtobasket-group"> 768 @*input-group was here*@ 769 @*@if (Pageview.User != null) 770 { 771 <favorite-item :product-id="productId" 772 :language-id="languageId" 773 :variant-id="variantId" 774 ref="favoriteItem"> 775 </favorite-item> 776 }*@ 777 <template v-if="missingVariant"> 778 <p class="alert alert-warning"> 779 <svg> 780 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"> 781 </use> 782 </svg> 783 @Translate(addToBasketRoundingPrifix + "Select variant", "Select variant") 784 </p> 785 </template> 786 <template v-else> 787 <div class="input-group"> 788 <div class="input-group-prepend"><span class="input-group-text">{{unitsOfMeasureDescription().toLowerCase().trim() }}</span></div> 789 <label for="quantity" class="sr-only">@Translate(addToBasketRoundingPrifix + "Quantity", "Quantity")</label> 790 <input class="form-control" type="number" v-on:keyup.enter="addToBasketAndResetQuantity()" min="1" max="9999" name="quantity" v-model="quantity" value="1" autocomplete="off" onclick="this.select()" v-on:blur="calculateMinPurchase($event.target.value)"> 791 <div class="input-group-append"> 792 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketRoundingPrifix + "Add", "Add")" should-animate> 793 <slot> 794 <svg> 795 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 796 </use> 797 </svg> 798 <span v-if="isCoolDownProduct"> 799 @Translate(addToBasketRoundingPrifix + "Add to basket udmeldt", "Udgået") 800 </span> 801 <span v-else> 802 @Translate(addToBasketRoundingPrifix + "Add to basket", "Add to basket") 803 </span> 804 </slot> 805 </button> 806 </div> 807 </div> 808 </template> 809 </div> 810 @*<div id="add-message" v-if="IsAdded || IsAdding"><p>@Translate("Tilføjet til kurv!")</p></div>*@ 811 </div> 812 </script> 813 @using Bolind.Web.CustomCode 814 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 815 816 <script type="text/x-template" id="async-price-template"> 817 @{ 818 string asyncPrefix = "Async "; 819 } 820 <div :class="classType + (loading && !isCoolDownProduct ? ' loading' : '')"> 821 <template> 822 <p :class="classType + '--error'" v-if="error">{{error}}</p> 823 </template> 824 <template v-if="isCoolDownProduct"> 825 <p class="alert noprice" style="background-color: #dae0e5"> 826 @Translate(asyncPrefix + "item discontinued", "Vare udg&aring;et") 827 </p> 828 </template> 829 <template v-else-if="!onlyStock && !error && price && price.unitPrice"> 830 @{ 831 bool B2C = Pageview.IsB2C(); 832 var vat = (B2C) ? Translate("product_inclVat", "inkl. moms") : Translate("product_exVat", "ekskl. moms"); 833 } 834 <p class="alert alert-warning noprice" v-if="priceWithoutVatString == '0' && !allowZeroPrice"> 835 @Translate(asyncPrefix + "Contact Bolind for price", "Kontakt Bolind for pris") 836 </p> 837 <p class="listprice" v-if="showListPrice && (priceWithoutVatString != '0')"> 838 @Translate(asyncPrefix + "product_listPrice", "Vejledende pris:") <span>{{ listPrice | currency(true) }}</span> 839 </p> 840 <p class="price" v-bind:class="{ sale: showListPrice }" v-if="!loading && price && price.netUnitPrice && (priceWithoutVatString != '0' || allowZeroPrice ) && !isCart" itemprop="priceCurrency" :content="price.unitPrice.currencyKey"> 841 <template v-if="isCampaign"> 842 <span class="price-campaigntext">@Translate(asyncPrefix + "Campaign_price", "Kampagnepris")</span> 843 </template> 844 <span itemprop="price" :content="price.unitPrice.priceWithoutVat" class="price-actual"> 845 {{ price.netUnitPrice.priceWithoutVat | currency(true) }} 846 </span> 847 </p> 848 <template v-if="(priceWithoutVatString != '0' || allowZeroPrice) && !isCart"> 849 <ul class="list-inline qtyPrices" v-if="price.extraInfo.navPrices.length > 0 && showQtyPrices(price)"> 850 <li v-for="navPrice in price.extraInfo.navPrices"> 851 <span>@Translate(asyncPrefix + "Price pr. unit", "Fra") {{navPrice.quantity}} {{ unitsOfMeasureDescription().toLowerCase().trim() }} </span> 852 <span class="qtyprice">{{navPrice.price | currency(true)}}</span> 853 </li> 854 </ul> 855 <p class="priceper"> 856 @Translate(asyncPrefix + "product_pricePer", "Pris pr.") {{ unitsOfMeasureDescription().toLowerCase().trim() }} @vat 857 </p> 858 @if (!B2C) 859 { 860 <p class="priceincl" v-if="!hidePriceIncl"> 861 @Translate(asyncPrefix + "PriceVatIncl", "Pris inkl. moms:") <span>{{ priceWithVatString | currency(true) }}</span> 862 </p> 863 } 864 </template> 865 <template v-if="isCart"> 866 <span class="montage-price">{{ price.netUnitPrice.priceWithoutVat | currency(true) }}</span> 867 </template> 868 </template> 869 </div> 870 </script> 871 872 <script type="text/x-template" id="cart-icon-template"> 873 @{ 874 string translationPrefixCart = "Minicart "; 875 } 876 <a :href="cartlink"> 877 <svg> 878 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 879 </svg> 880 <span class="label">@Translate(translationPrefixCart + "Checkout", "Checkout")</span> 881 <span v-if="!cartEmpty" class="cart-quantity">{{quantity}}</span> 882 </a> 883 </script> 884 <script type="text/x-template" id="basic-facet-filter-template"> 885 @{ 886 string basicFacetPrefix = "Filter "; 887 } 888 889 <div class="basic_filter" v-if="!error && facetFilters"> 890 <template v-if="HasActiveFilter()"> 891 <p id="selected-filter-label" class="sr-only"> 892 @Translate(basicFacetPrefix + "Active", "Active") 893 </p> 894 <div aria-labelledby="selected-filter-label" class="basic_filter-active"> 895 <template v-for="facetFilter in facetFilters"> 896 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 897 <input type="checkbox" 898 :id="'Selected-' + facetFilter.Name + '-' + option.Name" 899 :name="facetFilter.Name" 900 :key="option.Label" 901 :v-model="option.Selected" 902 :checked="option.Selected" 903 v-on:click="ToggleFilter(facetFilter.Name,option)" 904 class="custom-control-input" /> 905 <label :for="'Selected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 906 <span class="filtername">{{facetFilter.Name}}:&nbsp;</span> 907 <span class="filterstring">{{option.Label}}</span> 908 <span class="remove">X</span> 909 </label> 910 </span> 911 </template> 912 </div> 913 </template> 914 <b-collapse class="basic_filter-collapse" id="sidebar-filter"> 915 <div class="basic_filter-head"> 916 <h3> 917 @Translate(basicFacetPrefix + "Filter", "Filter") 918 </h3> 919 <template v-if="queryLoading"> 920 <span class="spinner-md-default"></span> 921 </template> 922 <template v-else> 923 <button type="button" class="btn-close" v-b-toggle.sidebar-filter aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 924 <span></span> 925 <span></span> 926 </button> 927 </template> 928 </div> 929 <div class="basic_filter-groups"> 930 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 931 <p :id="'filter-group-' + facetFilter.Name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()"> 932 {{facetFilter.Name}} 933 <svg> 934 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-right"></use> 935 </svg> 936 </p> 937 <b-collapse :id="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowGroupIfSelected(facetFilter.Options, index)" class="basic_filter-collapsing"> 938 <template v-if="facetFilter.Options.length > 7"> 939 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.Options, index)"> 940 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 941 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 942 <input type="checkbox" class="custom-control-input" 943 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 944 :key="option.Label" 945 :name="facetFilter.Name" 946 :v-model="option.Selected" 947 :checked="option.Selected" 948 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 949 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 950 {{option.Label}} ({{option.Count}}) 951 </label> 952 </li> 953 </ul> 954 </b-collapse> 955 <a v-b-toggle="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.Options.length > 7"> 956 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 957 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 958 </a> 959 </template> 960 <template v-else> 961 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 962 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 963 <input type="checkbox" class="custom-control-input" 964 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 965 :key="option.Label" 966 :name="facetFilter.Name" 967 :v-model="option.Selected" 968 :checked="option.Selected" @*AG: should it have been 'checked'?*@ 969 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 970 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 971 {{option.Label}} <span class="count">({{option.Count}})</span> 972 </label> 973 </li> 974 </ul> 975 </template> 976 </b-collapse> 977 </div> 978 </div> 979 <div class="basic_filter-foot"> 980 <button class="btn btn-dark btn-icon btn-block" v-b-toggle.sidebar-filter> 981 <svg class="icon"> 982 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#check"></use> 983 </svg> 984 @Translate(basicFacetPrefix + "Show selected", "Show Selected") 985 </button> 986 </div> 987 </b-collapse> 988 </div> 989 </script> 990 @{ 991 string favoriteListPrefix = "FavoriteList "; 992 } 993 <script type="text/x-template" id="favorite-list-template"> 994 <div v-bind:class="{ active: active }" id="basic_favoritelist" v-autoClose="closeFoldOut"> 995 <div class="fav-inwrap"> 996 <template v-if="loading"> 997 <div class="loading"> 998 <span class="spinner-xl-default"></span> 999 </div> 1000 </template> 1001 <h5>@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</h5> 1002 <p class="desc"> 1003 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 1004 </p> 1005 <template v-for="favoriteList in favoriteLists"> 1006 <div class="form-check"> 1007 <input type="checkbox" :id="'fav-' + favoriteList.id" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1008 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1009 {{favoriteList.name}} 1010 </label> 1011 </div> 1012 </template> 1013 <div class="form-check"> 1014 <input type="checkbox" id="addNewListCheckbox" v-model="addNewList" class="form-check-input" /> 1015 <label for="addNewListCheckbox" class="form-check-label"> 1016 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1017 </label> 1018 </div> 1019 <div v-if="addNewList" class="input-group input-group-sm"> 1020 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control new-list-name-input" v-on:keyup.enter="saveAsNewList" /> 1021 <div class="input-group-append"> 1022 <button v-on:click="saveAsNewList" class="btn btn-dark">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1023 </div> 1024 </div> 1025 </div> 1026 </div> 1027 </script> 1028 <script type="text/x-template" id="favorite-item-template"> 1029 <div class="basic_favoriteitem" v-if="loaded"> 1030 <button class="btn btn-light btn-icon icon-only" title="@Translate("AddFavorite", "Tilføj favorit")" v-on:click="toggleFavoriteList($event)"> 1031 <template v-if="showFavoriteIcon"> 1032 <svg viewBox="0 0 576 512" class="added"><path d="M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"></path></svg> 1033 @*<svg> 1034 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star"></use> 1035 </svg>*@ 1036 <span class="pdp-only">@Translate("FavoriteAdded", "Favorit")</span> 1037 </template> 1038 <template v-else> 1039 <svg viewBox="0 0 576 512"><path d="M528.1 171.5L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6zM388.6 312.3l23.7 138.4L288 385.4l-124.3 65.3 23.7-138.4-100.6-98 139-20.2 62.2-126 62.2 126 139 20.2-100.6 98z"></path></svg> 1040 @*<svg> 1041 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star-stroke"></use> 1042 </svg>*@ 1043 <span class="pdp-only">@Translate("AddFavorite", "Tilføj favorit")</span> 1044 </template> 1045 </button> 1046 </div> 1047 </script> 1048 @using Bolind.Web.CustomCode.CDN 1049 @using Dynamicweb.Frontend 1050 <script type="text/x-template" id="instant-search-template"> 1051 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 1052 <div class="basic_instantsearch"> 1053 <label for="searchquery" class="sr-only">@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")</label> 1054 <input type="search" 1055 placeholder="@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")" 1056 id="searchquery" 1057 name="searchquery" 1058 autocomplete="off" 1059 v-on:input="inputChanged" 1060 v-on:focus="foldActive = 'active'"> 1061 <button type="submit"> 1062 <span class="sr-only">@Translate(centerHeaderPrefix + "Search", "Søg")</span> 1063 <svg> 1064 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 1065 </svg> 1066 </button> 1067 <div class="fold-out" v-bind:class="{ active: foldActive }"> 1068 <div class="products"> 1069 <template v-if="searchQuery == ''"> 1070 @Translate(centerHeaderPrefix + "Type something", "Indtast for at søge") 1071 </template> 1072 <template v-else-if="queryLoading"> 1073 <div class="basic_listview-loading"> 1074 <span class="spinner-xl-default"></span> 1075 </div> 1076 </template> 1077 <template v-else-if="productList == null"> 1078 @Translate(centerHeaderPrefix + "Empty search...", "Der blev ikke fundet varer...") 1079 </template> 1080 <table v-else class="table table-sm table-border-bottom"> 1081 <tbody> 1082 <tr v-for="product in productList"> 1083 <td class="thumb text-center"> 1084 <a :href="getProductUrl(product)"> 1085 <img :src="'@PageView.Current().CdnWrap("/Admin/Public/GetImage.ashx?Width=50&amp;Height=40&amp;fillcanvas=true&amp;Compression=85&amp;Crop=5&amp;Image=")' + (product.PrimaryImage ? product.PrimaryImage : '/Files/Images/Default.png')" /> 1086 </a> 1087 </td> 1088 <td> 1089 <a :href="getProductUrl(product)"> 1090 {{product.Name}} <small>{{product.Description2}} {{product.Description3}}</small> 1091 </a> 1092 </td> 1093 <td class="text-right"> 1094 <small>{{product.Number}}</small> 1095 </td> 1096 </tr> 1097 </tbody> 1098 </table> 1099 </div> 1100 <div v-if="searchQuery != '' && productList != null" class="actions"> 1101 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?searchquery=' + searchQuery">@Translate(centerHeaderPrefix + "See all products", "Se alle varer")</a> 1102 </div> 1103 </div> 1104 </div> 1105 </form> 1106 </script> 1107 <script type="text/x-template" id="pagination-template"> 1108 @{ 1109 string paginationPrefix = "Pagination "; 1110 } 1111 <nav aria-label="@Translate(paginationPrefix + "Produktliste pagination", "Produktliste pagination")"> 1112 <ul class="pagination"> 1113 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]"> 1114 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1115 <svg> 1116 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1117 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1118 </use> 1119 </svg> 1120 </a> 1121 </li> 1122 <template v-for="n in totalPages" v-if="showPage(n)"> 1123 <li :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1124 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'aria-page' : '')" class="page-link"> 1125 {{n}} 1126 </a> 1127 </li> 1128 </template> 1129 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')"> 1130 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1131 <svg class="icon-pagination"> 1132 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1133 </svg> 1134 </a> 1135 </li> 1136 </ul> 1137 </nav> 1138 </script> 1139 1140 <script> 1141 var messages = { 1142 required: '@Translate("messages_required", "This field is required")', 1143 email: ' @Translate("messages_email", "Enter email")', 1144 numeric: ' @Translate("messages_numeric", "Enter number")', 1145 checked: ' @Translate("messages_checked", "Please accept terms and conditions to shop")', 1146 max: '@Translate("messages_max", "This field contains to many characters")' 1147 }; 1148 </script> 1149 @if (System.Web.HttpContext.Current.Session[WebsiteService.ClearLocalStorageTag] != null) 1150 { 1151 System.Web.HttpContext.Current.Session.Remove(WebsiteService.ClearLocalStorageTag); 1152 <script> 1153 localStorage.clear(); 1154 console.log("localstorage cleared"); 1155 </script> 1156 } 1157 <script src="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js"))" data-category-consent="cookie_cat_necessary"></script> 1158 <script> 1159 AppStart.VueProvider.init({ 1160 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 1161 currencyCode: '@Pageview.Area.EcomCurrencyId', 1162 locale: '@Pageview.Area.Culture', 1163 currencyLeft: false, 1164 currencySpacing: true, 1165 currencySymbol: '@Pageview.Area.EcomCurrencyId', 1166 currencyDecimalSeparator: ',', 1167 currencyGroupSeparator: '.', 1168 currencyDecimalDigits: 2, 1169 dateFormatShort: '@Pageview.Area.Dateformat' 1170 }); 1171 </script> 1172 <script append="replace"></script> 1173 <script src="https://www.google.com/recaptcha/api.js" async defer></script> 1174 </body> 1175 </html>