Skovbo Data kursus

Tryk på det kursus, du ønsker at vide mere om.

Herefter kan du få mere information samt tilmelde dig kurset.

Står du og mangler et kursus, som ikke findes på denne side, er du altid meget velkommen til at kontakte os.
Vi laver løbende "ønske-kurser" for enkelt personer/kirker eller for flere deltagere.
Disse kurser kan indrettes efter ønske og behov.

Skriv til sd@skovbodata.dk for specielle kursusønsker.

 

Hvis du ikke kan se kurser på denne side, er der ikke pt. planlagt kurser.

Error executing template "Designs/Dwsimple/Paragraph/SD_kurser.cshtml"
System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
   at System.Net.HttpWebRequest.GetResponse()
   at System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials, IWebProxy proxy, RequestCachePolicy cachePolicy)
   at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
   at System.Xml.XmlTextReaderImpl.FinishInitUriString()
   at System.Xml.XmlReaderSettings.CreateReader(String inputUri, XmlParserContext inputContext)
   at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
   at CompiledRazorTemplates.Dynamic.RazorEngine_0e617479c60a4cf28e88352b879794f1.b__16_0(TextWriter __razor_helper_writer) in E:\dynamicweb.net\solutions\SkovboData\skovbodata.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\Paragraph\SD_kurser.cshtml:line 483
   at CompiledRazorTemplates.Dynamic.RazorEngine_0e617479c60a4cf28e88352b879794f1.b__13_0(TextWriter __razor_helper_writer) in E:\dynamicweb.net\solutions\SkovboData\skovbodata.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\Paragraph\SD_kurser.cshtml:line 215
   at CompiledRazorTemplates.Dynamic.RazorEngine_0e617479c60a4cf28e88352b879794f1.Execute() in E:\dynamicweb.net\solutions\SkovboData\skovbodata.dw9.dynamicweb-cms.com\files\Templates\Designs\Dwsimple\Paragraph\SD_kurser.cshtml:line 110
   at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
   at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
   at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.b__0(TextWriter writer)
   at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
   at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System.Xml.Linq; 2 @using System.Text; 3 @using System.Globalization; 4 5 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6 @{ 7 init(); 8 } 9 10 @functions { 11 private int columnsWritten { get; set; } 12 private int columns { get; set; } 13 14 public void init() 15 { 16 columnsWritten = Dynamicweb.Core.Converter.ToInt32(System.Web.HttpContext.Current.Items["currentColumns"]); 17 columns = GetInteger("Item.Width"); 18 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + GetInteger("Item.Width"); 19 } 20 21 public void Fluid() 22 { 23 columnsWritten = Dynamicweb.Core.Converter.ToInt32(System.Web.HttpContext.Current.Items["currentColumns"]); 24 columns = 12; 25 System.Web.HttpContext.Current.Items["currentColumns"] = columnsWritten + 12; 26 } 27 28 public string ColumnClass() 29 { 30 if (GetString("Item.WidthMobile") == "hide"){ 31 return "col-md-" + GetString("Item.Width") + " hidden-xs"; 32 } else { 33 return "col-md-" + GetString("Item.Width") + " col-xs-" + GetString("Item.WidthMobile"); 34 } 35 } 36 37 public string NewRow() 38 { 39 //return columns + " - " + columnsWritten + ">"; 40 41 if (columns + columnsWritten > 12) 42 { 43 System.Web.HttpContext.Current.Items["currentColumns"] = columns; 44 return "</div><div class=\"row\">"; 45 } 46 else 47 { 48 return string.Empty; 49 } 50 51 } 52 53 public string NewRowParagraphExtended() 54 { 55 if (columns + columnsWritten > 12) 56 { 57 System.Web.HttpContext.Current.Items["currentColumns"] = columns; 58 return "</div><div class=\"flex-container\">"; 59 } 60 else if (columnsWritten == 0) 61 { 62 return "<div class=\"flex-container\">"; 63 } 64 else 65 { 66 return string.Empty; 67 } 68 69 } 70 } 71 72 @{ 73 <style> 74 .datobgcolor { 75 background-color: @GetString("Item.DatoBGColor.Color"); 76 } 77 </style> 78 } 79 80 @if (GetParagraphWidth() == "100%"){ 81 82 @NewRow(); 83 84 } else { 85 86 @NewRowParagraphExtended(); 87 88 } 89 90 91 <div class="@ColumnClass() flex-item; min-width:calc(@GetParagraphWidth() - 10px)" style="margin-bottom: 5px"> 92 <div class="@GetString("Item.ContentStyle") Special-Col-Style" style="background-color: @GetString("Item.BackgroundColor.Color")"> 93 94 @if (GetString("Item.Order") == "title-first" || GetString("Item.Order") == "") 95 { 96 97 if (GetBoolean("Item.VisTitel") != false){ 98 if (!string.IsNullOrEmpty(GetString("Item.Titel"))) { 99 <h1 class="dw-section-title alignCenter"> 100 <span>@GetString("Item.Titel")</span> 101 </h1> 102 <br> 103 } 104 } else { 105 <h1 class="dw-section-title alignCenter"><span></span></h1> 106 } 107 108 109 @RenderImage() 110 @kalendertype() 111 } 112 113 @if (GetString("Item.Order") == "image-first") 114 { 115 @RenderImage() 116 if (GetBoolean("Item.VisTitel") != false){ 117 if (!string.IsNullOrEmpty(GetString("Item.Titel"))) { 118 <h1 class="dw-section-title alignCenter"> 119 <span>@GetString("Item.Titel")</span> 120 </h1> 121 <br> 122 } 123 } else { 124 <h1 class="dw-section-title alignCenter"><span></span></h1> 125 } 126 127 128 @kalendertype() 129 } 130 131 @if (GetString("Item.Order") == "icon-xs") 132 { 133 <div class="col-md-2"> 134 @RenderImage() 135 </div> 136 137 <div class="col-md-10"> 138 if (GetBoolean("Item.VisTitel") != false){ 139 if (!string.IsNullOrEmpty(GetString("Item.Titel"))) { 140 <h1 class="dw-section-title alignCenter"> 141 <span>@GetString("Item.Titel")</span> 142 </h1> 143 <br> 144 } 145 } else { 146 <h1 class="dw-section-title alignCenter"><span></span></h1> 147 } 148 149 @kalendertype() 150 </div> 151 } 152 153 @if (GetString("Item.Order") == "icon-sm") 154 { 155 156 <div class="col-md-3"> 157 @RenderImage() 158 </div> 159 160 <div class="col-md-9"> 161 if (GetBoolean("Item.VisTitel") != false){ 162 if (!string.IsNullOrEmpty(GetString("Item.Titel"))) { 163 <h1 class="dw-section-title alignCenter"> 164 <span>@GetString("Item.Titel")</span> 165 <br> 166 </h1> 167 <br> 168 } 169 } else { 170 <h1 class="dw-section-title alignCenter"><span></span></h1> 171 } 172 173 @kalendertype() 174 </div> 175 } 176 177 @if (GetString("Item.Order") == "icon-md") 178 { 179 180 <div class="col-md-4"> 181 @RenderImage() 182 </div> 183 184 <div class="col-md-8"> 185 if (GetBoolean("Item.VisTitel") != false){ 186 if (!string.IsNullOrEmpty(GetString("Item.Titel"))) { 187 <h1 class="dw-section-title alignCenter"> 188 <span>@GetString("Item.Titel")</span> 189 </h1> 190 <br> 191 } 192 } else { 193 <h1 class="dw-section-title alignCenter"><span></span></h1> 194 } 195 196 197 @kalendertype() 198 </div> 199 } 200 </div> 201 </div> 202 203 @helper kalendertype(){ 204 if (@GetString("Item.LayoutMode") == "ballon") { 205 @Ballon() 206 } 207 208 if (@GetString("Item.LayoutMode") == "list") { 209 <p class="list-item-info nomargin">(Tryk på aktiviten for at se detaljer)</p><p></p> 210 211 @list() 212 } 213 214 if (@GetString("Item.LayoutMode") == "kasse") { 215 @kasse() 216 } 217 } 218 219 @helper Ballon(){ 220 221 <ul class="list-listings blog-list"> 222 @{ 223 DateTime EndDate = DateTime.Now.AddDays(GetInteger("Item.Days")); 224 String StartDate = DateTime.Now.ToString("dd/MM/yyyy"); 225 String Limit = int.Parse(GetString("Item.CountLimit"), NumberStyles.AllowThousands).ToString(); 226 227 if (GetBoolean("Item.StartDateNow") == false){ 228 EndDate = Convert.ToDateTime(GetString("Item.StartDate")).AddDays(GetInteger("Item.Days")); 229 StartDate = GetString("Item.StartDate"); 230 } 231 232 string linkstring = GetString("Item.FeedLink")+"&InKontonr="+GetString("Item.AccountNumber")+"&InMaksAntalAftaler="+Limit+"&InDatoFra="+StartDate+"&InDatoTil="+EndDate.ToString("dd/MM/yyyy"); 233 234 if (GetString("Item.Show.Filter") != "alle"){ 235 linkstring += "&InAftaletypeID=" + GetString("Item.Show.Filter"); 236 } 237 238 XDocument xdoc = XDocument.Load(linkstring); 239 var elements = xdoc.Element("DATA").Elements("AFTALE"); 240 241 foreach (var el in elements) 242 { 243 string id = "0"; 244 string type = "alle"; 245 DateTime date; 246 string title = "Title"; 247 string description = "Description"; 248 string fulldate = "Date"; 249 string cleanDate = ""; 250 string day = ""; 251 string month = ""; 252 string location = ""; 253 string document = ""; 254 string document_type = "document"; 255 string ShowInfo = "Closed"; 256 257 if (el.Elements("ID").Any()){ 258 id = el.Element("ID").Value; 259 } 260 261 if (el.Elements("AFTALETYPE").Any()){ 262 type = el.Element("AFTALETYPE").Value; 263 } 264 265 if (el.Elements("DATO_FRA").Any() && el.Elements("KL_FRA").Any()) { 266 date = DateTime.Parse(el.Element("DATO_FRA").Value + " " + el.Element("KL_FRA").Value, new CultureInfo("da-DK")); 267 cleanDate = date.ToString("dddd d. MMMM kl. HH:mm", new CultureInfo("da-DK")); 268 day = date.ToString(" d", new CultureInfo("da-DK")); 269 month = date.ToString("MMM", new CultureInfo("da-DK")); 270 } 271 272 if (el.Elements("OVERSKRIFT").Any()){ 273 title = el.Element("OVERSKRIFT").Value; 274 } 275 276 if (el.Elements("BESKRIVELSE").Any()){ 277 description = el.Element("BESKRIVELSE").Value; 278 } 279 280 if (el.Elements("DATO_FORMATERET").Any()){ 281 fulldate = el.Element("DATO_FORMATERET").Value; 282 } 283 284 if (el.Elements("STED").Any()){ 285 location = el.Element("STED").Value; 286 } 287 288 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("URL").Any()){ 289 document = "http://kalender.brandsoft.dk/bska/" + el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("URL").Value; 290 } 291 292 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("DOKUMENTTYPE").Any()){ 293 document_type = el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("DOKUMENTTYPE").Value; 294 } 295 296 297 298 <a href="javascript:void(0);" onclick="toggle_visibility('@id');"> 299 <div class="row"> 300 301 <div class="media col-md-12"> 302 303 <div class="media-left"> 304 305 <div class="media-object calendar-date datobgcolor text-center"><span>@day</span> @month</div> 306 307 </div> 308 <div class="media-body"> 309 <h2 class="media-heading">@title</h2> 310 311 <p class="list-item-info">@type</p> 312 <p class="list-item-info nomargin"><i class="fa fa-fw fa-calendar-o"></i> @fulldate</p> 313 <p class="list-item-info nomargin"><i class="fa fa-fw fa-map-marker"></i> @location</p> 314 315 316 @{ 317 string isHidden = ""; 318 if (ShowInfo == "Closed" || ShowInfo == "Hidden"){ 319 isHidden = "style=\"display:none;\""; 320 } 321 } 322 323 <div id="@id" @isHidden> 324 <p>@description</p> 325 </div> 326 327 328 </div> 329 <div class="media-right" style="width: 33%;"> 330 @if (document != ""){ 331 if (document_type == "OFFENTLIGT_AFTALE_BILLEDE"){ 332 <img class="img-responsive" src="@document" alt="" id="@(id)_img" style="max-height: 100px; float:right; position: relative;"></img> 333 } 334 } 335 </div> 336 337 </div> 338 </div> 339 340 @if (!string.IsNullOrWhiteSpace(description) || !string.IsNullOrWhiteSpace(document)){ 341 if (ShowInfo == "Open"){ 342 <p id="@(id)_chevron" class="text-center chevron"></p> 343 } else if (ShowInfo == "Closed") { 344 <p id="@(id)_chevron" class="text-center chevron bottom"></p> 345 } 346 } 347 348 349 </a> 350 <hr> 351 352 353 } 354 } 355 </ul> 356 357 358 359 } 360 361 @helper list(){ 362 <ul class="list-listings blog-list"> 363 @{ 364 DateTime EndDate = DateTime.Now.AddDays(GetInteger("Item.Days")); 365 String StartDate = DateTime.Now.ToString("dd/MM/yyyy"); 366 String Limit = int.Parse(GetString("Item.CountLimit"), NumberStyles.AllowThousands).ToString(); 367 String sognekode = GetString("Item.Sognekode"); 368 string kalenderkonto = GetString("Item.AccountNumber"); 369 370 if (GetBoolean("Item.StartDateNow") == false){ 371 EndDate = Convert.ToDateTime(GetString("Item.StartDate")).AddDays(GetInteger("Item.Days")); 372 StartDate = GetString("Item.StartDate"); 373 } 374 375 string linkstring = GetString("Item.FeedLink")+"&InKontonr="+kalenderkonto+"&InMaksAntalAftaler="+Limit+"&InDatoFra="+StartDate+"&InDatoTil="+EndDate.ToString("dd/MM/yyyy")+"&InSognekode="+sognekode; 376 377 378 if (GetString("Item.Show.Filter") != "alle"){ 379 linkstring += "&InAftaletypeID=" + GetString("Item.Show.Filter"); 380 } 381 382 XDocument xdoc = XDocument.Load(linkstring); 383 var elements = xdoc.Element("DATA").Elements("AFTALE"); 384 385 foreach (var el in elements) 386 { 387 string id = "0"; 388 string type = "alle"; 389 DateTime date; 390 string title = "Title"; 391 string description = "Description"; 392 string fulldate = "Date"; 393 string cleanDate = ""; 394 string day = ""; 395 string month = ""; 396 string location = ""; 397 string document = ""; 398 string document_type = "document"; 399 400 if (el.Elements("ID").Any()){ 401 id = el.Element("ID").Value; 402 } 403 404 if (el.Elements("AFTALETYPE").Any()){ 405 type = el.Element("AFTALETYPE").Value; 406 } 407 408 if (el.Elements("DATO_FRA").Any() && el.Elements("KL_FRA").Any()) { 409 date = DateTime.Parse(el.Element("DATO_FRA").Value + " " + el.Element("KL_FRA").Value, new CultureInfo("da-DK")); 410 cleanDate = date.ToString("dddd d. MMMM kl. HH:mm", new CultureInfo("da-DK")); 411 day = date.ToString(" d", new CultureInfo("da-DK")); 412 month = date.ToString("MMM", new CultureInfo("da-DK")); 413 } 414 415 if (el.Elements("OVERSKRIFT").Any()){ 416 title = el.Element("OVERSKRIFT").Value; 417 } 418 419 if (el.Elements("BESKRIVELSE").Any()){ 420 description = el.Element("BESKRIVELSE").Value; 421 } 422 423 if (el.Elements("DATO_FORMATERET").Any()){ 424 fulldate = el.Element("DATO_FORMATERET").Value; 425 } 426 427 if (el.Elements("STED").Any()){ 428 location = el.Element("STED").Value; 429 } 430 431 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("URL").Any()){ 432 document = "http://kalender.brandsoft.dk/bska/" + el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("URL").Value; 433 } 434 435 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("DOKUMENTTYPE").Any()){ 436 document_type = el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("DOKUMENTTYPE").Value; 437 } 438 439 440 <a href="Kursus?kalenderkonto=@kalenderkonto&aftaleid=@id" data-toggle="tooltip" data-placement="right" data-html="true" title="@title &#013; &#013Beskrivelse: &#013;@description &#013; &#013;@fulldate"> 441 <div class="row"> 442 <div class="media col-md-12"> 443 444 445 <div class="media-body"> 446 447 <p class="list-item-info nomargin"><i class="fa fa-fw fa-calendar-o"></i> @fulldate</p> 448 <h2 class="media-heading">@title</h2> 449 450 <p class="list-item-info nomargin"><i class="fa fa-fw fa-map-marker"></i> @location</p> 451 452 </div> 453 <br> 454 </div> 455 </div> 456 </a> 457 } 458 } 459 </ul> 460 } 461 462 @helper kasse(){ 463 <div class="sqcalendar"> 464 @{ 465 DateTime EndDate = DateTime.Now.AddDays(GetInteger("Item.Days")); 466 String StartDate = DateTime.Now.ToString("dd/MM/yyyy"); 467 String Limit = int.Parse(GetString("Item.CountLimit"), NumberStyles.AllowThousands).ToString(); 468 String kalenderkonto = GetString("Item.AccountNumber"); 469 470 471 472 if (GetBoolean("Item.StartDateNow") == false){ 473 EndDate = Convert.ToDateTime(GetString("Item.StartDate")).AddDays(GetInteger("Item.Days")); 474 StartDate = GetString("Item.StartDate"); 475 } 476 477 string linkstring = GetString("Item.FeedLink")+"&InKontonr="+GetString("Item.AccountNumber")+"&InMaksAntalAftaler="+Limit+"&InDatoFra="+StartDate+"&InDatoTil="+EndDate.ToString("dd/MM/yyyy"); 478 479 if (GetString("Item.Show.Filter") != "alle"){ 480 linkstring += "&InAftaletypeID=" + GetString("Item.Show.Filter"); 481 } 482 483 XDocument xdoc = XDocument.Load(linkstring); 484 var elements = xdoc.Element("DATA").Elements("AFTALE"); 485 486 foreach (var el in elements) 487 { 488 string id = "0"; 489 string type = "alle"; 490 DateTime date; 491 string title = "Title"; 492 string description = "Description"; 493 string fulldate = "Date"; 494 string cleanDate = ""; 495 string day = ""; 496 string month = ""; 497 string location = ""; 498 string document = ""; 499 string document_type = "document"; 500 501 if (el.Elements("ID").Any()){ 502 id = el.Element("ID").Value; 503 } 504 505 if (el.Elements("AFTALETYPE").Any()){ 506 type = el.Element("AFTALETYPE").Value; 507 } 508 509 if (el.Elements("DATO_FRA").Any() && el.Elements("KL_FRA").Any()) { 510 date = DateTime.Parse(el.Element("DATO_FRA").Value + " " + el.Element("KL_FRA").Value, new CultureInfo("da-DK")); 511 cleanDate = date.ToString("dddd d. MMMM kl. HH:mm", new CultureInfo("da-DK")); 512 day = date.ToString(" d", new CultureInfo("da-DK")); 513 month = date.ToString("MMM", new CultureInfo("da-DK")); 514 } 515 516 if (el.Elements("OVERSKRIFT").Any()){ 517 title = el.Element("OVERSKRIFT").Value; 518 } 519 520 if (el.Elements("BESKRIVELSE").Any()){ 521 description = el.Element("BESKRIVELSE").Value; 522 } 523 524 if (el.Elements("DATO_FORMATERET").Any()){ 525 fulldate = el.Element("DATO_FORMATERET").Value; 526 } 527 528 if (el.Elements("STED").Any()){ 529 location = el.Element("STED").Value; 530 } 531 532 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("URL").Any()){ 533 document = "http://kalender.brandsoft.dk/bska/" + el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("URL").Value; 534 } 535 536 if (el.Elements("OFFENTLIGE_DOKUMENTER").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Elements("DOKUMENT").Any() && el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Elements("DOKUMENTTYPE").Any()){ 537 document_type = el.Element("OFFENTLIGE_DOKUMENTER").Element("DOKUMENT").Element("DOKUMENTTYPE").Value; 538 } 539 540 541 <div class="sqcalendar-item sqkalender-liste-item-odd"> 542 <a class="sqcalendar-link" href="Kursus?kalenderkonto=@kalenderkonto&aftaleid=@id" data-toggle="tooltip" data-placement="right" data-html="true" title="@title &#013; &#013Beskrivelse: &#013;@description &#013; &#013;@fulldate"> 543 544 545 546 <div class="sqcalendar-date datobgcolor sqevent-date--hide-year"> 547 <div class="sqdate-center"> 548 549 <span class="sqdate">@day</span><span class="sqmonth">@month</span> 550 551 </div> 552 </div> 553 <div class="sqcalendar-desc"> 554 <div class="sqcalendar-item-info"> 555 <span class="sqmedia-heading">@title</span> 556 557 <p></p> 558 <p class="list-item-info nomargin"><i class="fa fa-fw fa-calendar-o"></i> @cleanDate</p> 559 <p class="list-item-info nomargin"><i class="fa fa-fw fa-map-marker"></i> @location</p> 560 561 562 563 564 </div> 565 </div> 566 <div class="media-right" style="width: 33%;"> 567 @if (document != ""){ 568 if (document_type == "OFFENTLIGT_AFTALE_BILLEDE"){ 569 <img class="img-responsive" src="@document" alt="" id="@(id)_img" style="max-height: 100px; float:right; position: relative;"></img> 570 } 571 } 572 </div> 573 574 575 </a> 576 </div> 577 578 579 580 } 581 } 582 </div> 583 } 584 585 @helper RenderImage() 586 { 587 if (!string.IsNullOrEmpty(GetString("Item.Image"))) 588 { 589 var image = System.Web.HttpContext.Current.Server.UrlEncode(GetString("Item.Image")); 590 591 <!-- Choosing the smallest possible width that will work with responsive sizes --> 592 string optimizedwidth = "1280"; 593 switch (GetString("Item.Width")){ 594 case "12": 595 optimizedwidth = "1280"; 596 break; 597 case "9": 598 optimizedwidth = "960"; 599 break; 600 case "6": 601 optimizedwidth = "722"; 602 break; 603 case "3": 604 optimizedwidth = "722"; 605 break; 606 case "8": 607 optimizedwidth = "960"; 608 break; 609 case "4": 610 optimizedwidth = "722"; 611 break; 612 } 613 614 if (GetString("Item.ImageStyle") == "ball") { 615 optimizedwidth = "500&height=500"; 616 } 617 618 619 if (string.IsNullOrEmpty(GetString("Item.Link"))) 620 { 621 <div class="img-responsive dw-std-image"> 622 <img class="content-image img-responsive img-centered" style="@GetImageBorderCss()" src="/Admin/Public/GetImage.ashx?width=@optimizedwidth&crop=1&Compression=75&image=@image" class="img-responsive" alt=""></img> 623 </div> 624 } else { 625 <a href="@GetString("Item.Link")"> 626 <div class="img-responsive dw-std-image"> 627 <img class="content-image img-responsive img-centered" style="@GetImageBorderCss()" src="/Admin/Public/GetImage.ashx?width=@optimizedwidth&crop=1&Compression=75&image=@image" class="img-responsive" alt=""></img> 628 </div> 629 </a> 630 } 631 } 632 } 633 @functions { 634 private string GetImageBorderCss() 635 { 636 if (GetString("Item.ImageStyle") == "cover") 637 { 638 return "padding: 8px"; 639 } 640 else if (GetString("Item.ImageStyle") == "cover-border") 641 { 642 return "padding: 4px; border: 1px solid #e1e1e1; border-radius: 0px !important"; 643 } 644 else if (GetString("Item.ImageStyle") == "frame") 645 { 646 return "padding: 6px; border: 1px solid #e1e1e1; border-radius: 0px !important"; 647 } 648 else if (GetString("Item.ImageStyle") == "rounded") 649 { 650 return "border-radius: 8px !important"; 651 } 652 else if (GetString("Item.ImageStyle") == "ball") 653 { 654 return "border-radius: 1000px !important"; 655 } 656 else if (GetString("Item.ImageStyle") == "shadow") 657 { 658 return "box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.2)"; 659 } 660 else 661 { 662 return string.Empty; 663 } 664 } 665 private string GetParagraphWidth() 666 { 667 string PctWidth = "100%"; 668 switch (GetString("Item.Width")){ 669 case "12": 670 PctWidth = "100%"; 671 break; 672 case "9": 673 PctWidth = "75%"; 674 break; 675 case "6": 676 PctWidth = "50%"; 677 break; 678 case "3": 679 PctWidth = "25%"; 680 break; 681 case "8": 682 PctWidth = "66%"; 683 break; 684 case "4": 685 PctWidth = "33%"; 686 break; 687 } 688 return PctWidth; 689 } 690 691 } 692 <script type="text/javascript"> 693 function toggle_visibility(id) { 694 if($('#' + id + "_chevron").length){ 695 $('#' + id).stop().slideToggle('slow'); 696 $('#' + id + "_chevron").toggleClass('bottom'); 697 698 699 if(!$('#' + id + "_img").hasClass('bigPic')){ 700 701 var container_width = 269; 702 var image_height; 703 var natural_width = document.getElementById(id + "_img").naturalWidth; 704 var natural_height = document.getElementById(id + "_img").naturalHeight; 705 706 if(natural_width < container_width){ //> 707 container_width = natural_width; 708 } 709 710 var res = container_width / natural_width; 711 //console.log(res); 712 713 image_height = natural_height * res; 714 //console.log(image_height); 715 716 if(image_height > 400){ 717 image_height = 400; 718 } 719 720 //console.log(natural_width + " x " + natural_height); 721 //console.log(image_height); 722 $('#' + id + "_img").addClass('bigPic'); 723 $('#' + id + "_img").css('max-height', image_height + "px"); 724 }else{ 725 $('#' + id + "_img").removeClass('bigPic'); 726 $('#' + id + "_img").css('max-height', "100px"); 727 } 728 } 729 } 730 </script> 731 732
  • Skovbo Data
  • Industrivænget 18
    4622 Havdrup

  • CVR nummer: 66 81 07 12