Error executing template "Designs/Jks/_parsed/Article.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_52f75ab6f4d940f18b822cd18d14468c.Execute() in D:\Web\jks.dk\Files\Templates\Designs\Jks\_parsed\Article.parsed.cshtml:line 886
   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 @using Dynamicweb.Content.Files.Metadata 436 @using System.Web; 437 438 439 440 @{ 441 HttpContext context = HttpContext.Current; 442 string image = GetString("Item.Image"); 443 string MyUrl = context.Request.Url.ToString(); 444 string UrlRelative = "https://" + HttpContext.Current.Request.Url.Host + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetInteger("DwPageID")); 445 string SoMeImage = image; 446 if (!string.IsNullOrEmpty(GetString("Item.SoMeImage"))) 447 { 448 SoMeImage = GetString("Item.SoMeImage"); 449 } 450 } 451 452 <!--@SnippetStart(Meta)--> 453 <meta property="og:site_name" content="www.jks.dk"> 454 <meta property="og:url" content='@MyUrl'> 455 <meta property="og:type" content="article"> 456 <meta property="og:title" content='@GetString("Item.Header")'> 457 <meta property="og:description" content='@GetValue("Item.Teaser")'> 458 <meta property="og:image" content="@SoMeImage"> 459 <meta property="og:image:width" content="480"> 460 <meta property="og:image:height" content="250"> 461 <!--@SnippetEnd(Meta)--> 462 463 <div class="container"> 464 <div class="row "> 465 <div class="col-md-9 article__content"> 466 <h1 class="subline blue article-main-header">@GetString("Item.Header")</h1> 467 <p><img class="img-responsive" src="/Admin/Public/GetImage.ashx?Image=@image&Crop=0&Format=jpg&Height=450&Width=850&Compression=75">@GetString("Item.Content")</p> 468 @if (!string.IsNullOrEmpty(GetString("Item.Tags"))) 469 { 470 <p> 471 @foreach (string tag in GetString("Item.Tags").ToString().Split(',')) 472 { 473 <span class="frontpage__articles__tag">@tag</span> 474 } 475 </p> 476 } 477 <p class="article__date">@Convert.ToDateTime(GetString("Item.Date")).ToShortDateString()</p> 478 <div class="row"> 479 <div class="col-xs-12"> 480 <b>@(Translate("share_icons_jobview", "Del dette jobopslag") )</b><br><br> 481 </div> 482 </div> 483 <div class="row"> 484 <div class="col-xs-12"> 485 <a href="javascript:" onclick="linkedinShare();" title="Del på LinkedIn" alt="Del på LinkedIn"> 486 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Linkedin.png"> 487 </a>&nbsp;&nbsp; 488 <a href="javascript:" onclick="facebookShare();" title="Del på facebook" alt="Del på facebook"> 489 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Facebook.png"> 490 </a>&nbsp;&nbsp; 491 <a href='mailto:?subject=@(GetString("Item.Title"))&body=Lige nu har vi denne spændende artikel på jks.dk – se den her: @(UrlRelative)%0D%0A%0D%0ASe alle vores artikler på jks.dk%0D%0A%0D%0AMed venlig hilsen%0D%0A%0D%0AJKS' title="Send pr. mail" alt="Send pr. mail"> 492 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Mail.png"> 493 </a>&nbsp;&nbsp; 494 <a href="@(UrlRelative)?pdf=true&LayoutTemplate=Designs/Jks/jobview_print_template.cshtml&leftRightMargin=1&topBottomMargin=0" target="_blank" title="Print jobopslag" alt="Print jobopslag"> 495 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Print.png"> 496 </a> 497 </div> 498 </div> 499 </div> 500 <div class="col-md-3"> 501 @{ 502 var items = RenderItemList(new 503 { 504 ItemType = "Article", 505 ListSourceType = "Page", 506 ListSourcePage = GetPageIdByNavigationTag("Articles"), 507 ItemFieldList = "*", 508 ListTemplate = "ItemPublisher/List/ArticleSidebarList.cshtml", 509 ListPageSize = "100", 510 ListOrderBy = "Date", 511 ListOrderByDirection = "Descending" 512 }); 513 } 514 515 @items 516 </div> 517 </div> 518 </div> 519 520 <!--@SnippetStart(javascripts)--> 521 <script type="text/javascript"> 522 function linkedinShare() { 523 var MainUrl = 'https://www.linkedin.com/shareArticle?url=@(UrlRelative)&mini=true&title=@(GetString("Item.Title"))&summary=@(GetString("Item.Short_Description"))'; 524 525 popitup(MainUrl); 526 } 527 528 function facebookShare() { 529 var MainUrl = 'https://www.facebook.com/sharer/sharer.php?u=@(UrlRelative)'; 530 popitup(MainUrl); 531 } 532 533 function popitup(url) { 534 newwindow=window.open(url,'@(GetString("Item.Title"))','height=460,width=670'); 535 if (window.focus) {newwindow.focus()} 536 return false; 537 } 538 539 </script> 540 541 542 543 <!--@SnippetEnd(javascripts)--> 544 </div> 545 546 547 548 @if (GetBoolean("Item.VisAfdelingskontakt")) 549 { 550 <div class="section double-padding-top double-padding-bottom your-contact require-department"> 551 <div class="container"> 552 <div class="row"> 553 <div class="col-md-3 department-contact"> 554 <div class="inner-cta-contact"> 555 <h3>Kontakt din lokale afdeling</h3><br> 556 <p> 557 <b><span data-depinfo="name"></span></b><br> 558 <span data-depinfo="address"></span><br> 559 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br><br> 560 T: <span data-depinfo="phone"></span><br> 561 F: <span data-depinfo="fax"></span><br> 562 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a><br><br> 563 <div class="ctas text-left"> 564 <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> 565 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#openings" target="_blank">Se ledige stillinger tæt på dig</a><br> 566 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#contacts" target="_blank">Se medarbejdere her</a> 567 </div> 568 </p> 569 </div> 570 </div> 571 572 <div class="col-md-9"> 573 <div id="contact-map" data-depreplace="" data-page="{{dep[page]}}" data-lat="{{dep[lat]}}" data-lng="{{dep[lng]}}"></div> 574 </div> 575 </div> 576 </div> 577 <div class="clearfix"></div> 578 </div> 579 } 580 581 <div class="section coloreeeeee double-padding-top double-padding-bottom main-footer" style="background-color:#eeeeee;"> 582 <div class="container"> 583 584 585 @if (!string.IsNullOrEmpty(footerContentLeft) || !string.IsNullOrEmpty(footerContentMid) || !string.IsNullOrEmpty(footerContentRight)) 586 { 587 588 <div class="row footer-grid"> 589 590 <div class="col-md-2">@footerContentLeft</div> 591 592 <div class="col-md-8 middle">@footerContentMid</div> 593 594 <div class="col-md-2">@footerContentRight</div> 595 596 </div> 597 598 } 599 600 </div> 601 </div> 602 </div> 603 </div> 604 605 606 607 608 609 <div class="department-picker-modal"> 610 <div class="inner"> 611 <h4>Din lokale afdeling er<br><span data-depinfo="name"></span></h4> 612 <p>Er denne oplysning korrekt klik på "ok" eller find din lokale afdeling ved at klikke på "find afdeling"</p> 613 614 <select name="new-department" class="new-department"> 615 <option>Find afdeling</option> 616 @{int depIndex = 0; 617 } 618 @foreach (var dep in departments) 619 { 620 if ( 621 dep.DepartmentId.Equals("357") || 622 dep.DepartmentId.Equals("299") || 623 dep.DepartmentId.Equals("400")) 624 { 625 continue; 626 } 627 try 628 { 629 <text> 630 <option value='@(depIndex)'>@(dep.City)</option> 631 </text>depIndex++; 632 } 633 catch (Exception e) { } 634 } 635 </select> 636 637 <a href="javascript:" class="button close-department-picker">OK</a> 638 </div> 639 </div> 640 641 <div class="initial-department-picker-modal"> 642 <div class="inner"> 643 <h4>Vælg venligst din nærmeste afdeling</h4> 644 <p>Vi kunne desværre ikke finde din nærmeste afdeling automatisk. Vælg din afdeling på listen herunder.</p> 645 646 <select name="new-department" class="new-department"> 647 <option>Find afdeling</option> 648 @{int depIndex2 = 0; 649 } 650 @foreach (var dep in departments) 651 { 652 if ( 653 dep.DepartmentId.Equals("357") || 654 dep.DepartmentId.Equals("299") || 655 dep.DepartmentId.Equals("400")) 656 { 657 continue; 658 } 659 try 660 { 661 <text> 662 <option value='@(depIndex2)'>@(dep.City)</option> 663 </text>depIndex2++; 664 } 665 catch (Exception e) { } 666 } 667 </select> 668 669 <a href="javascript:" class="button close-initial-department-picker">OK</a> 670 </div> 671 </div> 672 <div class="department-info-window require-department"> 673 <div class="toolbar open-close-department"> 674 <ul> 675 <li> 676 <h4>Din lokale JKS afdeling</h4> 677 </li> 678 <li> 679 <i class="fa fa-minus open-close-icon" aria-hidden="true"></i> 680 </li> 681 </ul> 682 </div> 683 <div class="content"> 684 685 <h4 data-depinfo="name"></h4> 686 <p> 687 <span data-depinfo="address"></span><br> 688 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br> 689 T: <span data-depinfo="phone"></span><br> 690 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a> 691 692 <br> 693 <a data-depreplace="" href='{{dep[page]}}'>Se medarbejdere her</a> 694 <br> 695 <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> 696 697 <a href="javascript:" class="open-department-picker">Skift afdeling</a> 698 </p> 699 </div> 700 </div> 701 702 703 <div id="search-overlay"> 704 <div class="inner"> 705 <div class="centered"> 706 <form action='/Default.aspx' id="search-form" method="GET"> 707 <input type="hidden" name="ID" value='@GetValue("Item.Area.S_gesideId")'> 708 <input type="text" id="search-string" name="q" placeholder='@(Translate("search_string","Indtast søgeord"))'><input type="submit" value='@(Translate("search","Søg"))'> 709 </form> 710 </div> 711 </div> 712 </div> 713 714 </div> 715 716 <link rel="stylesheet" href="/Files/Templates/Designs/Jks/assets/live/style.css?v=1.3" type="text/css"> 717 <!--Snippet(stylesheets)--> 718 <!-- Scripts --> 719 @{ 720 string siteAreaId = GetGlobalValue("Global:Area.ID"); 721 string languageid = GetGlobalValue("Global:Area.Lang"); 722 var departments2 = Jks.ViewModels.Departments.GetAllDepartments(true, siteAreaId); 723 string device = GetGlobalValue("Global:Device.IsMobile"); 724 } 725 <script type="text/javascript"> 726 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"}]}]; 727 var forgetlocation = true; 728 var infoWindow = null; 729 var markers = []; 730 var map = null; 731 var markerIcon = "/Files/Templates/Designs/Jks/assets/live/img/map_marker.png"; 732 var cMapMarker = null; 733 var cMap = null; 734 var cContactPage = null; 735 736 var res = function() 737 { 738 if( $('#contact-map').length > 0 ) 739 { 740 $('#contact-map').css('height',$('.department-contact').height() ); 741 } 742 743 if( map != null ) 744 { 745 if( $(window).width() <= 992 ) 746 { 747 map.setOptions({draggable: false}); 748 } else { map.setOptions({draggable: true}); } 749 } 750 }; 751 752 function setNewContactMap() { 753 if( $('#contact-map').length > 0 && cMap != null ) 754 { 755 var NewCenter = new google.maps.LatLng( 756 $('#contact-map').attr('data-lat'), 757 $('#contact-map').attr('data-lng') 758 ); 759 760 cContactPage = $('#contact-map').attr('data-page'); 761 762 cMap.setCenter(NewCenter); 763 cMapMarker.setPosition( NewCenter ); 764 } 765 } 766 767 function initMap(what) { 768 769 if( $('#contact-map').length > 0 ) 770 { 771 console.log( $('#contact-map').attr('data-lat') ); 772 773 if( $('#contact-map').attr('data-lat') == "{{dep[lat]}}" ) 774 { 775 setTimeout( function() { initMap("cm"); }, 200 ); 776 } else { 777 778 cContactPage = $('#contact-map').attr('data-page'); 779 780 var MyCenter = new google.maps.LatLng( 781 $('#contact-map').attr('data-lat'), 782 $('#contact-map').attr('data-lng') 783 ); 784 785 786 cMap = new google.maps.Map(document.getElementById('contact-map'), { 787 zoom: 12, 788 center: MyCenter, 789 styles : mapStyle, 790 draggable: false, 791 mapTypeControl : false, 792 }); 793 794 res(); 795 796 cMapMarker = new google.maps.Marker({ 797 position: MyCenter, 798 map: cMap, 799 icon: markerIcon, 800 }); 801 802 cMapMarker.addListener('click', function() { 803 if( cContactPage != null ) 804 location.href=cContactPage; 805 else 806 alert("Desværre, der skete en fejl."); 807 }); 808 } 809 810 } 811 812 if( typeof(what) != "undefined" && what == "cm" ) 813 return; 814 815 if( $('#map').length > 0 ) 816 { 817 infoWindow = new google.maps.InfoWindow({}); 818 var dkCenter = { lat: 56.263920, lng: 9.501785 }; 819 var noCenter = { lat: 61.4720, lng: 8.5 }; 820 var seCenter = { lat: 57, lng: 13.5 }; 821 var mapCoords = dkCenter; 822 var mapZoom = 0; 823 switch ("@languageid") { 824 case "da": 825 mapZoom = 7; 826 mapCoords = dkCenter; 827 break; 828 case "nn": 829 mapZoom = 5.75; 830 mapCoords = noCenter; 831 break; 832 case "sv": 833 mapZoom = 6; 834 mapCoords = seCenter; 835 break; 836 } 837 map = new google.maps.Map(document.getElementById('map'), { 838 zoom: mapZoom, 839 center: mapCoords, 840 styles : mapStyle, 841 draggable: true, 842 mapTypeControl : false, 843 }); 844 845 res(); 846 847 $.each(departments, function(i,v) { 848 849 var depMark = new google.maps.Marker({ 850 position: { lat: parseFloat( v.latitude ), lng: parseFloat( v.longitude ) }, 851 map: map, 852 icon: markerIcon, 853 }); 854 depMark.addListener('mouseover', function() { 855 856 var template = $('#contentWindowHtml').html(); 857 template = template.split("{{name}}").join(v.name) 858 .split("{{address}}").join(v.address) 859 .split("{{zip}}").join(v.zip) 860 .split("{{city}}").join(v.city) 861 .split("{{phone}}").join(v.phone) 862 .split("{{fax}}").join(v.fax) 863 .split("{{email}}").join(v.email) 864 .split("{{pageurl}}").join(v.page); 865 866 //Closing previous. 867 infoWindow.close(); 868 869 infoWindow = new google.maps.InfoWindow({ 870 content: template 871 }); 872 873 infoWindow.open(map, depMark); 874 }); 875 }); 876 } 877 } 878 @if( GetString("LongLang").Substring(0,2).ToUpper() != "DA" ) 879 { 880 <text> 881 var forgetlocation = true; 882 </text> 883 } 884 885 var departments = [ 886 @foreach( var dep in departments2 ) 887 { 888 if( 889 dep.DepartmentId.Equals("357") || 890 dep.DepartmentId.Equals("299") || 891 dep.DepartmentId.Equals("400") || 892 dep.DepartmentId.Equals("199") ) 893 { 894 continue; 895 } 896 897 var consultants = Jks.ViewModels.Consultants.GetConsultantsByDepartmentId(dep.DepartmentId, GetGlobalValue("Global:Area.ID")); 898 var consultant = consultants.FirstOrDefault(x => x.HasCareer()); 899 900 if( consultant == null ) 901 { 902 consultant = consultants.FirstOrDefault(); 903 } 904 905 if( consultant != null ) 906 { 907 908 string pP = "/Files/Templates/Designs/Jks/assets/live/img/default_job.jpg"; 909 910 var cId = consultant.ConsultantId; 911 string pN = String.Format("{0}.jpg", cId); 912 913 // Make picture reference case-insensitive 914 pN = consultantPictures.Where(x => x.ToLower() == pN.ToLower()).FirstOrDefault(); 915 916 if (pN != null) { 917 pP = String.Format("{0}/{1}", virtConsultantsDirPath, pN); 918 } 919 920 string img = "/Admin/Public/GetImage.ashx?Image="+pP+"&Format=jpg&Width=584&Height=400&Compression=99"; 921 922 923 try { 924 string[] latlng = dep.LatLong.Split(','); 925 <text> 926 { 927 "id" : '@(dep.DepartmentId)', 928 "name" : '@(dep.WebName)', 929 "city" : '@(dep.City)', 930 "zip" : '@(dep.PostalCode)', 931 "region" : '@(dep.Region)', 932 "address" : '@(dep.Address)', 933 "email" : '@(dep.Email)', 934 "phone" : '@(dep.Phone)', 935 "fax" : '@(dep.Fax)', 936 "municipality" : '@(dep.Municipality)', 937 "latitude" : '@(latlng[0])', 938 "longitude" : '@(latlng[1])', 939 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )', 940 "contact" : { 941 "name" : '@(consultant.Name)', 942 "title" : '@(consultant.Title)', 943 "phone" : '@(consultant.Phone)', 944 "mobile_phone" : '@(consultant.MobilePhone)', 945 "email" : '@(consultant.Email)', 946 "image" : '@(img)', 947 "career" : '@("assets/live/img/" + (consultant.HasCareer() ? "jks-career-icon.png" : "jks-staffing-icon.png") )' 948 } 949 }, 950 </text> 951 } catch(Exception) {} 952 } 953 else 954 { 955 string[] latlng = dep.LatLong.Split(','); 956 <text> 957 { 958 "id" : '@(dep.DepartmentId)', 959 "name" : '@(dep.WebName)', 960 "city" : '@(dep.City)', 961 "zip" : '@(dep.PostalCode)', 962 "region" : '@(dep.Region)', 963 "address" : '@(dep.Address)', 964 "email" : '@(dep.Email)', 965 "phone" : '@(dep.Phone)', 966 "fax" : '@(dep.Fax)', 967 "municipality" : '@(dep.Municipality)', 968 "latitude" : '@(latlng[0])', 969 "longitude" : '@(latlng[1])', 970 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )' 971 }, 972 </text> 973 } 974 } 975 ]; 976 </script> 977 978 <script type="text/javascript" src="/Files/Templates/Designs/Jks/assets/live/main.js"></script> 979 <script type="text/javascript"> 980 function setCookie(cname, cvalue, exdays) { 981 var d = new Date(); 982 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 983 var expires = "expires=" + d.toUTCString(); 984 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 985 } 986 987 function getCookie(cname) { 988 var name = cname + "="; 989 var decodedCookie = decodeURIComponent(document.cookie); 990 var ca = decodedCookie.split(';'); 991 for (var i = 0; i < ca.length; i++) { 992 var c = ca[i]; 993 while (c.charAt(0) == ' ') { 994 c = c.substring(1); 995 } 996 if (c.indexOf(name) == 0) { 997 return c.substring(name.length, c.length); 998 } 999 } 1000 return ""; 1001 } 1002 1003 1004 $(function () { 1005 1006 $('.mobile-navigation li').on('click', function (event) { 1007 var $this = $(this); 1008 1009 if ($this.find('.mobile-level-2').length > 0 && !$this.hasClass("clicked")) { 1010 event.preventDefault(); 1011 1012 var level2 = $this.find('.mobile-level-2'); 1013 $this.addClass("clicked"); 1014 level2.slideDown(); 1015 } 1016 1017 }); 1018 1019 $('#contact-map').css('height', $('.department-contact').height()); 1020 1021 $('#site-wrapper').fadeIn('medium'); 1022 1023 $(window).resize(res); 1024 1025 if (getCookie("cookieAccepted") != "") { 1026 1027 } else { 1028 $('.cookie-notice').fadeIn(); 1029 $('#cookie-accept').click(function () { 1030 $('.cookie-notice').stop().fadeOut(); 1031 setCookie("cookieAccepted", "true", 365); 1032 //localStorage.setItem("cookieaccepted","true"); 1033 //alert("Hola"); 1034 1035 }); 1036 } 1037 1038 /*if (typeof(Storage) !== "undefined") { 1039 if (localStorage.cookieaccepted) { 1040 1041 } else { 1042 $('.cookie-notice').fadeIn(); 1043 1044 } 1045 } else { 1046 $('.cookie-notice').fadeIn(); 1047 $('#cookie-accept').hide(); 1048 }*/ 1049 1050 1051 }); 1052 </script> 1053 <script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyATlsQNnFk0v_xH3IpLUdHgYPiND5nS1lE&callback=initMap"></script> 1054 <!--@Snippet(javascripts)--> 1055 1056 1057 <div class="cookie-notice"> 1058 <div class="notice"> 1059 @Translate("cookie_text", "Websitet anvender cookies til at huske dine indstillinger og statistik. Denne information deles med tredjepart.")<br><br> 1060 <input type="button" class="btn btn-primary" value="Accepter" id="cookie-accept"> 1061 </div> 1062 1063 @if (ShowSiteOverlayEntry && siteOverlayEntries.Count > 0 && Convert.ToInt32(GetGlobalValue("Global:Page.ID")) == 525) 1064 { 1065 <div class="site-entry-overlay__shade"></div> 1066 <div class="site-entry-overlay"> 1067 <a href="javascript:void(0)" class="fa fa-times-circle site-entry-overlay__close"></a> 1068 <div class="container"> 1069 <div class="row"> 1070 <div class="col-xs-12"> 1071 @foreach (var item in siteOverlayEntries) 1072 { 1073 <div class="site-entry-overlay__item"> 1074 <img src='@item.GetString("Item.Area.SiteOverlayEntries.Image")' class="hidden-xs hidden-sm"> 1075 <div class="h2">@item.GetString("Item.Area.SiteOverlayEntries.Headline")</div> 1076 <p class="hidden-xs"> 1077 @item.GetString("Item.Area.SiteOverlayEntries.Content") 1078 </p> 1079 <a href='@item.GetString("Item.Area.SiteOverlayEntries.Link")' class="button">@item.GetString("Item.Area.SiteOverlayEntries.LinkText")</a> 1080 </div> 1081 } 1082 </div> 1083 </div> 1084 1085 </div> 1086 1087 </div> 1088 } 1089 1090 <!-- Conversion Pixel - JKS - Afledt Trafik - DO NOT MODIFY --> 1091 <img src="https://secure.adnxs.com/px?id=1112313&t=2" width="1" height="1" style="display:none"> 1092 <!-- End of Conversion Pixel --> 1093 1094 </div></body> 1095 </html> 1096