Error executing template "Designs/Jks/_parsed/jobview.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_1b0cfe472d2641bead27b6ed07297a9d.Execute() in D:\Web\jks.dk\Files\Templates\Designs\Jks\_parsed\jobview.parsed.cshtml:line 1155
   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.Rendering; 436 @using System.Web; 437 @using ClientiCoreDotNet.Extensions.String 438 439 @using Dynamicweb.Content 440 @using Dynamicweb.Content.Files.Metadata 441 @using Dynamicweb.Core 442 @using Jks.ViewModel.Department 443 444 445 @GetValue("Title(Jobview template)") 446 @GetValue("Description(Use this page to display pages.)") 447 448 @{ 449 HttpContext context = HttpContext.Current; 450 var MyUrl = context.Request.Url.ToString(); 451 string UrlRelative = "https://" + HttpContext.Current.Request.Url.Host + Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl(GetInteger("DwPageID")); 452 string fromArchive = Dynamicweb.Core.Converter.ToString(context.Request.QueryString["archive"]); 453 string areaId = GetGlobalValue("Global:Area.ID"); 454 string metaDescription = string.IsNullOrEmpty(GetValue("Item.Subtitle").ToString()) ? GetValue("Item.Description").ToString().StripHtml().TruncateHtml(80, "...") : GetValue("Item.Subtitle").ToString().TruncateHtml(80, "..."); 455 456 457 if (String.IsNullOrEmpty(fromArchive)) 458 { 459 if (DateTime.Now > GetDate("Item.ActiveTo").AddDays(1).Date.AddMinutes(1)) 460 { 461 try 462 { 463 context.Response.Redirect("/" + GetValue("Item.Area.JobNotFoundPage").ToString(), true); 464 } 465 catch 466 { 467 //ignore 468 } 469 context.Response.End(); 470 } 471 } 472 473 //jobimageurl for facebook 474 string jobImageUrl = GetString("Item.ImageUrl"); 475 if (string.IsNullOrEmpty(jobImageUrl)) 476 { 477 jobImageUrl = "https://jks.dk" + Jks.ViewModels.Jobs.GetJobImageUrlByIndustry(GetString("Item.Industry")); 478 } 479 else 480 { 481 string imageFileName = "/Files/Images/Job_Billeder/job_" + GetInteger("DwPageID") + ".png"; 482 var imageFileNameMappath = HttpContext.Current.Request.MapPath(imageFileName); 483 if (System.IO.File.Exists(imageFileNameMappath)) 484 { 485 DateTime lastWriteTime = System.IO.File.GetLastWriteTime(imageFileNameMappath); 486 if (lastWriteTime < DateTime.Now.AddHours(-6)) 487 { 488 ShopJKS.AddIns.ProductImportStarkAddIn.DownloadRemoteImageFile(jobImageUrl, imageFileNameMappath); 489 } 490 } 491 else 492 { 493 ShopJKS.AddIns.ProductImportStarkAddIn.DownloadRemoteImageFile(jobImageUrl, imageFileNameMappath); 494 } 495 jobImageUrl = "https://" + HttpContext.Current.Request.Url.Host + imageFileName; 496 } 497 jobImageUrl = jobImageUrl + "?timestamp=" + DateTime.Now.ToString("yyyyMMddHHmmssffff"); 498 499 500 } 501 <!--@SnippetStart(Meta)--> 502 <meta property="og:site_name" content="www.jks.dk"> 503 <meta property="og:url" content="@(MyUrl)"> 504 <meta property="og:type" content="article"> 505 <meta property="og:title" content='@GetValue("Item.Title")'> 506 <meta property="og:description" content="@metaDescription"> 507 <meta property="og:image" content="@(jobImageUrl)"> 508 <meta property="og:image:width" content="480"> 509 <meta property="og:image:height" content="250"> 510 @if (!String.IsNullOrEmpty(fromArchive)) 511 { 512 <link rel="canonical" href="@UrlRelative"> 513 } 514 <!--@SnippetEnd(Meta)--> 515 516 517 <div class="section double-padding-top double-padding-bottom colortransparent" style="background-color:transparent;"> 518 <div class="container"> 519 <div class="row text-content pure-text"> 520 521 <div class="col-md-4"> 522 <div class="info-container"> 523 <p class="description">@(Translate("info_company", "Info om virksomheden der søger medarbejder"))</p> 524 <div class="row"> 525 <div class="col-md-6"> 526 <b>@(Translate("workplace", "Arbejdssted")):</b> 527 </div> 528 <div class="col-md-6"> 529 @(GetValue("Item.Work_City")) 530 </div> 531 </div> 532 <div class="row"> 533 <div class="col-md-6"> 534 <b>@(Translate("created_at", "Oprettet")):</b> 535 </div> 536 <div class="col-md-6"> 537 @(GetDate("Item.ActiveFrom").ToString("dd.MM.yy")) 538 </div> 539 </div> 540 <div class="row"> 541 <div class="col-md-6"> 542 <b>@(Translate("end_at", "Udløber")):</b> 543 </div> 544 <div class="col-md-6"> 545 @(GetDate("Item.ActiveTo").ToString("dd.MM.yy")) 546 </div> 547 </div> 548 <div class="row"> 549 <div class="col-md-6"> 550 <b>@(Translate("industry", "Branche")):</b> 551 </div> 552 <div class="col-md-6"> 553 @if (areaId != "1") 554 { 555 @Translate((GetString("Item.Industry"))) 556 } 557 else 558 { 559 @(GetString("Item.Industry")) 560 } 561 </div> 562 </div> 563 <div class="row"> 564 <div class="col-md-6"> 565 <b>@(Translate("jobtype", "Jobtype")):</b> 566 </div> 567 <div class="col-md-6"> 568 @( (GetString("Item.Job_Type") == "Rekruttering" ? "Fastansættelse" : GetString("Item.Job_Type")) ) 569 </div> 570 </div> 571 <div class="row"> 572 <div class="col-md-6"> 573 <b>@(Translate("category", "Jobtype")):</b> 574 </div> 575 <div class="col-md-6"> 576 @(GetValue("Item.Category")) 577 578 </div> 579 </div> 580 </div> 581 582 @{ 583 var departmentIdSplitByComma = GetString("Item.Department_ID").Split(',').First(); 584 var department = Jks.ViewModels.Departments.GetDepartmentById(departmentIdSplitByComma); 585 586 //easy fix to get it to work with udland, that is unpublished 587 if (department == null && (departmentIdSplitByComma == "357" || departmentIdSplitByComma == "179" || departmentIdSplitByComma == "999")) 588 { 589 590 var clientiPageService = new ClientiDw9.Services.PageService(); 591 var pagesAllDepartments = clientiPageService.GetPagesByParentID(2); 592 593 int pageToLookFor = 502; 594 if (departmentIdSplitByComma == "999") 595 { 596 pageToLookFor = 12503; 597 } 598 var departmentPage = pagesAllDepartments.FirstOrDefault(page => page.Id.Equals(pageToLookFor)); 599 600 department = new JksDepartmentPage(departmentPage); 601 } 602 603 604 } 605 @if (department != null && departmentIdSplitByComma != "999") 606 { 607 <text> 608 <div class="info-container"> 609 <div class="row"> 610 <div class="col-md-6"> 611 <b>@(Translate("contactinformation", "Kontaktoplysninger"))</b> 612 </div> 613 @if (GetBoolean("Item.Contact_Data")) 614 { 615 <div class="col-md-6"> 616 <b>@(Translate("contactperson", "Kontaktperson"))</b> 617 </div> 618 } 619 </div> 620 <div class="row text-content"> 621 @{ 622 623 <text> 624 <div class="col-md-6 make-nice"> 625 <p>JKS @(department.City)</p> 626 <p>@(department.Address)</p> 627 <p>@(department.PostalCode) @(department.City)</p> 628 <p>@(Translate("phone_short", "Tlf")): @(department.Phone)</p> 629 <p><a href='mailto:@(department.Email)'>@(department.Email)</a></p> 630 </div> 631 632 @if (GetBoolean("Item.Contact_Data") && GetLoop("Item.Consultant").Count() > 0) 633 { 634 var consultant = GetLoop("Item.Consultant").First(); 635 636 <div class="col-md-6 make-nice"> 637 <text> 638 <p>@(consultant.GetValue("Item.Consultant.Name"))</p> 639 <p>@(consultant.GetValue("Item.Consultant.Title"))</p> 640 <p> 641 <b>T:</b> @(consultant.GetValue("Item.Consultant.Phone")) 642 </p> 643 644 @if (!string.IsNullOrEmpty(consultant.GetString("Item.Consultant.Mobile_Phone"))) 645 { 646 <p> 647 <b>M:</b> @(consultant.GetValue("Item.Consultant.Mobile_Phone")) 648 </p> 649 } 650 651 <p> 652 <a href='mailto:@(consultant.GetValue("Item.Consultant.Email"))' class="blue" title='@(Translate("mail_to", "Skriv en mail til")) @(consultant.GetValue("Item.Consultant.Name"))'>@(consultant.GetValue("Item.Consultant.Email"))</a> 653 </p> 654 </text> 655 </div> 656 } 657 </text> 658 659 660 } 661 </div> 662 </div> 663 </text> 664 } 665 666 </div> 667 668 <div class="col-md-7 col-md-push-1 job-text"> 669 670 <h1 class="subline blue">@(GetValue("Item.Title"))</h1> 671 <h2 class="subline">@(GetValue("Item.Subtitle"))</h2> 672 @(GetValue("Item.Description")) 673 @{ 674 string applicationUrl = GetString("Item.ApplicationUrl"); 675 676 if (GetString("Item.IsApplicationUrlVisible").Equals(true.ToString()) && applicationUrl.IsNotNullOrEmpty()) //would use viewmodel, but it is not easily available here. 677 { 678 679 <div class="row"> 680 <div class="col-xs-12"> 681 <a href="@(applicationUrl)" target="_blank" class="button">@(Translate("apply_for_job", "Søg jobbet").Trim())</a> 682 <br><br> 683 </div> 684 </div> 685 } 686 else if (GetString("Item.IsCVUrlVisible").Equals(true.ToString())) 687 { 688 <div class="row"> 689 <div class="col-xs-12"> 690 <a href="/cv" target="_blank" class="button">@(Translate("create_cv", "Opret dit CV").Trim())</a> 691 <br><br> 692 </div> 693 </div> 694 } 695 } 696 <div class="row"> 697 <div class="col-xs-12"> 698 <b>@(Translate("share_icons_jobview", "Del dette jobopslag") )</b><br><br> 699 </div> 700 </div> 701 <div class="row"> 702 <div class="col-xs-12"> 703 <a href="javascript:" onclick="linkedinShare();" title="Del på LinkedIn" alt="Del på LinkedIn"> 704 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Linkedin.png"> 705 </a>&nbsp;&nbsp; 706 <a href="javascript:" onclick="facebookShare();" title="Del på facebook" alt="Del på facebook"> 707 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Facebook.png"> 708 </a>&nbsp;&nbsp; 709 <a href='mailto:?subject=@(GetString("Item.Title"))&body=Lige nu har vi dette spændende stillingsopslag på jks.dk – se det her: @(UrlRelative)%0D%0A%0D%0ASe alle vores stillingsopslag på jks.dk, hvor du også kan oprette dit cv og finde dit nærmeste JKS lokalkontor.%0D%0A%0D%0AMed venlig hilsen%0D%0A%0D%0AJKS' title="Send pr. mail" alt="Send pr. mail"> 710 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Mail.png"> 711 </a>&nbsp;&nbsp; 712 <a href="@(UrlRelative)?pdf=true&LayoutTemplate=Designs/Jks/jobview_print_template.cshtml&leftRightMargin=1&topBottomMargin=0" target="_blank" title="Print jobopslag" alt="Print jobopslag"> 713 <img width="32px" height="32px" src="/Files/Templates/Designs/Jks/assets/live/img/icons/Print.png"> 714 </a> 715 </div> 716 </div> 717 718 <br><br> 719 @*@(Translate("extra_job_info"))*@ 720 </div> 721 722 723 724 725 <!--@SnippetStart(javascripts)--> 726 <script type="text/javascript"> 727 function linkedinShare() { 728 var MainUrl = 'https://www.linkedin.com/shareArticle?url=@(UrlRelative)&mini=true&title=@(GetString("Item.Title"))&summary=@(GetString("Item.Short_Description"))'; 729 730 popitup(MainUrl); 731 } 732 733 function facebookShare() { 734 var MainUrl = 'https://www.facebook.com/sharer/sharer.php?u=@(UrlRelative)'; 735 popitup(MainUrl); 736 } 737 738 function popitup(url) { 739 newwindow=window.open(url,'@(GetString("Item.Title"))','height=460,width=670'); 740 if (window.focus) {newwindow.focus()} 741 return false; 742 } 743 744 </script> 745 746 747 748 <!--@SnippetEnd(javascripts)--> 749 @* <div class="row"> 750 <div class="col-md-7 col-md-push-5"> 751 752 <!--Facebook--> 753 <div style="float:left;padding:5px;" class="fb-share-button" data-href="https://www.jks.dk/Default.aspx?ID=3" data-layout="button" data-size="small" data-mobile-iframe="true"><a class="fb-xfbml-parse-ignore" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fwww.jks.dk%2FDefault.aspx%3FID%3D3&amp;src=sdkpreparse"><img src="http://placehold.it/42?text=FB"></a></div> 754 755 <!--Linkedin--> 756 <div style="float:left;padding:5px;"> 757 <a href="#"><img src="http://placehold.it/42?text=LI"></a> 758 </div> 759 760 <!--Email--> 761 <div style="float:left;padding:5px;"><a href="mailto:info@example.com?subject=JKS - job annonce"><img src="http://placehold.it/42?text=placehold.it+Email"></a></div> 762 763 <!--Download--> 764 <div style="float:left;padding:5px;"><a href="https://www.jks.dk/Default.aspx?ID=3" download=""><img src="http://placehold.it/42?text=placehold.it+DW"></a></div> 765 766 </div><!--/col-md-7--> 767 </div><!--/row--> *@ 768 769 770 771 <!--Facebook--> 772 <div id="fb-root"></div> 773 <script> 774 (function (d, s, id) { 775 var js, fjs = d.getElementsByTagName(s)[0]; 776 if (d.getElementById(id)) return; 777 js = d.createElement(s); js.id = id; 778 js.src = "//connect.facebook.net/da_DK/sdk.js#xfbml=1&version=v2.9"; 779 fjs.parentNode.insertBefore(js, fjs); 780 }(document, 'script', 'facebook-jssdk'));</script> 781 </div> 782 </div> 783 </div> 784 785 786 <div class="wrapper" id="main-content">@GetValue("DwContent(maincontent)")</div> 787 <script type="text/javascript"> 788 var forgetlocation = true; 789 </script> 790 791 @{ 792 string urlEncodedIndustry = HttpContext.Current.Server.UrlEncode(GetString("Item.Industry")); 793 string urlAdformImage = "https://track.adform.net/Serving/TrackPoint/?pm=1419027&ADFPageName=" + urlEncodedIndustry + "&ADFdivider=|"; 794 } 795 796 <!-- Adform Tracking Code BEGIN --> 797 <script type="text/javascript"> 798 window._adftrack = Array.isArray(window._adftrack) ? window._adftrack : (window._adftrack ? [window._adftrack] : []); 799 window._adftrack.push({ 800 pm: 1419027, 801 divider: encodeURIComponent('|'), 802 pagename: encodeURIComponent('@GetString("Item.Industry")') 803 }); 804 (function () { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = 'https://track.adform.net/serving/scripts/trackpoint/async/'; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })(); 805 806 </script> 807 <noscript> 808 <p style="margin:0;padding:0;border:0;"> 809 <img src="@urlAdformImage" width="1" height="1" alt=""> 810 </p> 811 </noscript> 812 <!-- Adform Tracking Code END --> 813 </div> 814 815 816 817 @if (GetBoolean("Item.VisAfdelingskontakt")) 818 { 819 <div class="section double-padding-top double-padding-bottom your-contact require-department"> 820 <div class="container"> 821 <div class="row"> 822 <div class="col-md-3 department-contact"> 823 <div class="inner-cta-contact"> 824 <h3>Kontakt din lokale afdeling</h3><br> 825 <p> 826 <b><span data-depinfo="name"></span></b><br> 827 <span data-depinfo="address"></span><br> 828 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br><br> 829 T: <span data-depinfo="phone"></span><br> 830 F: <span data-depinfo="fax"></span><br> 831 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a><br><br> 832 <div class="ctas text-left"> 833 <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> 834 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#openings" target="_blank">Se ledige stillinger tæt på dig</a><br> 835 <a class="link-arrow basic" data-depreplace="" href="{{dep[page]}}#contacts" target="_blank">Se medarbejdere her</a> 836 </div> 837 </p> 838 </div> 839 </div> 840 841 <div class="col-md-9"> 842 <div id="contact-map" data-depreplace="" data-page="{{dep[page]}}" data-lat="{{dep[lat]}}" data-lng="{{dep[lng]}}"></div> 843 </div> 844 </div> 845 </div> 846 <div class="clearfix"></div> 847 </div> 848 } 849 850 <div class="section coloreeeeee double-padding-top double-padding-bottom main-footer" style="background-color:#eeeeee;"> 851 <div class="container"> 852 853 854 @if (!string.IsNullOrEmpty(footerContentLeft) || !string.IsNullOrEmpty(footerContentMid) || !string.IsNullOrEmpty(footerContentRight)) 855 { 856 857 <div class="row footer-grid"> 858 859 <div class="col-md-2">@footerContentLeft</div> 860 861 <div class="col-md-8 middle">@footerContentMid</div> 862 863 <div class="col-md-2">@footerContentRight</div> 864 865 </div> 866 867 } 868 869 </div> 870 </div> 871 </div> 872 </div> 873 874 875 876 877 878 <div class="department-picker-modal"> 879 <div class="inner"> 880 <h4>Din lokale afdeling er<br><span data-depinfo="name"></span></h4> 881 <p>Er denne oplysning korrekt klik på "ok" eller find din lokale afdeling ved at klikke på "find afdeling"</p> 882 883 <select name="new-department" class="new-department"> 884 <option>Find afdeling</option> 885 @{int depIndex = 0; 886 } 887 @foreach (var dep in departments) 888 { 889 if ( 890 dep.DepartmentId.Equals("357") || 891 dep.DepartmentId.Equals("299") || 892 dep.DepartmentId.Equals("400")) 893 { 894 continue; 895 } 896 try 897 { 898 <text> 899 <option value='@(depIndex)'>@(dep.City)</option> 900 </text>depIndex++; 901 } 902 catch (Exception e) { } 903 } 904 </select> 905 906 <a href="javascript:" class="button close-department-picker">OK</a> 907 </div> 908 </div> 909 910 <div class="initial-department-picker-modal"> 911 <div class="inner"> 912 <h4>Vælg venligst din nærmeste afdeling</h4> 913 <p>Vi kunne desværre ikke finde din nærmeste afdeling automatisk. Vælg din afdeling på listen herunder.</p> 914 915 <select name="new-department" class="new-department"> 916 <option>Find afdeling</option> 917 @{int depIndex2 = 0; 918 } 919 @foreach (var dep in departments) 920 { 921 if ( 922 dep.DepartmentId.Equals("357") || 923 dep.DepartmentId.Equals("299") || 924 dep.DepartmentId.Equals("400")) 925 { 926 continue; 927 } 928 try 929 { 930 <text> 931 <option value='@(depIndex2)'>@(dep.City)</option> 932 </text>depIndex2++; 933 } 934 catch (Exception e) { } 935 } 936 </select> 937 938 <a href="javascript:" class="button close-initial-department-picker">OK</a> 939 </div> 940 </div> 941 <div class="department-info-window require-department"> 942 <div class="toolbar open-close-department"> 943 <ul> 944 <li> 945 <h4>Din lokale JKS afdeling</h4> 946 </li> 947 <li> 948 <i class="fa fa-minus open-close-icon" aria-hidden="true"></i> 949 </li> 950 </ul> 951 </div> 952 <div class="content"> 953 954 <h4 data-depinfo="name"></h4> 955 <p> 956 <span data-depinfo="address"></span><br> 957 <span data-depinfo="zip"></span> <span data-depinfo="name"></span><br> 958 T: <span data-depinfo="phone"></span><br> 959 <a href="mailto:{{dep[email]}}" data-depreplace="">{{dep[email]}}</a> 960 961 <br> 962 <a data-depreplace="" href='{{dep[page]}}'>Se medarbejdere her</a> 963 <br> 964 <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> 965 966 <a href="javascript:" class="open-department-picker">Skift afdeling</a> 967 </p> 968 </div> 969 </div> 970 971 972 <div id="search-overlay"> 973 <div class="inner"> 974 <div class="centered"> 975 <form action='/Default.aspx' id="search-form" method="GET"> 976 <input type="hidden" name="ID" value='@GetValue("Item.Area.S_gesideId")'> 977 <input type="text" id="search-string" name="q" placeholder='@(Translate("search_string","Indtast søgeord"))'><input type="submit" value='@(Translate("search","Søg"))'> 978 </form> 979 </div> 980 </div> 981 </div> 982 983 </div> 984 985 <link rel="stylesheet" href="/Files/Templates/Designs/Jks/assets/live/style.css?v=1.3" type="text/css"> 986 <!--Snippet(stylesheets)--> 987 <!-- Scripts --> 988 @{ 989 string siteAreaId = GetGlobalValue("Global:Area.ID"); 990 string languageid = GetGlobalValue("Global:Area.Lang"); 991 var departments2 = Jks.ViewModels.Departments.GetAllDepartments(true, siteAreaId); 992 string device = GetGlobalValue("Global:Device.IsMobile"); 993 } 994 <script type="text/javascript"> 995 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"}]}]; 996 var forgetlocation = true; 997 var infoWindow = null; 998 var markers = []; 999 var map = null; 1000 var markerIcon = "/Files/Templates/Designs/Jks/assets/live/img/map_marker.png"; 1001 var cMapMarker = null; 1002 var cMap = null; 1003 var cContactPage = null; 1004 1005 var res = function() 1006 { 1007 if( $('#contact-map').length > 0 ) 1008 { 1009 $('#contact-map').css('height',$('.department-contact').height() ); 1010 } 1011 1012 if( map != null ) 1013 { 1014 if( $(window).width() <= 992 ) 1015 { 1016 map.setOptions({draggable: false}); 1017 } else { map.setOptions({draggable: true}); } 1018 } 1019 }; 1020 1021 function setNewContactMap() { 1022 if( $('#contact-map').length > 0 && cMap != null ) 1023 { 1024 var NewCenter = new google.maps.LatLng( 1025 $('#contact-map').attr('data-lat'), 1026 $('#contact-map').attr('data-lng') 1027 ); 1028 1029 cContactPage = $('#contact-map').attr('data-page'); 1030 1031 cMap.setCenter(NewCenter); 1032 cMapMarker.setPosition( NewCenter ); 1033 } 1034 } 1035 1036 function initMap(what) { 1037 1038 if( $('#contact-map').length > 0 ) 1039 { 1040 console.log( $('#contact-map').attr('data-lat') ); 1041 1042 if( $('#contact-map').attr('data-lat') == "{{dep[lat]}}" ) 1043 { 1044 setTimeout( function() { initMap("cm"); }, 200 ); 1045 } else { 1046 1047 cContactPage = $('#contact-map').attr('data-page'); 1048 1049 var MyCenter = new google.maps.LatLng( 1050 $('#contact-map').attr('data-lat'), 1051 $('#contact-map').attr('data-lng') 1052 ); 1053 1054 1055 cMap = new google.maps.Map(document.getElementById('contact-map'), { 1056 zoom: 12, 1057 center: MyCenter, 1058 styles : mapStyle, 1059 draggable: false, 1060 mapTypeControl : false, 1061 }); 1062 1063 res(); 1064 1065 cMapMarker = new google.maps.Marker({ 1066 position: MyCenter, 1067 map: cMap, 1068 icon: markerIcon, 1069 }); 1070 1071 cMapMarker.addListener('click', function() { 1072 if( cContactPage != null ) 1073 location.href=cContactPage; 1074 else 1075 alert("Desværre, der skete en fejl."); 1076 }); 1077 } 1078 1079 } 1080 1081 if( typeof(what) != "undefined" && what == "cm" ) 1082 return; 1083 1084 if( $('#map').length > 0 ) 1085 { 1086 infoWindow = new google.maps.InfoWindow({}); 1087 var dkCenter = { lat: 56.263920, lng: 9.501785 }; 1088 var noCenter = { lat: 61.4720, lng: 8.5 }; 1089 var seCenter = { lat: 57, lng: 13.5 }; 1090 var mapCoords = dkCenter; 1091 var mapZoom = 0; 1092 switch ("@languageid") { 1093 case "da": 1094 mapZoom = 7; 1095 mapCoords = dkCenter; 1096 break; 1097 case "nn": 1098 mapZoom = 5.75; 1099 mapCoords = noCenter; 1100 break; 1101 case "sv": 1102 mapZoom = 6; 1103 mapCoords = seCenter; 1104 break; 1105 } 1106 map = new google.maps.Map(document.getElementById('map'), { 1107 zoom: mapZoom, 1108 center: mapCoords, 1109 styles : mapStyle, 1110 draggable: true, 1111 mapTypeControl : false, 1112 }); 1113 1114 res(); 1115 1116 $.each(departments, function(i,v) { 1117 1118 var depMark = new google.maps.Marker({ 1119 position: { lat: parseFloat( v.latitude ), lng: parseFloat( v.longitude ) }, 1120 map: map, 1121 icon: markerIcon, 1122 }); 1123 depMark.addListener('mouseover', function() { 1124 1125 var template = $('#contentWindowHtml').html(); 1126 template = template.split("{{name}}").join(v.name) 1127 .split("{{address}}").join(v.address) 1128 .split("{{zip}}").join(v.zip) 1129 .split("{{city}}").join(v.city) 1130 .split("{{phone}}").join(v.phone) 1131 .split("{{fax}}").join(v.fax) 1132 .split("{{email}}").join(v.email) 1133 .split("{{pageurl}}").join(v.page); 1134 1135 //Closing previous. 1136 infoWindow.close(); 1137 1138 infoWindow = new google.maps.InfoWindow({ 1139 content: template 1140 }); 1141 1142 infoWindow.open(map, depMark); 1143 }); 1144 }); 1145 } 1146 } 1147 @if( GetString("LongLang").Substring(0,2).ToUpper() != "DA" ) 1148 { 1149 <text> 1150 var forgetlocation = true; 1151 </text> 1152 } 1153 1154 var departments = [ 1155 @foreach( var dep in departments2 ) 1156 { 1157 if( 1158 dep.DepartmentId.Equals("357") || 1159 dep.DepartmentId.Equals("299") || 1160 dep.DepartmentId.Equals("400") || 1161 dep.DepartmentId.Equals("199") ) 1162 { 1163 continue; 1164 } 1165 1166 var consultants = Jks.ViewModels.Consultants.GetConsultantsByDepartmentId(dep.DepartmentId, GetGlobalValue("Global:Area.ID")); 1167 var consultant = consultants.FirstOrDefault(x => x.HasCareer()); 1168 1169 if( consultant == null ) 1170 { 1171 consultant = consultants.FirstOrDefault(); 1172 } 1173 1174 if( consultant != null ) 1175 { 1176 1177 string pP = "/Files/Templates/Designs/Jks/assets/live/img/default_job.jpg"; 1178 1179 var cId = consultant.ConsultantId; 1180 string pN = String.Format("{0}.jpg", cId); 1181 1182 // Make picture reference case-insensitive 1183 pN = consultantPictures.Where(x => x.ToLower() == pN.ToLower()).FirstOrDefault(); 1184 1185 if (pN != null) { 1186 pP = String.Format("{0}/{1}", virtConsultantsDirPath, pN); 1187 } 1188 1189 string img = "/Admin/Public/GetImage.ashx?Image="+pP+"&Format=jpg&Width=584&Height=400&Compression=99"; 1190 1191 1192 try { 1193 string[] latlng = dep.LatLong.Split(','); 1194 <text> 1195 { 1196 "id" : '@(dep.DepartmentId)', 1197 "name" : '@(dep.WebName)', 1198 "city" : '@(dep.City)', 1199 "zip" : '@(dep.PostalCode)', 1200 "region" : '@(dep.Region)', 1201 "address" : '@(dep.Address)', 1202 "email" : '@(dep.Email)', 1203 "phone" : '@(dep.Phone)', 1204 "fax" : '@(dep.Fax)', 1205 "municipality" : '@(dep.Municipality)', 1206 "latitude" : '@(latlng[0])', 1207 "longitude" : '@(latlng[1])', 1208 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )', 1209 "contact" : { 1210 "name" : '@(consultant.Name)', 1211 "title" : '@(consultant.Title)', 1212 "phone" : '@(consultant.Phone)', 1213 "mobile_phone" : '@(consultant.MobilePhone)', 1214 "email" : '@(consultant.Email)', 1215 "image" : '@(img)', 1216 "career" : '@("assets/live/img/" + (consultant.HasCareer() ? "jks-career-icon.png" : "jks-staffing-icon.png") )' 1217 } 1218 }, 1219 </text> 1220 } catch(Exception) {} 1221 } 1222 else 1223 { 1224 string[] latlng = dep.LatLong.Split(','); 1225 <text> 1226 { 1227 "id" : '@(dep.DepartmentId)', 1228 "name" : '@(dep.WebName)', 1229 "city" : '@(dep.City)', 1230 "zip" : '@(dep.PostalCode)', 1231 "region" : '@(dep.Region)', 1232 "address" : '@(dep.Address)', 1233 "email" : '@(dep.Email)', 1234 "phone" : '@(dep.Phone)', 1235 "fax" : '@(dep.Fax)', 1236 "municipality" : '@(dep.Municipality)', 1237 "latitude" : '@(latlng[0])', 1238 "longitude" : '@(latlng[1])', 1239 "page" : '@( Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl("default.aspx?ID=" + dep.Id) )' 1240 }, 1241 </text> 1242 } 1243 } 1244 ]; 1245 </script> 1246 1247 <script type="text/javascript" src="/Files/Templates/Designs/Jks/assets/live/main.js"></script> 1248 <script type="text/javascript"> 1249 function setCookie(cname, cvalue, exdays) { 1250 var d = new Date(); 1251 d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000)); 1252 var expires = "expires=" + d.toUTCString(); 1253 document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/"; 1254 } 1255 1256 function getCookie(cname) { 1257 var name = cname + "="; 1258 var decodedCookie = decodeURIComponent(document.cookie); 1259 var ca = decodedCookie.split(';'); 1260 for (var i = 0; i < ca.length; i++) { 1261 var c = ca[i]; 1262 while (c.charAt(0) == ' ') { 1263 c = c.substring(1); 1264 } 1265 if (c.indexOf(name) == 0) { 1266 return c.substring(name.length, c.length); 1267 } 1268 } 1269 return ""; 1270 } 1271 1272 1273 $(function () { 1274 1275 $('.mobile-navigation li').on('click', function (event) { 1276 var $this = $(this); 1277 1278 if ($this.find('.mobile-level-2').length > 0 && !$this.hasClass("clicked")) { 1279 event.preventDefault(); 1280 1281 var level2 = $this.find('.mobile-level-2'); 1282 $this.addClass("clicked"); 1283 level2.slideDown(); 1284 } 1285 1286 }); 1287 1288 $('#contact-map').css('height', $('.department-contact').height()); 1289 1290 $('#site-wrapper').fadeIn('medium'); 1291 1292 $(window).resize(res); 1293 1294 if (getCookie("cookieAccepted") != "") { 1295 1296 } else { 1297 $('.cookie-notice').fadeIn(); 1298 $('#cookie-accept').click(function () { 1299 $('.cookie-notice').stop().fadeOut(); 1300 setCookie("cookieAccepted", "true", 365); 1301 //localStorage.setItem("cookieaccepted","true"); 1302 //alert("Hola"); 1303 1304 }); 1305 } 1306 1307 /*if (typeof(Storage) !== "undefined") { 1308 if (localStorage.cookieaccepted) { 1309 1310 } else { 1311 $('.cookie-notice').fadeIn(); 1312 1313 } 1314 } else { 1315 $('.cookie-notice').fadeIn(); 1316 $('#cookie-accept').hide(); 1317 }*/ 1318 1319 1320 }); 1321 </script> 1322 <script async="" defer="" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyATlsQNnFk0v_xH3IpLUdHgYPiND5nS1lE&callback=initMap"></script> 1323 <!--@Snippet(javascripts)--> 1324 1325 1326 <div class="cookie-notice"> 1327 <div class="notice"> 1328 @Translate("cookie_text", "Websitet anvender cookies til at huske dine indstillinger og statistik. Denne information deles med tredjepart.")<br><br> 1329 <input type="button" class="btn btn-primary" value="Accepter" id="cookie-accept"> 1330 </div> 1331 1332 @if (ShowSiteOverlayEntry && siteOverlayEntries.Count > 0 && Convert.ToInt32(GetGlobalValue("Global:Page.ID")) == 525) 1333 { 1334 <div class="site-entry-overlay__shade"></div> 1335 <div class="site-entry-overlay"> 1336 <a href="javascript:void(0)" class="fa fa-times-circle site-entry-overlay__close"></a> 1337 <div class="container"> 1338 <div class="row"> 1339 <div class="col-xs-12"> 1340 @foreach (var item in siteOverlayEntries) 1341 { 1342 <div class="site-entry-overlay__item"> 1343 <img src='@item.GetString("Item.Area.SiteOverlayEntries.Image")' class="hidden-xs hidden-sm"> 1344 <div class="h2">@item.GetString("Item.Area.SiteOverlayEntries.Headline")</div> 1345 <p class="hidden-xs"> 1346 @item.GetString("Item.Area.SiteOverlayEntries.Content") 1347 </p> 1348 <a href='@item.GetString("Item.Area.SiteOverlayEntries.Link")' class="button">@item.GetString("Item.Area.SiteOverlayEntries.LinkText")</a> 1349 </div> 1350 } 1351 </div> 1352 </div> 1353 1354 </div> 1355 1356 </div> 1357 } 1358 1359 <!-- Conversion Pixel - JKS - Afledt Trafik - DO NOT MODIFY --> 1360 <img src="https://secure.adnxs.com/px?id=1112313&t=2" width="1" height="1" style="display:none"> 1361 <!-- End of Conversion Pixel --> 1362 1363 </div></body> 1364 </html> 1365