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_ddafc993ce5b4a8095e8d2256ff9c220.Execute() in C:\inetpub\wwwroot\rybners.espresso4.dk\Files\Templates\Designs\rybners\_parsed\Rybners_course.parsed.cshtml:line 204at 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 Co3.Rybners.Website.Services128 @using Dynamicweb.Content129 @using Dynamicweb.Content.Items130 @using Dynamicweb.Extensibility131 @using Dynamicweb.Frontend132 @using RazorEngine.Templating133 @using ItemService = Co3.Espresso.Website.Services.ItemService134 @using Page = Dynamicweb.Content.Page135 @using PageService = Dynamicweb.Content.PageService136 @using ParagraphService = Dynamicweb.Content.ParagraphService137 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase138139 @{140 Espresso.Canvas.Classes.AddClasses( "js-e-canvas is-loading" );141 if ( Espresso.Item.CanvasFullscreen == "True" )142 {143 Espresso.Canvas.Classes.AddClasses( "is-fullscreen" );144 }145146 PageService ps = new PageService();147 ParagraphService paragraphService = new ParagraphService();148149 Page holdPage = ps.GetPage( GetInteger( "Global.PageId" ) );150 var teams = RybnersItemService.Instance.GetTeamsForCourse( holdPage.ID ).ToList();151 var severalTeams = teams.Where( t => ( int ) t.Item[ "HoldLedigePladser" ] > 1 );152153 Page defaultTeam = teams.FirstOrDefault();154155 var defaultTeamContactPerson = defaultTeam?.Item["HoldKontaktperson"]?.ToString();156 var defaultTeamContactNumber = defaultTeam?.Item["HoldKontaktTelefon"]?.ToString();157 var defaultTeamQuickNumber = defaultTeam?.Item["HoldKvikNr"]?.ToString();158159 var teamType = defaultTeam?.Item["HoldType"]?.ToString();160161 bool anyTeams = teams.Any();162163 IEnumerable< Paragraph > courseMainCategoriesCollection = paragraphService.GetParagraphsByItemTypes( new[] {"CourseMainCaategori"} );164 Paragraph courseMainCategoryDefaults = new Paragraph();165166 foreach ( Paragraph mainCatParagraph in courseMainCategoriesCollection )167 {168 string[] cats = mainCatParagraph.Item[ "KategoriNavn" ]?.ToString().Split( ',' );169170 foreach ( string cat in cats )171 {172 if ( cat.ToLower().Trim().Replace( " ", "" ) == holdPage.Item[ "KategoriNavn" ]?.ToString().ToLower().Trim().Replace( " ", "" ) )173 {174 courseMainCategoryDefaults = mainCatParagraph;175 break;176 }177178 }179 }180181 var fagPages = RybnersItemService.Instance.GetSchoolSubjectsForCourse( holdPage.ID ).ToList();182183 string courseStartStr = defaultTeam?.Item[ "HoldStartDato" ]?.ToString();184 DateTime courseMainStartDate = new DateTime();185 DateTime.TryParse( courseStartStr, out courseMainStartDate );186187 string courseEndStr = defaultTeam?.Item[ "HoldSlutDato" ]?.ToString();188 DateTime courseMainEndDate = new DateTime();189 DateTime.TryParse( courseEndStr, out courseMainEndDate );190191 string courseDeadlineStr = defaultTeam?.Item[ "HoldTilmeldingsfrist" ]?.ToString();192 DateTime courseMainDeadlineDate = new DateTime();193 DateTime.TryParse( courseDeadlineStr, out courseMainDeadlineDate );194195 string coursePlace = defaultTeam?.Item[ "HoldAfholdssted" ]?.ToString().Replace( ",", "<br>" );196197198 string courseImage = string.Empty;199 string courseDesc = string.Empty;200 string courseContacts = string.Empty;201202 if ( courseMainCategoryDefaults != null )203 {204 courseImage = courseMainCategoryDefaults.Item[ "CourseMainCategoryImage" ]?.ToString();205 courseDesc = courseMainCategoryDefaults.Item[ "CourseMainCategoryDescription" ]?.ToString();206 }207208 courseContacts = holdPage.Item[ "TilknyttedeKontaktpersoner" ]?.ToString();209210 string ManualImage = holdPage.Item["Billede"]?.ToString();211 string ManualDesc = holdPage.Item[ "YderligereTekst" ]?.ToString();212213214 if ( string.IsNullOrEmpty( ManualImage ) == false )215 {216 courseImage = ManualImage;217 }218 if ( string.IsNullOrEmpty( ManualDesc ) == false )219 {220 courseDesc = ManualDesc;221 }222223 string teamEmail = defaultTeam?.Item[ "HoldEmail" ]?.ToString();224 string signupRedirect = "https://www.voksenuddannelse.dk/soeg/uddannelser/filtrering?searchString=" + defaultTeam?.Item[ "HoldKvikNr" ];225 string antalPladser = "";226227 }228229230231 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">232 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" )233 </div>234235 @RenderingService.Instance.PartialView( "_partials/webfonts.cshtml", Espresso )236 <a class="rybners-home-link" href="/"></a>237 <div class="@Espresso.Canvas.Classes">238 @RenderingService.Instance.PartialView( "_partials/header.cshtml", Espresso )239 @RenderingService.Instance.PartialView( "usermanagement/viewprofile/espresso-impersonate-user-msg.cshtml", Espresso )240 @RenderingService.Instance.PartialView( "_partials/nav-local-horizontal.cshtml", Espresso )241 <main class="e-content js-e-content @Espresso.ContentArea.Classes pt-0" id="dwcontentmain">242 @RenderingService.Instance.PartialView( "_partials/breadcrumb.cshtml", Espresso )243 <article class="e-content-article">244 @RenderingService.Instance.PartialView( "_partials/nav-local-vertical.cshtml", Espresso )245246 <section class="e-section e-theme-quaternary js-e-section mb-3 p pb-0 p-section pt-0 px-0" id="19717">247 <div class="container-fluid fixed-gutters overflow-hidden px-0">248 <div class="no-gutters row">249 <div class="col-12 col-lg-12 col-md-12 mx-auto">250 <div class="justify-content-center row">251 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">252 <div class="row ">253 <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">254 <div class="p-tile-container">255 <div class="p-txt-container">256 <div class="container-fluid">257 <div class="p-txt-wrapper row">258 <div class="col-xl-9">259260 <h2 class="mb-1">@holdPage.Item["AktivitetNavn"]</h2>261 @courseDesc262263 <div class="row">264 <div class="col-12 col-md-6 pt-2">265 @if ( courseMainStartDate.Equals( DateTime.MinValue ) == false )266 {267 if (severalTeams.Any() == false ) {268 <h3>Hvornår</h3>269 <p class="mb-0 small">270 @courseMainStartDate.ToString( "dd. MMM yyyy" ) - @courseMainEndDate.ToString( "dd. MMM yyyy" )271 </p>272 }273 else274 {275 <h3>Hvornår</h3>276 <p class="mb-0 small">277 <strong>Se holdlisten</strong>278 </p>279 }280 }281282 @if ( fagPages.Count() == 1 )283 {284 Item firstPageItem = fagPages.FirstOrDefault();285 var duration = firstPageItem["SkoleFagVarighed"]?.ToString();286 <p class="mb-0">287 Varighed: @duration dage288 </p>289 }290 @if ( courseMainDeadlineDate.Equals( DateTime.MinValue ) == false )291 {292 <h5 class="pt-2">Tilmeldingsfrist:</h5>293 <p class="small">@courseMainDeadlineDate.ToString( "dd. MMM yyyy" )</p>294 }295 @if ( fagPages.Any() == false )296 {297 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>298299 }300301 </div>302 @if ( string.IsNullOrEmpty( coursePlace ) == false )303 {304 <div class="col-12 col-md-6 pt-2">305 <h3>Hvor</h3>306 <p class="small">307 @coursePlace308 </p>309 </div>310 }311312 <script>313 var debugData = @JsonService.Instance.ToJson( holdPage.Item )314 </script>315316317318 </div>319 </div>320 </div>321 </div>322 </div>323 </div>324 </div>325 </div>326 </div>327328 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">329 <div class="row ">330 <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">331 <div class="p-tile-container">332 <div class="p-txt-container">333334 </div>335 </div>336 </div>337338 <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">339 <div class="p-tile-container">340 <div class="p-img-container">341 @if ( courseImage != null )342 {343 <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>344 }345346 </div>347 <div class="p-txt-container"></div>348 </div>349 </div>350 </div>351 </div>352 </div>353 </div>354 </div>355 </div>356 </section>357358 <section class="e-section e-theme-tertiary js-e-section p pb-0 p-section pt-0 px-0" id="19785">359 <div class="container-fluid overflow-hidden px-0">360 <div class="no-gutters no-gutters row">361 <div class="col-12 col-lg-12 col-md-12 mx-auto">362363364365 <div class="justify-content-center no-gutters row">366367368369 <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">370371 @if ( severalTeams.Any() ) {372 <div class="row">373 <div class="col-12 col-lg-12 col-md-12 is-lg mx-auto">374 <div class="justify-content-center row">375 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">376 <div class="row">377 <div class="col-12 p-txt-container">378 <h3 class="mb-2">Holdliste</h3>379 </div>380 </div>381 <div class="row">382 <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">383 <div class="card rybners-fag-card e-theme-quaternary border-0">384 <div class="p-txt-container e-text-fixed-vertical-flow">385 <div class="card-body ">386 <table class="table" style="font-size: 1em">387388 @foreach ( Page teamPage in teams )389 {390391 DateTime startDato = ( DateTime ) teamPage.Item[ "HoldStartDato" ];392 DateTime slutDato = ( DateTime ) teamPage.Item[ "HoldSlutDato" ];393 string kvikNr = ( string )teamPage.Item[ "HoldKvikNr" ];394 double freeSpots;395 double.TryParse( teamPage.Item["HoldLedigePladser"]?.ToString(), out freeSpots );396 <tr>397 <td class="px-0">398 @startDato.ToString("dd. MMM yyyy")- @slutDato.ToString("dd. MMM yyyy")399 </td>400 <td class=" px-0 text-right">401 <span class="badge p-1 badge-pill badge-secondary">402 @if ( freeSpots > 0 )403 {404 <span>@teamPage.Item["HoldLedigePladser"] ledige pladser</span>405 }406 else407 {408 <span>Kontakt os</span>409 }410411 </span>412 </td>413 </tr>414415 }416 </table>417 </div>418 </div>419 </div>420 </div>421 </div>422423 </div>424 </div>425 </div>426 </div>427 }428429430 <div class="row ">431432 @if ( !anyTeams )433 {434 <div class="col-12">435 <h3>Der er pt. ingen aktive hold til dette kursus. </h3>436 <p>@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</p>437 </div>438 }439440441 @if(fagPages != null && fagPages.Any()){442 <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">443 <button class="btn btn-primary e-section-collapse-toggle-btn" type="button">444 <i class="e-section-collapse-toggle-icon material-icons">keyboard_arrow_down</i>445 </button>446 <small class="e-section-collapse-toggle-text h4" data-collapse-text="Vis mindre" data-expand-text="Vis mere"></small>447 </div>448449 <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="">450 <div class="justify-content-center row">451 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">452 <div class="row">453 <div class="col-12 p-txt-container">454 <h3 class="mb-2">Fag tilknyttet kurset</h3>455 </div>456 </div>457 @foreach ( Item fag in fagPages )458 {459 <div class="row">460 <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">461 <div class="card rybners-fag-card e-theme-quaternary border-0">462 <div class="p-txt-container e-text-fixed-vertical-flow">463 <div class="card-body ">464 <h3>465 @fag["SkoleFagNavn"]466 </h3>467 <hr>468 <p class="mb-1"><h5 class="d-inline-flex mb-0">Skolefagkode:</h5> @fag["SkoleFagKode"]</p>469 <p class="mb-1"><h5 class="d-inline-flex mb-0">Varighed:</h5> @fag["SkoleFagVarighed"] dage</p>470 <p class="mb-1"><h5 class="d-inline-flex mb-0">Timer pr dag:</h5> @fag["SkoleFagTimerPrDag"]</p>471 <p class="mb-1"><h5 class="d-inline-flex mb-0">Deltagerpris:</h5> @fag["SkoleFagDeltagerpris"] kr.</p>472 <p class="mb-1"><h5 class="d-inline-flex mb-0">Pris for ledige:</h5> @fag["SkoleFagPrisForLedige"] kr.@*(Jobcenteret afholder kursusudgiften, hvis man har ret til 6 ugers jobrettet uddannelse og faget findes på positivlisten)*@</p>473 <p class="mb-1"><h5 class="d-inline-flex mb-0">Pris udenfor AMU-målgruppe:</h5> @fag["SkoleFagPrisUdenforAmuMaalgruppe"] kr.</p>474475 <h5 class="mt-2">Målgruppe</h5>476 <p>477 @fag["SkoleFagMaalgruppe"]478 </p>479 <h5 class="mt-2">Formål</h5>480 <p>481 @fag["SkoleFagFormaal"]482 </p>483 <h5 class="mt-2">Indhold</h5>484 <p>485 @fag["SkoleFagIndhold"]486 </p>487488 </div>489 </div>490 </div>491 </div>492 </div>493 }494 </div>495 </div>496 </div>497 }498 </div>499500501502 @if ( teamType == "idv" )503 {504 <div class="row">505 <div class="col-12 col-lg-12 col-md-12 is-lg mx-auto">506 <div class="justify-content-center row">507 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">508 <div class="row">509 <div class="col-12 p-txt-container">510 <h3 class="mb-2">Beskrivelse</h3>511 </div>512 </div>513 <div class="row">514 <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">515 <div class="card rybners-fag-card e-theme-quaternary border-0">516 <div class="p-txt-container e-text-fixed-vertical-flow">517 <div class="card-body ">518 <p class="mb-1">@GetString( "Item.AktivitetOverordnetBeskrivelse.Value" )</p>519 </div>520 </div>521 </div>522 </div>523 </div>524525 </div>526 </div>527 </div>528 </div>529 }530531 </div>532533534 <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">535 <div class="no-gutters row">536 @if ( fagPages != null && fagPages.Any() || teamType == "idv" )537 {538 <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">539 <div class="card e-theme-kursuscenter-primary">540 <div class="e-text-fixed-vertical-flow p-txt-container">541 <div class="card-body text-center">542 <h3 class="h2">Tilmelding</h3>543 @if ( teamType == "idv" )544 {545 <form class="js-rybners-course-signup-selector" action="@signupRedirect">546547 @if ( severalTeams.Any() )548 {549 <div class="form-group py-1">550 <select class="form-control rybners-course-form-select js-rybners-teams-select-input">551552 <option selected="" disabled="">Vælg hold</option>553554 @foreach ( Page teamPage in teams )555 {556557 DateTime startDato = (DateTime) teamPage.Item["HoldStartDato"];558 DateTime slutDato = (DateTime) teamPage.Item["HoldSlutDato"];559 string kviknr = teamPage.Item["HoldKvikNr"]?.ToString();560561 string optionValue = "https://www.efteruddannelse.dk/kursus?kviknrinfo=" + kviknr;562563 bool ledigePladser = (int) teamPage.Item["HoldLedigePladser"] > 0;564 if ( ledigePladser )565 {566 <option value="@optionValue" data-kviknr="@kviknr">567 @startDato.ToString( "dd. MMM yyyy" )- @slutDato.ToString( "dd. MMM yyyy" )568 </option>569570 }571572 }573 </select>574 </div>575 }576 <div class="form-group py-1">577 <select class="form-control rybners-course-form-select js-rybners-course-signup-input">578 <option>Vælg rolle</option>579 <option value="1">580 Betaling via virksomhed (DK)581 </option>582 <option value="2">583 Egenbetaling / IKUF bevilling (DK)584 </option>585 <option value="3">586 Foreigner / Udlænding (English)587 </option>588 </select>589 </div>590 </form>591 <div class="js-rybners-course-signup-container rybners-course-signup-container" data-idv1-formpageid="16547" data-idv2-formpageid="16549" data-idv3-formpageid="16550"></div>592 }593594 else if ( (string) holdPage.Item["AktivitetOfflineVisning"] == "amu" )595 {596597598599 <form class="js-rybners-sign-up-form" action="@signupRedirect">600601602603 @if ( severalTeams.Any() )604 {605 <div class="form-group py-1">606 <select class="form-control rybners-course-form-select js-rybners-teams-select-input">607608 <option selected="" disabled="">Vælg hold</option>609610 @foreach ( Page teamPage in teams )611 {612613 DateTime startDato = (DateTime) teamPage.Item["HoldStartDato"];614 DateTime slutDato = (DateTime) teamPage.Item["HoldSlutDato"];615 string kviknr = teamPage.Item["HoldKvikNr"]?.ToString();616617 string optionValue = "https://www.efteruddannelse.dk/kursus?kviknrinfo=" + kviknr;618619 bool ledigePladser = (int) teamPage.Item["HoldLedigePladser"] > 0;620 if ( ledigePladser )621 {622 <option value="@optionValue" data-kviknr="@kviknr">623 @startDato.ToString( "dd. MMM yyyy" )- @slutDato.ToString( "dd. MMM yyyy" )624 </option>625626 }627628 }629 </select>630 </div>631 }632633634 <div class="form-group py-1">635 <select class="form-control rybners-course-form-select js-rybners-sign-up-select-input">636 <option selected="" disabled="">Vælg rolle</option>637 <option value="virksomhed">638 Jeg er i job og tilmelder mig selv eller andre ansatte i min virksomhed639 </option>640 <option value="privatperson">641 Jeg tilmelder mig som privatperson642 </option>643 <option value="ledig">644 Jeg er ledig645 </option>646 <option value="aktoer">647 Jeg er ansat hos et Jobcenter eller anden aktør, og tilmelder en ledig648 </option>649 </select>650 </div>651 <button type="submit" class="btn btn-secondary">Tilmeld</button>652 </form>653654 <div class="mt-4 row text-left">655 <div class="col-12 col-md-6 small">656 <p class="pb-0">Kursets kviknummer: <span class="js-rybners-kviknr">@defaultTeamQuickNumber</span></p>657 </div>658 @*@if ( severalTeams.Any() == false )659 {660 <div class="col-12 col-md-6 text-right">661 <p class="pb-0"><strong>@antalPladser</strong></p>662 </div>663 }*@664 </div>665 }666 else667 {668 <h3 class="py-1">@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</h3>669 }670 </div>671 </div>672 </div>673 </div>674 }675 @if ( teamType != "idv" )676 {677 var educationForm = defaultTeam?.Item["HoldUndervisningsform"]?.ToString();678 var educationTime = defaultTeam?.Item["HoldUndervisningstid"]?.ToString();679 var prerequisites = defaultTeam?.Item["HoldForudsetninger"]?.ToString();680 var description = defaultTeam?.Item["HoldBeskrivelse"]?.ToString();681 <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">682 <div class="card e-theme-quaternary">683 <div class="e-text-fixed-vertical-flow p-txt-container">684 <div class="card-body">685 <div class="row">686 <div class="align-self-center col-12 p-txt-container">687688 <h3 class="mb-2">Yderligere holdinformation</h3>689690 <h5 class="d-inline-flex mb-0">Undervisningsform</h5>691 <p>@educationForm</p>692 <h5 class="d-inline-flex mb-0">Undervisningstid</h5>693 <p>@educationTime</p>694 <h5 class="d-inline-flex mb-0">Forudsætninger</h5>695 <p>@prerequisites</p>696 <h5 class="d-inline-flex mb-0">Beskrivelse</h5>697 <p>@description</p>698699 </div>700 </div>701 </div>702 </div>703 </div>704 </div>705 }706 @if ( anyTeams && teamType != "idv" )707 {708 <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">709 <div class="card e-theme-quaternary">710 <div class="e-text-fixed-vertical-flow p-txt-container">711 <div class="card-body">712 <div class="row">713 <div class="align-self-center col-12 p-txt-container">714715 <h3>Har du spørgsmål om kurset?</h3>716 <p>@Translate( "Rybners Course module - Further info contactperson DA - Text", "Kontakt os:" )</p>717 <br>718 <p>@defaultTeamContactPerson</p>719720 <p>tlf. @defaultTeamContactNumber <br>721 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>722723 </p>724725 </div>726 <div class="col-12 col-lg-4 col-md-6 order-first order-sm-last p-img-container">727 <div class="row">728 <p class="col-12">729 @*<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">*@730 </p>731 </div>732 </div>733 </div>734 </div>735 </div>736 </div>737 </div>738 }739740 <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">741 <div class="card e-theme-quaternary" style="padding: 3.5em 2em !important;">742 <div class="e-text-fixed-vertical-flow p-txt-container">743 <div class="card-body">744 <div class="row">745 <div class="align-self-center col-12 p-txt-container">746 @if ( courseMainCategoryDefaults != null )747 {748 string systemName = courseMainCategoryDefaults.Item.SystemName;749 string itemId = courseMainCategoryDefaults.Item.Id;750 Item dwItem = Dynamicweb.Services.Items.GetItem( systemName, itemId );751752 IEnumerable<Item> items = Co3.Rybners.Website.Services.RybnersItemService.Instance.GetItemsFromItemListId( dwItem, "TilknyttedeKontaktpersoner" );753754 if ( items != null )755 {756 foreach ( Item contactItem in items.Take( 2 ) )757 {758759 string contactImage = contactItem["Image"].ToString();760 string contactName = contactItem["ContactName"].ToString();761 string contactTitle = contactItem["ContactTitle"].ToString();762 string contactMobile = contactItem["ContactMobile"].ToString();763 string contactDirect = contactItem["ContactDirect"].ToString();764 string contactEmail = contactItem["ContactEmail"].ToString();765 <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;">766767 <div class="p-contact-wrapper">768 <div class="p-img-container col-12 order-first mb-3">769 <div class="row">770 <p class="col-12 p-img-width-auto mx-auto">771 <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">772 </div>773 </div>774 <div class="col-12 p-txt-container ">775 <div class="p-txt-wrapper">776 <h3 class="p-contact-name" itemprop="name">@contactName</h3>777 <p class="p-contact-title" itemprop="jobTitle">@contactTitle</p>778 @if ( contactMobile != "" )779 {780 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">smartphone</i><a href="tel:@contactMobile" class="text-auto">@contactMobile</a></p>781 }782 @if ( contactDirect != "" )783 {784 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">phone</i><a href="tel:@contactDirect" class="text-auto">@contactDirect</a></p>785 }786 @if ( contactEmail != "" )787 {788 <p class="p-contact-email" itemprop="email"><i class="material-icons">mail</i><a href="mailto:@contactEmail" class="text-auto">@contactEmail</a></p>789 }790 </div>791 </div>792 </div>793 </div>794 }795 }796 }797798799800801802803 </div>804 </div>805 </div>806 </div>807 </div>808 </div>809810811812813 <div aria-hidden="true" class="js-rybners-contact-modal fade modal" tabindex="-1">814 <div class="modal-dialog" role="document">815 <div class="modal-content">816817 <div class="modal-body">818 <button aria-label="Close" class="close" data-dismiss="modal" type="button">819 <span aria-hidden="true">&times;</span>820 </button>821 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>822 <p class="mb-1">Kontaktperson: @defaultTeamContactPerson</p>823 <p class="mb-1">tlf. @defaultTeamContactNumber824 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>825 </p>826 </div>827 <div class="modal-footer">828 <button class="btn btn-primary" data-dismiss="modal" type="button">Luk</button>829 </div>830 </div>831 </div>832 </div>833 </div>834 </div>835836 </div>837838 @{839 IEnumerable< Page > siblings = ServiceLocator.Current.GetPageService().GetPagesByParentID( PageView.Current().Page.Parent.ID ).Where( p => p.ID != PageView.Current().Page.ID && p.Active );840 IEnumerable< Page > relatedActivity = siblings.Where( s => RybnersItemService.Instance.GetTeamsForCourse( s.ID ).FirstOrDefault()?.Item["HoldAktiId"] == defaultTeam?.Item["HoldAktiId"] );841 }842843 @if ( anyTeams && relatedActivity.Any() )844 {845846 <div class="col-12">847 <div class="col-12">848 <h2 class="mt-2 mb-2">Yderligere hold</h2>849 <ul class="rybners-course-overview">850 @foreach ( Page coursePage in relatedActivity.Take(4))851 {852 var fagByRelatedCourse = RybnersItemService.Instance.GetSchoolSubjectsForCourse( coursePage.ID );853 var teamByRelatedCourse = RybnersItemService.Instance.GetTeamsForCourse( coursePage.ID ).FirstOrDefault();854855 string relatedCourseName = teamByRelatedCourse?.Item[ "HoldAktivitetsnavn" ]?.ToString();856 string relatedCourseType = coursePage.Item[ "AktivitetOfflineVisning" ]?.ToString();857858 string relatedCourseStartStr = teamByRelatedCourse?.Item[ "HoldStartDato" ]?.ToString();859 DateTime relatedCourseStartDate = new DateTime();860 DateTime.TryParse( relatedCourseStartStr, out relatedCourseStartDate );861862 string relatedCourseEndStr = teamByRelatedCourse?.Item[ "HoldSlutDato" ]?.ToString();863 DateTime relatedCourseEndDate = new DateTime();864 DateTime.TryParse( relatedCourseEndStr, out relatedCourseEndDate );865866 string relatedCourseDeadlineStr = teamByRelatedCourse?.Item[ "HoldTilmeldingsfrist" ]?.ToString();867 DateTime relatedCourseDeadlineDate = new DateTime();868 DateTime.TryParse( relatedCourseDeadlineStr, out relatedCourseDeadlineDate );869870 string relatedCourseDuration = fagByRelatedCourse.FirstOrDefault()?[ "SkoleFagVarighed" ]?.ToString();871 string relatedCourseUrl = string.Format( "Default.aspx?ID={0}", coursePage.ID );872873874875 relatedCourseUrl = SearchEngineFriendlyURLs.GetFriendlyUrl( relatedCourseUrl );876877 <li class="d-flex rybners-course-list w-100 align-self-center">878 <div class="course-name">879 <a href="@relatedCourseUrl">880 <h3>@relatedCourseName</h3></a></div>881 <div class="course-type text-center">882883 @if ( relatedCourseType == "amu" )884 {885 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> AMU-kursus</p>886 }887 else if ( relatedCourseType == "idv" ) {888 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> IDV-kursus</p>889 }890 else891 {892 <p class="mb-0">@relatedCourseType</p>893 }894 </div>895 @if ( fagByRelatedCourse.Count() > 1 )896 {897 <div class="course-date small">Flere fag tilknyttet</div>898 }899 else900 {901 if ( relatedCourseDuration == "1" )902 {903 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dag</div>904 } else if ( relatedCourseDuration == "0" )905 {906 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )</div>907 }908 else909 {910 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dage</div>911 }912 <div class="course-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )<br>Varighed: @relatedCourseDuration dage</div>913 }914 <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>915 @if ( fagByRelatedCourse.Count() > 1 && relatedCourseDeadlineDate > DateTime.Now )916 {917 <br>918 <span class="d-block small text-right"><small>@Translate( "Rybners Course module - Deadline DA - Text", "Tilmeldingsfrist:" ) @relatedCourseDeadlineDate</small></span>919 }920 </div>921 </li>922 }923 </ul>924 </div>925 </div>926 }927 </div>928 </div>929 </div>930 </section>931932933 @*END COURSE CONTENT*@934935 @GetValue("DwContent(dwcontentmain)")936937 </article>938 </main>939940 @RenderingService.Instance.PartialView( "_partials/footer.cshtml", Espresso )941942 @if ( !string.IsNullOrEmpty( GetString( "DwContent(dwcontentsocialmedia)" ) ) )943 {944 <aside id="dwcontentsocialmedia">@GetValue("DwContent(dwcontentsocialmedia)")</aside>945 }946947 @RenderingService.Instance.PartialView( "ecom7/cartv2/step/espresso-cart-msg.cshtml" )948 </div>949950 @RenderingService.Instance.PartialView( "_partials/search.cshtml", Espresso )951952 @RenderingService.Instance.PartialView( "_partials/back-to-top.cshtml", Espresso )953954 @if ( 1 == 2 )955 {956 @GetValue( "DwCookieWarning" )957 }958959960 @{961 if ( GetString( "Item.Area.TekniskSkole.Value" ) == GetString( "DwPageID_2" ) )962 {963 @RenderParagraphContent( GetInteger( "Item.Area.TekniskSkoleSocialeMedier.Value" ) )964 }965 if ( GetString( "Item.Area.Handelsskole.Value" ) == GetString( "DwPageID_2" ) )966 {967 @RenderParagraphContent( GetInteger( "Item.Area.HandelsskoleSocialeMedier.Value" ) )968 }969 if ( GetString( "Item.Area.EUX.Value" ) == GetString( "DwPageID_2" ) )970 {971 @RenderParagraphContent( GetInteger( "Item.Area.EUXSocialeMedier.Value" ) )972 }973 if ( GetString( "Item.Area.Kursuscenter.Value" ) == GetString( "DwPageID_2" ) )974 {975 @RenderParagraphContent( GetInteger( "Item.Area.KursuscenterSocialeMedier.Value" ) )976 }977 if ( GetString( "Item.Area.HHXHandelsgymnasium.Value" ) == GetString( "DwPageID_2" ) )978 {979 @RenderParagraphContent( GetInteger( "Item.Area.HHXHandelsgymnasiumSocialeMedier.Value" ) )980 }981 if ( GetString( "Item.Area.STXAlmentGymnasium.Value" ) == GetString( "DwPageID_2" ) )982 {983 @RenderParagraphContent( GetInteger( "Item.Area.STXAlmentGymnasiumSocialeMedier.Value" ) )984 }985 if ( GetString( "Item.Area.HTXTekniskGymnasium.Value" ) == GetString( "DwPageID_2" ) )986 {987 @RenderParagraphContent( GetInteger( "Item.Area.HTXTekniskGymnasiumSocialeMedier.Value" ) )988 }989 if ( GetString( "Item.Area.HF.Value" ) == GetString( "DwPageID_2" ) )990 {991 @RenderParagraphContent( GetInteger( "Item.Area.HFSocialeMedier.Value" ) )992 }993 }994995 <script async="" src="/Files/Templates/Designs/rybners/_assets/_dist/js/default.js?v=0.0.5"></script>996 </body>997998 @GetValue( "CopyRightNotice" )999 </html>