Exception in template (\Designs\energiviborg-e4\Paragraph\AccordionFirstAgenda.cshtml): System.ArgumentException: Invalid JSON primitive: .
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject()
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth)
   at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input, Int32 depthLimit, JavaScriptSerializer serializer)
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit)
   at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize[T](String input)
   at EnergiViborg.CustomModules.FirstAgenda.FirstAgendaService.GetMeetingDetails(String Uid) in C:\azp\agent\_work\8\s\EnergiViborg\EnergiViborg\CustomModules\FirstAgenda\FirstAgendaService.cs:line 99
   at CompiledRazorTemplates.Dynamic.cfcfdedcdeeef.Execute()
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateBase.cs:line 126
   at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 608
   at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Templating\TemplateService.cs:line 439
   at RazorEngine.Razor.Parse[T](String razorTemplate, T model, String cacheName) in c:\Users\abbottm\Documents\GitHub\RazorEngine\src\Core\RazorEngine.Core\Razor.cs:line 276
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()
@using System.Web; @using System.Web.Script.Serialization; @using RestSharp; @using RestSharp.Authenticators; @using Dynamicweb.Content.Items @using Co3.Espresso.Base.Models @using Co3.Espresso.Base.Extensions @using Co3.Espresso.Website.Models.FrontEnd @using Co3.Espresso.Website.Models.FrontEnd.Elements @using Co3.Espresso.Website.Models.FrontEnd.Paragraphs @using EnergiViborg.CustomModules.FirstAgenda @inherits Co3.Espresso.Website.TemplateBases.Paragraphs.ImageTextTopBottom @{ Espresso.Wrapper.ClassList.Clear(); ClassList AccordionItemClassList = new ClassList(); ClassList AccordionItemBorderStyleClassList = new ClassList(); ClassList AccordionItemToggleClassList = new ClassList(); ClassList AccordionItemToggleTextClassList = new ClassList(); ClassList AccordionItemToggleIconClassList = new ClassList(); ClassList AccordionItemContentClassList = new ClassList(); AccordionItemClassList.AddClasses("p-accordion-item"); Espresso.Container.ClassList.RemoveClasses("p-imagetext"); Espresso.Container.ClassList.AddClasses("p-accordion"); var agendaUid = HttpContext.Current.Request.Params["agendaUid"]; var meetingDetails = FirstAgendaService.GetMeetingDetails(agendaUid); var firstAgendaSecret = Espresso.Item.ClientSecret; var firstAgendaID = Espresso.Item.ClientID; var firstAgendaOrganizationUID = Espresso.Item.OrganizationUID; var currentRawUrl = HttpContext.Current.Request.RawUrl; var itemComitteeUid = Espresso.Item.CommitteeUid; string AccordionBorderStyle = string.Empty; if (Espresso.Item.Border == "top-bottom") { if (Espresso.Item.Margin != "none" && string.IsNullOrEmpty(Espresso.Item.Margin) == false) { AccordionBorderStyle = "horizontal-spaced"; } else { AccordionBorderStyle = "horizontal-condensed"; } } else if (Espresso.Item.Border == "top-bottom-left-right" || Espresso.Item.Border == "none") { if (Espresso.Item.Margin != "none" && string.IsNullOrEmpty(Espresso.Item.Margin) == false) { AccordionBorderStyle = "around-spaced"; } else { AccordionBorderStyle = "around-condensed"; } } if (Espresso.Item.TextColor != "" && Espresso.Item.TextColor != "auto") { Espresso.Wrapper.ClassList.AddClasses("e-text-" + Espresso.Item.TextColor); } if (AccordionBorderStyle == "horizontal-spaced") { AccordionItemClassList.AddClasses("border border-right-0 border-left-0"); } else if (AccordionBorderStyle == "horizontal-condensed") { AccordionItemClassList.AddClasses("border border-right-0 border-left-0"); } else if (AccordionBorderStyle == "around-spaced") { AccordionItemClassList.AddClasses("border rounded"); } else if (AccordionBorderStyle == "around-condensed") { AccordionItemClassList.AddClasses("border"); } if (Espresso.Item.BorderColor != "auto" && Espresso.Item.BorderColor != "") { Espresso.Wrapper.ClassList.AddClasses("border-" + Espresso.Item.BorderColor); AccordionItemClassList.AddClasses("border-" + Espresso.Item.BorderColor); } if (Espresso.Item.BackgroundColor != "" && Espresso.Item.BackgroundColor != "none") { AccordionItemClassList.AddClasses("bg-" + Espresso.Item.BackgroundColor); } if (Espresso.Item.IconColor != "" && Espresso.Item.IconColor != "auto") { AccordionItemToggleIconClassList.AddClasses("text-" + Espresso.Item.IconColor); } if (Espresso.Item.ToggleTextColor != "" && Espresso.Item.ToggleTextColor != "auto") { AccordionItemToggleTextClassList.AddClasses("text-" + Espresso.Item.ToggleTextColor); } if (Espresso.Item.Padding == "sm") { AccordionItemToggleClassList.AddClasses("px-1"); AccordionItemContentClassList.AddClasses("px-1 pb-1"); } else if (Espresso.Item.Padding == "lg") { AccordionItemToggleClassList.AddClasses("px-3"); AccordionItemContentClassList.AddClasses("px-3 pb-3"); } else if (Espresso.Item.Padding == "md") { AccordionItemToggleClassList.AddClasses("px-2"); AccordionItemContentClassList.AddClasses("px-2 pb-2"); } else { AccordionItemToggleClassList.AddClasses("px-2"); AccordionItemContentClassList.AddClasses("px-2 pb-2"); @* No padding AccordionItemToggleClassList.AddClasses("px-0"); AccordionItemContentClassList.AddClasses("px-0 pb-1"); *@ } if (Espresso.Item.Margin == "sm") { AccordionItemClassList.AddClasses("mb-1"); } else if (Espresso.Item.Margin == "lg") { AccordionItemClassList.AddClasses("mb-3"); } else if (Espresso.Item.Margin == "md") { AccordionItemClassList.AddClasses("mb-2"); } else { AccordionItemClassList.AddClasses("mb-0"); } AccordionItemToggleClassList.AddClasses("py-1 d-flex align-items-center collapsed"); AccordionItemToggleTextClassList.AddClasses("m-0 line-height-sm"); AccordionItemToggleTextClassList.AddClasses(Espresso.Item.ToggleTextStyle); if (Espresso.Item.IconPosition == "right") { AccordionItemToggleClassList.AddClasses("justify-content-between"); AccordionItemToggleIconClassList.AddClasses("ml-1 order-last"); } else { AccordionItemToggleIconClassList.AddClasses("mr-1 order-first"); } if (Espresso.Container.ClassList.Contains("hidden-md-up")) { Espresso.Container.ClassList.Add("d-md-none"); Espresso.Container.ClassList.Remove("hidden-md-up"); } if (Espresso.Container.ClassList.Contains("hidden-sm-down")) { Espresso.Container.ClassList.Add("d-none d-md-block"); Espresso.Container.ClassList.Remove("hidden-sm-down"); } } <div class="@Espresso.Container.ClassList" id="@Espresso.Id"> <div class="p-accordion-lead"> <h2 class="font-weight-normal">@meetingDetails.Name</h2> <p>@meetingDetails.Description</p> </div> <div class="p-accordion-container @Espresso.Wrapper.ClassList"> @{ int AccordionItemLoopCounter = 1; } @foreach (dynamic AccordionItem in Espresso.Item.AccordionItems) { EspressoImage AccordionItemImage = new EspressoImage(AccordionItem.Item); AccordionItemImage.Width = 640; AccordionItemBorderStyleClassList.Clear(); if (AccordionBorderStyle == "horizontal-spaced") { AccordionItemBorderStyleClassList.AddClasses(""); } else if (AccordionBorderStyle == "horizontal-condensed") { if (AccordionItemLoopCounter != Espresso.Item.AccordionItems.Count) { AccordionItemBorderStyleClassList.AddClasses("border-bottom-0"); } } else if (AccordionBorderStyle == "around-spaced") { AccordionItemClassList.AddClasses("border rounded"); } else if (AccordionBorderStyle == "around-condensed") { if (AccordionItemLoopCounter != Espresso.Item.AccordionItems.Count) { AccordionItemBorderStyleClassList.AddClasses("border-bottom-0"); } if (AccordionItemLoopCounter == 1) { AccordionItemBorderStyleClassList.AddClasses("rounded-top"); } else if (AccordionItemLoopCounter == Espresso.Item.AccordionItems.Count) { AccordionItemBorderStyleClassList.AddClasses("rounded-bottom"); } } foreach (var agenda in meetingDetails.Items) { if (!string.IsNullOrEmpty(itemComitteeUid)) { <div class="@AccordionItemClassList @AccordionItemBorderStyleClassList"> @if (agenda.IsPublic == true) { <div class="p-accordion-toggle"> <a data-toggle="collapse" data-target="#e-accordion-@Espresso.Id-@AccordionItem.Item.Id-@agenda.Uid" class="@AccordionItemToggleClassList"> <span class="p-accordion-toggle-text @AccordionItemToggleTextClassList"> @{ var agendaDetails = FirstAgendaService.GetAgendaItemDetails(agenda.Uid); } @agenda.Number @agendaDetails.Caption </span> <i class="material-icons p-accordion-toggle-icon @AccordionItemToggleIconClassList">add</i> </a> </div> <div id="e-accordion-@Espresso.Id-@AccordionItem.Item.Id-@agenda.Uid" class="collapse"> <div class="@AccordionItemContentClassList p-accordion-content"> @if (@AccordionItemImage.URL != "") { <div class="row no-gutters justify-content-@AccordionItem.ImageAlignmentHorizontal"> <div class="col-@AccordionItem.ImageScale"> <div class="p-img-container mb-1"> <img src="@AccordionItemImage.URL" class="p-img" alt="@AccordionItem.Heading"> </div> </div> </div> } <div class="p-txt-container small"> <h2 class="font-weight-normal">@Translate("Dagsorden")</h2> @if (agenda.PdfImages != null) { int i = 1; foreach (var images in agenda.PdfImages) { <a data-toggle="modal" data-target="#@agenda.Uid-@i"> <img class="img-fluid mb-2" src="@images.Url" /> </a> <div id="@agenda.Uid-@i" class="modal" tabindex="-1" role="dialog" aria-labelledby="@agenda.Uid" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <div class="modal-body"> <img class="img-fluid mb-2" src="@images.Url" /> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">@Translate("Luk")</button> </div> </div> </div> </div> i++; } } @foreach (var presentation in agendaDetails.Presentations) { var presentationContent = !string.IsNullOrWhiteSpace(presentation.Title) ? presentation.Title : string.Empty; var presentationContentTest = !string.IsNullOrWhiteSpace(presentation.Content) ? presentation.Content : string.Empty; if (!string.IsNullOrWhiteSpace(FirstAgendaService.GetDocLink(presentation.DocumentUid))) { <br /> //PDF link - used for showing the given link to the PDF (referat) <span>@Translate("Link til pdf"):</span> <br /> <a href="@FirstAgendaService.GetDocLink(presentation.DocumentUid)" target="_blank" rel="nofollow" class="link-to-pdf">@presentation.Title</a> <br /> } if (!string.IsNullOrEmpty(presentationContentTest)) { <h2 class="font-weight-normal test-hest">@Translate("Referat")</h2> @presentationContentTest @presentationContent } } @if (agendaDetails.ItemDecision != null && !string.IsNullOrWhiteSpace(agendaDetails.ItemDecision.Text)) { <h2 class="font-weight-normal">@Translate("Referat")</h2> <span>@agendaDetails.ItemDecision.Text</span> } @* Bilag link *@ @foreach (var doc in agendaDetails.Documents) { if (!string.IsNullOrEmpty(FirstAgendaService.GetDocLink(doc.Uid))) { if (agendaDetails.Documents.IndexOf(doc) == 0) { <h2 class="font-weight-normal">@Translate("Bilag")</h2> } <a href="@FirstAgendaService.GetDocLink(doc.Uid)" target="_blank" rel="nofollow" class="bilag">@doc.Title</a> <br /> } } </div> </div> </div> } else { <div class="p-accordion-toggle"> <a data-toggle="collapse" data-target="#e-accordion-@Espresso.Id-@AccordionItem.Item.Id-@agenda.Uid disabled" class="@AccordionItemToggleClassList" disabled> <span class="p-accordion-toggle-text @AccordionItemToggleTextClassList"> @{ var agendaDetails = FirstAgendaService.GetAgendaItemDetails(agenda.Uid); } @agenda.Number @agendaDetails.Caption </span> <i class="material-icons p-accordion-toggle-icon @AccordionItemToggleIconClassList">add</i> </a> </div> <div id="e-accordion-@Espresso.Id-@AccordionItem.Item.Id-@agenda.Uid disabled" class="collapse" disabled> <div class="@AccordionItemContentClassList p-accordion-content"> @if (@AccordionItemImage.URL != "") { <div class="row no-gutters justify-content-@AccordionItem.ImageAlignmentHorizontal"> <div class="col-@AccordionItem.ImageScale"> <div class="p-img-container mb-1"> <img src="@AccordionItemImage.URL" class="p-img" alt="@AccordionItem.Heading"> </div> </div> </div> } <div class="p-txt-container small"> @foreach (var presentation in agendaDetails.Presentations) { var presentationContent = !string.IsNullOrWhiteSpace(presentation.Title) ? presentation.Title : string.Empty; var presentationContentTest = !string.IsNullOrWhiteSpace(presentation.Content) ? presentation.Content : string.Empty; <a href="@FirstAgendaService.GetDocLink(presentation.DocumentUid)">@presentation.Title</a> @presentationContentTest @presentationContent } @foreach (var doc in agendaDetails.Documents) { <a href="@FirstAgendaService.GetDocLink(doc.Uid)">@doc.Title</a> } </div> </div> </div> } </div> } } AccordionItemLoopCounter++; } </div> </div> <style> .modal-backdrop { z-index: -10; } .modal-header { border-bottom: none; } .close { margin: 0 !important; font-size: 2.5em; } </style>
keyboard_arrow_up