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