Error executing template "Designs/rybners/_parsed/Rybners_course.parsed.cshtml"System.NullReferenceException: Object reference not set to an instance of an object.at CompiledRazorTemplates.Dynamic.RazorEngine_2ed0e738e4844b4980c652b1ce28cf95.Execute() in C:\inetpub\wwwroot\rybners.espresso4.dk\Files\Templates\Designs\rybners\_parsed\Rybners_course.parsed.cshtml:line 194at 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 Co3.Espresso.Website.TemplateBases.Pages.PageBase 2 @using System.IO 3 @using System.Web 4 @using System.Globalization 5 @using Dynamicweb.Frontend 6 @using Dynamicweb.Ecommerce.Common 7 @using Dynamicweb.Security.UserManagement 8 9 @{ 10 bool isUserAuthenticated = User.IsExtranetUserLoggedIn(); 11 12 string globalAreaLang = PageView.Current().Area.CultureInfo.TwoLetterISOLanguageName; 13 CultureInfo currencyCulture = new CultureInfo( Context.Currency.CultureInfo ); 14 string currencySeparatorDecimal = currencyCulture.NumberFormat.NumberDecimalSeparator; 15 string currencySeparatorInteger = currencyCulture.NumberFormat.NumberGroupSeparator; 16 string openGraphUrl = PageView.Current().SearchFriendlyUrl; 17 string openGraphImage = HttpContext.Current.Request.Url.Scheme + "://" + HttpContext.Current.Request.Url.Host + Espresso.OpenGraphImage; 18 bool loadGoogleTagManager = !string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) && 19 !(Espresso.Area.Item.GoogleTagManagerDisableIfPerformanceTestIsDetected == "True" && HttpContext.Current.Request.UserAgent.ToLower().Contains( "lighthouse" )); 20 21 string rybnersSchoolBodyClass = string.Empty; 22 // Skoler 23 24 if ( GetString( "Item.Area.TekniskSkole.Value" ) == GetString( "DwPageID_2" ) ) 25 { 26 rybnersSchoolBodyClass = "rybners-tekniskskole"; 27 } 28 if ( GetString( "Item.Area.Handelsskole.Value" ) == GetString( "DwPageID_2" ) ) 29 { 30 rybnersSchoolBodyClass = "rybners-handelsskole"; 31 } 32 if ( GetString( "Item.Area.EUX.Value" ) == GetString( "DwPageID_2" ) ) 33 { 34 rybnersSchoolBodyClass = "rybners-eux"; 35 } 36 if ( GetString( "Item.Area.Kursuscenter.Value" ) == GetString( "DwPageID_2" ) ) 37 { 38 rybnersSchoolBodyClass = "rybners-kursuscenter"; 39 } 40 if ( GetString( "Item.Area.HHXHandelsgymnasium.Value" ) == GetString( "DwPageID_2" ) ) 41 { 42 rybnersSchoolBodyClass = "rybners-hhxhandelsgymnasium"; 43 } 44 if ( GetString( "Item.Area.STXAlmentGymnasium.Value" ) == GetString( "DwPageID_2" ) ) 45 { 46 rybnersSchoolBodyClass = "rybners-stxalmentgymnasium"; 47 } 48 if ( GetString( "Item.Area.HTXTekniskGymnasium.Value" ) == GetString( "DwPageID_2" ) ) 49 { 50 rybnersSchoolBodyClass = "rybners-htxtekniskgymnasium"; 51 } 52 if ( GetString( "Item.Area.HF.Value" ) == GetString( "DwPageID_2" ) ) 53 { 54 rybnersSchoolBodyClass = "rybners-hf"; 55 } 56 } 57 58 59 <!DOCTYPE html> 60 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal"> 61 <head> 62 @GetValue( "CopyRightNotice" ) 63 <meta charset="utf-8"> 64 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport"> 65 <meta content="ie=edge" http-equiv="x-ua-compatible"> 66 <title>@GetValue("Title")</title> 67 @Espresso.CriticalCSS 68 @RenderSnippet( "webfonts" ) 69 <link href="/Files/Templates/Designs/rybners/_assets/_dist/css/default.css?v=0.035" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style"> 70 @Espresso.CriticalJS 71 <link href="https://cdnjs.cloudflare.com" rel="preconnect"> 72 <link href="https://www.googletagmanager.com" rel="preconnect"> 73 <link href="https://www.google-analytics.com" rel="preconnect"> 74 <link href="https://connect.facebook.net" rel="preconnect"> 75 <link rel="shortcut icon" type="image/x-icon" href="@Espresso.Area.Item.Favicon"> 76 <meta name="description" content="@Espresso.DynamicwebPage.Description"> 77 @GetValue( "MetaTags" ) 78 @if ( Espresso.IsStagingUrl ) 79 { 80 <meta content="noindex,nofollow" name="robots"> 81 } 82 <meta property="og:url" content="@openGraphUrl"> 83 <meta property="og:title" content="@Espresso.OpenGraphTitle"> 84 <meta property="og:description" content="@Espresso.OpenGraphDescription"> 85 <meta property="og:image" content="@openGraphImage"> 86 <meta property="og:type" content="website"> 87 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false ) 88 { 89 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification"> 90 } 91 @if ( loadGoogleTagManager ) 92 { 93 <!-- Google Tag Manager --> 94 <script> 95 (function(w, d, s, l, i) { 96 w[l] = w[l] || []; 97 w[l].push({ 98 'gtm.start': 99 new Date().getTime(),100 event: 'gtm.js'101 });102 var f = d.getElementsByTagName(s)[0],103 j = d.createElement(s),104 dl = l != 'dataLayer' ? '&l=' + l : '';105 j.async = true;106 j.src =107 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;108 f.parentNode.insertBefore(j, f);109 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID');110 </script>111 <!-- End Google Tag Manager -->112 }113 </head>114115 <body class="@Espresso.Item.CustomClasses @rybnersSchoolBodyClass" data-is-user-authenticated="@isUserAuthenticated.ToString().ToLower()" data-design="@Espresso.Area.DesignsFolderName">116 @if ( loadGoogleTagManager )117 {118 <!-- Google Tag Manager (noscript) -->119 <noscript>120 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe>121 </noscript>122 <!-- End Google Tag Manager (noscript) -->123 }124125 @using Co3.Espresso.Base.Extensions126 @using Co3.Espresso.Website.Services127 @using Dynamicweb.Content128 @using Dynamicweb.Content.Items129 @using Dynamicweb.Extensibility130 @using Dynamicweb.Frontend131 @using RazorEngine.Templating132 @using ItemService = Co3.Espresso.Website.Services.ItemService133 @using Page = Dynamicweb.Content.Page134 @using PageService = Dynamicweb.Content.PageService135 @using ParagraphService = Dynamicweb.Content.ParagraphService136 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase137138 @{139 Espresso.Canvas.Classes.AddClasses( "js-e-canvas is-loading" );140 if ( Espresso.Item.CanvasFullscreen == "True" )141 {142 Espresso.Canvas.Classes.AddClasses( "is-fullscreen" );143 }144145 PageService ps = new PageService();146 ParagraphService paragraphService = new ParagraphService();147148 Page holdPage = ps.GetPage( GetInteger( "Global.PageId" ) );149 string holdId = holdPage.Item[ "HoldAktiId" ]?.ToString();150 PageCollection fagCollection = ps.GetPagesForItems( new[] { "Skolefag" } );151 IEnumerable< Paragraph > courseMainCategoriesCollection = paragraphService.GetParagraphsByItemTypes( new[] {"CourseMainCaategori"} );152 Paragraph courseMainCategoryDefaults = new Paragraph();153154 foreach ( Paragraph mainCatParagraph in courseMainCategoriesCollection )155 {156 string[] cats = mainCatParagraph.Item[ "KategoriNavn" ]?.ToString().Split( ',' );157158 foreach ( string cat in cats )159 {160 if ( cat.ToLower().Trim().Replace( " ", "" ) == holdPage.Item[ "KategoriNavn" ]?.ToString().ToLower().Trim().Replace( " ", "" ) )161 {162 courseMainCategoryDefaults = mainCatParagraph;163 break;164 }165166 }167 }168169170171 List < Page > fagPages = fagCollection.Where( fc => fc.Item[ "SkoleFagAkti_id" ]?.ToString() != null && fc.Item[ "SkoleFagAkti_id" ].ToString().Split( ',' ).Contains( holdId ) ).ToList();172173 string courseStartStr = holdPage.Item[ "HoldStartDato" ]?.ToString();174 DateTime courseMainStartDate = new DateTime();175 DateTime.TryParse( courseStartStr, out courseMainStartDate );176177 string courseEndStr = holdPage.Item[ "HoldSlutDato" ]?.ToString();178 DateTime courseMainEndDate = new DateTime();179 DateTime.TryParse( courseEndStr, out courseMainEndDate );180181 string courseDeadlineStr = holdPage.Item[ "HoldTilmeldingsfrist" ]?.ToString();182 DateTime courseMainDeadlineDate = new DateTime();183 DateTime.TryParse( courseDeadlineStr, out courseMainDeadlineDate );184185 string coursePlace = holdPage.Item[ "HoldAfholdssted" ]?.ToString().Replace( ",", "<br>" );186187188 string courseImage = string.Empty;189 string courseDesc = string.Empty;190 string courseContacts = string.Empty;191192 if ( courseMainCategoryDefaults != null )193 {194 courseImage = courseMainCategoryDefaults.Item[ "CourseMainCategoryImage" ]?.ToString();195 courseDesc = courseMainCategoryDefaults.Item[ "CourseMainCategoryDescription" ]?.ToString();196 }197198 courseContacts = holdPage.Item[ "TilknyttedeKontaktpersoner" ]?.ToString();199200 string ManualImage = holdPage.Item["Billede"]?.ToString();201 string ManualDesc = holdPage.Item[ "YderligereTekst" ]?.ToString();202203204 if ( string.IsNullOrEmpty( ManualImage ) == false )205 {206 courseImage = ManualImage;207 }208 if ( string.IsNullOrEmpty( ManualDesc ) == false )209 {210 courseDesc = ManualDesc;211 }212213 string teamEmail = holdPage.Item[ "HoldEmail" ]?.ToString();214 string teamSignup = holdPage.Item[ "HoldTilmeldingsUrl" ]?.ToString();215 string signupRedirect = "https://www.efteruddannelse.dk/kursus?kviknrinfo=" + holdPage.Item[ "HoldKvikNr" ];216 string antalPladser = "";217 antalPladser = ( int ) holdPage.Item[ "HoldUdbudtePladser" ] == 0 ? "Få pladser tilbage. Kontakt os" : ( int ) holdPage.Item[ "HoldUdbudtePladser" ] + " pladser";218219220 }221222223224225 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">226 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" )227 </div>228229 @RenderingService.Instance.PartialView( "_partials/webfonts.cshtml", Espresso )230 <a class="rybners-home-link" href="/"></a>231 <div class="@Espresso.Canvas.Classes">232 @RenderingService.Instance.PartialView( "_partials/header.cshtml", Espresso )233 @RenderingService.Instance.PartialView( "usermanagement/viewprofile/espresso-impersonate-user-msg.cshtml", Espresso )234 @RenderingService.Instance.PartialView( "_partials/nav-local-horizontal.cshtml", Espresso )235 <main class="e-content js-e-content @Espresso.ContentArea.Classes pt-0" id="dwcontentmain">236 @RenderingService.Instance.PartialView( "_partials/breadcrumb.cshtml", Espresso )237 <article class="e-content-article">238 @RenderingService.Instance.PartialView( "_partials/nav-local-vertical.cshtml", Espresso )239240 <section class="e-section e-theme-quaternary js-e-section mb-3 p pb-0 p-section pt-0 px-0" id="19717">241 <div class="container-fluid fixed-gutters overflow-hidden px-0">242 <div class="no-gutters row">243 <div class="col-12 col-lg-12 col-md-12 mx-auto">244 <div class="justify-content-center row">245 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">246 <div class="row ">247 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 e-theme- p p-tile p-tile-center-middle p-tile-height-lg p-tile-txt-medium" id="19719">248 <div class="p-tile-container">249 <div class="p-txt-container">250 <div class="container-fluid">251 <div class="p-txt-wrapper row">252 <div class="col-xl-9">253254 <h2 class="mb-1">@holdPage.Item["AktivitetNavn"]</h2>255 @courseDesc256257 <div class="row">258 <div class="col-12 col-md-6 pt-2">259 @if ( courseMainStartDate.Equals( DateTime.MinValue ) == false )260 {261 <h3>Hvornår</h3>262 <p class="mb-0 small">263 @courseMainStartDate.ToString( "dd. MMM yyyy" ) - @courseMainEndDate.ToString( "dd. MMM yyyy" )264 </p>265 }266267 @if ( fagPages.Count == 1 )268 {269 Page firstPageItem = fagPages.FirstOrDefault();270 <p class="mb-0">271 Varighed: @firstPageItem.Item[ "SkoleFagVarighed" ] dage272 </p>273 }274 @if ( courseMainDeadlineDate.Equals( DateTime.MinValue ) == false )275 {276 <h5 class="pt-2">Tilmeldingsfrist:</h5>277 <p class="small">@courseMainDeadlineDate.ToString( "dd. MMM yyyy" )</p>278 }279 @if ( fagPages.Any() == false )280 {281 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>282283 }284285 </div>286 @if ( string.IsNullOrEmpty( coursePlace ) == false )287 {288 <div class="col-12 col-md-6 pt-2">289 <h3>Hvor</h3>290 <p class="small">291 @coursePlace292 </p>293 </div>294 }295296 <script>297 var debugData = @JsonService.Instance.ToJson( holdPage.Item )298 </script>299300301302 </div>303 </div>304 </div>305 </div>306 </div>307 </div>308 </div>309 </div>310 </div>311312 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">313 <div class="row ">314 <div class="col-12 col-lg-3 col-md-3 col-sm-3 col-xl-3 e-theme-education-primary p p-tile p-tile-center-middle p-tile-gradient-disabled p-tile-height-xxs p-tile-txt-small" id="19722">315 <div class="p-tile-container">316 <div class="p-txt-container">317318 </div>319 </div>320 </div>321322 <div class="col-12 col-lg-9 col-md-9 col-sm-9 col-xl-9 e-theme- p p-tile p-tile-center-middle p-tile-gradient-disabled p-tile-height-lg p-tile-img p-tile-txt-small" id="19723">323 <div class="p-tile-container">324 <div class="p-img-container">325 @if ( courseImage != null )326 {327 <div class="bg-center-middle p-img" style="background-image: url(/admin/public/getimage.ashx?Image=@courseImage&amp;Width=960&amp;Height=0&amp;Format=jpg&amp;Quality=75&amp;Crop=0);"></div>328 }329330 </div>331 <div class="p-txt-container"></div>332 </div>333 </div>334 </div>335 </div>336 </div>337 </div>338 </div>339 </div>340 </section>341342 <section class="e-section e-theme-tertiary js-e-section p pb-0 p-section pt-0 px-0" id="19785">343 <div class="container-fluid overflow-hidden px-0">344 <div class="no-gutters no-gutters row">345 <div class="col-12 col-lg-12 col-md-12 mx-auto">346347348349 <div class="justify-content-center no-gutters row">350351352353 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-2 p-columns p-imagetext-tb px-lg-6">354355356 <div class="row ">357358 @if ( holdId == "0" )359 {360 <div class="col-12">361 <h3>Der er pt. ingen aktive hold til dette kursus. </h3>362 <p>@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</p>363 </div>364 }365366367 @if(fagPages != null && fagPages.Any()){368 <div aria-expanded="false" class="col-12 collapsed col-lg-12 col-md-12 e-section-collapse-toggle mx-auto order-last text-center" data-target="#e-section-collapse-coursedetails" data-toggle="collapse">369 <button class="btn btn-primary e-section-collapse-toggle-btn" type="button">370 <i class="e-section-collapse-toggle-icon material-icons">keyboard_arrow_down</i>371 </button>372 <small class="e-section-collapse-toggle-text h4" data-collapse-text="Vis mindre" data-expand-text="Vis mere"></small>373 </div>374375 <div class="col-12 collapse col-lg-12 col-md-12 e-section-collapse-content is-lg mx-auto" id="e-section-collapse-coursedetails" style="">376 <div class="justify-content-center row">377 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">378 <div class="row">379 <div class="col-12 p-txt-container">380 <h3 class="mb-2">Fag tilknyttet kurset</h3>381 </div>382 </div>383 @foreach ( Page fag in fagPages )384 {385 <div class="row">386 <div class="p col-12 p-card-padding-large p-card p-card-top-bottom p-card-border-thin p-card-shadow-none p-card-hover-disabled p-card-txt-small">387 <div class="card rybners-fag-card e-theme-quaternary border-0">388 <div class="p-txt-container e-text-fixed-vertical-flow">389 <div class="card-body ">390 <h3>391 @fag.Item["SkoleFagNavn"]392 </h3>393 <hr>394 <p class="mb-1"><h5 class="d-inline-flex mb-0">Skolefagkode:</h5> @fag.Item["SkoleFagKode"]</p>395 <p class="mb-1"><h5 class="d-inline-flex mb-0">Varighed:</h5> @fag.Item["SkoleFagVarighed"] dage</p>396 <p class="mb-1"><h5 class="d-inline-flex mb-0">Timer pr dag:</h5> @fag.Item["SkoleFagTimerPrDag"]</p>397 <p class="mb-1"><h5 class="d-inline-flex mb-0">Deltagerpris:</h5> @fag.Item["SkoleFagDeltagerpris"] kr.</p>398 <p class="mb-1"><h5 class="d-inline-flex mb-0">Pris for ledige:</h5> @fag.Item["SkoleFagPrisForLedige"] kr.@*(Jobcenteret afholder kursusudgiften, hvis man har ret til 6 ugers jobrettet uddannelse og faget findes på positivlisten)*@</p>399 <p class="mb-1"><h5 class="d-inline-flex mb-0">Pris udenfor AMU-målgruppe:</h5> @fag.Item["SkoleFagPrisUdenforAmuMaalgruppe"] kr.</p>400401 <h5 class="mt-2">Målgruppe</h5>402 <p>403 @fag.Item["SkoleFagMaalgruppe"]404 </p>405 <h5 class="mt-2">Formål</h5>406 <p>407 @fag.Item["SkoleFagFormaal"]408 </p>409 <h5 class="mt-2">Indhold</h5>410 <p>411 @fag.Item["SkoleFagIndhold"]412 </p>413414 </div>415 </div>416 </div>417 </div>418 </div>419 }420 </div>421 </div>422 </div>423 }424 </div>425 </div>426427428 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 e-theme-tertiary p p-columns p-imagetext-tb">429 <div class="no-gutters row">430 @if ( fagPages != null && fagPages.Any() )431 {432 <div class="border-radius-none col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-card p-card-border-none p-card-shadow-none p-card-top-bottom p-card-txt-small">433 <div class="card e-theme-kursuscenter-primary">434 <div class="e-text-fixed-vertical-flow p-txt-container">435 <div class="card-body text-center">436 <h3 class="h2">Tilmelding</h3>437438439 @if ( ( string ) holdPage.Item[ "AktivitetOfflineVisning" ] == "amu" )440 {441442443 <form class="js-rybners-sign-up-form" action="@signupRedirect">444 <div class="form-group py-1">445 <select class="form-control rybners-course-form-select js-rybners-sign-up-select-input">446 <option>Vælg rolle</option>447 <option value="virksomhed">448 Jeg er i job og tilmelder mig selv eller andre ansatte i min virksomhed449 </option>450 <option value="privatperson">451 Jeg tilmelder mig som privatperson452 </option>453 <option value="ledig">454 Jeg er ledig455 </option>456 <option value="aktoer">457 Jeg er ansat hos et Jobcenter eller anden aktør, og tilmelder en ledig458 </option>459 </select>460 </div>461 <button type="submit" class="btn btn-secondary">Tilmeld</button>462 </form>463464 <div class="mt-4 row text-left">465 <div class="col-12 col-md-6 small">466 <p class="pb-0">Kursets kviknummer: @holdPage.Item[ "HoldKvikNr" ]</p>467 </div>468 <div class="col-12 col-md-6 text-right">469 <p class="pb-0"><strong>@antalPladser</strong></p>470 </div>471 </div>472 }473 else474 {475 <h3 class="py-1">@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</h3>476 }477 </div>478 </div>479 </div>480 </div>481 }482 <div class="border-radius-none col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-card p-card-border-none p-card-shadow-none p-card-top-bottom p-card-txt-medium">483 <div class="card e-theme-quaternary">484 <div class="e-text-fixed-vertical-flow p-txt-container">485 <div class="card-body">486 <div class="row">487 <div class="align-self-center col-12 p-txt-container">488489 <h3 class="mb-2">Yderligere holdinformation</h3>490491 <h5 class="d-inline-flex mb-0">Undervisningsform</h5> <p>@holdPage.Item["HoldUndervisningsform"]</p>492 <h5 class="d-inline-flex mb-0">Undervisningstid</h5> <p>@holdPage.Item["HoldUndervisningstid"]</p>493 <h5 class="d-inline-flex mb-0">Forudsætninger</h5> <p>@holdPage.Item["HoldForudsetninger"]</p>494 <h5 class="d-inline-flex mb-0">Beskrivelse</h5> <p>@holdPage.Item["HoldBeskrivelse"]</p>495496 </div>497 </div>498 </div>499 </div>500 </div>501 </div>502 @if ( holdId != "0" )503 {504 <div class="border-radius-none col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-card p-card-border-none p-card-shadow-none p-card-top-bottom p-card-txt-medium">505 <div class="card e-theme-quaternary">506 <div class="e-text-fixed-vertical-flow p-txt-container">507 <div class="card-body">508 <div class="row">509 <div class="align-self-center col-12 p-txt-container">510511 <h3>Har du spørgsmål om kurset?</h3>512 <p>@Translate( "Rybners Course module - Further info contactperson DA - Text", "Kontakt os:" )</p>513 <br>514 <p>@holdPage.Item["HoldKontaktperson"]</p>515516 <p>tlf. @holdPage.Item["HoldKontaktTelefon"] <br>517 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>518519 </p>520521 </div>522 <div class="col-12 col-lg-4 col-md-6 order-first order-sm-last p-img-container">523 <div class="row">524 <p class="col-12">525 @*<img alt="" class="p-img rounded-circle" src="/admin/public/getimage.ashx?Image=/Files/Images/IMG_2258_1.jpg&amp;Width=1920&amp;Height=1920&amp;Format=jpg&amp;Quality=75&amp;Crop=0">*@526 </p>527 </div>528 </div>529 </div>530 </div>531 </div>532 </div>533 </div>534 }535536 <div class="border-radius-none col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-card p-card-border-none p-card-shadow-none p-card-top-bottom p-card-txt-medium">537 <div class="card e-theme-quaternary" style="padding: 3.5em 2em !important;">538 <div class="e-text-fixed-vertical-flow p-txt-container">539 <div class="card-body">540 <div class="row">541 <div class="align-self-center col-12 p-txt-container">542 @if ( courseMainCategoryDefaults != null )543 {544 string systemName = courseMainCategoryDefaults.Item.SystemName;545 string itemId = courseMainCategoryDefaults.Item.Id;546 Item dwItem = Dynamicweb.Services.Items.GetItem( systemName, itemId );547548 IEnumerable< Item > items = Co3.Rybners.Website.Services.RybnersItemService.Instance.GetItemsFromItemListId( dwItem, "TilknyttedeKontaktpersoner" );549550 if ( items != null )551 {552 foreach ( Item contactItem in items.Take( 2 ) )553 {554555 string contactImage = contactItem[ "Image" ].ToString();556 string contactName = contactItem[ "ContactName" ].ToString();557 string contactTitle = contactItem[ "ContactTitle" ].ToString();558 string contactMobile = contactItem[ "ContactMobile" ].ToString();559 string contactDirect = contactItem[ "ContactDirect" ].ToString();560 string contactEmail = contactItem[ "ContactEmail" ].ToString();561 <div class="p p-imagetext p-imagetext-tb col-12 col-sm-12 col-md-12 col-lg-6 col-xl-6 text-center p-contact" style="float: left;">562563 <div class="p-contact-wrapper">564 <div class="p-img-container col-12 order-first mb-3">565 <div class="row">566 <p class="col-12 p-img-width-auto mx-auto">567 <img src="/admin/public/getimage.ashx?Image=@contactImage&amp;Width=1920&amp;Height=1920&amp;Format=jpg&amp;Quality=0&amp;Crop=0" class="p-img rounded-circle" alt="@contactName">568 </div>569 </div>570 <div class="col-12 p-txt-container ">571 <div class="p-txt-wrapper">572 <h3 class="p-contact-name" itemprop="name">@contactName</h3>573 <p class="p-contact-title" itemprop="jobTitle">@contactTitle</p>574 @if ( contactMobile != "" )575 {576 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">smartphone</i><a href="tel:@contactMobile" class="text-auto">@contactMobile</a></p>577 }578 @if ( contactDirect != "" )579 {580 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">phone</i><a href="tel:@contactDirect" class="text-auto">@contactDirect</a></p>581 }582 @if ( contactEmail != "" )583 {584 <p class="p-contact-email" itemprop="email"><i class="material-icons">mail</i><a href="mailto:@contactEmail" class="text-auto">@contactEmail</a></p>585 }586 </div>587 </div>588 </div>589 </div>590 }591 }592 }593594595596597598599 </div>600 </div>601 </div>602 </div>603 </div>604 </div>605606607608609 <div aria-hidden="true" class="js-rybners-contact-modal fade modal" tabindex="-1">610 <div class="modal-dialog" role="document">611 <div class="modal-content">612613 <div class="modal-body">614 <button aria-label="Close" class="close" data-dismiss="modal" type="button">615 <span aria-hidden="true">&times;</span>616 </button>617 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>618 <p class="mb-1">Kontaktperson: @holdPage.Item["HoldKontaktperson"]</p>619 <p class="mb-1">tlf. @holdPage.Item["HoldKontaktTelefon"]620 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>621 </p>622 </div>623 <div class="modal-footer">624 <button class="btn btn-primary" data-dismiss="modal" type="button">Luk</button>625 </div>626 </div>627 </div>628 </div>629 </div>630 </div>631632 </div>633634 @{635 IEnumerable< Page > siblings = ServiceLocator.Current.GetPageService().GetPagesByParentID( PageView.Current().Page.Parent.ID ).Where( p => p.ID != PageView.Current().Page.ID && p.Active );636 IEnumerable< Page > relatedActivity = siblings.Where( s => ItemExtensions.GetValue< int >( s.Item, "HoldAktiId" ) == ( int ) PageView.Current().Page.Item[ "HoldAktiId" ] );637 }638639 @if ( holdId != "0" && relatedActivity.Any() )640 {641642 <div class="col-12">643 <div class="col-12">644 <h2 class="mt-2 mb-2">Yderligere hold</h2>645 <ul class="rybners-course-overview">646 @foreach ( Page coursePage in relatedActivity.Take(4))647 {648 List< Page > fagByRelatedCourse = fagCollection.Where( fc => fc.Item[ "SkoleFagAkti_id" ]?.ToString() != null && fc.Item[ "SkoleFagAkti_id" ].ToString().Split( ',' ).Contains( coursePage.Item["HoldAktiId"]?.ToString() ) )?.ToList();649650 string relatedCourseName = coursePage.Item[ "HoldAktivitetsnavn" ]?.ToString();651 string relatedCourseType = coursePage.Item[ "AktivitetOfflineVisning" ]?.ToString();652653 string relatedCourseStartStr = coursePage.Item[ "HoldStartDato" ]?.ToString();654 DateTime relatedCourseStartDate = new DateTime();655 DateTime.TryParse( relatedCourseStartStr, out relatedCourseStartDate );656657 string relatedCourseEndStr = coursePage.Item[ "HoldSlutDato" ]?.ToString();658 DateTime relatedCourseEndDate = new DateTime();659 DateTime.TryParse( relatedCourseEndStr, out relatedCourseEndDate );660661 string relatedCourseDeadlineStr = coursePage.Item[ "HoldTilmeldingsfrist" ]?.ToString();662 DateTime relatedCourseDeadlineDate = new DateTime();663 DateTime.TryParse( relatedCourseDeadlineStr, out relatedCourseDeadlineDate );664665 string relatedCourseDuration = fagByRelatedCourse.FirstOrDefault()?.Item[ "SkoleFagVarighed" ]?.ToString();666 string relatedCourseUrl = string.Format( "Default.aspx?ID={0}", coursePage.ID );667668 relatedCourseUrl = SearchEngineFriendlyURLs.GetFriendlyUrl( relatedCourseUrl );669670 <li class="d-flex rybners-course-list w-100 align-self-center">671 <div class="course-name">672 <a href="@relatedCourseUrl">673 <h3>@relatedCourseName</h3></a></div>674 <div class="course-type text-center">675676 @if ( relatedCourseType == "amu" )677 {678 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> AMU-kursus</p>679 }680 else if ( relatedCourseType == "idv" ) {681 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> IDV-kursus</p>682 }683 else684 {685 <p class="mb-0">@relatedCourseType</p>686 }687 </div>688 @if ( fagByRelatedCourse.Count > 1 )689 {690 <div class="course-date small">Flere fag tilknyttet</div>691 }692 else693 {694 if ( relatedCourseDuration == "1" )695 {696 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dag</div>697 } else if ( relatedCourseDuration == "0" )698 {699 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )</div>700 }701 else702 {703 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dage</div>704 }705 <div class="course-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dage</div>706 }707 <div class="course-signup text-right"><a class="btn btn-sm " href="@relatedCourseUrl">@Translate( "Rybners Course module - Signup DA - Button", "Se mere og tilmeld" )</a>708 @if ( fagByRelatedCourse.Count > 1 )709 {710 <br>711 <span class="d-block small text-right"><small>@Translate( "Rybners Course module - Deadline DA - Text", "Tilmeldingsfrist:" ) @relatedCourseDeadlineDate</small></span>712 }713 </div>714 </li>715 }716 </ul>717 </div>718 </div>719 }720 </div>721 </div>722 </div>723 </section>724725726 @*END COURSE CONTENT*@727728 @GetValue("DwContent(dwcontentmain)")729730 </article>731 </main>732733 @RenderingService.Instance.PartialView( "_partials/footer.cshtml", Espresso )734735 @if ( !string.IsNullOrEmpty( GetString( "DwContent(dwcontentsocialmedia)" ) ) )736 {737 <aside id="dwcontentsocialmedia">@GetValue("DwContent(dwcontentsocialmedia)")</aside>738 }739740 @RenderingService.Instance.PartialView( "ecom7/cartv2/step/espresso-cart-msg.cshtml" )741 </div>742743 @RenderingService.Instance.PartialView( "_partials/search.cshtml", Espresso )744745 @RenderingService.Instance.PartialView( "_partials/back-to-top.cshtml", Espresso )746 @RenderingService.Instance.PartialView( "cookiewarning/espresso.cshtml", Espresso )747748 @if ( 1 == 2 )749 {750 @GetValue( "DwCookieWarning" )751 }752753754 @{755 if ( GetString( "Item.Area.TekniskSkole.Value" ) == GetString( "DwPageID_2" ) )756 {757 @RenderParagraphContent( GetInteger( "Item.Area.TekniskSkoleSocialeMedier.Value" ) )758 }759 if ( GetString( "Item.Area.Handelsskole.Value" ) == GetString( "DwPageID_2" ) )760 {761 @RenderParagraphContent( GetInteger( "Item.Area.HandelsskoleSocialeMedier.Value" ) )762 }763 if ( GetString( "Item.Area.EUX.Value" ) == GetString( "DwPageID_2" ) )764 {765 @RenderParagraphContent( GetInteger( "Item.Area.EUXSocialeMedier.Value" ) )766 }767 if ( GetString( "Item.Area.Kursuscenter.Value" ) == GetString( "DwPageID_2" ) )768 {769 @RenderParagraphContent( GetInteger( "Item.Area.KursuscenterSocialeMedier.Value" ) )770 }771 if ( GetString( "Item.Area.HHXHandelsgymnasium.Value" ) == GetString( "DwPageID_2" ) )772 {773 @RenderParagraphContent( GetInteger( "Item.Area.HHXHandelsgymnasiumSocialeMedier.Value" ) )774 }775 if ( GetString( "Item.Area.STXAlmentGymnasium.Value" ) == GetString( "DwPageID_2" ) )776 {777 @RenderParagraphContent( GetInteger( "Item.Area.STXAlmentGymnasiumSocialeMedier.Value" ) )778 }779 if ( GetString( "Item.Area.HTXTekniskGymnasium.Value" ) == GetString( "DwPageID_2" ) )780 {781 @RenderParagraphContent( GetInteger( "Item.Area.HTXTekniskGymnasiumSocialeMedier.Value" ) )782 }783 if ( GetString( "Item.Area.HF.Value" ) == GetString( "DwPageID_2" ) )784 {785 @RenderParagraphContent( GetInteger( "Item.Area.HFSocialeMedier.Value" ) )786 }787 }788789 <script async="" src="/Files/Templates/Designs/rybners/_assets/_dist/js/default.js?v=0.0.5"></script>790 </body>791792 @GetValue( "CopyRightNotice" )793 </html>