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_ff4710738f1c4816b0d96b951c234195.Execute() in C:\inetpub\wwwroot\rybners_2022.espresso4.dk\Files\Templates\Designs\rybners\_parsed\Rybners_course.parsed.cshtml:line 258
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.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
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 19 bool cookieConsentAcceptedStatistics = false;
20 var cookieConsent = HttpContext.Current.Request.Cookies["CookieConsent"];
21 if ( cookieConsent != null )
22 {
23 string cookieConsentValue = cookieConsent.Value;
24 cookieConsentAcceptedStatistics = cookieConsentValue != null && cookieConsentValue.Contains( "statistics:true" );
25 }
26 bool loadGoogleTagManager = !string.IsNullOrEmpty( Espresso.Area.GoogleTagManagerID ) && cookieConsentAcceptedStatistics &&
27 !(Espresso.Area.Item.GoogleTagManagerDisableIfPerformanceTestIsDetected == "True" && HttpContext.Current.Request.UserAgent.ToLower().Contains( "lighthouse" ));
28 29 string rybnersSchoolBodyClass = string.Empty;
30 31 // Set a color based on the area of subdomains
32 var areaId = GetInteger( "DwAreaID" );
33 var rescueCenterAreaId = 24;
34 var courseCenterAreaId = 25;
35 36 if (areaId == courseCenterAreaId) {
37 rybnersSchoolBodyClass = "rybners-kursuscenter";
38 } else if (areaId == rescueCenterAreaId) {
39 rybnersSchoolBodyClass = "rybners-rescuecenter";
40 }
41 42 bool isStandalone = false;
43 if (areaId == courseCenterAreaId || areaId == rescueCenterAreaId)
44 {
45 isStandalone = true;
46 }
47 48 // Skoler
49 if ( isStandalone == false )
50 {
51 if ( GetString( "Item.Area.TekniskSkole.Value" ) == GetString( "DwPageID_2" ) )
52 {
53 rybnersSchoolBodyClass = "rybners-tekniskskole";
54 }
55 if ( GetString( "Item.Area.Handelsskole.Value" ) == GetString( "DwPageID_2" ) )
56 {
57 rybnersSchoolBodyClass = "rybners-handelsskole";
58 }
59 if ( GetString( "Item.Area.EUX.Value" ) == GetString( "DwPageID_2" ) )
60 {
61 rybnersSchoolBodyClass = "rybners-eux";
62 }
63 if ( GetString( "Item.Area.Kursuscenter.Value" ) == GetString( "DwPageID_2" ) )
64 {
65 rybnersSchoolBodyClass = "rybners-kursuscenter";
66 }
67 if ( GetString( "Item.Area.HHXHandelsgymnasium.Value" ) == GetString( "DwPageID_2" ) )
68 {
69 rybnersSchoolBodyClass = "rybners-hhxhandelsgymnasium";
70 }
71 if ( GetString( "Item.Area.STXAlmentGymnasium.Value" ) == GetString( "DwPageID_2" ) )
72 {
73 rybnersSchoolBodyClass = "rybners-stxalmentgymnasium";
74 }
75 if ( GetString( "Item.Area.HTXTekniskGymnasium.Value" ) == GetString( "DwPageID_2" ) )
76 {
77 rybnersSchoolBodyClass = "rybners-htxtekniskgymnasium wat";
78 }
79 if ( GetString( "Item.Area.HF.Value" ) == GetString( "DwPageID_2" ) )
80 {
81 rybnersSchoolBodyClass = "rybners-hf";
82 }
83 }
84 }
85 86 87 <!DOCTYPE html>
88 <html lang="@globalAreaLang" data-separator-integer="@currencySeparatorInteger" data-separator-decimal="@currencySeparatorDecimal">
89 <head>
90 @GetValue( "CopyRightNotice" )
91 <meta charset="utf-8">
92 <meta content="width=device-width, initial-scale=1, shrink-to-fit=no, minimal-ui" name="viewport">
93 <meta content="ie=edge" http-equiv="x-ua-compatible">
94 <title>@GetValue("Title")</title>
95 @Espresso.CriticalCSS
96 @RenderSnippet( "webfonts" )
97 <link href="/Files/Templates/Designs/rybners/_assets/_dist/css/default.css?v=0.036" media="@Espresso.StylesheetAttributeMedia" rel="@Espresso.StylesheetAttributeRel" as="style">
98 @Espresso.CriticalJS
99 <link href="https://cdnjs.cloudflare.com" rel="preconnect">
100 <link href="https://www.googletagmanager.com" rel="preconnect">
101 <link href="https://www.google-analytics.com" rel="preconnect">
102 <link href="https://connect.facebook.net" rel="preconnect">
103 <link rel="shortcut icon" type="image/x-icon" href="@Espresso.Area.Item.Favicon">
104 <meta name="description" content="@Espresso.DynamicwebPage.Description">
105 @GetValue( "MetaTags" )
106 @if ( Espresso.IsStagingUrl )
107 {
108 <meta content="noindex,nofollow" name="robots">
109 }
110 <meta property="og:url" content="@openGraphUrl">
111 <meta property="og:title" content="@Espresso.OpenGraphTitle">
112 <meta property="og:description" content="@Espresso.OpenGraphDescription">
113 <meta property="og:image" content="@openGraphImage">
114 <meta property="og:type" content="website">
115 @if ( string.IsNullOrEmpty( Espresso.Area.Item.GoogleSiteVerification ) == false )
116 {
117 <meta name="google-site-verification" content="@Espresso.Area.Item.GoogleSiteVerification">
118 }
119 <script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="693e4c71-0568-41d0-acd5-14478229a22a" data-culture="@globalAreaLang" data-blockingmode="auto" type="text/javascript"></script>
120121 <!-- Google Consent Mode -->
122 <script data-cookieconsent="statistics">
123 window.dataLayer = window.dataLayer || [];
124 function gtag() {
125 dataLayer.push(arguments)
126 }
127 gtag("consent", "default", {
128 ad_storage: "denied",
129 analytics_storage: "denied",
130 });
131 gtag("set", "url_passthrough", true);
132 </script>
133 <!-- End Google Consent Mode-->
134135 @if ( loadGoogleTagManager )
136 {
137 <!-- Google Tag Manager -->
138 <script data-cookieconsent="statistics">
139 (function(w, d, s, l, i) {
140 w[l] = w[l] || [];
141 w[l].push({
142 'gtm.start':
143 new Date().getTime(),
144 event: 'gtm.js'
145 });
146 var f = d.getElementsByTagName(s)[0],
147 j = d.createElement(s),
148 dl = l != 'dataLayer' ? '&l=' + l : '';
149 j.async = true;
150 j.src =
151 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
152 f.parentNode.insertBefore(j, f);
153 })(window, document, 'script', 'dataLayer', '@Espresso.Area.GoogleTagManagerID');
154 </script>
155 <!-- End Google Tag Manager -->
156 }
157158159 </head>
160161 <body class="@Espresso.Item.CustomClasses @rybnersSchoolBodyClass" data-is-user-authenticated="@isUserAuthenticated.ToString().ToLower()" data-design="@Espresso.Area.DesignsFolderName">
162 @if ( loadGoogleTagManager )
163 {
164 <!-- Google Tag Manager (noscript) -->
165 <noscript>
166 <iframe src="https://www.googletagmanager.com/ns.html?id=@Espresso.Area.GoogleTagManagerID" height="0" width="0" style="display: none; visibility: hidden"></iframe>
167 </noscript>
168 <!-- End Google Tag Manager (noscript) -->
169 }
170171 @using Co3.Espresso.Base.Extensions
172 @using Co3.Espresso.Website.Services
173 @using Co3.Rybners.Website.Services
174 @using Dynamicweb.Content
175 @using Dynamicweb.Content.Items
176 @using Dynamicweb.Extensibility
177 @using Dynamicweb.Frontend
178 @using RazorEngine.Templating
179 @using ItemService = Co3.Espresso.Website.Services.ItemService
180 @using Page = Dynamicweb.Content.Page
181 @using PageService = Dynamicweb.Content.PageService
182 @using ParagraphService = Dynamicweb.Content.ParagraphService
183 @inherits Co3.Espresso.Website.TemplateBases.Pages.PageBase
184185 @{
186 Espresso.Canvas.Classes.AddClasses( "js-e-canvas is-loading" );
187 if ( Espresso.Item.CanvasFullscreen == "True" )
188 {
189 Espresso.Canvas.Classes.AddClasses( "is-fullscreen" );
190 }
191192 PageService ps = new PageService();
193 ParagraphService paragraphService = new ParagraphService();
194195 Page holdPage = ps.GetPage( GetInteger( "Global.PageId" ) );
196 var teams = RybnersItemService.Instance.GetTeamsForCourse( holdPage.ID ).Where( c =>
197 {
198 string HoldTilmeldingsfrist = c.Item["HoldTilmeldingsfrist"]?.ToString();
199 DateTime courseDeadlineDate = new DateTime();
200 DateTime.TryParse( HoldTilmeldingsfrist, out courseDeadlineDate );
201 return courseDeadlineDate.Date >= DateTime.Now.Date;
202 } ).ToList();
203 var teamsInFuture = teams.Where( t => (DateTime) t.Item["HoldStartDato"] > DateTime.Now ).ToList();
204 var severalTeams = teams.Where( t => (int) t.Item["HoldLedigePladser"] > 1 && (DateTime) t.Item["HoldStartDato"] > DateTime.Now ).ToList();
205 bool anyFreeSeats = teams.Any( t => (int) t.Item["HoldLedigePladser"] > 0 && (DateTime) t.Item["HoldTilmeldingsfrist"] > DateTime.Now );
206207 Page defaultTeam = teams.FirstOrDefault();
208209 var defaultTeamContactPerson = defaultTeam?.Item["HoldKontaktperson"]?.ToString();
210 var defaultTeamContactNumber = defaultTeam?.Item["HoldKontaktTelefon"]?.ToString();
211 var defaultTeamQuickNumber = defaultTeam?.Item["HoldKvikNr"]?.ToString();
212213 var teamType = defaultTeam?.Item["HoldType"]?.ToString();
214215 bool anyTeams = teams.Any();
216217 IEnumerable< Paragraph > courseMainCategoriesCollection = paragraphService.GetParagraphsByItemTypes( new[] {"CourseMainCaategori"} );
218 Paragraph courseMainCategoryDefaults = new Paragraph();
219220 foreach ( Paragraph mainCatParagraph in courseMainCategoriesCollection )
221 {
222 string[] cats = mainCatParagraph.Item[ "KategoriNavn" ]?.ToString().Split( ',' );
223224 foreach ( string cat in cats )
225 {
226 if ( cat.ToLower().Trim().Replace( " ", "" ) == holdPage.Item[ "KategoriNavn" ]?.ToString().ToLower().Trim().Replace( " ", "" ) )
227 {
228 courseMainCategoryDefaults = mainCatParagraph;
229 break;
230 }
231232 }
233 }
234235 var fagPages = RybnersItemService.Instance.GetSchoolSubjectsForCourse( holdPage.ID ).ToList();
236237 string courseStartStr = defaultTeam?.Item[ "HoldStartDato" ]?.ToString();
238 DateTime courseMainStartDate = new DateTime();
239 DateTime.TryParse( courseStartStr, out courseMainStartDate );
240241 string courseEndStr = defaultTeam?.Item[ "HoldSlutDato" ]?.ToString();
242 DateTime courseMainEndDate = new DateTime();
243 DateTime.TryParse( courseEndStr, out courseMainEndDate );
244245 string courseDeadlineStr = defaultTeam?.Item[ "HoldTilmeldingsfrist" ]?.ToString();
246 DateTime courseMainDeadlineDate = new DateTime();
247 DateTime.TryParse( courseDeadlineStr, out courseMainDeadlineDate );
248249 string coursePlace = defaultTeam?.Item[ "HoldAfholdssted" ]?.ToString().Replace( ",", "<br>" );
250251252 string courseImage = string.Empty;
253 string courseDesc = string.Empty;
254 string courseContacts = string.Empty;
255256 if ( courseMainCategoryDefaults != null )
257 {
258 courseImage = courseMainCategoryDefaults.Item[ "CourseMainCategoryImage" ]?.ToString();
259 courseDesc = courseMainCategoryDefaults.Item[ "CourseMainCategoryDescription" ]?.ToString();
260 }
261262 courseContacts = holdPage.Item[ "TilknyttedeKontaktpersoner" ]?.ToString();
263264 string ManualImage = holdPage.Item["Billede"]?.ToString();
265 string ManualDesc = holdPage.Item[ "YderligereTekst" ]?.ToString();
266267 if ( string.IsNullOrEmpty( ManualImage ) == false )
268 {
269 courseImage = ManualImage;
270 }
271 if ( string.IsNullOrEmpty( ManualDesc ) == false )
272 {
273 courseDesc = ManualDesc;
274 }
275 string teamEmail = defaultTeam?.Item[ "HoldEmail" ]?.ToString();
276 string signupRedirect = "https://www.voksenuddannelse.dk/soeg/uddannelser/filtrering?searchString=" + defaultTeam?.Item[ "HoldKvikNr" ];
277 string antalPladser = "";
278279 }
280281282283 <div class="e-loading-overlay e-page-loading-overlay is-loading js-e-page-loading-overlay">
284 @RenderingService.Instance.PartialView( "_partials/loading-spinner.cshtml" )
285 </div>
286287 @RenderingService.Instance.PartialView( "_partials/webfonts.cshtml", Espresso )
288 <a class="rybners-home-link" href="/"></a>
289 <div class="@Espresso.Canvas.Classes">
290 @RenderingService.Instance.PartialView( "_partials/header.cshtml", Espresso )
291 @RenderingService.Instance.PartialView( "usermanagement/viewprofile/espresso-impersonate-user-msg.cshtml", Espresso )
292 @RenderingService.Instance.PartialView( "_partials/nav-local-horizontal.cshtml", Espresso )
293 <main class="e-content js-e-content @Espresso.ContentArea.Classes pt-0" id="dwcontentmain">
294 @RenderingService.Instance.PartialView( "_partials/breadcrumb.cshtml", Espresso )
295 <article class="e-content-article">
296 @RenderingService.Instance.PartialView( "_partials/nav-local-vertical.cshtml", Espresso )
297298 <section class="e-section e-theme-quaternary js-e-section mb-3 p pb-0 p-section pt-0 px-0" id="19717">
299 <div class="container-fluid fixed-gutters overflow-hidden px-0">
300 <div class="no-gutters row">
301 <div class="col-12 col-lg-12 col-md-12 mx-auto">
302 <div class="justify-content-center row">
303 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">
304 <div class="row ">
305 <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">
306 <div class="p-tile-container">
307 <div class="p-txt-container">
308 <div class="container-fluid">
309 <div class="p-txt-wrapper row">
310 <div class="col-xl-9">
311312 <h2 class="mb-1">@holdPage.Item["AktivitetNavn"]</h2>
313 @courseDesc
314315 <div class="row">
316 <div class="col-12 col-md-6 pt-2">
317 @if ( courseMainStartDate.Equals( DateTime.MinValue ) == false )
318 {
319 if (severalTeams.Any() == false && courseMainDeadlineDate > DateTime.Now ) {
320 <h3>Hvornår</h3>
321 <p class="mb-0 small">
322 @courseMainStartDate.ToString( "dd. MMM yyyy" ) - @courseMainEndDate.ToString( "dd. MMM yyyy" )
323 </p>
324 }
325 else
326 {
327 <h3>Hvornår</h3>
328 <p class="mb-0 small">
329 <strong>Se holdlisten</strong>
330 </p>
331 }
332 }
333334335 @if ( courseMainDeadlineDate.Equals( DateTime.MinValue ) == false && courseMainDeadlineDate > DateTime.Now )
336 {
337 <h5 class="pt-2">Tilmeldingsfrist:</h5>
338 <p class="small">@courseMainDeadlineDate.ToString( "dd. MMM yyyy" )</p>
339 }
340 @if ( fagPages.Any() == false )
341 {
342 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>
343344 }
345346 </div>
347 @if ( string.IsNullOrEmpty( coursePlace ) == false )
348 {
349 <div class="col-12 col-md-6 pt-2">
350 <h3>Hvor</h3>
351 <p class="small">
352 @coursePlace
353 </p>
354 </div>
355 }
356357 <script>
358 var debugData = @JsonService.Instance.ToJson( holdPage.Item )
359 </script>
360361362363 </div>
364 </div>
365 </div>
366 </div>
367 </div>
368 </div>
369 </div>
370 </div>
371 </div>
372373 <div class="col-12 col-lg-6 col-md-6 col-sm-12 col-xl-6 p p-columns p-imagetext-tb">
374 <div class="row ">
375 <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">
376 <div class="p-tile-container">
377 <div class="p-txt-container">
378379 </div>
380 </div>
381 </div>
382383 <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">
384 <div class="p-tile-container">
385 <div class="p-img-container">
386 @if ( courseImage != null )
387 {
388 <div class="bg-center-middle p-img" style="background-image: url('/admin/public/getimage.ashx?Image=@courseImage&Width=960&Height=0&Format=jpg&Quality=75&Crop=0');"></div>
389 }
390391 </div>
392 <div class="p-txt-container"></div>
393 </div>
394 </div>
395 </div>
396 </div>
397 </div>
398 </div>
399 </div>
400 </div>
401 </section>
402403 <section class="e-section e-theme-tertiary js-e-section p pb-0 p-section pt-0 px-0" id="19785">
404 <div class="container-fluid overflow-hidden px-0">
405 <div class="no-gutters no-gutters row">
406 <div class="col-12 col-lg-12 col-md-12 mx-auto">
407408409410 <div class="justify-content-center no-gutters row">
411412413414 <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">
415416 @if ( teamsInFuture.Any() )
417 {
418 <div class="row">
419 <div class="col-12 col-lg-12 col-md-12 is-lg mx-auto">
420 <div class="justify-content-center row">
421 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">
422 <div class="row">
423 <div class="col-12 p-txt-container">
424 <h3 class="mb-2">Holdliste</h3>
425 </div>
426 </div>
427 <div class="row">
428 <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">
429 <div class="card rybners-fag-card e-theme-quaternary border-0">
430 <div class="p-txt-container e-text-fixed-vertical-flow">
431 <div class="card-body ">
432 <table class="table" style="font-size: 1em">
433434 @foreach ( Page teamPage in teamsInFuture.OrderBy( t => (DateTime)t.Item[ "HoldStartDato" ] ) )
435 {
436437 DateTime startDato = (DateTime) teamPage.Item["HoldStartDato"];
438 DateTime slutDato = (DateTime) teamPage.Item["HoldSlutDato"];
439 string kvikNr = (string) teamPage.Item["HoldKvikNr"];
440 double freeSpots;
441 double.TryParse( teamPage.Item["HoldLedigePladser"]?.ToString(), out freeSpots );
442443 <tr>
444 <td class="px-0">
445 @startDato.ToString( "dd. MMM yyyy" )- @slutDato.ToString( "dd. MMM yyyy" )
446 </td>
447 <td class=" px-0 text-right">
448 <span class="badge p-1 badge-pill badge-secondary">
449 @if ( freeSpots > 0 )
450 {
451 <span>@teamPage.Item["HoldLedigePladser"] ledige pladser</span>
452 }
453 else
454 {
455 <span>Kontakt os</span>
456 }
457458 </span>
459 </td>
460 </tr>
461 }
462 </table>
463 </div>
464 </div>
465 </div>
466 </div>
467 </div>
468469 </div>
470 </div>
471 </div>
472 </div>
473 }
474475476 <div class="row ">
477478 @if ( !anyTeams )
479 {
480 <div class="col-12">
481 <h3>Der er pt. ingen aktive hold til dette kursus. </h3>
482 <p>@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</p>
483 </div>
484 }
485486487 @if ( fagPages != null && fagPages.Any() )
488 {
489 <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">
490 <button class="btn btn-primary e-section-collapse-toggle-btn" type="button">
491 <i class="e-section-collapse-toggle-icon material-icons">keyboard_arrow_down</i>
492 </button>
493 <small class="e-section-collapse-toggle-text h4" data-collapse-text="Vis mindre" data-expand-text="Vis mere"></small>
494 </div>
495496 <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="">
497 <div class="justify-content-center row">
498 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">
499 <div class="row">
500 <div class="col-12 p-txt-container">
501 <h3 class="mb-2">Fag tilknyttet kurset</h3>
502 </div>
503 </div>
504 @foreach ( Item fag in fagPages )
505 {
506 <div class="row">
507 <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">
508 <div class="card rybners-fag-card e-theme-quaternary border-0">
509 <div class="p-txt-container e-text-fixed-vertical-flow">
510 <div class="card-body ">
511 <h3>
512 @fag["SkoleFagNavn"]
513 </h3>
514 <hr>
515 <p class="mb-1"><h5 class="d-inline-flex mb-0">Skolefagkode:</h5> @fag["SkoleFagKode"]
516517 <p class="mb-1"><h5 class="d-inline-flex mb-0">Timer pr dag:</h5> @fag["SkoleFagTimerPrDag"]
518 <p class="mb-1"><h5 class="d-inline-flex mb-0">Deltagerpris:</h5> @fag["SkoleFagDeltagerpris"] kr.
519 <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)*@
520 <p class="mb-1"><h5 class="d-inline-flex mb-0">Pris udenfor AMU-målgruppe:</h5> @fag["SkoleFagPrisUdenforAmuMaalgruppe"] kr.
521522 <h5 class="mt-2">Målgruppe</h5>
523 <p>
524 @fag["SkoleFagMaalgruppe"]
525 </p>
526 <h5 class="mt-2">Formål</h5>
527 <p>
528 @fag["SkoleFagFormaal"]
529 </p>
530 <h5 class="mt-2">Indhold</h5>
531 <p>
532 @fag["SkoleFagIndhold"]
533 </p>
534535 </div>
536 </div>
537 </div>
538 </div>
539 </div>
540 }
541 </div>
542 </div>
543 </div>
544 }
545 </div>
546547548549 @{
550 bool AktivitetAnvendOverordnetBeskrivelse = holdPage.Item["AktivitetAnvendOverordnetBeskrivelse"].Equals( true );
551 string AktivitetOverordnetBeskrivelse = holdPage.Item["AktivitetOverordnetBeskrivelse"]?.ToString();
552 // Check if AktivitetOverordnetBeskrivelse is not empty
553554 }
555 @if ( teamType == "idv" && !string.IsNullOrEmpty(AktivitetOverordnetBeskrivelse) || AktivitetAnvendOverordnetBeskrivelse && !string.IsNullOrEmpty(AktivitetOverordnetBeskrivelse) )
556 {
557 <div class="row">
558 <div class="col-12 col-lg-12 col-md-12 is-lg mx-auto">
559 <div class="justify-content-center row">
560 <div class="col-12 col-lg-12 col-md-12 col-sm-12 col-xl-12 p p-imagetext p-imagetext-tb">
561 <div class="row">
562 <div class="col-12 p-txt-container">
563 <h3 class="mb-2">Beskrivelse</h3>
564 </div>
565 </div>
566 <div class="row">
567 <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">
568 <div class="card rybners-fag-card e-theme-quaternary border-0">
569 <div class="p-txt-container e-text-fixed-vertical-flow">
570 <div class="card-body ">
571 <p class="mb-1">@AktivitetOverordnetBeskrivelse</p>
572 </div>
573 </div>
574 </div>
575 </div>
576 </div>
577578 </div>
579 </div>
580 </div>
581 </div>
582 }
583584 </div>
585586 <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">
587 <div class="no-gutters row">
588589 @{
590 bool isOpenCourse = false;
591 if ( defaultTeam != null && defaultTeam.Item != null && defaultTeam.Item["HoldErGarantikursus"] != null )
592 {
593 isOpenCourse = (bool) defaultTeam.Item["HoldErGarantikursus"];
594 }
595 }
596597 @if ( (anyFreeSeats || isOpenCourse == true) )
598 {
599600 <script>console.log(@JsonService.Instance.ToJson( holdPage.Item ));</script>
601602 <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">
603 <div class="card e-theme-education-primary">
604 <div class="e-text-fixed-vertical-flow p-txt-container">
605 <div class="card-body text-center">
606 <h3 class="h2">Tilmelding</h3>
607 @if ( teamType == "idv" )
608 {
609 <form class="js-rybners-course-signup-selector" action="@signupRedirect">
610611 @if ( severalTeams.Any() )
612 {
613 <div class="form-group py-1">
614 <select class="form-control rybners-course-form-select js-rybners-teams-select-input">
615616 <option selected="" disabled="">Vælg hold</option>
617618 @foreach ( Page teamPage in teams.OrderBy( t => (DateTime)t.Item[ "HoldStartDato" ] ) )
619 {
620621 DateTime startDato = (DateTime) teamPage.Item["HoldStartDato"];
622 DateTime slutDato = (DateTime) teamPage.Item["HoldSlutDato"];
623624 string kviknr = teamPage.Item["HoldKvikNr"]?.ToString();
625626 string optionValue = "https://voksenuddannelse.dk/soeg/uddannelser/filtrering?searchString=" + kviknr;
627628 bool ledigePladser = (int) teamPage.Item["HoldLedigePladser"] > 0;
629 if ( ledigePladser )
630 {
631 <option value="@optionValue" data-kviknr="@kviknr">
632 @startDato.ToString( "dd. MMM yyyy" )- @slutDato.ToString( "dd. MMM yyyy" )
633 </option>
634635 }
636637 }
638 </select>
639 </div>
640 }
641 <div class="form-group py-1">
642 <select class="form-control rybners-course-form-select js-rybners-course-signup-input">
643 <option>Vælg rolle</option>
644 <option value="1">
645 Betaling via virksomhed (DK)
646 </option>
647 <option value="2">
648 Egenbetaling / IKUF bevilling (DK)
649 </option>
650 <option value="3">
651 Foreigner / Udlænding (English)
652 </option>
653 </select>
654 </div>
655 </form>
656 <div class="js-rybners-course-signup-container rybners-course-signup-container" data-idv1-formpageid="28817" data-idv2-formpageid="28818" data-idv3-formpageid="28819"></div>
657 }
658659 else if ( (string) holdPage.Item["AktivitetOfflineVisning"] == "amu" )
660 {
661 <form class="js-rybners-sign-up-form" action="@signupRedirect">
662 @if ( severalTeams.Any() )
663 {
664 <div class="form-group py-1">
665 <select class="form-control rybners-course-form-select js-rybners-teams-select-input" required="">
666667 <option selected="" disabled="">Vælg hold</option>
668669 @foreach ( Page teamPage in teams.OrderBy( t => (DateTime)t.Item[ "HoldStartDato" ] ) )
670 {
671672 DateTime startDato = (DateTime) teamPage.Item["HoldStartDato"];
673 DateTime slutDato = (DateTime) teamPage.Item["HoldSlutDato"];
674 string kviknr = teamPage.Item["HoldKvikNr"]?.ToString();
675676677 string optionValue = "https://voksenuddannelse.dk/soeg/uddannelser/filtrering?searchString=" + kviknr;
678679 bool ledigePladser = (int) teamPage.Item["HoldLedigePladser"] > 0;
680 if ( ledigePladser )
681 {
682 <option value="@optionValue" data-kviknr="@kviknr">
683 @startDato.ToString( "dd. MMM yyyy" )- @slutDato.ToString( "dd. MMM yyyy" )
684 </option>
685686 }
687688 }
689 </select>
690 </div>
691 }
692693694695696 <div class="form-group py-1">
697 <select class="form-control rybners-course-form-select js-rybners-sign-up-select-input" required="required">
698 <option selected="" disabled="">Vælg rolle</option>
699 <option value="virksomhed">
700 Jeg er i job og tilmelder mig selv eller andre ansatte i min virksomhed
701 </option>
702 <option value="privatperson">
703 Jeg tilmelder mig som privatperson
704 </option>
705706 </select>
707 </div>
708 <button type="submit" class="btn btn-primary">Tilmeld</button>
709 </form>
710711 <div class="mt-4 row text-left">
712 <div class="col-6 small">
713 <p class="pb-0 text-left text-dark font-weight-bold">@Translate("Rybners Course module - Ledige og Jobcentre - Info - Text", "Til ledige og Jobcentre: Kontakt vores kursussekretærer for tilmelding.")</p>
714 </div>
715 <div class="col-6 small">
716 <p class="pb-0 text-right">Kursets kviknummer: <span class="js-rybners-kviknr">@defaultTeamQuickNumber</span></p>
717 </div>
718 </div>
719 }
720 else
721 {
722 <h3 class="py-1">@Translate( "Rybners Course module - Further info contact DA - Text", "Kontakt skolen for yderligere information." )</h3>
723 }
724 </div>
725 </div>
726 </div>
727 </div>
728 }
729 @if ( teamType != "idv" )
730 {
731732 var educationForm = defaultTeam?.Item["HoldUndervisningsform"]?.ToString();
733 var educationTime = defaultTeam?.Item["HoldUndervisningstid"]?.ToString();
734 var prerequisites = defaultTeam?.Item["HoldForudsetninger"]?.ToString();
735 var description = defaultTeam?.Item["HoldBeskrivelse"]?.ToString();
736 <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">
737 <div class="card e-theme-quaternary">
738 <div class="e-text-fixed-vertical-flow p-txt-container">
739 <div class="card-body">
740 <div class="row">
741 <div class="align-self-center col-12 p-txt-container">
742743 <h3 class="mb-2">Yderligere holdinformation</h3>
744745 <h5 class="d-inline-flex mb-0">Undervisningsform</h5>
746 <p>@educationForm</p>
747 <h5 class="d-inline-flex mb-0">Undervisningstid</h5>
748 <p>@educationTime</p>
749 <h5 class="d-inline-flex mb-0">Forudsætninger</h5>
750 <p>@prerequisites</p>
751 @if ( description != "" )
752 {
753 <h5 class="d-inline-flex mb-0">Beskrivelse</h5>
754 <p>@description</p>
755 }
756757 </div>
758 </div>
759 </div>
760 </div>
761 </div>
762 </div>
763 }
764 @if ( anyTeams && teamType != "idv" )
765 {
766 <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">
767 <div class="card e-theme-quaternary">
768 <div class="e-text-fixed-vertical-flow p-txt-container">
769 <div class="card-body">
770 <div class="row">
771 <div class="align-self-center col-12 p-txt-container">
772773 <h3>Har du spørgsmål om kurset?</h3>
774 <p>@Translate( "Rybners Course module - Further info contactperson DA - Text", "Kontakt os:" )</p>
775 <br>
776 <p>@defaultTeamContactPerson</p>
777778 <p>tlf. @defaultTeamContactNumber <br>
779 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>
780781 </p>
782783 </div>
784 <div class="col-12 col-lg-4 col-md-6 order-first order-sm-last p-img-container">
785 <div class="row">
786 <p class="col-12">
787 @*<img alt="" class="p-img rounded-circle" src="/admin/public/getimage.ashx?Image=/Files/Images/IMG_2258_1.jpg&Width=1920&Height=1920&Format=jpg&Quality=75&Crop=0">*@
788 </p>
789 </div>
790 </div>
791 </div>
792 </div>
793 </div>
794 </div>
795 </div>
796 }
797 @if ( courseMainCategoryDefaults != null )
798 {
799 string systemName = courseMainCategoryDefaults.Item.SystemName;
800 string itemId = courseMainCategoryDefaults.Item.Id;
801 Item dwItem = Dynamicweb.Services.Items.GetItem( systemName, itemId );
802803 IEnumerable<Item> items = Co3.Rybners.Website.Services.RybnersItemService.Instance.GetItemsFromItemListId( dwItem, "TilknyttedeKontaktpersoner" );
804805 if ( items != null && items.Any() )
806 {
807 <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">
808 <div class="card e-theme-quaternary" style="padding: 3.5em 2em !important;">
809 <div class="e-text-fixed-vertical-flow p-txt-container">
810 <div class="card-body">
811 <div class="row">
812 <div class="align-self-center col-12 p-txt-container">
813 @foreach ( Item contactItem in items.Take( 2 ) )
814 {
815 string contactImage = contactItem["Image"].ToString();
816 string contactName = contactItem["ContactName"].ToString();
817 string contactTitle = contactItem["ContactTitle"].ToString();
818 string contactMobile = contactItem["ContactMobile"].ToString();
819 string contactDirect = contactItem["ContactDirect"].ToString();
820 string contactEmail = contactItem["ContactEmail"].ToString();
821822 <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;">
823 <div class="p-contact-wrapper">
824 <div class="row">
825 <div class="col-12">
826 <div class="row" itemscope="" itemtype="http://schema.org/Person">
827 <div class="col-12 p-txt-container ">
828 <div class="p-txt-wrapper">
829 <h3 class="p-contact-name" itemprop="name">@contactName</h3>
830 <p class="p-contact-title" itemprop="jobTitle">@contactTitle</p>
831 @if ( contactMobile != "" )
832 {
833 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">smartphone</i><a href="tel:@contactMobile" class="text-auto">@contactMobile</a></p>
834 }
835 @if ( contactDirect != "" )
836 {
837 <p class="p-contact-phone" itemprop="telephone"><i class="material-icons">phone</i><a href="tel:@contactDirect" class="text-auto">@contactDirect</a></p>
838 }
839 @if ( contactEmail != "" )
840 {
841 <p class="p-contact-email" itemprop="email"><i class="material-icons">mail</i><a href="mailto:@contactEmail" class="text-auto">@contactEmail</a></p>
842 }
843 </div>
844 </div>
845 <div class="p-img-container col-12 order-first mb-3">
846 <div class="row">
847 <p class="col-12 p-img-width-auto mx-auto">
848 <img src="/admin/public/getimage.ashx?Image=@contactImage&Width=960&Height=960&Format=jpg&Quality=0&Crop=0" class="p-img rounded-circle" alt="@contactName" itemprop="image">
849 </p></div>
850 </div>
851 </div>
852 </div>
853 </div>
854 </div>
855 </div>
856 }
857 </div>
858 </div>
859 </div>
860 </div>
861 </div>
862 </div>
863 }
864 }
865866867 <div aria-hidden="true" class="js-rybners-contact-modal fade modal" tabindex="-1">
868 <div class="modal-dialog" role="document">
869 <div class="modal-content">
870871 <div class="modal-body">
872 <button aria-label="Close" class="close" data-dismiss="modal" type="button">
873 <span aria-hidden="true">×</span>
874 </button>
875 <h3>@Translate( "Rybners Course module - Inactive contact DA - Text", "Kontakt skolen" )</h3>
876 <p class="mb-1">Kontaktperson: @defaultTeamContactPerson</p>
877 <p class="mb-1">tlf. @defaultTeamContactNumber
878 <br>e-mail: <a href="mailto:@teamEmail">@teamEmail</a>
879 </p>
880 </div>
881 <div class="modal-footer">
882 <button class="btn btn-primary" data-dismiss="modal" type="button">Luk</button>
883 </div>
884 </div>
885 </div>
886 </div>
887 </div>
888 </div>
889890 </div>
891892 @{
893 IEnumerable< Page > siblings = ServiceLocator.Current.GetPageService().GetPagesByParentID( PageView.Current().Page.Parent.ID ).Where( p => p.ID != PageView.Current().Page.ID && p.Active );
894 IEnumerable< Page > relatedActivity = siblings.Where( s => RybnersItemService.Instance.GetTeamsForCourse( s.ID ).FirstOrDefault()?.Item["HoldAktiId"] == defaultTeam?.Item["HoldAktiId"] );
895 }
896897 @if ( anyTeams && relatedActivity.Any() )
898 {
899900 <div class="col-12">
901 <div class="col-12">
902 <h2 class="mt-2 mb-2">Yderligere hold</h2>
903 <ul class="rybners-course-overview">
904 @foreach ( Page coursePage in relatedActivity.Take(4))
905 {
906 var fagByRelatedCourse = RybnersItemService.Instance.GetSchoolSubjectsForCourse( coursePage.ID );
907 var teamByRelatedCourse = RybnersItemService.Instance.GetTeamsForCourse( coursePage.ID ).FirstOrDefault();
908909 string relatedCourseName = teamByRelatedCourse?.Item[ "HoldAktivitetsnavn" ]?.ToString();
910 string relatedCourseType = coursePage.Item[ "AktivitetOfflineVisning" ]?.ToString();
911912 string relatedCourseStartStr = teamByRelatedCourse?.Item[ "HoldStartDato" ]?.ToString();
913 DateTime relatedCourseStartDate = new DateTime();
914 DateTime.TryParse( relatedCourseStartStr, out relatedCourseStartDate );
915916 string relatedCourseEndStr = teamByRelatedCourse?.Item[ "HoldSlutDato" ]?.ToString();
917 DateTime relatedCourseEndDate = new DateTime();
918 DateTime.TryParse( relatedCourseEndStr, out relatedCourseEndDate );
919920 string relatedCourseDeadlineStr = teamByRelatedCourse?.Item[ "HoldTilmeldingsfrist" ]?.ToString();
921 DateTime relatedCourseDeadlineDate = new DateTime();
922 DateTime.TryParse( relatedCourseDeadlineStr, out relatedCourseDeadlineDate );
923924 string relatedCourseDuration = fagByRelatedCourse.FirstOrDefault()?[ "SkoleFagVarighed" ]?.ToString();
925 string relatedCourseUrl = string.Format( "Default.aspx?ID={0}", coursePage.ID );
926927928929 relatedCourseUrl = SearchEngineFriendlyURLs.GetFriendlyUrl( relatedCourseUrl );
930931 <li class="d-flex rybners-course-list w-100 align-self-center">
932 <div class="course-name">
933 <a href="@relatedCourseUrl">
934 <h3>@relatedCourseName</h3></a></div>
935 <div class="course-type text-center">
936937 @if ( relatedCourseType == "amu" )
938 {
939 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> AMU-kursus</p>
940 }
941 else if ( relatedCourseType == "idv" ) {
942 <p class="mb-0 font-weight-bold"><i class="material-icons">done</i> IDV-kursus</p>
943 }
944 else
945 {
946 <p class="mb-0">@relatedCourseType</p>
947 }
948 </div>
949 @if ( fagByRelatedCourse.Count() > 1 )
950 {
951 <div class="course-date small">Flere fag tilknyttet</div>
952 }
953 else
954 {
955 if ( relatedCourseDuration == "1" )
956 {
957 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )</div>
958 } else if ( relatedCourseDuration == "0" )
959 {
960 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" )</div>
961 }
962 else
963 {
964 <div class="relatedCourse-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )</div>
965 }
966 <div class="course-date small">@relatedCourseStartDate.ToString( "dd. MMM yyyy" ) - @relatedCourseEndDate.ToString( "dd. MMM yyyy" )</div>
967 }
968 <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>
969 @if ( fagByRelatedCourse.Count() > 1 && relatedCourseDeadlineDate > DateTime.Now )
970 {
971 <br>
972 <span class="d-block small text-right"><small>@Translate( "Rybners Course module - Deadline DA - Text", "Tilmeldingsfrist:" ) @relatedCourseDeadlineDate</small></span>
973 }
974 </div>
975 </li>
976 }
977 </ul>
978 </div>
979 </div>
980 }
981 </div>
982 </div>
983 </div>
984 </section>
985986987 @*END COURSE CONTENT*@
988989 @GetValue("DwContent(dwcontentmain)")
990991 </article>
992 </main>
993994 @RenderingService.Instance.PartialView( "_partials/footer.cshtml", Espresso )
995996 @if ( !string.IsNullOrEmpty( GetString( "DwContent(dwcontentsocialmedia)" ) ) )
997 {
998 <aside id="dwcontentsocialmedia">@GetValue("DwContent(dwcontentsocialmedia)")</aside>
999 }
10001001 @RenderingService.Instance.PartialView( "ecom7/cartv2/step/espresso-cart-msg.cshtml" )
1002 </div>
10031004 @RenderingService.Instance.PartialView( "_partials/search.cshtml", Espresso )
10051006 @RenderingService.Instance.PartialView( "_partials/back-to-top.cshtml", Espresso )
10071008 @if ( 1 == 2 )
1009 {
1010 @GetValue( "DwCookieWarning" )
1011 }
101210131014 @{
1015 if ( isStandalone == false )
1016 {
1017 if ( GetString( "Item.Area.TekniskSkole.Value" ) == GetString( "DwPageID_2" ) )
1018 {
1019 @RenderParagraphContent( GetInteger( "Item.Area.TekniskSkoleSocialeMedier.Value" ) )
1020 }
1021 if ( GetString( "Item.Area.Handelsskole.Value" ) == GetString( "DwPageID_2" ) )
1022 {
1023 @RenderParagraphContent( GetInteger( "Item.Area.HandelsskoleSocialeMedier.Value" ) )
1024 }
1025 if ( GetString( "Item.Area.EUX.Value" ) == GetString( "DwPageID_2" ) )
1026 {
1027 @RenderParagraphContent( GetInteger( "Item.Area.EUXSocialeMedier.Value" ) )
1028 }
1029 if ( GetString( "Item.Area.Kursuscenter.Value" ) == GetString( "DwPageID_2" ) )
1030 {
1031 @RenderParagraphContent( GetInteger( "Item.Area.KursuscenterSocialeMedier.Value" ) )
1032 }
1033 if ( GetString( "Item.Area.HHXHandelsgymnasium.Value" ) == GetString( "DwPageID_2" ) )
1034 {
1035 @RenderParagraphContent( GetInteger( "Item.Area.HHXHandelsgymnasiumSocialeMedier.Value" ) )
1036 }
1037 if ( GetString( "Item.Area.STXAlmentGymnasium.Value" ) == GetString( "DwPageID_2" ) )
1038 {
1039 @RenderParagraphContent( GetInteger( "Item.Area.STXAlmentGymnasiumSocialeMedier.Value" ) )
1040 }
1041 if ( GetString( "Item.Area.HTXTekniskGymnasium.Value" ) == GetString( "DwPageID_2" ) )
1042 {
1043 @RenderParagraphContent( GetInteger( "Item.Area.HTXTekniskGymnasiumSocialeMedier.Value" ) )
1044 }
1045 if ( GetString( "Item.Area.HF.Value" ) == GetString( "DwPageID_2" ) )
1046 {
1047 @RenderParagraphContent( GetInteger( "Item.Area.HFSocialeMedier.Value" ) )
1048 }
1049 }
1050 }
10511052 <script async="" src="/Files/Templates/Designs/rybners/_assets/_dist/js/default.js?v=1.0.5"></script>
1053 </body>
10541055 @GetValue( "CopyRightNotice" )
1056 </html>