Error executing template "Designs/Jks/_parsed/fullwidth.parsed.cshtml"
System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
   at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
   at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
   at CompiledRazorTemplates.Dynamic.RazorEngine_75ccd57c56b148109b811fa08a3a2b2c.Execute() in D:\Web\jks.dk\Files\Templates\Designs\Jks\_parsed\fullwidth.parsed.cshtml:line 793
   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 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using Dynamicweb.Content 3 @using Dynamicweb.Content.Files.Metadata 4 5 @{ 6 var areaID = Dynamicweb.Frontend.PageView.Current().Area.ID; 7 var pageID = Dynamicweb.Frontend.PageView.Current().Page.ID; 8 var RootPages = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetRootPagesForArea(areaID); 9 var FirstPage = RootPages.First(); 10 int pageIDForSub = Convert.ToInt32(pageID); 11 var SubPages = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPagesByParentID(pageIDForSub); 12 var myPath = Dynamicweb.Frontend.PageView.Current().Page.GetPath(); 13 14 List<Dynamicweb.Content.Page> tertiaryPages = new List<Dynamicweb.Content.Page>(); 15 string PickerID = "1005"; 16 17 if (!string.IsNullOrEmpty(GetString("Item.Area.PickerID"))) 18 { 19 PickerID = GetString("Item.Area.PickerID"); 20 } 21 22 int PageID = Convert.ToInt32(PickerID); 23 try 24 { 25 tertiaryPages = Dynamicweb.Extensibility.ServiceLocator.Current.GetPageService().GetPagesByParentID(PageID).ToList(); 26 } 27 catch (Exception e) { } 28 } 29 30 @{ 31 var virtConsultantsDirPath = "/Files/Images/Consultants"; 32 var dirPath = System.Web.HttpContext.Current.Server.MapPath(virtConsultantsDirPath); 33 var consultantPictures = System.IO.Directory.GetFiles(dirPath, "*.jpg").Select(x => System.IO.Path.GetFileName(x)); 34 var departments = Jks.ViewModels.Departments.GetAllDepartments(true, GetGlobalValue("Global:Area.ID")); 35 @*@VestjyskMarketing.Helpers.DebugHelper.DumpObject(departments)*@ 36 string footerContentLeft = GetString("Item.Area.FooterVenstre"); 37 string footerContentMid = GetString("Item.Area.FooterMidt"); 38 string footerContentRight = GetString("Item.Area.FooterH_jre"); 39 var linksForMegamenu = GetLoop("Item.Area.LinksTilMenu"); 40 var siteOverlayEntries = GetLoop("Item.Area.SiteOverlayEntries"); 41 42 System.Web.HttpCookie siteOverlayEntryCookie = System.Web.HttpContext.Current.Request.Cookies["SiteOverlayEntry"]; 43 bool ShowSiteOverlayEntry = false; 44 if (siteOverlayEntryCookie == null && siteOverlayEntries.Count > 0) 45 { 46 ShowSiteOverlayEntry = true; 47 System.Web.HttpCookie cookie = new System.Web.HttpCookie("SiteOverlayEntry"); 48 cookie.Expires = DateTime.Now.AddDays(7); 49 cookie.HttpOnly = false; 50 cookie.Value = "1"; 51 System.Web.HttpContext.Current.Response.Cookies.Add(cookie); 52 } 53 } 54 55 <!DOCTYPE html> 56 <html> 57 <head> 58 <meta charset="utf-8"> 59 <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"> 60 <meta name="viewport" content="maximum-scale=1,width=device-width,initial-scale=1,user-scalable=0"> 61 <link rel='shortcut icon' type='image/x-icon' href='/Files/Templates/Designs/Jks/assets/live/img/favicon.ico'> 62 <title>@GetValue("Title")</title> 63 @GetValue("MetaTags") 64 @GetValue("CopyRightNotice") 65 66 <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous"> 67 <!--@Snippet(Meta)--> 68 <script> 69 (function (w, d, s, l, i) { 70 w[l] = w[l] || []; w[l].push({ 71 'gtm.start': 72 new Date().getTime(), event: 'gtm.js' 73 }); var f = d.getElementsByTagName(s)[0], 74 j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : ''; j.async = true; j.src = 75 'https://www.googletagmanager.com/gtm.js?id=' + i + dl; f.parentNode.insertBefore(j, f); 76 })(window, document, 'script', 'dataLayer', 'GTM-K8MKQ8B');</script> 77 <noscript> 78 <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K8MKQ8B" height="0" width="0" style="display:none;visibility:hidden"></iframe> 79 </noscript> 80 <script> 81 (function (i, s, o, g, r, a, m) { 82 i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { 83 (i[r].q = i[r].q || []).push(arguments) 84 }, i[r].l = 1 * new Date(); a = s.createElement(o), 85 m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) 86 })(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); 87 88 ga('create', 'UA-22448373-1', 'auto'); 89 ga('send', 'pageview'); 90 91 </script> 92 93 <!-- Facebook Pixel Code --> 94 <script> 95 !function (f, b, e, v, n, t, s) { 96 if (f.fbq) return; n = f.fbq = function () { 97 n.callMethod ? 98 n.callMethod.apply(n, arguments) : n.queue.push(arguments) 99 }; if (!f._fbq) f._fbq = n; 100 n.push = n; n.loaded = !0; n.version = '2.0'; n.queue = []; t = b.createElement(e); t.async = !0; 101 t.src = v; s = b.getElementsByTagName(e)[0]; s.parentNode.insertBefore(t, s) 102 }(window, 103 document, 'script', 'https://connect.facebook.net/en_US/fbevents.js'); 104 fbq('init', '607978199390920', { 105 em: 'insert_email_variable,' 106 }); 107 fbq('track', 'PageView'); 108 </script> 109 <noscript> 110 <img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=607978199390920&ev=PageView&noscript=1"> 111 </noscript> 112 <!-- DO NOT MODIFY --> 113 <!-- End Facebook Pixel Code --> 114 <style> 115 @@media print { 116 117 #site-wrapper { 118 display: block !important; 119 } 120 121 a[href]:after { 122 content: none !important; 123 } 124 } 125 </style> 126 @if (System.Web.HttpContext.Current.Request.Url.Host.Contains("staging") || System.Web.HttpContext.Current.Request.Url.Host.Contains("vestjyskmarketing")) 127 { 128 <meta name="robots" content="noindex,nofollow"> 129 } 130 @GetValue("Stylesheets") 131 @GetValue("Javascripts") 132 </head> 133 <body> 134 135 <div id="site-wrapper" style="display:none;"> 136 <div id="site-canvas"> 137 <div id="site-menu"> 138 <ul class="mobile-navigation "> 139 @{ foreach (var page in RootPages) 140 { 141 if (page.Item == null) { continue; } 142 143 var pI = page.Item; 144 if (pI.ContainsKey("MenuTekst") && pI.ContainsKey("MenuIkon")) 145 { 146 string title = ""; 147 string icon = ""; 148 bool showDropdown = false; 149 150 try { title = pI["MenuTekst"].ToString(); } catch (Exception e) { } 151 try { icon = pI["MenuIkon"].ToString(); } catch (Exception e2) { } 152 try { showDropdown = Dynamicweb.Core.Converter.ToBoolean(pI["VisDropdown"]); } catch (Exception e2) { } 153 154 if (!string.IsNullOrEmpty(title) && !string.IsNullOrEmpty(icon)) 155 { 156 string add = ""; 157 if ( 158 page.ID.Equals(Dynamicweb.Frontend.PageView.Current().Page.ID) || 159 myPath.Where(x => x.ID.Equals(page.ID)).Count() > 0) 160 { 161 add = "active"; 162 } 163 164 <text> 165 <li class="@(add)"> 166 <a href='@(page.GetPageHrefValue())'> 167 <span class="icon"><img src='@(icon)' class="img-responsive"></span> 168 <span class="title">@(title)</span> 169 </a> 170 171 @if (showDropdown) 172 { 173 Dynamicweb.Content.Items.ItemList column1 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_1"])); 174 Dynamicweb.Content.Items.ItemList column2 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_2"])); 175 Dynamicweb.Content.Items.ItemList column3 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_3"])); 176 177 <ul class="mobile-level-2"> 178 @foreach (Dynamicweb.Content.Items.Item link in column1.Relations) 179 { 180 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 181 } 182 @foreach (Dynamicweb.Content.Items.Item link in column2.Relations) 183 { 184 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 185 } 186 @foreach (Dynamicweb.Content.Items.Item link in column3.Relations) 187 { 188 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 189 } 190 </ul> 191 } 192 193 </li> 194 </text> 195 } 196 197 } 198 199 } 200 201 } 202 <li><br></li> 203 <li style="width: 200px;"> 204 @if (tertiaryPages.Count() > 0) 205 { 206 string CurLangCode = GetString("LongLang").Substring(0, 2).ToUpper(); 207 208 if (CurLangCode == "EN") 209 { 210 CurLangCode = "GB"; 211 } 212 else if (CurLangCode == "DA") 213 { 214 CurLangCode = "DK"; 215 } 216 217 foreach (var p in tertiaryPages) 218 { 219 <text> 220 <a href='/Default.aspx?ID=@(p.ID)' style="display:inline-block;"> 221 <img src='@(p.Item["FlagIkon"].ToString())' alt="@(p.MenuText)" title="@(p.MenuText)">&nbsp; 222 </a> 223 </text> 224 } 225 } 226 </li> 227 </ul> 228 229 </div> 230 231 <div id="click-container"> 232 <div class="section colorf9f9f9 main-header" style="background-color:#f9f9f9;"> 233 <div class="container"> 234 <div class="row"> 235 <div class="col-md-2 col-xs-6"> 236 <a href='@((FirstPage.ID == 525 ? "/" : "/Default.aspx?ID="+ FirstPage.ID ))'><img src="/Files/Templates/Designs/Jks/assets/live/img/logo.png" class="img-responsive main-logo"></a> 237 </div> 238 <div class="col-md-6 hidden-sm hidden-xs"> 239 <ul class="main-navigation "> 240 @{ 241 foreach (var page in RootPages) 242 { 243 if (page.Item == null) { continue; } 244 245 @*foreach (var subpage in SubPages) { 246 //if (subpage.Item != null) { 247 //string subpagetitle = ""; 248 //try {subpagetitle = subpage.Item["MenuTekst"].ToString(); } catch(Exception e) {} 249 //if (!string.IsNullOrEmpty(subpagetitle)) { 250 // <text> 251 <div class="hide">@(subpagetitle)</div> 252 </text> 253 } 254 } 255 }*@ 256 257 var shortcut = page.ShortCut; 258 var pI = page.Item; 259 if (pI.ContainsKey("MenuTekst") && pI.ContainsKey("MenuIkon")) 260 { 261 string title = ""; 262 string icon = ""; 263 bool showDropdown = false; 264 265 string add2 = ""; 266 if ( 267 page.ID.Equals(Dynamicweb.Frontend.PageView.Current().Page.ID) || 268 myPath.Where(x => x.ID.Equals(page.ID)).Count() > 0) 269 { 270 add2 = "active"; 271 } 272 273 try { title = pI["MenuTekst"].ToString(); } catch (Exception e) { } 274 try { icon = pI["MenuIkon"].ToString(); } catch (Exception e2) { } 275 try { showDropdown = Dynamicweb.Core.Converter.ToBoolean(pI["VisDropdown"]); } catch (Exception e2) { } 276 277 if (!string.IsNullOrEmpty(title) && !string.IsNullOrEmpty(icon)) 278 { 279 if (string.IsNullOrEmpty(shortcut)) 280 { 281 282 <text> 283 <li class="@(add2)"> 284 <a href='@(Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(page.GetPageHrefValue()))'> 285 <span class="icon"><img src='@(icon)' class="img-responsive"></span> 286 <span class="title">@(title)</span> 287 </a> 288 @if (showDropdown) 289 { 290 Dynamicweb.Content.Items.ItemList column1 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_1"])); 291 Dynamicweb.Content.Items.ItemList column2 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_2"])); 292 Dynamicweb.Content.Items.ItemList column3 = Dynamicweb.Content.Items.ItemList.GetItemListById(Convert.ToInt32(pI["DropdownKolonne_3"])); 293 294 <div class="megamenu hidden-xs hidden-sm"> 295 <div class="megamenu__inner"> 296 <div class="container"> 297 <div class="row"> 298 <div class="col-xs-12"> 299 @*<div class="h2 text-uppercase text-center">@pI["DropdownOverskrift"].ToString()</div>*@ 300 301 <div class="megamenu__column__wrapper"> 302 <div class="row"> 303 <div class="col-md-3"> 304 <ul> 305 @foreach (Dynamicweb.Content.Items.Item link in column1.Relations) 306 { 307 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 308 } 309 </ul> 310 </div> 311 <div class="col-md-3"> 312 <ul> 313 @foreach (Dynamicweb.Content.Items.Item link in column2.Relations) 314 { 315 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 316 } 317 </ul> 318 </div> 319 <div class="col-md-3"> 320 <ul> 321 @foreach (Dynamicweb.Content.Items.Item link in column3.Relations) 322 { 323 <li><a href='@link["Link"].ToString()' title='Gå til @link["Navn"].ToString()'>@link["Navn"].ToString()</a></li> 324 } 325 </ul> 326 </div> 327 <div class="col-md-3"> 328 <img src='@pI["DropdownBillede"]' alt="" class="img-responsive"> 329 </div> 330 </div> 331 </div> 332 333 <div class="clearfix"></div> 334 335 </div> 336 </div> 337 </div> 338 </div> 339 340 341 </div> 342 } 343 </li> 344 </text> 345 } 346 else 347 { 348 <text> 349 <li class="@(add2)"> 350 <a href='@(page.ShortCut)'> 351 <span class="icon"><img src='@(icon)' class="img-responsive"></span> 352 <span class="title">@(title)</span> 353 </a> 354 </li> 355 </text> 356 } 357 } 358 } 359 } 360 } 361 362 </ul> 363 </div> 364 <div class="col-md-4 col-xs-6"> 365 <div class="hidden-md hidden-lg menu-box text-right"> 366 <a href="javascript:" class="open-search" style="margin-right:20px;"><i class="fa fa-search"></i></a><a href="javascript:" class="open-menu"><i class="fa fa-bars"></i></a> 367 </div> 368 <div class="hidden-sm hidden-xs text-right"> 369 <ul class="tertiary"> 370 <li> 371 <a href="javascript:" class="open-search"><i class="fa fa-search"></i></a> 372 </li> 373 @if (tertiaryPages.Count() > 0) 374 { 375 string CurLangCode = GetString("LongLang").Substring(3, 2).ToUpper(); 376 377 if (CurLangCode == "EN") 378 { 379 CurLangCode = "GB"; 380 } 381 else if (CurLangCode == "DA") 382 { 383 CurLangCode = "DK"; 384 } 385 386 <text> 387 <li class="sub-choose"> 388 <a class="sub-select" href="javascript:"><img src="/Files/Templates/Designs/Jks/assets/live/img/flags/@(CurLangCode).png">&nbsp;&nbsp;<i class="fa fa-caret-down" aria-hidden="true"></i></a> 389 <ul> 390 @foreach (var p in tertiaryPages) 391 { 392 <text> 393 <li> 394 <a href='/Default.aspx?ID=@(p.ID)'> 395 <img src='@(p.Item["FlagIkon"].ToString())' alt="@(p.MenuText)" title="@(p.MenuText)"> 396 </a> 397 </li> 398 </text> 399 } 400 </ul> 401 </li> 402 </text> 403 } 404 <!--<li> 405 DK 406 </li>--> 407 </ul> 408 409 410 @if (areaID == 1) 411 { 412 <a href="https://www.soliditet.dk/lang/da_DK/RatingGuideline" target="_blank" class="aaaRating"><img style="border:0px;" class="img-responsive" oncontextmenu="return false" title="Vi er en kreditv&aelig;rdig virksomhed baseret p&aring; Bisnodes kreditvurderingssystem. Vurderingen er foretaget ud fra en m&aelig;ngde forskellige beslutningsregler. Oplysningerne bliver opdateret dagligt via Bisnodes database. Kreditvurderingen af virksomheden er s&aring;ledes altid aktuel." alt="Vi er en kreditv&aelig;rdig virksomhed baseret p&aring; Bisnodes kreditvurderingssystem. Vurderingen er foretaget ud fra en m&aelig;ngde forskellige beslutningsregler. Oplysningerne bliver opdateret dagligt via Bisnodes database. Kreditvurderingen af virksomheden er s&aring;ledes altid aktuel." id="img_98_58_px_tr1" src="https://merit.soliditet.dk/merit/imageGenerator/display?lang=DK&country=DK&cId=OER3SWXtwG%2FmqN1VrzuaIg%3D%3D&cUid=3xMR3CHqTqQ%3D&imgType=img_98_58_px_tr1"></a> 413 } 414 </div> 415 </div> 416 </div> 417 </div> 418 </div> 419 <div class="content-holder-static"> 420 @*Breadcrump*@ 421 @if (Dynamicweb.Frontend.PageView.Current().Page.ShowInLegend) 422 { 423 <div class="breadcrumb-holder"> 424 <div class="container"> 425 <div class="row"> 426 <div class="col-xs-12"> 427 @GetValue("DwNavigation(breadcrumb)") 428 </div> 429 </div> 430 </div> 431 </div> 432 } 433 434 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 435 436 437 @GetValue("Title(Full width page)") 438 @GetValue("Description(Use this page for full width pages.)") 439 440 <div class="wrapper" id="main-content">@GetValue("DwContent(maincontent)")</div> 441 442 @if (!String.IsNullOrEmpty(GetString("Item.Social_Billede"))) 443 { 444 string portText = System.Web.HttpContext.Current.Request.Url.Port == 80 ? "http" : "https"; 445 string socialImage = portText + "://" + System.Web.HttpContext.Current.Request.Url.Host + GetString("Item.Social_Billede"); 446 447 <!--@SnippetStart(Meta)--> 448 <meta property="og:image" content="@(socialImage)"> 449 <!--@SnippetEnd(Meta)--> 450 } 451 </div> 452 453 454 455 @if (GetBoolean("Item.VisAfdelingskontakt")) 456 { 457 <div class="section double-padding-top double-padding-bottom your-contact require-department"> 458 <div class="container"> 459 <div class="row"> 460 <div class="col-md-3 department-contact"> 461 <div class="inner-cta-contact"> 462 <h3>Kontakt din lokale afdeling</h3><br> 463 <p> 464 <b><span data-depinfo="name"></span></b><br> 465 <span data-depinfo="address"></span><br> 466 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br><br> 467 T: <span data-depinfo="phone"></span><br> 468 F: <span data-depinfo="fax"></span><br> 469 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a><br><br> 470 <div class="ctas text-left"> 471 <a class="link-arrow basic" data-depreplace="" href="https://www.google.com/maps/place/{{dep[address]}},{{dep[zip]}} {{dep[name]}}" target="_blank">Find vej</a><br> 472 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#openings" target="_blank">Se ledige stillinger tæt på dig</a><br> 473 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#contacts" target="_blank">Se medarbejdere her</a> 474 </div> 475 </p> 476 </div> 477 </div> 478 479 <div class="col-md-9"> 480 <div id="contact-map" data-depreplace="" data-page="{{dep[page]}}" data-lat="{{dep[lat]}}" data-lng="{{dep[lng]}}"></div> 481 </div> 482 </div> 483 </div> 484 <div class="clearfix"></div> 485 </div> 486 } 487 488 <div class="section coloreeeeee double-padding-top double-padding-bottom main-footer" style="background-color:#eeeeee;"> 489 <div class="container"> 490 491 492 @if (!string.IsNullOrEmpty(footerContentLeft) || !string.IsNullOrEmpty(footerContentMid) || !string.IsNullOrEmpty(footerContentRight)) 493 { 494 495 <div class="row footer-grid"> 496 497 <div class="col-md-2">@footerContentLeft</div> 498 499 <div class="col-md-8 middle">@footerContentMid</div> 500 501 <div class="col-md-2">@footerContentRight</div> 502 503 </div> 504 505 } 506 507 </div> 508 </div> 509 </div> 510 </div> 511 512 513 514 515 516 <div class="department-picker-modal"> 517 <div class="inner"> 518 <h4>Din lokale afdeling er<br><span data-depinfo="name"></span></h4> 519 <p>Er denne oplysning korrekt klik på "ok" eller find din lokale afdeling ved at klikke på "find afdeling"</p> 520 521 <select name="new-department" class="new-department"> 522 <option>Find afdeling</option> 523 @{int depIndex = 0; 524 } 525 @foreach (var dep in departments) 526 { 527 if ( 528 dep.DepartmentId.Equals("357") || 529 dep.DepartmentId.Equals("299") || 530 dep.DepartmentId.Equals("400")) 531 { 532 continue; 533 } 534 try 535 { 536 <text> 537 <option value='@(depIndex)'>@(dep.City)</option> 538 </text>depIndex++; 539 } 540 catch (Exception e) { } 541 } 542 </select> 543 544 <a href="javascript:" class="button close-department-picker">OK</a> 545 </div> 546 </div> 547 548 <div class="initial-department-picker-modal"> 549 <div class="inner"> 550 <h4>Vælg venligst din nærmeste afdeling</h4> 551 <p>Vi kunne desværre ikke finde din nærmeste afdeling automatisk. Vælg din afdeling på listen herunder.</p> 552 553 <select name="new-department" class="new-department"> 554 <option>Find afdeling</option> 555 @{int depIndex2 = 0; 556 } 557 @foreach (var dep in departments) 558 { 559 if ( 560 dep.DepartmentId.Equals("357") || 561 dep.DepartmentId.Equals("299") || 562 dep.DepartmentId.Equals("400")) 563 { 564 continue; 565 } 566 try 567 { 568 <text> 569 <option value='@(depIndex2)'>@(dep.City)</option> 570 </text>depIndex2++; 571 } 572 catch (Exception e) { } 573 } 574 </select> 575 576 <a href="javascript:" class="button close-initial-department-picker">OK</a> 577 </div> 578 </div> 579 <div class="department-info-window require-department"> 580 <div class="toolbar open-close-department"> 581 <ul> 582 <li> 583 <h4>Din lokale JKS afdeling</h4> 584 </li> 585 <li> 586 <i class="fa fa-minus open-close-icon" aria-hidden="true"></i> 587 </li> 588 </ul> 589 </div> 590 <div class="content"> 591 592 <h4 data-depinfo="name"></h4> 593 <p> 594 <span data-depinfo="address"></span><br> 595 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br> 596 T: <span data-depinfo="phone"></span><br> 597 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a> 598 599 <br> 600 <a data-depreplace="" href='{{dep[page]}}'>Se medarbejdere her</a> 601 <br> 602 <a class="link-arrow basic" data-depreplace="" href="https://www.google.com/maps/place/{{dep[address]}},{{dep[zip]}} {{dep[name]}}" target="_blank">Find vej</a> 603 604 <a href="javascript:" class="open-department-picker">Skift afdeling</a> 605 </p> 606 </div> 607 </div> 608 609 610 <div id="search-overlay"> 611 <div class="inner"> 612 <div class="centered"> 613 <form action='/Default.aspx' id="search-form" method="GET"> 614 <input type="hidden" name="ID" value='@GetValue("Item.Area.S_gesideId")'> 615 <input type="text" id="search-string" name="q" placeholder='@(Translate("search_string","Indtast søgeord"))'><input type="submit" value='@(Translate("search","Søg"))'> 616 </form> 617 </div> 618 </div> 619 </div> 620 621 </div> 622 623 <link rel="stylesheet" href="/Files/Templates/Designs/Jks/assets/live/style.css?v=1.3" type="text/css"> 624 <!--Snippet(stylesheets)--> 625 <!-- Scripts --> 626 @{ 627 string siteAreaId = GetGlobalValue("Global:Area.ID"); 628 string languageid = GetGlobalValue("Global:Area.Lang"); 629 var departments2 = Jks.ViewModels.Departments.GetAllDepartments(true, siteAreaId); 630 string device = GetGlobalValue("Global:Device.IsMobile"); 631 } 632 <script type="text/javascript"> 633 var mapStyle=[{featureType:"landscape",elementType:"all",stylers:[{hue:"#FFBB00"},{saturation:43.400000000000006},{lightness:37.599999999999994},{gamma:1}]},{featureType:"poi",elementType:"all",stylers:[{hue:"#00FF6A"},{saturation:-1.0989010989011234},{lightness:11.200000000000017},{gamma:1}]},{featureType:"road.highway",elementType:"all",stylers:[{hue:"#FFC200"},{saturation:-61.8},{lightness:45.599999999999994},{gamma:1}]},{featureType:"road.arterial",elementType:"all",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:51.19999999999999},{gamma:1}]},{featureType:"road.local",elementType:"all",stylers:[{hue:"#FF0300"},{saturation:-100},{lightness:52},{gamma:1}]},{featureType:"water",elementType:"all",stylers:[{saturation:"0"},{lightness:"0"},{gamma:"1.00"},{color:"#d7effc"}]}]; 634 var forgetlocation = true; 635 var infoWindow = null; 636 var markers = []; 637 var map = null; 638 var markerIcon = "/Files/Templates/Designs/Jks/assets/live/img/map_marker.png"; 639 var cMapMarker = null; 640 var cMap = null; 641 var cContactPage = null; 642 643 var res = function() 644 { 645 if( $('#contact-map').length > 0 ) 646 { 647 $('#contact-map').css('height',$('.department-contact').height() ); 648 } 649 650 if( map != null ) 651 { 652 if( $(window).width() <= 992 ) 653 { 654 map.setOptions({draggable: false}); 655 } else { map.setOptions({draggable: true}); } 656 } 657 }; 658 659 function setNewContactMap() { 660 if( $('#contact-map').length > 0 && cMap != null ) 661 { 662 var NewCenter = new google.maps.LatLng( 663 $('#contact-map').attr('data-lat'), 664 $('#contact-map').attr('data-lng') 665 ); 666 667 cContactPage = $('#contact-map').attr('data-page'); 668 669 cMap.setCenter(NewCenter); 670 cMapMarker.setPosition( NewCenter ); 671 } 672 } 673 674 function initMap(what) { 675 676 if( $('#contact-map').length > 0 ) 677 { 678 console.log( $('#contact-map').attr('data-lat') ); 679 680 if( $('#contact-map').attr('data-lat') == "{{dep[lat]}}" ) 681 { 682 setTimeout( function() { initMap("cm"); }, 200 ); 683 } else { 684 685 cContactPage = $('#contact-map').attr('data-page'); 686 687 var MyCenter = new google.maps.LatLng( 688 $('#contact-map').attr('data-lat'), 689 $('#contact-map').attr('data-lng') 690 ); 691 692 693 cMap = new google.maps.Map(document.getElementById('contact-map'), { 694 zoom: 12, 695 center: MyCenter, 696 styles : mapStyle, 697 draggable: false, 698 mapTypeControl : false, 699 }); 700 701 res(); 702 703 cMapMarker = new google.maps.Marker({ 704 position: MyCenter, 705 map: cMap, 706 icon: markerIcon, 707 }); 708 709 cMapMarker.addListener('click', function() { 710 if( cContactPage != null ) 711 location.href=cContactPage; 712 else 713 alert("Desværre, der skete en fejl."); 714 }); 715 } 716 717 } 718 719 if( typeof(what) != "undefined" && what == "cm" ) 720 return; 721 722 if( $('#map').length > 0 ) 723 { 724 infoWindow = new google.maps.InfoWindow({}); 725 var dkCenter = { lat: 56.263920, lng: 9.501785 }; 726 var noCenter = { lat: 61.4720, lng: 8.5 }; 727 var seCenter = { lat: 57, lng: 13.5 }; 728 var mapCoords = dkCenter; 729 var mapZoom = 0; 730 switch ("@languageid") { 731 case "da": 732 mapZoom = 7; 733 mapCoords = dkCenter; 734 break; 735 case "nn": 736 mapZoom = 5.75; 737 mapCoords = noCenter; 738 break; 739 case "sv": 740 mapZoom = 6; 741 mapCoords = seCenter; 742 break; 743 } 744 map = new google.maps.Map(document.getElementById('map'), { 745 zoom: mapZoom, 746 center: mapCoords, 747 styles : mapStyle, 748 draggable: true, 749 mapTypeControl : false, 750 }); 751 752 res(); 753 754 $.each(departments, function(i,v) { 755 756 var depMark = new google.maps.Marker({ 757 position: { lat: parseFloat( v.latitude ), lng: parseFloat( v.longitude ) }, 758 map: map, 759 icon: markerIcon, 760 }); 761 depMark.addListener('mouseover', function() { 762 763 var template = $('#contentWindowHtml').html(); 764 template = template.split("{{name}}").join(v.name) 765 .split("{{address}}").join(v.address) 766 .split("{{zip}}").join(v.zip) 767 .split("{{city}}").join(v.city) 768 .split("{{phone}}").join(v.phone) 769 .split("{{fax}}").join(v.fax) 770 .split("{{email}}").join(v.email) 771 .split("{{pageurl}}").join(v.page); 772 773 //Closing previous. 774 infoWindow.close(); 775 776 infoWindow = new google.maps.InfoWindow({ 777 content: template 778 }); 779 780 infoWindow.open(map, depMark); 781 }); 782 }); 783 } 784 } 785 @if( GetString("LongLang").Substring(0,2).ToUpper() != "DA" ) 786 { 787 <text> 788 var forgetlocation = true; 789 </text> 790 } 791 792 var departments = [ 793 @foreach( var dep in departments2 ) 794 { 795 if( 796 dep.DepartmentId.Equals("357") || 797 dep.DepartmentId.Equals("299") || 798 dep.DepartmentId.Equals("400") || 799 dep.DepartmentId.Equals("199") ) 800 { 801 continue; 802 } 803 804 var consultants = Jks.ViewModels.Consultants.GetConsultantsByDepartmentId(dep.DepartmentId, GetGlobalValue("Global:Area.ID")); 805 var consultant = consultants.FirstOrDefault(x => x.HasCareer()); 806 807 if( consultant == null ) 808 { 809 consultant = consultants.FirstOrDefault(); 810 } 811 812 if( consultant != null ) 813 { 814 815 string pP = "/Files/Templates/Designs/Jks/assets/live/img/default_job.jpg"; 816 817 var cId = consultant.ConsultantId; 818 string pN = String.Format("{0}.jpg", cId); 819 820 // Make picture reference case-insensitive 821 pN = consultantPictures.Where(x => x.ToLower() == pN.ToLower()).FirstOrDefault(); 822 823 if (pN != null) { 824 pP = String.Format("{0}/{1}", virtConsultantsDirPath, pN); 825 } 826 827 string img = "/Admin/Public/GetImage.ashx?Image="+pP+"&Format=jpg&Width=584&Height=400&Compression=99"; 828 829 830 try { 831 string[] latlng = dep.LatLong.Split(','); 832 <text> 833 { 834 "id" : '@(dep.DepartmentId)', 835 "name" : '@(dep.WebName)', 836 "city" : '@(dep.City)', 837 "zip" : '@(dep.PostalCode)', 838 "region" : '@(dep.Region)', 839 "address" : '@(dep.Address)', 840 "email" : '@(dep.Email)', 841 "phone" : '@(dep.Phone)', 842 "fax" : '@(dep.Fax)', 843 "municipality" : '@(dep.Municipality)', 844 "latitude" : '@(latlng[0])', 845 "longitude" : '@(latlng[1])', 846 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )', 847 "contact" : { 848 "name" : '@(consultant.Name)', 849 "title" : '@(consultant.Title)', 850 "phone" : '@(consultant.Phone)', 851 "mobile_phone" : '@(consultant.MobilePhone)', 852 "email" : '@(consultant.Email)', 853 "image" : '@(img)', 854 "career" : '@("assets/live/img/" + (consultant.HasCareer() ? "jks-career-icon.png" : "jks-staffing-icon.png") )' 855 } 856 }, 857 </text> 858 } catch(Exception) {} 859 } 860 else 861 { 862 string[] latlng = dep.LatLong.Split(','); 863 <text> 864 { 865 "id" : '@(dep.DepartmentId)', 866 "name" : '@(dep.WebName)', 867 "city" : '@(dep.City)', 868 "zip" : '@(dep.PostalCode)', 869 "region" : '@(dep.Region)', 870 "address" : '@(dep.Address)', 871 "email" : '@(dep.Email)', 872 "phone" : '@(dep.Phone)', 873 "fax" : '@(dep.Fax)', 874 "municipality" : '@(dep.Municipality)', 875 "latitude" : '@(latlng[0])', 876 "longitude" : '@(latlng[1])', 877 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )' 878 }, 879 </text> 880 } 881 } 882 ]; 883 </script> 884 885 <script type="text/javascript" src="/Files/Templates/Designs/Jks/assets/live/main.js"></script> 886 <script type="text/javascript"> 887 function setCookie(cname, cvalue, exdays) { 888 var d = new Date(); 889 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 890 var expires = "expires=" + d.toUTCString(); 891 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 892 } 893 894 function getCookie(cname) { 895 var name = cname + "="; 896 var decodedCookie = decodeURIComponent(document.cookie); 897 var ca = decodedCookie.split(';'); 898 for (var i = 0; i < ca.length; i++) { 899 var c = ca[i]; 900 while (c.charAt(0) == ' ') { 901 c = c.substring(1); 902 } 903 if (c.indexOf(name) == 0) { 904 return c.substring(name.length, c.length); 905 } 906 } 907 return ""; 908 } 909 910 911 $(function () { 912 913 $('.mobile-navigation li').on('click', function (event) { 914 var $this = $(this); 915 916 if ($this.find('.mobile-level-2').length > 0 && !$this.hasClass("clicked")) { 917 event.preventDefault(); 918 919 var level2 = $this.find('.mobile-level-2'); 920 $this.addClass("clicked"); 921 level2.slideDown(); 922 } 923 924 }); 925 926 $('#contact-map').css('height', $('.department-contact').height()); 927 928 $('#site-wrapper').fadeIn('medium'); 929 930 $(window).resize(res); 931 932 if (getCookie("cookieAccepted") != "") { 933 934 } else { 935 $('.cookie-notice').fadeIn(); 936 $('#cookie-accept').click(function () { 937 $('.cookie-notice').stop().fadeOut(); 938 setCookie("cookieAccepted", "true", 365); 939 //localStorage.setItem("cookieaccepted","true"); 940 //alert("Hola"); 941 942 }); 943 } 944 945 /*if (typeof(Storage) !== "undefined") { 946 if (localStorage.cookieaccepted) { 947 948 } else { 949 $('.cookie-notice').fadeIn(); 950 951 } 952 } else { 953 $('.cookie-notice').fadeIn(); 954 $('#cookie-accept').hide(); 955 }*/ 956 957 958 }); 959 </script> 960 <script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyATlsQNnFk0v_xH3IpLUdHgYPiND5nS1lE&callback=initMap"></script> 961 <!--@Snippet(javascripts)--> 962 963 964 <div class="cookie-notice"> 965 <div class="notice"> 966 @Translate("cookie_text", "Websitet anvender cookies til at huske dine indstillinger og statistik. Denne information deles med tredjepart.")<br><br> 967 <input type="button" class="btn btn-primary" value="Accepter" id="cookie-accept"> 968 </div> 969 970 @if (ShowSiteOverlayEntry && siteOverlayEntries.Count > 0 && Convert.ToInt32(GetGlobalValue("Global:Page.ID")) == 525) 971 { 972 <div class="site-entry-overlay__shade"></div> 973 <div class="site-entry-overlay"> 974 <a href="javascript:void(0)" class="fa fa-times-circle site-entry-overlay__close"></a> 975 <div class="container"> 976 <div class="row"> 977 <div class="col-xs-12"> 978 @foreach (var item in siteOverlayEntries) 979 { 980 <div class="site-entry-overlay__item"> 981 <img src='@item.GetString("Item.Area.SiteOverlayEntries.Image")' class="hidden-xs hidden-sm"> 982 <div class="h2">@item.GetString("Item.Area.SiteOverlayEntries.Headline")</div> 983 <p class="hidden-xs"> 984 @item.GetString("Item.Area.SiteOverlayEntries.Content") 985 </p> 986 <a href='@item.GetString("Item.Area.SiteOverlayEntries.Link")' class="button">@item.GetString("Item.Area.SiteOverlayEntries.LinkText")</a> 987 </div> 988 } 989 </div> 990 </div> 991 992 </div> 993 994 </div> 995 } 996 997 <!-- Conversion Pixel - JKS - Afledt Trafik - DO NOT MODIFY --> 998 <img src="https://secure.adnxs.com/px?id=1112313&t=2" width="1" height="1" style="display:none"> 999 <!-- End of Conversion Pixel --> 1000 1001 </div></body> 1002 </html> 1003