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