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_f58165d41891477fb7716b5f464032e8.Execute() in E:\Solutions\Bolind\Web\Live\Files\Templates\Designs\Bolind\_parsed\Basic_Page.parsed.cshtml:line 400
   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 @Title("Page") 393 @Description("Default page template") 394 @{ 395 string basicPagePrefix = "Page "; 396 var bg = Model.Item != null && Model.Item.GetBoolean("WhiteBackground") ? "whitebg" : ""; 397 } 398 @if (Pageview.IsCurrentUserAllowed) 399 { 400 var pageLayout = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("Layout").SelectedValue) ? Model.Item.GetValue<ListViewModel>("Layout").SelectedValue : "content-page-sidebar"; 401 var pageClass = pageLayout == "page-wide" ? "basic_page-wide" : "basic_page"; 402 bool isBanner = Model.Item.GetBoolean("isBanner"); 403 var isBottomRight = Model.Item.GetBoolean("isBottomRight") ? " bottom-right" : "top-left"; 404 var isWhite = Model.Item.GetBoolean("isWhite") ? "text-white" : "text-dark"; 405 var isFixedWidth = Model.Item.GetBoolean("isFixedWidth") ? " is-fixed" : ""; 406 var justifyBanner = Model.Item.GetBoolean("isBottomRight") ? "space-between" : "center"; 407 408 409 if (!Model.Item.GetBoolean("HideBreadcrumb")) 410 { 411 @DwCaching.CacheByPage("basic_Breadcrumb.xslt", () => RenderNavigation(new { Template = "basic_Breadcrumb.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 5 })) 412 } 413 <main class="@pageClass" id="main-element"> 414 @if (pageLayout == "content-page-sidebar" || pageLayout == "module-page-sidebar") 415 { 416 <aside class="basic_page-sidebar"> 417 @*<div class="sidebar-toggle"> 418 <button type="button" 419 class="btn-toggle" 420 v-b-toggle.sidebar-navigation 421 aria-label="@Translate(basicPagePrefix + "Open sidebar","Open sidebar")"> 422 <svg class="icon-left"> 423 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-left"></use> 424 </svg> 425 <span>@Pageview.Page.MenuText</span> 426 </button> 427 </div>*@ 428 @DwCaching.CacheByPage("basic_Page.xslt", () => RenderNavigation(new { Template = "basic_Page.xslt", StartLevel = 1, EndLevel = 3 })) 429 </aside> 430 <section class="basic_page-content @bg"> 431 @if (pageLayout == "content-page-sidebar" 432 && !string.IsNullOrEmpty(Model.Item.GetString("Title").ToString()) 433 || !string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) 434 || Model.Item.GetFile("Image") != null) 435 { 436 if (isBanner && Model.Item.GetFile("Image") != null) 437 { 438 <figure class="page-banner @isWhite" style="background-image:url(@Pageview.CdnWrap(Model.Item.GetFile("Image").Path);"> 439 <figcaption class="@justifyBanner"> 440 @if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 441 { 442 <h1 class="page-banner-title"> 443 @Model.Item.GetString("Title") 444 </h1> 445 } 446 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString())) 447 { 448 <div class="@isBottomRight"> 449 <div class="page-banner-text@(isFixedWidth)"> 450 @Model.Item.GetString("Text") 451 </div> 452 </div> 453 454 } 455 </figcaption> 456 </figure> 457 } 458 else 459 { 460 if (!string.IsNullOrEmpty(Model.Item.GetString("Title").ToString())) 461 { 462 <header class="basic_page-header"> 463 <h1> 464 @Model.Item.GetString("Title") 465 </h1> 466 </header> 467 } 468 if (!string.IsNullOrEmpty(Model.Item.GetString("Text").ToString()) || Model.Item.GetFile("Image") != null) 469 { 470 string ImagePosition = !string.IsNullOrEmpty(Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue) ? Model.Item.GetValue<ListViewModel>("ImagePosition").SelectedValue : "top"; 471 <div class="basic_page-@ImagePosition"> 472 @if (Model.Item.GetFile("Image") != null) 473 { 474 <figure> 475 <img src="@Pageview.CdnWrap(Model.Item.GetFile("Image").Path)" 476 alt="@(!string.IsNullOrEmpty(Model.Item.GetString("ImageText")) ? Model.Item.GetString("ImageText") : Model.Item.GetString("Title"))" 477 class="img-fluid" /> 478 @if (!string.IsNullOrEmpty(Model.Item.GetString("ImageText"))) 479 { 480 <figcaption>@Model.Item.GetString("ImageText")</figcaption> 481 } 482 </figure> 483 } 484 @if (!string.IsNullOrEmpty(Model.Item.GetString("Text"))) 485 { 486 <div class="basic_page-text"> 487 @Model.Item.GetString("Text") 488 </div> 489 } 490 </div> 491 } 492 } 493 } 494 @RenderPlaceholder() 495 </section> 496 } 497 else 498 { 499 @RenderPlaceholder() 500 @RenderBoxedPlaceholder() 501 } 502 </main> 503 } 504 else 505 { 506 <main class="basic_page" id="main-element"> 507 @RenderPlaceholder() 508 @RenderBoxedPlaceholder() 509 </main> 510 } 511 @helper RenderPlaceholder() 512 { 513 @Model.Placeholder("Content", "Content", "unwrap:true;default:true") 514 } 515 516 @helper RenderBoxedPlaceholder() 517 { 518 if (!String.IsNullOrEmpty(Model.Placeholder("Boxed"))) 519 { 520 <div class="basic_page-group"> 521 @Model.Placeholder("Boxed", "Grouped Content", "unwrap:true") 522 </div> 523 } 524 } 525 @*=== Footer Start ===*@ 526 @{ 527 string basicFooterPrefix = "Footer "; 528 } 529 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterGraphicsText")) || Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 530 { 531 <div class="basic_footer-graphics"> 532 <div class="basic_footer-wrap"> 533 <div class="basic_footer-box"> 534 @*@if (Pageview.User != null) 535 { 536 var salesPersonService = ObjectFactory.GetInstance<SalesPersonService>(); 537 var salesPerson = salesPersonService.GetPrimarySalesPerson(); 538 539 if (salesPerson != null) 540 { 541 <table class="table table-person"> 542 <tr> 543 <td class="img-cell"> 544 <img src="@Pageview.CdnWrap($"/Admin/Public/GetImage.ashx?Width=150&amp;Height=150&amp;Crop=5&amp;Compression=85&amp;Image={salesPerson.Image}")" /> 545 </td> 546 <td> 547 <p> 548 <strong>@Translate("contactperson_header", "Din kontaktperson")</strong><br /> 549 <span class="semibold">@salesPerson.Name</span> 550 <br /><span class="title">@salesPerson.Title</span><br /> 551 <span>@Translate("users_phone", "Tlf.")</span> <span>@salesPerson.Phone</span> 552 <br /> 553 <span>@Translate("users_email", "Email:")</span> <a href="mailto:@salesPerson.Email">@salesPerson.Email</a> 554 </p> 555 </td> 556 </tr> 557 </table> 558 } 559 else 560 { 561 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 562 } 563 } 564 else 565 { 566 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 567 }*@ 568 <p>@Model.Area.Item.GetString("FooterGraphicsText")</p> 569 </div> 570 @if (Model.Area.Item.GetFile("FooterGraphicsGraphic") != null) 571 { 572 <div class="basic_footer-box"> 573 <figure> 574 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterGraphicsGraphic").Path)" class="img-fluid" alt="@Translate(basicFooterPrefix + "Graphics Alt Text", "City")" /> 575 </figure> 576 </div> 577 } 578 </div> 579 </div> 580 } 581 <div class="basic_footer-sup"> 582 <div class="basic_footer-wrap"> 583 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubOneText")) && Model.Area.Item.GetFile("FooterSubOneImage") != null) 584 { 585 <div class="basic_footer-box"> 586 <div class="basic_footer-text"> 587 <h3>@Model.Area.Item.GetString("FooterSubOneTitle")</h3> 588 @Model.Area.Item.GetString("FooterSubOneText") 589 </div> 590 <div class="basic_footer-image"> 591 <figure> 592 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubOneImage").Path)" alt="@Model.Title" class="img-fluid" /> 593 </figure> 594 </div> 595 </div> 596 } 597 598 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterSubTwoText")) && Model.Area.Item.GetFile("FooterSubTwoImage") != null) 599 { 600 <div class="basic_footer-box"> 601 <div class="basic_footer-text"> 602 <h3>@Model.Area.Item.GetString("FooterSubTwoTitle")</h3> 603 @Model.Area.Item.GetString("FooterSubTwoText") 604 </div> 605 <div class="basic_footer-image"> 606 <figure> 607 <img src="@Pageview.CdnWrap(Model.Area.Item.GetFile("FooterSubTwoImage").Path)" alt="@Model.Title" class="img-fluid" /> 608 </figure> 609 </div> 610 </div> 611 } 612 </div> 613 </div> 614 <footer class="basic_footer"> 615 <div class="basic_footer-wrap"> 616 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterOneText"))) 617 { 618 <div class="basic_footer-box"> 619 <div class="basic_footer-head" role="button" v-b-toggle.footer-one> 620 <h3>@Model.Area.Item.GetString("FooterOneTitle")</h3> 621 </div> 622 <b-collapse id="footer-one" class="basic_footer-collapse"> 623 <div class="basic_footer-body"> 624 @Model.Area.Item.GetString("FooterOneText") 625 </div> 626 </b-collapse> 627 </div> 628 } 629 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoTitle"))) 630 { 631 var navitag = Model.Area.Item.GetString("FooterTwoNavigationtag"); 632 633 <div class="basic_footer-box"> 634 <div class="basic_footer-head" role="button" v-b-toggle.footer-two> 635 <h3>@Model.Area.Item.GetString("FooterTwoTitle")</h3> 636 </div> 637 <b-collapse id="footer-two" class="basic_footer-collapse"> 638 <div class="basic_footer-body"> 639 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterTwoText"))) 640 { 641 @Model.Area.Item.GetString("FooterTwoText") 642 } 643 @if (!string.IsNullOrEmpty(navitag)) 644 { 645 @DwCaching.CacheByArea("basic_SubPage.xslt", () => RenderNavigation(new { Template = "basic_SubPage.xslt", Expandmode = "all", StartLevel = 1, EndLevel = 2, NavigationTag = navitag })) 646 } 647 </div> 648 </b-collapse> 649 </div> 650 } 651 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeTitle")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterThreeText"))) 652 { 653 <div class="basic_footer-box"> 654 <div class="basic_footer-head" role="button" v-b-toggle.footer-three> 655 <h3>@Model.Area.Item.GetString("FooterThreeTitle")</h3> 656 </div> 657 <b-collapse id="footer-three" class="basic_footer-collapse"> 658 <div class="basic_footer-body"> 659 @Model.Area.Item.GetString("FooterThreeText") 660 </div> 661 </b-collapse> 662 </div> 663 } 664 @if (!string.IsNullOrEmpty(Model.Area.Item.GetString("FooterFourText")) && !string.IsNullOrEmpty(Model.Area.Item.GetString("FooterCopyright"))) 665 { 666 <div class="basic_footer-box"> 667 <div id="footer-four" class="basic_footer-logo"> 668 <div class="basic_footer-body"> 669 @Model.Area.Item.GetString("FooterFourText") 670 <p> 671 @Translate(basicFooterPrefix + "Copyright", "Copyright")&copy; @DateTime.Now.Year - @Model.Area.Item.GetString("FooterCopyright") 672 </p> 673 </div> 674 </div> 675 </div> 676 } 677 </div> 678 @if (Model.Area.Item.GetItems("PaymentCards") != null && Model.Area.Item.GetItems("PaymentCards").Any()) 679 { 680 <div class="basic_footer-wrap"> 681 <div class="basic_footer-box"> 682 <div class="basic_footer-icons"> 683 <ul class="list-inline payments"> 684 @foreach (var i in Model.Area.Item.GetItems("PaymentCards")) 685 { 686 var cardTitle = i.GetString("Title"); 687 var cardImage = i.GetFile("ImageFile"); 688 <li class="list-inline-item"> 689 <img src="@cardImage.Path" alt="@cardTitle" class="img-fluid" /> 690 </li> 691 } 692 </ul> 693 </div> 694 </div> 695 </div> 696 } 697 </footer> 698 @*=== Footer End ===*@ 699 </div> 700 } 701 <a href="#top" class="scroll-to-top" title="@Translate("Scroll to top", "Gå til toppen")"> 702 <svg class="icon"> 703 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#arrow-to-top"></use> 704 </svg><span class="sr-only">@Translate("Scroll to top", "Gå til toppen")</span> 705 </a> 706 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 707 708 <script type="text/x-template" id="add-to-basket-simple-template"> 709 @{ 710 string addToBasketSimplePrifix = "BuyButton "; 711 } 712 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 713 <label for="quantity">@Translate(addToBasketSimplePrifix + "Quantity", "Quantity")</label> 714 <input class="form-control" type="number" name="quantity" v-model="quantity" autocomplete="off" onclick="this.select()"> 715 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketSimplePrifix + "Add", "Add")"> 716 <slot> 717 <svg> 718 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#shopping-cart"> 719 </use> 720 </svg> 721 <span v-if="isCoolDownProduct"> 722 @Translate(addToBasketSimplePrifix + "Add to basket udmeldt", "Udgået") 723 </span> 724 <span v-else> 725 @Translate(addToBasketSimplePrifix + "Add to basket", "Add to basket") 726 </span> 727 </slot> 728 </button> 729 </div> 730 </script> 731 732 <script type="text/x-template" id="quick-add-template"> 733 @{ 734 string quickAddPrifix = "BuyButton "; 735 } 736 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]" v-if="!isCoolDownProduct"> 737 <label for="quantity">@Translate(quickAddPrifix + "Quantity", "Quantity")</label> 738 <input class="form-control" type="number" id="quantity" name="quantity" v-model="quantity" autocomplete="off"> 739 </div> 740 </script> 741 742 <script type="text/x-template" id="add-to-basket-button-only-template"> 743 @{ 744 string addToBasketPrefix = "BuyButton "; 745 } 746 <div v-bind:class="[{added: IsAdded}, {adding: IsAdding}]"> 747 <button :class="buttonCl" v-on:click="addToBasket()" :disbaled="isCoolDownProduct"> 748 <slot v-if="isCoolDownProduct"> 749 @Translate(addToBasketPrefix + "Add to basket udmeldt", "Udgået") 750 </slot> 751 <slot v-else> 752 @Translate(addToBasketPrefix + "Add to basket", "Add to basket") 753 </slot> 754 </button> 755 </div> 756 </script> 757 758 <script type="text/x-template" id="add-to-basket-rounding-template"> 759 @{ 760 string addToBasketRoundingPrifix = "BuyButton "; 761 } 762 <div v-bind:class="[{animated: true}, {added: IsAdded}, {adding: IsAdding}]" v-if="showBasket()"> 763 <p class="alert alert-warning" v-if="didRounding"> 764 <svg> 765 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"></use> 766 </svg> 767 @Translate("product_minPurchaseRoundingInfoText", "Vi har ændret antal ift. kolli-størrelse") 768 </p> 769 <div class="addtobasket-group"> 770 @*input-group was here*@ 771 @*@if (Pageview.User != null) 772 { 773 <favorite-item :product-id="productId" 774 :language-id="languageId" 775 :variant-id="variantId" 776 ref="favoriteItem"> 777 </favorite-item> 778 }*@ 779 <template v-if="missingVariant"> 780 <p class="alert alert-warning"> 781 <svg> 782 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#info-circle"> 783 </use> 784 </svg> 785 @Translate(addToBasketRoundingPrifix + "Select variant", "Select variant") 786 </p> 787 </template> 788 <template v-else> 789 <div class="input-group"> 790 <div class="input-group-prepend"><span class="input-group-text">{{unitsOfMeasureDescription().toLowerCase().trim() }}</span></div> 791 <label for="quantity" class="sr-only">@Translate(addToBasketRoundingPrifix + "Quantity", "Quantity")</label> 792 <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)"> 793 <div class="input-group-append"> 794 <button :disabled="quantity < 1 || isCoolDownProduct" :class="buttonCl" v-on:click="addToBasketAndResetQuantity()" aria-label="@Translate(addToBasketRoundingPrifix + "Add", "Add")" should-animate> 795 <slot> 796 <svg> 797 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"> 798 </use> 799 </svg> 800 <span v-if="isCoolDownProduct"> 801 @Translate(addToBasketRoundingPrifix + "Add to basket udmeldt", "Udgået") 802 </span> 803 <span v-else> 804 @Translate(addToBasketRoundingPrifix + "Add to basket", "Add to basket") 805 </span> 806 </slot> 807 </button> 808 </div> 809 </div> 810 </template> 811 </div> 812 @*<div id="add-message" v-if="IsAdded || IsAdding"><p>@Translate("Tilføjet til kurv!")</p></div>*@ 813 </div> 814 </script> 815 @using Bolind.Web.CustomCode 816 @inherits Dynamicweb.Rendering.ViewModelTemplate<Dynamicweb.Frontend.PageViewModel> 817 818 <script type="text/x-template" id="async-price-template"> 819 @{ 820 string asyncPrefix = "Async "; 821 } 822 <div :class="classType + (loading && !isCoolDownProduct ? ' loading' : '')"> 823 <template> 824 <p :class="classType + '--error'" v-if="error">{{error}}</p> 825 </template> 826 <template v-if="isCoolDownProduct"> 827 <p class="alert noprice" style="background-color: #dae0e5"> 828 @Translate(asyncPrefix + "item discontinued", "Vare udg&aring;et") 829 </p> 830 </template> 831 <template v-else-if="!onlyStock && !error && price && price.unitPrice"> 832 @{ 833 bool B2C = Pageview.IsB2C(); 834 var vat = (B2C) ? Translate("product_inclVat", "inkl. moms") : Translate("product_exVat", "ekskl. moms"); 835 } 836 <p class="alert alert-warning noprice" v-if="priceWithoutVatString == '0' && !allowZeroPrice"> 837 @Translate(asyncPrefix + "Contact Bolind for price", "Kontakt Bolind for pris") 838 </p> 839 <p class="listprice" v-if="showListPrice && (priceWithoutVatString != '0')"> 840 @Translate(asyncPrefix + "product_listPrice", "Vejledende pris:") <span>{{ listPrice | currency(true) }}</span> 841 </p> 842 <p class="price" v-bind:class="{ sale: showListPrice }" v-if="!loading && price && price.netUnitPrice && (priceWithoutVatString != '0' || allowZeroPrice ) && !isCart" itemprop="priceCurrency" :content="price.unitPrice.currencyKey"> 843 <template v-if="isCampaign"> 844 <span class="price-campaigntext">@Translate(asyncPrefix + "Campaign_price", "Kampagnepris")</span> 845 </template> 846 <span itemprop="price" :content="price.unitPrice.priceWithoutVat" class="price-actual"> 847 {{ price.netUnitPrice.priceWithoutVat | currency(true) }} 848 </span> 849 </p> 850 <template v-if="(priceWithoutVatString != '0' || allowZeroPrice) && !isCart"> 851 <ul class="list-inline qtyPrices" v-if="price.extraInfo.navPrices.length > 0 && showQtyPrices(price)"> 852 <li v-for="navPrice in price.extraInfo.navPrices"> 853 <span>@Translate(asyncPrefix + "Price pr. unit", "Fra") {{navPrice.quantity}} {{ unitsOfMeasureDescription().toLowerCase().trim() }} </span> 854 <span class="qtyprice">{{navPrice.price | currency(true)}}</span> 855 </li> 856 </ul> 857 <p class="priceper"> 858 @Translate(asyncPrefix + "product_pricePer", "Pris pr.") {{ unitsOfMeasureDescription().toLowerCase().trim() }} @vat 859 </p> 860 @if (!B2C) 861 { 862 <p class="priceincl" v-if="!hidePriceIncl"> 863 @Translate(asyncPrefix + "PriceVatIncl", "Pris inkl. moms:") <span>{{ priceWithVatString | currency(true) }}</span> 864 </p> 865 } 866 </template> 867 <template v-if="isCart"> 868 <span class="montage-price">{{ price.netUnitPrice.priceWithoutVat | currency(true) }}</span> 869 </template> 870 </template> 871 </div> 872 </script> 873 <script type="text/x-template" id="cart-icon-template"> 874 @{ 875 string translationPrefixCart = "Minicart "; 876 } 877 <a :href="cartlink"> 878 <svg> 879 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#shopping-cart"></use> 880 </svg> 881 <span class="label">@Translate(translationPrefixCart + "Checkout", "Checkout")</span> 882 <span v-if="!cartEmpty" class="cart-quantity">{{quantity}}</span> 883 </a> 884 </script> 885 <script type="text/x-template" id="basic-facet-filter-template"> 886 @{ 887 string basicFacetPrefix = "Filter "; 888 } 889 890 <div class="basic_filter" v-if="!error && facetFilters"> 891 <template v-if="HasActiveFilter()"> 892 <p id="selected-filter-label" class="sr-only"> 893 @Translate(basicFacetPrefix + "Active", "Active") 894 </p> 895 <div aria-labelledby="selected-filter-label" class="basic_filter-active"> 896 <template v-for="facetFilter in facetFilters"> 897 <span v-for="option in SelectedOptions(facetFilter)" class="custom-control custom-filter"> 898 <input type="checkbox" 899 :id="'Selected-' + facetFilter.Name + '-' + option.Name" 900 :name="facetFilter.Name" 901 :key="option.Label" 902 :v-model="option.Selected" 903 :checked="option.Selected" 904 v-on:click="ToggleFilter(facetFilter.Name,option)" 905 class="custom-control-input" /> 906 <label :for="'Selected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 907 <span class="filtername">{{facetFilter.Name}}:&nbsp;</span> 908 <span class="filterstring">{{option.Label}}</span> 909 <span class="remove">X</span> 910 </label> 911 </span> 912 </template> 913 </div> 914 </template> 915 <b-collapse class="basic_filter-collapse" id="sidebar-filter"> 916 <div class="basic_filter-head"> 917 <h3> 918 @Translate(basicFacetPrefix + "Filter", "Filter") 919 </h3> 920 <template v-if="queryLoading"> 921 <span class="spinner-md-default"></span> 922 </template> 923 <template v-else> 924 <button type="button" class="btn-close" v-b-toggle.sidebar-filter aria-label="@Translate(basicFacetPrefix + "Close Filter", "Close Filter")"> 925 <span></span> 926 <span></span> 927 </button> 928 </template> 929 </div> 930 <div class="basic_filter-groups"> 931 <div class="basic_filter-group" v-for="(facetFilter, index) in facetFilters"> 932 <p :id="'filter-group-' + facetFilter.Name.toLowerCase().trim()" v-b-toggle="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()"> 933 {{facetFilter.Name}} 934 <svg> 935 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#chevron-right"></use> 936 </svg> 937 </p> 938 <b-collapse :id="'filter-collapse-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowGroupIfSelected(facetFilter.Options, index)" class="basic_filter-collapsing"> 939 <template v-if="facetFilter.Options.length > 7"> 940 <b-collapse class="basic_filter-expand" :id="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" :visible="ShowMoreIfSelected(facetFilter.Options, index)"> 941 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 942 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 943 <input type="checkbox" class="custom-control-input" 944 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 945 :key="option.Label" 946 :name="facetFilter.Name" 947 :v-model="option.Selected" 948 :checked="option.Selected" 949 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 950 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 951 {{option.Label}} ({{option.Count}}) 952 </label> 953 </li> 954 </ul> 955 </b-collapse> 956 <a v-b-toggle="'filter-expand-' + facetFilter.Name.toLowerCase().trim()" class="basic_filter-expanding" v-if="facetFilter.Options.length > 7"> 957 <span class="show-more">+ @Translate(basicFacetPrefix + "show more", "show more")</span> 958 <span class="show-less">- @Translate(basicFacetPrefix + "show less", "show less")</span> 959 </a> 960 </template> 961 <template v-else> 962 <ul :aria-labelledby="'filter-group-' + facetFilter.Name.toLowerCase().trim()"> 963 <li v-for="option in facetFilter.Options" class="custom-control custom-checkbox"> 964 <input type="checkbox" class="custom-control-input" 965 :id="'UnSelected-' + facetFilter.Name + '-' + option.Name" 966 :key="option.Label" 967 :name="facetFilter.Name" 968 :v-model="option.Selected" 969 :checked="option.Selected" @*AG: should it have been 'checked'?*@ 970 v-on:click="ToggleFilter(facetFilter.Name,option)" /> 971 <label :for="'UnSelected-' + facetFilter.Name + '-' + option.Name" class="custom-control-label"> 972 {{option.Label}} <span class="count">({{option.Count}})</span> 973 </label> 974 </li> 975 </ul> 976 </template> 977 </b-collapse> 978 </div> 979 </div> 980 <div class="basic_filter-foot"> 981 <button class="btn btn-dark btn-icon btn-block" v-b-toggle.sidebar-filter> 982 <svg class="icon"> 983 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#check"></use> 984 </svg> 985 @Translate(basicFacetPrefix + "Show selected", "Show Selected") 986 </button> 987 </div> 988 </b-collapse> 989 </div> 990 </script> 991 @{ 992 string favoriteListPrefix = "FavoriteList "; 993 } 994 <script type="text/x-template" id="favorite-list-template"> 995 <div v-bind:class="{ active: active }" id="basic_favoritelist" v-autoClose="closeFoldOut"> 996 <div class="fav-inwrap"> 997 <template v-if="loading"> 998 <div class="loading"> 999 <span class="spinner-xl-default"></span> 1000 </div> 1001 </template> 1002 <h5>@Translate(favoriteListPrefix + "Favoritliste", "Favoritliste")</h5> 1003 <p class="desc"> 1004 @Translate(favoriteListPrefix + "Tilføj eller fjern markering.", "Tilføj eller fjern markering.") 1005 </p> 1006 <template v-for="favoriteList in favoriteLists"> 1007 <div class="form-check"> 1008 <input type="checkbox" :id="'fav-' + favoriteList.id" :value="favoriteList.id" :checked="isItemAddedToThisList(favoriteList)" v-on:change="toggleItem($event, favoriteList.id)" class="form-check-input" /> 1009 <label :for="'fav-' + favoriteList.id" class="form-check-label"> 1010 {{favoriteList.name}} 1011 </label> 1012 </div> 1013 </template> 1014 <div class="form-check"> 1015 <input type="checkbox" id="addNewListCheckbox" v-model="addNewList" class="form-check-input" /> 1016 <label for="addNewListCheckbox" class="form-check-label"> 1017 @Translate(favoriteListPrefix + "Ny favoritliste", "Ny favoritliste") 1018 </label> 1019 </div> 1020 <div v-if="addNewList" class="input-group input-group-sm"> 1021 <input type="text" id="addNewListNameInput" v-model="addNewListNameInput" class="form-control new-list-name-input" v-on:keyup.enter="saveAsNewList" /> 1022 <div class="input-group-append"> 1023 <button v-on:click="saveAsNewList" class="btn btn-dark">@Translate(favoriteListPrefix + "Gem", "Gem")</button> 1024 </div> 1025 </div> 1026 </div> 1027 </div> 1028 </script> 1029 <script type="text/x-template" id="favorite-item-template"> 1030 <div class="basic_favoriteitem" v-if="loaded"> 1031 <button class="btn btn-light btn-icon icon-only" title="@Translate("AddFavorite", "Tilføj favorit")" v-on:click="toggleFavoriteList($event)"> 1032 <template v-if="showFavoriteIcon"> 1033 <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> 1034 @*<svg> 1035 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star"></use> 1036 </svg>*@ 1037 <span class="pdp-only">@Translate("FavoriteAdded", "Favorit")</span> 1038 </template> 1039 <template v-else> 1040 <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> 1041 @*<svg> 1042 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#star-stroke"></use> 1043 </svg>*@ 1044 <span class="pdp-only">@Translate("AddFavorite", "Tilføj favorit")</span> 1045 </template> 1046 </button> 1047 </div> 1048 </script> 1049 @using Bolind.Web.CustomCode.CDN 1050 @using Dynamicweb.Frontend 1051 <script type="text/x-template" id="instant-search-template"> 1052 <form v-bind:class="baseClass" action="@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")" v-autoClose="closeFoldOut"> 1053 <div class="basic_instantsearch"> 1054 <label for="searchquery" class="sr-only">@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")</label> 1055 <input type="search" 1056 placeholder="@Translate(centerHeaderPrefix + "Search products", "Hvad søger du?")" 1057 id="searchquery" 1058 name="searchquery" 1059 autocomplete="off" 1060 v-on:input="inputChanged" 1061 v-on:focus="foldActive = 'active'"> 1062 <button type="submit"> 1063 <span class="sr-only">@Translate(centerHeaderPrefix + "Search", "Søg")</span> 1064 <svg> 1065 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/Files/dist/icons/icons.svg#search"></use> 1066 </svg> 1067 </button> 1068 <div class="fold-out" v-bind:class="{ active: foldActive }"> 1069 <div class="products"> 1070 <template v-if="searchQuery == ''"> 1071 @Translate(centerHeaderPrefix + "Type something", "Indtast for at søge") 1072 </template> 1073 <template v-else-if="queryLoading"> 1074 <div class="basic_listview-loading"> 1075 <span class="spinner-xl-default"></span> 1076 </div> 1077 </template> 1078 <template v-else-if="productList == null"> 1079 @Translate(centerHeaderPrefix + "Empty search...", "Der blev ikke fundet varer...") 1080 </template> 1081 <table v-else class="table table-sm table-border-bottom"> 1082 <tbody> 1083 <tr v-for="product in productList"> 1084 <td class="thumb text-center"> 1085 <a :href="getProductUrl(product)"> 1086 <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')" /> 1087 </a> 1088 </td> 1089 <td> 1090 <a :href="getProductUrl(product)"> 1091 {{product.Name}} <small>{{product.Description2}} {{product.Description3}}</small> 1092 </a> 1093 </td> 1094 <td class="text-right"> 1095 <small>{{product.Number}}</small> 1096 </td> 1097 </tr> 1098 </tbody> 1099 </table> 1100 </div> 1101 <div v-if="searchQuery != '' && productList != null" class="actions"> 1102 <a :href="'@NORRIQ.Common8.Razor.Navigation.GetUrlByNavigationTag("searchresult")?searchquery=' + searchQuery">@Translate(centerHeaderPrefix + "See all products", "Se alle varer")</a> 1103 </div> 1104 </div> 1105 </div> 1106 </form> 1107 </script> 1108 <script type="text/x-template" id="pagination-template"> 1109 @{ 1110 string paginationPrefix = "Pagination "; 1111 } 1112 <nav aria-label="@Translate(paginationPrefix + "Produktliste pagination", "Produktliste pagination")"> 1113 <ul class="pagination"> 1114 <li :class="['page-item', currentPage == 1 ? 'disabled' : '' ]"> 1115 <a class="page-link" v-on:click="togglePrevPage()" aria-label="@Translate(paginationPrefix + "Previous Page", "Previous Page")" v-bind:aria-disabled="currentPage > 1 ? 'true' : null"> 1116 <svg> 1117 <use xmlns:xlink="http://www.w3.org/1999/xlink" 1118 xlink:href="/files/dist/icons/icons.svg#chevron-left"> 1119 </use> 1120 </svg> 1121 </a> 1122 </li> 1123 <template v-for="n in totalPages" v-if="showPage(n)"> 1124 <li :key="n" :class="(n == currentPage ? 'page-item active' : 'page-item')"> 1125 <a v-on:click="togglePage(n)" v-bind:aria-current="(n == currentPage ? 'aria-page' : '')" class="page-link"> 1126 {{n}} 1127 </a> 1128 </li> 1129 </template> 1130 <li :class="'page-item' + (currentPage >= totalPages ? ' disabled' : '')"> 1131 <a v-on:click="toggleNextPage()" aria-label="@Translate(paginationPrefix + "Next Page", "Next Page")" class="page-link" v-bind:aria-disabled="totalPages > currentPage ? 'true' : null"> 1132 <svg class="icon-pagination"> 1133 <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/files/dist/icons/icons.svg#chevron-right"></use> 1134 </svg> 1135 </a> 1136 </li> 1137 </ul> 1138 </nav> 1139 </script> 1140 1141 <script> 1142 var messages = { 1143 required: '@Translate("messages_required", "This field is required")', 1144 email: ' @Translate("messages_email", "Enter email")', 1145 numeric: ' @Translate("messages_numeric", "Enter number")', 1146 checked: ' @Translate("messages_checked", "Please accept terms and conditions to shop")', 1147 max: '@Translate("messages_max", "This field contains to many characters")' 1148 }; 1149 </script> 1150 @if (System.Web.HttpContext.Current.Session[WebsiteService.ClearLocalStorageTag] != null) 1151 { 1152 System.Web.HttpContext.Current.Session.Remove(WebsiteService.ClearLocalStorageTag); 1153 <script> 1154 localStorage.clear(); 1155 console.log("localstorage cleared"); 1156 </script> 1157 } 1158 <script src="@Pageview.CdnWrapResources(NORRIQ.Common8.Razor.TimestampSource.GetSourceWithTimestamp("/Files/dist/scripts/bundle.min.js"))" data-category-consent="cookie_cat_necessary"></script> 1159 <script> 1160 AppStart.VueProvider.init({ 1161 webApiUrl: '@System.Web.Configuration.WebConfigurationManager.AppSettings["WebApiProxyUrl"]', 1162 currencyCode: '@Pageview.Area.EcomCurrencyId', 1163 locale: '@Pageview.Area.Culture', 1164 currencyLeft: false, 1165 currencySpacing: true, 1166 currencySymbol: '@Pageview.Area.EcomCurrencyId', 1167 currencyDecimalSeparator: ',', 1168 currencyGroupSeparator: '.', 1169 currencyDecimalDigits: 2, 1170 dateFormatShort: '@Pageview.Area.Dateformat' 1171 }); 1172 </script> 1173 <script append="replace"></script> 1174 <script src="https://www.google.com/recaptcha/api.js" async defer></script> 1175 </body> 1176 </html>