Error executing template "/Designs/HagsCore/Paragraph/AssetsSearch.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_4253f12ee4a5438f9bf25c4c73cf92c7.Execute() in C:\Projects\Hags_Dw9\Files\Templates\Designs\HagsCore\Paragraph\AssetsSearch.cshtml:line 887
   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 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.Web.Optimization; 3 @using Dynamicweb.Ecommerce.Variants; 4 @{ 5 string validationMessages = string.Format("messages_{0}.min.js", GetGlobalValue("Global:Area.Lang")); 6 string areaLanguage = GetGlobalValue("Global:Area.Lang"); 7 string customErrorMessage = HagsWeb.Library.Utilities.DWUtilities.GetTranslation("AdvancedSearchError", "You must provide a Product Code or a Product Name for your Search", GetGlobalValue("Global:Area.LongLang")); 8 } 9 10 @*@Scripts.Render("~/bundle/AssetSearch") 11 12 @if (areaLanguage != "en") 13 { 14 // non english validation messages 15 <script src="/Files/Templates/Designs/HagsCore/script/source/libraries/validation/localization/@validationMessages"></script> 16 }*@ 17 18 <input type="hidden" id="CultureLanguage" value="@GetGlobalValue("Global:Area.LongLang")" /> 19 <input type="hidden" id="PageID" value="@GetGlobalValue("Global:Page.ID")" /> 20 <input type="hidden" id="ErrorMessage" value="@customErrorMessage" /> 21 22 <div id="advancedSearch"> 23 <div class="m-search-primary"> 24 <div class="text-center"> 25 <ul> 26 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#advancedsearch-ui" data-toggle="tab">@Translate("AdvancedSearch", "Advanced Search")</a></li> 27 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#downloadfinder" data-toggle="tab">@Translate("ProductDownloads", "Product Downloads")</a></li> 28 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#productcollection" data-toggle="tab">@Translate("MyProductCollection", "My Product Collection")</a></li> 29 <li><a class="m-btn-search-options btn btn-default text-uppercase" role="button" href="#inspirationfinder" data-toggle="tab">@Translate("InspirationFinder", "Inspiration Finder")</a></li> 30 </ul> 31 </div> 32 </div> 33 34 35 <div class="container"> 36 37 <div class="content"> 38 39 <div class="tab-content"> 40 41 <div class="tab-pane fade" id="advancedsearch-ui"> 42 43 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 44 @using Dynamicweb.Ecommerce.Variants; 45 @using HagsWeb.Library.BusinessObjects.UsersLists; 46 @using HagsWeb.Library.State; 47 @{} 48 49 @*@helper AdvancedSearch(string name) { 50 // your helper can contain code and/or markup, e.g. 51 // var msg = "Hello " + name; 52 // <p>@msg</p> 53 // For more information, visit http://go.microsoft.com/fwlink/?LinkID=204658 54 }*@ 55 56 57 @{ 58 Dynamicweb.Frontend.PageView advSearchPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 59 Dynamicweb.Content.Area advSearchArea = new Dynamicweb.Content.AreaService().GetArea(advSearchPage.AreaID); 60 61 string advancedSearchUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)new Dynamicweb.Content.PageService().GetFirstModulePageForArea(advSearchArea.ID, "Searchv1").ID); 62 63 // Search Results in Session - Phase 2 64 //List<AdvancedSearchState> advancedSearchState = SessionManager.UsersAdvancedSearchState != null ? SessionManager.UsersAdvancedSearchState as List<AdvancedSearchState> : new List<AdvancedSearchState>(); 65 66 67 68 69 70 // Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 71 // var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 72 73 //var AnchoringVariants = GlobalAnchoringVariants; // Defined in AssetsSearch.cshtml, the controls' parent 74 75 //Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 76 //var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 77 78 //Dynamicweb.Frontend.PageView thisPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 79 //ParagraphCollection pageParagraphCollection = Dynamicweb.Content.Paragraph.GetParagraphsByPageID(thisPage.ID); 80 //string pageId = thisPage.ID.ToString(); 81 82 //var area = Dynamicweb.Content.Area.GetAreaById(thisPage.AreaID); 83 // //var l = area.EcomLanguageId; 84 //string EcomLanguageID = area.EcomLanguageId; 85 //string EcomShopID = area.EcomShopID; 86 87 ////string lang = thisPage.GlobalTags.GetTagByName("LongLang").Value; 88 //string l = thisPage.Area.Values["areaecomlanguageid"].ToString(); 89 } 90 91 <div class="m-search-advanced" style="display:block;visibility:visible;"> 92 <div class="m-search-advanced-panel m-search-advanced-product" id="m-search-advanced-product" style="display:block;visibility:visible;"> 93 <div class="l-page"> 94 <div class="container-fluid"> 95 <nav class="text-center"> 96 <ul class="m-nav-tabs-search nav nav-tabs text-uppercase"> 97 <li id="tabSearchPlay" class="active"><a href="#advancedsearch-Play" data-toggle="tab">@Translate("Play", "Play")</a></li> 98 <li id="tabSearchSportFitness"><a href="#advancedsearch-SportFitness" data-toggle="tab">@Translate("SportFitness", "Sport &amp; Fitness")</a></li> 99 <li id="tabSearchParkUrban"><a href="#advancedsearch-ParkUrban" data-toggle="tab">@Translate("ParkUrban", "Park &amp; Urban")</a></li> 100 <li id="tabSearchMarine"><a href="#advancedsearch-Marine" data-toggle="tab">@Translate("Marine", "Marine")</a></li> 101 <li id="tabSearchShade"><a href="#advancedsearch-Shade" data-toggle="tab">@Translate("Shade", "Shade")</a></li> 102 </ul> 103 </nav> 104 </div> <!-- container-fluid --> 105 <div class="tab-content"> 106 <div class="tab-pane fade in active" id="advancedsearch-Play"> 107 <form id="search-play" name="search-form" method="get" action="@advancedSearchUrl"> 108 <input type="hidden" name="Products" value="Play" /> 109 <div class="l-page"> 110 <div class="container-fluid"> 111 <div class="form-horizontal"> 112 <fieldset class="m-theme-border-grey"> 113 114 <div class="row"> 115 <div class="col-ms-4 col-sm-4"> 116 <div class="form-group"> 117 <label for="ProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 118 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 119 </div> 120 </div> 121 <div class="col-ms-4 col-sm-4"> 122 <div class="form-group"> 123 <label for="ProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 124 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 125 </div> 126 </div> 127 @{ 128 List<VariantOption> PlayAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Play", advSearchArea.EcomLanguageId); 129 130 if (PlayAnchoringVariants.Any()) 131 { 132 <div class="col-ms-4 col-sm-4"> 133 <div class="form-group"> 134 135 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 136 <div class="col-sm-7"> 137 <select class="form-control" name="AnchoringType"> 138 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 139 @foreach (var option in PlayAnchoringVariants) 140 { 141 <option value='@option.Id'>@option.Name</option> 142 } 143 </select> 144 </div> 145 </div> 146 </div> 147 } 148 else 149 { 150 <input type="hidden" name="AnchoringType" value="0" /> 151 } 152 153 } 154 155 </div> <!-- row --> 156 @*<input type="hidden" name="productsInSession" value="@advancedSearchState.Count()" />*@ 157 158 </fieldset> 159 160 161 162 163 </div> <!--form - horizontal--> 164 </div> <!--container - fluid--> 165 </div> <!--l - page--> 166 <div class="m-search-advanced-buttons text-center"> 167 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 168 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 169 </div> 170 </form> 171 172 @*<script> 173 $("#search-play").validate(); 174 </script>*@ 175 <div id="results-search-play" class="m-search-advanced-results-panel"> 176 177 @*// Search Results in Session - Phase 2 178 @if (advancedSearchState.Any()) 179 { 180 181 foreach (AdvancedSearchState product in advancedSearchState) 182 { 183 @String.Format("{0}", product.Products) 184 } 185 }*@ 186 187 </div> 188 </div> 189 <div class="tab-pane fade in" id="advancedsearch-SportFitness"> 190 <form id="search-sport" name="search-form" method="get" action="@advancedSearchUrl"> 191 <input type="hidden" name="Products" value="Sport" /> 192 <div class="l-page"> 193 <div class="container-fluid"> 194 <div class="form-horizontal"> 195 <fieldset class="m-theme-border-grey"> 196 <div class="row"> 197 <div class="col-ms-4 col-sm-4"> 198 <div class="form-group"> 199 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 200 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 201 </div> 202 </div> 203 <div class="col-ms-4 col-sm-4"> 204 <div class="form-group"> 205 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 206 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 207 </div> 208 </div> 209 210 @{ 211 List<VariantOption> SportAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Sport", advSearchArea.EcomLanguageId); 212 213 if (SportAnchoringVariants.Count() > 0) 214 { 215 <div class="col-ms-4 col-sm-4"> 216 <div class="form-group"> 217 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 218 <div class="col-sm-7"> 219 <select class="form-control" name="AnchoringType"> 220 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 221 @foreach (var option in SportAnchoringVariants) 222 { 223 <option value='@option.Id'> @option.Name </option> 224 } 225 </select> 226 </div> 227 </div> 228 </div> 229 } 230 else 231 { 232 <input type="hidden" name="AnchoringType" value="0" /> 233 } 234 } 235 236 </div> <!-- row --> 237 </fieldset> 238 </div> <!-- form-horizontal --> 239 </div> <!-- container-fluid --> 240 </div> <!-- l-page --> 241 <div class="m-search-advanced-buttons text-center"> 242 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 243 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 244 </div> 245 </form> 246 <div id="results-search-sportfitness" class="m-search-advanced-results-panel"> 247 @*// Search Results in Session - Phase 2 248 @if (advancedSearchState.Any()) 249 { 250 251 foreach (AdvancedSearchState product in advancedSearchState) 252 { 253 @String.Format("{0}", product.Products) 254 } 255 }*@ 256 </div> 257 </div> 258 <div class="tab-pane fade in" id="advancedsearch-ParkUrban"> 259 <form id="search-park" name="search-form" method="get" action="@advancedSearchUrl"> 260 <input type="hidden" name="Products" value="Park" /> 261 <div class="l-page"> 262 <div class="container-fluid"> 263 <div class="form-horizontal"> 264 <fieldset class="m-theme-border-grey"> 265 <div class="row"> 266 <div class="col-ms-4 col-sm-4"> 267 <div class="form-group"> 268 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 269 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductCode" /></div> 270 </div> 271 </div> 272 <div class="col-ms-4 col-sm-4"> 273 <div class="form-group"> 274 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 275 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductName" /></div> 276 </div> 277 </div> 278 @{ 279 List<VariantOption> ParkAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Park", advSearchArea.EcomLanguageId); 280 281 if (ParkAnchoringVariants.Count() > 0) 282 { 283 <div class="col-ms-4 col-sm-4"> 284 <div class="form-group"> 285 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 286 <div class="col-sm-7"> 287 <select class="form-control" name="AnchoringType"> 288 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 289 @foreach (var option in ParkAnchoringVariants) 290 { 291 <option value='@option.Id'> @option.Name </option> 292 } 293 </select> 294 </div> 295 </div> 296 </div> 297 } 298 else 299 { 300 <input type="hidden" name="AnchoringType" value="0" /> 301 } 302 } 303 304 </div> <!-- row --> 305 </fieldset> 306 </div> <!-- form-horizontal --> 307 </div> <!-- container-fluid --> 308 </div> <!-- l-page --> 309 <div class="m-search-advanced-buttons text-center"> 310 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 311 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 312 </div> 313 </form> 314 <div id="results-search-parkurban" class="m-search-advanced-results-panel"> 315 @*// Search Results in Session - Phase 2 316 @if (advancedSearchState.Any()) 317 { 318 319 foreach (AdvancedSearchState product in advancedSearchState) 320 { 321 @String.Format("{0}", product.Products) 322 } 323 }*@ 324 </div> 325 </div> 326 <div class="tab-pane fade in" id="advancedsearch-Marine"> 327 <form id="search-marine" name="search-form" method="get" action="@advancedSearchUrl"> 328 <input type="hidden" name="Products" value="Marine" /> 329 <div class="l-page"> 330 <div class="container-fluid"> 331 <div class="form-horizontal"> 332 <fieldset class="m-theme-border-grey"> 333 <div class="row"> 334 <div class="col-ms-4 col-sm-4"> 335 <div class="form-group"> 336 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 337 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductCode" /></div> 338 </div> 339 </div> 340 <div class="col-ms-4 col-sm-4"> 341 <div class="form-group"> 342 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 343 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductName" /></div> 344 </div> 345 </div> 346 @{ 347 List<VariantOption> MarineAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Marine", advSearchArea.EcomLanguageId); 348 349 if (MarineAnchoringVariants.Count() > 0) 350 { 351 <div class="col-ms-4 col-sm-4"> 352 <div class="form-group"> 353 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 354 <div class="col-sm-7"> 355 <select class="form-control" name="AnchoringType"> 356 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 357 @foreach (var option in MarineAnchoringVariants) 358 { 359 <option value='@option.Id'> @option.Name </option> 360 } 361 </select> 362 </div> 363 </div> 364 </div> 365 } 366 else 367 { 368 <input type="hidden" name="AnchoringType" value="0" /> 369 } 370 } 371 372 </div> <!-- row --> 373 </fieldset> 374 </div> <!-- form-horizontal --> 375 </div> <!-- container-fluid --> 376 </div> <!-- l-page --> 377 <div class="m-search-advanced-buttons text-center"> 378 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 379 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 380 </div> 381 </form> 382 <div id="results-search-marine" class="m-search-advanced-results-panel"> 383 @*// Search Results in Session - Phase 2 384 @if (advancedSearchState.Any()) 385 { 386 387 foreach (AdvancedSearchState product in advancedSearchState) 388 { 389 @String.Format("{0}", product.Products) 390 } 391 }*@ 392 </div> 393 </div> 394 <div class="tab-pane fade in" id="advancedsearch-Shade"> 395 <form id="search-shade" name="search-form" method="get" action="@advancedSearchUrl"> 396 <input type="hidden" name="Products" value="Shade" /> 397 <div class="l-page"> 398 <div class="container-fluid"> 399 <div class="form-horizontal"> 400 <fieldset class="m-theme-border-grey"> 401 <div class="row"> 402 <div class="col-ms-4 col-sm-4"> 403 <div class="form-group"> 404 <label for="inputAdvancedSearch1" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 405 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductCode" /></div> 406 </div> 407 </div> 408 <div class="col-ms-4 col-sm-4"> 409 <div class="form-group"> 410 <label for="inputAdvancedSearch3" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 411 <div class="col-sm-7"><input type="text" class="form-control search-group" name="ProductName" /></div> 412 </div> 413 </div> 414 @{ 415 List<VariantOption> ShadeAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().CheckValidVariantOptions("ATP3", "Shade", advSearchArea.EcomLanguageId); 416 417 if (ShadeAnchoringVariants.Count() > 0) 418 { 419 <div class="col-ms-4 col-sm-4"> 420 <div class="form-group"> 421 <label for="inputAdvancedSearch6" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 422 <div class="col-sm-7"> 423 <select class="form-control" name="AnchoringType"> 424 <option value="0"> @Translate("SelectAnchoring", "Select Anchoring Type") </option> 425 @foreach (var option in ShadeAnchoringVariants) 426 { 427 <option value='@option.Id'> @option.Name </option> 428 } 429 </select> 430 </div> 431 </div> 432 </div> 433 } 434 else 435 { 436 <input type="hidden" name="AnchoringType" value="0" /> 437 } 438 } 439 440 </div> <!-- row --> 441 </fieldset> 442 </div> <!-- form-horizontal --> 443 </div> <!-- container-fluid --> 444 </div> <!-- l-page --> 445 <div class="m-search-advanced-buttons text-center"> 446 <button class="m-btn-search btn btn-default text-uppercase" type="reset" name="reset">@Translate("Reset", "Reset")</button> 447 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 448 </div> 449 </form> 450 <div id="results-search-shade" class="m-search-advanced-results-panel"> 451 @*// Search Results in Session - Phase 2 452 @if (advancedSearchState.Any()) 453 { 454 455 foreach (AdvancedSearchState product in advancedSearchState) 456 { 457 @String.Format("{0}", product.Products) 458 } 459 }*@ 460 </div> 461 </div> 462 </div> 463 </div> <!-- l-page --> 464 </div> <!-- m-search-advanced-product --> 465 <div class="text-center"> 466 <a href="#advancedsearch-ui" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 467 </div> 468 </div> 469 470 471 472 @*<h1>@GetGlobalValue("Global:Page.Name")</h1> 473 <h1>@GetValue("Global:Page.Name")</h1> 474 <h1>The Advanced Search Include is here.. PageID = @pageId, l=, LanguageID=@EcomLanguageID, ShopID=@EcomShopID, lang=@l</h1> 475 476 <h1>Set Tag = @GetString("CheckTag") // @GetValue("CheckTag") </h1> 477 478 @foreach (var p in pageParagraphCollection) 479 { 480 var a = p.Template; 481 var b = p.ID.ToString(); 482 var c = p.Text; 483 var f = p.Languages; 484 <ul> 485 <li>@a</li> 486 <li>@b</li> 487 <li>@c</li> 488 <li>@f</li> 489 </ul> 490 }*@ 491 492 493 </div> 494 495 <div class="tab-pane fade" id="downloadfinder"> 496 497 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 498 @using HagsWeb.Library.BusinessObjects.UsersLists; 499 @using HagsWeb.Library.State; 500 @using Dynamicweb.Ecommerce.Variants; 501 @{ 502 Dynamicweb.Frontend.PageView downloadsPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 503 Dynamicweb.Content.Area downloadsArea = new Dynamicweb.Content.AreaService().GetArea(downloadsPage.AreaID); 504 505 string downloadsSearchUrl = Dynamicweb.Frontend.SearchEngineFriendlyURLs.GetFriendlyUrl((Int32)new Dynamicweb.Content.PageService().GetFirstModulePageForArea(downloadsArea.ID, "Searchv1").ID); 506 507 // This seems to be still valid 508 List<VariantOption> ProductDownloadsAnchoringVariants = new HagsWeb.Library.Methods.AssetSearch.ProductAssets().GetVariantOptions("ATP3", downloadsArea.EcomLanguageId); 509 510 511 #region Search Results in Session - Phase 2 512 513 514 //// Search Results in Session - Phase 2 515 //List<AdvancedSearchState> downloadsSearchState = SessionManager.UsersAdvancedSearchState != null ? SessionManager.UsersAdvancedSearchState as List<AdvancedSearchState> : new List<AdvancedSearchState>(); 516 //List<AdvancedSearchState> brochuresStateList = new List<AdvancedSearchState>(); 517 //List<AdvancedSearchState> dwgsStateList = new List<AdvancedSearchState>(); 518 //List<AdvancedSearchState> certificatesStateList = new List<AdvancedSearchState>(); 519 //List<AdvancedSearchState> installationGuidesStateList = new List<AdvancedSearchState>(); 520 521 //if (downloadsSearchState.Count() > 0) 522 //{ 523 // foreach (AdvancedSearchState downloadsState in downloadsSearchState) 524 // { 525 // if (!String.IsNullOrEmpty(downloadsState.Brochures)) 526 // { 527 // AdvancedSearchState broch = new AdvancedSearchState(); 528 // broch.Brochures = downloadsState.Brochures; 529 // brochuresStateList.Add(broch); 530 // } 531 // if (!String.IsNullOrEmpty(downloadsState.Dwgs)) 532 // { 533 // AdvancedSearchState dwg = new AdvancedSearchState(); 534 // dwg.Dwgs = downloadsState.Dwgs; 535 // dwgsStateList.Add(dwg); 536 // } 537 // if (!String.IsNullOrEmpty(downloadsState.Certificates)) 538 // { 539 // AdvancedSearchState certs = new AdvancedSearchState(); 540 // certs.Certificates = downloadsState.Certificates; 541 // certificatesStateList.Add(certs); 542 // } 543 // if (!String.IsNullOrEmpty(downloadsState.InstallationGuides)) 544 // { 545 // AdvancedSearchState guide = new AdvancedSearchState(); 546 // guide.InstallationGuides = downloadsState.InstallationGuides; 547 // installationGuidesStateList.Add(guide); 548 // } 549 // } 550 551 //} 552 #endregion 553 554 } 555 556 557 <div class="m-search-advanced" style="display:block;visibility:visible;"> 558 <div class="m-search-advanced-panel m-search-advanced-product" id="m-search-advanced-product" style="display:block;visibility:visible;"> 559 <div class="l-page"> 560 <div class="container-fluid"> 561 <nav class="text-center"> 562 <ul class="m-nav-tabs-search nav nav-tabs text-uppercase"> 563 <li><a href="#download-brochures" data-toggle="tab">@Translate("Brochures", "Brochures")</a></li> 564 <li><a href="#download-dwg" data-toggle="tab">@Translate("DWGFiles", "DWG Files")</a></li> 565 <li><a href="#download-certificates" data-toggle="tab">@Translate("Certificates", "Certificates")</a></li> 566 <li><a href="#download-installationguides" data-toggle="tab">@Translate("InstallationGuides", "Installation Guides")</a></li> 567 </ul> 568 </nav> 569 <p>@Translate("ProductDownloadsInstructions", "To find product downloads simply click on one of the options above and then use the search form displayed to find all the documents associated with your search.")</p> 570 <p>&nbsp;</p> 571 </div> <!-- container-fluid --> 572 <div class="tab-content"> 573 574 575 576 577 <div class="tab-pane fade in" id="download-brochures"> 578 <form id="search-brochures" method="post" action="@downloadsSearchUrl?Assets=download-brochures"> 579 <div class="l-page"> 580 <div class="container-fluid"> 581 <div class="form-horizontal"> 582 <input type="hidden" name="SearchType" value="download-brochures" /> 583 @*<input type="hidden" name="ProductCode" value="0" /> 584 <input type="hidden" name="Products" value="0" />*@ 585 <!--<fieldset class="m-theme-border-grey"> 586 <input type="hidden" name="Assets" value="download-brochures" /> 587 <div class="row"> 588 <div class="col-ms-4 col-sm-4"> 589 <div class="form-group"> 590 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 591 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 592 </div> 593 </div> 594 <div class="col-ms-4 col-sm-4"> 595 <div class="form-group"> 596 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 597 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 598 </div> 599 </div> 600 601 @if (ProductDownloadsAnchoringVariants.Count() > 0) 602 { 603 604 <div class="col-ms-4 col-sm-4"> 605 <div class="form-group"> 606 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 607 <div class="col-sm-7"> 608 <select class="form-control" name="AnchoringType"> 609 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 610 @foreach (var option in ProductDownloadsAnchoringVariants) 611 { 612 <option value='@option.Id'>@option.Name</option> 613 } 614 </select> 615 </div> 616 </div> 617 </div> 618 619 } 620 621 </div> 622 </fieldset>--> 623 </div> <!-- form-horizontal --> 624 </div> <!-- container-fluid --> 625 </div> <!-- l-page --> 626 <div class="m-search-advanced-buttons text-center"> 627 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 628 @*<button class="m-btn-search btn btn-default text-uppercase" type="reset" >@Translate("Reset", "Reset")</button>*@ 629 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DisplayBrochures", "Display All Brochures")</button> 630 </div> 631 <div class="l-page"> 632 <div class="container-fluid"> 633 634 <div id="results-brochures" class="m-downloads m-search-advanced-results-panel"> 635 @*// SearchState - Phase 2 636 @if (brochuresStateList.Any()) 637 { 638 foreach (AdvancedSearchState brochures in brochuresStateList) 639 { 640 @String.Format("{0}", brochures.Brochures) 641 } 642 }*@ 643 </div> <!-- m-downloads --> 644 </div> <!-- container-fluid --> 645 </div> <!-- l-page --> 646 </form> 647 </div> 648 649 650 651 652 653 <div class="tab-pane fade in" id="download-dwg"> 654 <form id="search-dwg" method="post" action="@downloadsSearchUrl?Assets=download-dwg"> 655 <div class="l-page"> 656 <div class="container-fluid"> 657 <div class="form-horizontal"> 658 <fieldset id="dwg-criteria" class="m-theme-border-grey"> 659 <input type="hidden" name="SearchType" value="download-dwg" /> 660 <div class="row"> 661 <div class="col-ms-4 col-sm-4"> 662 <div class="form-group"> 663 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 664 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 665 </div> 666 </div> 667 <div class="col-ms-4 col-sm-4"> 668 <div class="form-group"> 669 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 670 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 671 </div> 672 </div> 673 @if (ProductDownloadsAnchoringVariants.Count() > 0) 674 { 675 676 <div class="col-ms-4 col-sm-4"> 677 <div class="form-group"> 678 679 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 680 <div class="col-sm-7"> 681 <select class="form-control" name="AnchoringType"> 682 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 683 @foreach (var option in ProductDownloadsAnchoringVariants) 684 { 685 <option value='@option.Id'>@option.Name</option> 686 } 687 </select> 688 </div> 689 </div> 690 </div> 691 692 } 693 </div> <!-- row --> 694 </fieldset> 695 </div> <!-- form-horizontal --> 696 </div> <!-- container-fluid --> 697 </div> <!-- l-page --> 698 <div class="m-search-advanced-buttons text-center"> 699 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 700 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 701 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 702 </div> 703 <div class="l-page"> 704 <div class="container-fluid"> 705 706 <div id="results-dwgs" class="m-downloads m-search-advanced-results-panel"> 707 @*// SearchState - Phase 2 708 @if (dwgsStateList.Any()) 709 { 710 foreach (AdvancedSearchState dwgs in dwgsStateList) 711 { 712 @String.Format("{0}", dwgs.Dwgs) 713 } 714 }*@ 715 </div> <!-- m-downloads --> 716 717 718 </div> <!-- container-fluid --> 719 </div> <!-- l-page --> 720 </form> 721 </div> 722 <div class="tab-pane fade in" id="download-certificates"> 723 <form id="search-certificates" method="post" action="@downloadsSearchUrl?Assets=download-certificates"> 724 <div class="l-page"> 725 <div class="container-fluid"> 726 <div class="form-horizontal"> 727 <fieldset id="certificates-criteria" class="m-theme-border-grey"> 728 <input type="hidden" name="SearchType" value="download-certificates" /> 729 <div class="row"> 730 <div class="col-ms-4 col-sm-4"> 731 <div class="form-group"> 732 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 733 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 734 </div> 735 </div> 736 <div class="col-ms-4 col-sm-4"> 737 <div class="form-group"> 738 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 739 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 740 </div> 741 </div> 742 @if (ProductDownloadsAnchoringVariants.Count() > 0) 743 { 744 745 <div class="col-ms-4 col-sm-4"> 746 <div class="form-group"> 747 748 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 749 <div class="col-sm-7"> 750 <select class="form-control" name="AnchoringType"> 751 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 752 @foreach (var option in ProductDownloadsAnchoringVariants) 753 { 754 <option value='@option.Id'>@option.Name</option> 755 } 756 </select> 757 </div> 758 </div> 759 </div> 760 761 } 762 </div> <!-- row --> 763 </fieldset> 764 </div> <!-- form-horizontal --> 765 </div> <!-- container-fluid --> 766 </div> <!-- l-page --> 767 <div class="m-search-advanced-buttons text-center"> 768 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 769 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 770 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 771 772 <div class="adviceMessage"></div> 773 774 </div> 775 <div class="l-page"> 776 <div class="container-fluid"> 777 778 <div id="results-certificates" class="m-downloads m-search-advanced-results-panel"> 779 @*// SearchState - Phase 2 780 @if (certificatesStateList.Any()) 781 { 782 foreach (AdvancedSearchState certs in certificatesStateList) 783 { 784 @String.Format("{0}", certs.Certificates) 785 } 786 }*@ 787 788 </div> <!-- m-downloads --> 789 790 791 </div> <!-- container-fluid --> 792 793 </div> <!-- l-page --> 794 </form> 795 </div> 796 <div class="tab-pane fade in" id="download-installationguides"> 797 <form id="search-installationguides" method="post" action="@downloadsSearchUrl?Assets=download-installationguides"> 798 <div class="l-page"> 799 <div class="container-fluid"> 800 <div class="form-horizontal"> 801 <fieldset id="installationguides-criteria" class="m-theme-border-grey"> 802 <input type="hidden" name="SearchType" value="download-installationguides" /> 803 <div class="row"> 804 <div class="col-ms-4 col-sm-4"> 805 <div class="form-group"> 806 <label for="inputProductCode" class="col-sm-5 control-label">@Translate("ProductCode", "Product Code")</label> 807 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductCode" name="ProductCode" /></div> 808 </div> 809 </div> 810 <div class="col-ms-4 col-sm-4"> 811 <div class="form-group"> 812 <label for="inputProductName" class="col-sm-5 control-label">@Translate("Name", "Name")</label> 813 <div class="col-sm-7"><input type="text" class="form-control search-group" id="inputProductName" name="ProductName" /></div> 814 </div> 815 </div> 816 @if (ProductDownloadsAnchoringVariants.Count() > 0) 817 { 818 819 <div class="col-ms-4 col-sm-4"> 820 <div class="form-group"> 821 822 <label for="AnchoringType" class="col-sm-5 control-label">@Translate("Anchoring", "Anchoring")</label> 823 <div class="col-sm-7"> 824 <select class="form-control" name="AnchoringType"> 825 <option value="0">@Translate("SelectAnchoring", "Select Anchoring Type")</option> 826 @foreach (var option in ProductDownloadsAnchoringVariants) 827 { 828 <option value='@option.Id'>@option.Name</option> 829 } 830 </select> 831 </div> 832 </div> 833 </div> 834 835 } 836 </div> <!-- row --> 837 </fieldset> 838 </div> <!-- form-horizontal --> 839 </div> <!-- container-fluid --> 840 </div> <!-- l-page --> 841 <div class="m-search-advanced-buttons text-center"> 842 @*<button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("DownloadAll", "Download All")</button>*@ 843 <button class="m-btn-search btn btn-default text-uppercase" type="reset">@Translate("Reset", "Reset")</button> 844 <button class="m-btn-search btn btn-default text-uppercase" type="submit">@Translate("Search", "Search")</button> 845 </div> 846 <div class="l-page"> 847 <div class="container-fluid"> 848 849 <div id="results-guides" class="m-downloads m-search-advanced-results-panel"> 850 @*// SearchState - Phase 2 851 @if (installationGuidesStateList.Any()) 852 { 853 foreach (AdvancedSearchState guide in installationGuidesStateList) 854 { 855 @String.Format("{0}", guide.InstallationGuides) 856 } 857 }*@ 858 859 </div> <!-- m-downloads --> 860 861 862 </div> <!-- container-fluid --> 863 </div> <!-- l-page --> 864 </form> 865 </div> 866 867 </div> 868 </div> <!-- l-page --> 869 </div> <!-- m-search-advanced-product --> 870 <div class="text-center"> 871 <a href="#downloadfinder" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 872 </div> 873 </div> 874 875 </div> 876 <div class="tab-pane fade" id="productcollection"> 877 878 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 879 @using HagsWeb.Library.BusinessObjects.UsersLists; 880 @using HagsWeb.Library.Methods.AssetManager; 881 @using HagsWeb.Library.State; 882 @{ 883 Dynamicweb.Frontend.PageView collectionPage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 884 Dynamicweb.Content.Area collectionArea = new Dynamicweb.Content.AreaService().GetArea(collectionPage.AreaID); 885 886 List<ProductCollectionItem> productCollectionItems = SessionManager.UsersMyProductCollection != null ? SessionManager.UsersMyProductCollection : new List<ProductCollectionItem>(); 887 bool isQuote = Convert.ToBoolean(collectionArea.Item["QuoteAndOrderChk"]); 888 string downloadingText = HagsWeb.Library.Utilities.DWUtilities.GetTranslation("Downloading...", "Downloading...", collectionArea.Culture); 889 int currentPage = collectionArea.ID; 890 } 891 892 893 <input type="hidden" id="isQuote" value="@isQuote" /> 894 <input type="hidden" id="downloadingText" value="@downloadingText" /> 895 <div class="m-search-advanced" style="display:block;visibility:visible;"> 896 897 <!--<div class="pull-left"><h4 class="clearfix">@Translate("MyProductCollection", "My Product Collection")</h4></div>--> 898 899 <div class="text-center" style="clear:both;padding-top:10px; border-bottom: 2px solid #000; padding-bottom: 20px;"> 900 <div id="btns_MyProductCollection"> 901 @if (productCollectionItems.Any()) 902 { 903 <p>@Translate("ProductCollectionButtonInstructions", "Use the buttons below to either download files, create quotes or create orders based on the products you have added to your collection.")</p> 904 905 <ul class="list-inline print-hide"> 906 @{ 907 List<ProductAsset> imageFileList = new List<ProductAsset>(); 908 List<ProductAsset> dwgFileList = new List<ProductAsset>(); 909 List<ProductAsset> instructionsFileList = new List<ProductAsset>(); 910 string contactUsLink = HagsWeb.Library.Utilities.DWUtilities.GetPageByNavigationTag("ContactUs", currentPage); // /kontakta-oss?mode=quote#contactForms // /kontakta-oss?success=True&mode=quote#contactForms // restful url 911 912 foreach (var item in productCollectionItems) 913 { 914 915 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.Images) && n.FileName == item.ProductNumber + ".jpg" || n.FileName == item.ProductNumber + "_Side.jpg" || n.FileName == item.ProductNumber + "_Top.jpg").ToList()) 916 { 917 imageFileList.Add(asset); 918 } 919 920 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.Drawings)).ToList()) 921 { 922 dwgFileList.Add(asset); 923 } 924 925 foreach (ProductAsset asset in item.AssetDownloads.Where(n => n.Index == HagsWeb.Library.Methods.AssetManager.AssetTypeEnum.ToFriendlyAssetName(HagsWeb.Library.Methods.AssetManager.AssetType.AssemblyInstructions)).ToList()) 926 { 927 instructionsFileList.Add(asset); 928 } 929 930 931 } 932 933 if (imageFileList.Any()) 934 { 935 <li> 936 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Bilder" id="imageDownloadButton">@Translate("DownloadImages", "Download Images")</a> 937 </li> 938 } 939 940 if (dwgFileList.Any()) 941 { 942 <li> 943 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Ritningar" id="dwgDownloadButton">@Translate("DownloadDWGFiles", "Download DWG Files")</a> 944 </li> 945 } 946 947 if (instructionsFileList.Any()) 948 { 949 <li> 950 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" name="download" role="button" data-parent="Monteringsanvisningar" id="instructionsDownloadButton">@Translate("DownloadInstallationGuides", "Download Installation Guides")</a> 951 </li> 952 } 953 954 if (isQuote) 955 { 956 if (!string.IsNullOrEmpty(contactUsLink)) 957 { 958 <li> 959 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@contactUsLink?mode=QuickQuote" role="button" data-parent="#quickquote" id="quickQuoteButton">@Translate("CreateQuickQuote", "Create a Quick Quote")</a> 960 </li> 961 <li> 962 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@contactUsLink?mode=QuickOrder" role="button" data-parent="#quickorder" id="quickOrderButton">@Translate("CreateQuickOrder", "Create a Quick Order")</a> 963 </li> 964 } 965 } 966 967 } 968 </ul> 969 970 } 971 972 <span class="error hide"></span> 973 974 </div> 975 976 <div class="m-search-advanced-results-panel" id="frm_MyProductCollection"> 977 <div class="row2"> 978 @if (productCollectionItems.Any()) 979 { 980 981 foreach (ProductCollectionItem item in productCollectionItems) 982 { 983 984 <div class="l-group-5 text-left"> 985 <div class="m-attractor"> 986 <div class="m-attractor-visual"> 987 <a href="@item.ProductUrlReference"><img src="@item.ProductImageUrl" class="img-responsive m-product-thumb"></a> 988 </div> 989 990 <div class="m-attractor-info m-attractor-info-product"> 991 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@item.ProductUrlReference">@item.ProductName</a></h3> 992 @*<p>@item.ProductDescription</p>*@ 993 <p>@Translate("ProductNumber", "Product Number"): @item.ProductNumber</p> 994 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@item.ProductUrlReference" role="button">@Translate("ProductDetails", "Product Details")</a> 995 </div> <!-- attractor-info --> 996 <div class="m-attractor-options"> 997 <ul class="m-icon-links list-unstyled"> 998 <li><a href="" name='productcollection' class="clearfix productcollection" data-removeProductlist="@item.ProductNumber"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/plus.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/plus.png" class="m-icon pull-left"><span>@Translate("RemoveFromCollection", "Remove from my collection")</span></a></li> 999 </ul> 1000 </div> <!-- m-attractor-options --> 1001 </div> 1002 1003 </div> 1004 1005 1006 } 1007 1008 } 1009 else 1010 { 1011 <p>@Translate("NoProductsInCollection", "You have no products in your collection.")</p> 1012 } 1013 </div> 1014 1015 </div> 1016 1017 </div> 1018 1019 <div class="text-center clearfix" style="clear:both;padding-top:10px;"> 1020 <a href="#productcollection" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 1021 </div> 1022 </div> 1023 1024 1025 1026 </div> 1027 1028 <div class="tab-pane fade" id="inspirationfinder"> 1029 1030 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 1031 @using Dynamicweb.Content.Items; 1032 @{ 1033 Dynamicweb.Frontend.PageView thePage = Dynamicweb.Frontend.PageView.Current() ?? Dynamicweb.Frontend.PageView.Current(); 1034 int areaId = thePage.Area.ID; 1035 1036 // Get the current area's Paragraphs and find the ItemPublisher Module, returning a link and its paragraph content. Checks if Normalize latin Chars is set in DW 1037 var tuple = HagsWeb.Library.Methods.Items.ItemTypeMethods.GetDefaultCaseStudies(areaId, 3); 1038 string paraContent = tuple.Item1; 1039 int pageId = tuple.Item2; // The Target Case Study Page listin Case study Item Types 1040 string hyperLink = tuple.Item3; 1041 bool latinCharacters = tuple.Item4; 1042 IEnumerable<Item> caseStudies = tuple.Item5; 1043 1044 //http://developer.dynamicweb-cms.com/documentation/for-developers/item-based-structure/querying-items.aspx 1045 1046 //string DataFromItem = RenderItemList(new 1047 //{ 1048 // ItemType = "Case_Study", 1049 // ListSourceType = "Page", 1050 // ListSourcePage = "62", 1051 // //IncludeAllChildItems = true, 1052 // //IncludeParagraphItems = true, 1053 // ItemFieldsList = "*", 1054 // ListTemplate = "ItemPublisher/List/Case Study List.cshtml", 1055 // ListPageSize = "100" 1056 //}).ToString(); 1057 1058 ////int productsPageId = GetPageIdByNavigationTag("Legals"); 1059 } 1060 1061 <div class="m-search-advanced" style="display:block;visibility:visible;"> 1062 <!--<h4>@Translate("InspirationFinder", "Inspiration Finder")</h4>--> 1063 1064 <div class="m-search-advanced-results-panel fade in" id="frm_InspirationFinder"> 1065 1066 @if (caseStudies.Any()) 1067 { 1068 1069 foreach (var study in caseStudies) 1070 { 1071 string studyId = study["Id"].ToString(); 1072 string Name = study["Study_Heading"] == null ? string.Empty : study["Study_Heading"].ToString(); 1073 string hyperlinkId = study["Read_More_Button"] == null ? String.Empty : study["Read_More_Button"].ToString(); 1074 string hyperlinkText = string.Empty; 1075 string Url = "Default.aspx?ID=" + pageId + "&itemId=Case_Study:" + studyId; 1076 1077 1078 // string sb_trim_Original = System.Text.RegularExpressions.Regex.Replace(Name, @"[., ?\/#!$%\^&\*;:{}=\-_`~()]", "-").ToLower(); 1079 //string sb_trim = System.Text.RegularExpressions.Regex.Replace(Name, @"[., ?\/#!$%\^&\*;:{}=\-_`~]", "-").ToLower(); 1080 1081 //string Url = hyperLink + "/" + sb_trim; 1082 1083 //if (latinCharacters) 1084 //{ 1085 // Url = HagsWeb.Library.Utilities.DWUtilities.NormalizeLatinCharacters(Url); 1086 //} 1087 1088 //string Url = hyperLink + "/" + sb_trim; 1089 string DateCreated = study["Study_Created_Date"] == null ? string.Empty : study["Study_Created_Date"].ToString(); 1090 string Description = study["Study_Content"] == null ? string.Empty : study["Study_Content"].ToString(); 1091 string StudyImages = study["Images"] == null ? string.Empty : study["Images"].ToString(); 1092 Item studyImage = null; 1093 1094 if (!string.IsNullOrEmpty(StudyImages)) 1095 { 1096 studyImage = HagsWeb.Library.Methods.Items.ItemTypeMethods.GetItemImages(study["Images"].ToString(), 1).FirstOrDefault(); 1097 } 1098 1099 1100 <div class="l-group-content col-xs-6 col-ms-4 col-sm-3"> 1101 1102 <div class="m-attractor"> 1103 1104 <div class="m-attractor-visual"> 1105 1106 @if (studyImage == null) 1107 { 1108 <a href="@Url"><img src="/Files/Templates/Designs/HagsCore/res/img/image-not-found.png" class="img-responsive" /></a> 1109 } 1110 else 1111 { 1112 <a href="@Url"><img src='@studyImage["Image"].ToString()' class="img-responsive"></a> 1113 } 1114 1115 1116 @*<img src="/Admin/Public/GetImage.ashx?width=1920&Compression=75&image=@image">*@ 1117 </div> 1118 1119 <div class="m-attractor-info m-attractor-info-product"> 1120 @if (!String.IsNullOrEmpty(Name)) 1121 { 1122 <h3 class="m-theme-after-yellow m-theme-border-yellow"><a href="@Url">@Name</a></h3> 1123 } 1124 @if (!String.IsNullOrEmpty(Description)) 1125 { 1126 <p>@Description</p> 1127 } 1128 1129 @if (!String.IsNullOrEmpty(DateCreated)) 1130 { 1131 <p>@DateCreated</p> 1132 } 1133 1134 @if (!String.IsNullOrEmpty(Url)) 1135 { 1136 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@Url" role="button">@Translate("CaseStudyDetails", "Case Study Details")</a> 1137 } 1138 1139 1140 </div> <!-- attractor-info --> 1141 @*<div class="m-attractor-options"> 1142 1143 <ul class="m-icon-links list-unstyled"> 1144 <li><a href="#" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/plus.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/plus.png" class="m-icon pull-left"><span>Add to my collection</span></a></li> 1145 </ul> 1146 1147 </div>*@ <!-- m-attractor-options --> 1148 1149 </div> <!-- attractor --> 1150 1151 </div> 1152 } 1153 } 1154 1155 </div> 1156 1157 <div class="text-center all-case-studies"> 1158 1159 @if (!String.IsNullOrEmpty(paraContent)) 1160 { 1161 @paraContent 1162 } 1163 1164 @if (!String.IsNullOrEmpty(hyperLink)) 1165 { 1166 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@hyperLink" role="button">@Translate("ViewAllCaseStudies", "View all our case studies")</a> 1167 } 1168 1169 </div> 1170 1171 @*<div class="m-search-advanced-buttons text-center"> 1172 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" href="@hyperLink" role="button">@Translate("ViewAllCaseStudies", "View all our case studies")</a> 1173 </div>*@ 1174 1175 @*</div>*@ 1176 1177 <div class="text-center"> 1178 <a href="#inspirationfinder" class="m-search-advanced-close"><img src="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.svg" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/buttons/search-advanced-close.png" width="112" alt="Search Advanced Close"></a> 1179 </div> 1180 </div> 1181 1182 </div> 1183 </div> 1184 1185 <div id="NoResults" style="display:none;">Sorry there are currently no items that match your search criteria. Please refine your search using the options above.</div> 1186 1187 </div> 1188 </div> 1189 1190 <div style="margin-top:50px; display:none;" id="SearchResults">@Translate("YourResults", "YourResults") **Search Results here**</div> 1191 1192 1193 </div> 1194 1195 @Scripts.Render("~/bundle/AssetSearch") 1196 1197 @if (areaLanguage != "en") 1198 { 1199 // non english validation messages 1200 <script src="/Files/Templates/Designs/HagsCore/script/source/libraries/validation/localization/@validationMessages"></script> 1201 } 1202

Case Studies:

King George V Recreation Ground, Berkshire

Winkfield Parish Council contracted HAGS to create a brand new playground for the whole community to enjoy.

11/02/2019 13:01:00

Read More

Kingsland Primary School, Wakefield

Kingsland Primary School is an outstanding rated SEN school in Wakefield, Yorkshire, which caters for children with a range of learning disabilities. They asked HAGS to design and build play areas for each of their two sites.

22/01/2019 15:42:00

Read More

Inclusive Tree House Themed Playground, Sweden

A fantastic inclusive playground in the city of Uppsala, Sweden, featuring a tree house-themed customised UniPlay unit.

03/12/2018 17:27:00

Read More

Woodgate Play and Fitness Area, Kingston

This new play and fitness area in Woodgate, Kingston ticks all of our clients requirements with high play value and excellent outdoor gym facilities.

22/11/2018 11:30:00

Read More

Chinley Play Area, Derbyshire

HAGS have recently created a play area in the leafy village of Chinley in the UK. Our play designers managed to include a lot of play activities in a narrow space owing to a well thought out layout.

26/10/2018 14:47:00

Read More

Low Bentham Village Play Area, Lancaster

HAGS have recently completed a recreational park to create an active play and social space for children. The play area has been named the Phillip Harvey Playing Field after the generous donation of land for a park by Philip Harvey around 70 years ago.

01/10/2018 16:04:00

Read More

Perdiswell Play Area, Worcester

We have created a spitfire-themed play area boasting its own runway and varied play opportunities. Both the client and the community were thrilled!

24/09/2018 16:45:00

Read More

Arnot Hill Playground, Gedling

Arnot Hill Playground was a popular site but needed an upgrade. The park has undergone a £129,000 refurbishment partly funded by WREN and designed by HAGS.

25/07/2018 15:33:00

Read More

Gala Park, Galashiels

HAGS were invited by the Scottish Borders Council to tender for part of the various proposed play park upgrades they have planned throughout the county, the first being Gala Park in Galashiels.

26/07/2018 17:07:00

Read More

PlayCubes, Barcelona, Spain

Take a look at this fantastic PlayCubes playground in Sant Pere de Ribes, Barcelona, with a variety of PlayCube structures.

27/04/2018 11:18:00

Read More

Stratford St Mary Playground

The existing playground in the village of Stratford St Mary was old, in a state of disrepair and very under-used. HAGS designed the playground with the help of the village's primary school pupils and the school council.

15/03/2018 16:30:00

Read More

Clarks Village, Somerset

This King Arthur themed adventure playground aims to deliver an exciting experience for young visitors of differing abilities.

05/04/2018 15:07:00

Read More
Error executing template "/Designs/HagsCore/Paragraph/Worldwide Contacts.cshtml"
System.NullReferenceException: Object reference not set to an instance of an object.
   at CompiledRazorTemplates.Dynamic.RazorEngine_f3de24552d5d417d8725317a36cd16c4.Execute() in C:\Projects\Hags_Dw9\Files\Templates\Designs\HagsCore\Paragraph\Worldwide Contacts.cshtml:line 13
   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 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.Web.Optimization; 3 @using Dynamicweb.Content.Items; 4 @using Dynamicweb.Security.UserManagement; 5 @using HagsWeb.Library.Methods.HagsUsers; 6 @{ 7 Dynamicweb.Content.Area area = new Dynamicweb.Content.AreaService().GetArea(Dynamicweb.Frontend.PageView.Current().AreaID); 8 9 Item Item = Dynamicweb.Content.Items.Item.GetItemById(GetString("Item.SystemName"), GetString("Item.Id")); 10 string areaLongLang = GetGlobalValue("Global:Area.LongLang"); //en-GB, sv-SE 11 12 // The areas social media configuration on initial page load 13 string social = Dynamicweb.Frontend.PageView.Current().Area.Item["Social_Media"].ToString(); 14 List<Item> socialMediaList = new List<Item>(); 15 16 foreach (var s in social.Split(',').ToArray()) 17 { 18 Item media = Dynamicweb.Content.Items.Item.GetItemById("Social_Links", s); 19 if (media != null) 20 { 21 socialMediaList.Add(media); 22 } 23 } 24 25 string selectedCountry = areaLongLang.Substring(areaLongLang.Length - 2); 26 27 if (Dynamicweb.Frontend.PageView.Current().AreaID == 1) 28 { 29 selectedCountry = ""; // default 30 } 31 32 Group countryGroup = HagsCustomModules.Ajax.WorldContacts.WorldContacts.GetCurrentGroup(selectedCountry); 33 34 UserCollection countryUsers = null; 35 UserCollection distributorUsers = null; 36 UserCollection subsiduaryUsers = null; 37 string countryGroupName = String.Empty; 38 string countryGroupMap = String.Empty; 39 HashSet<String[,]> ddList = new HashSet<string[,]>(); 40 41 if (countryGroup != null) 42 { 43 var tuple = UsersFilter.GetCountryGroup(countryGroup, selectedCountry.ToUpper()); 44 45 countryUsers = tuple.Item1; 46 distributorUsers = tuple.Item2; 47 subsiduaryUsers = tuple.Item3; 48 countryGroupName = tuple.Item4; 49 countryGroupMap = tuple.Item5; 50 ddList = tuple.Item6; 51 } 52 53 54 55 } 56 @*http://doc.dynamicweb.com/forum/cms-standard-features/disappointed-with-the-maps-module?M=BasicForum&PID=1605*@ 57 @*http://doc.dynamicweb.com/forum/development/dealer-search-outdates-as-of-dw8?M=BasicForum&PID=1605*@ 58 59 @Scripts.Render("~/bundle/WorldContacts") 60 61 <input type="hidden" id="selectedCountry" value="@selectedCountry" /> 62 63 <div class="m-worldwide m-theme-background-lightgrey"> 64 65 <div class="m-worldwide-select"> 66 67 <div class="l-page"> 68 69 <div class="container-fluid"> 70 71 @if (ddList.Count() > 0) 72 { 73 <label for="selectCountry">@Translate("WorldwideContacts", "Worldwide Contacts"):</label> 74 75 <div class="btn-group dropdown" id="selectCountry"> 76 77 <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> 78 79 @Translate("SelectYourCountry", "Select your Country") <span class="caret"></span> 80 81 </button> 82 83 84 <ul class="dropdown-menu" role="listbox"> 85 @foreach (var a in ddList) 86 { 87 <li> 88 <span> 89 <img src="@a[0, 2]" align="middle"><a href="#" data-ajax="@a[0, 0].ToLower()">@a[0, 1]</a> 90 </span> 91 </li> 92 93 } 94 </ul> 95 96 </div> 97 98 } 99 100 101 </div> <!-- container-fluid --> 102 103 </div> <!-- l-page --> 104 105 </div> <!-- m-worldwide-select --> 106 107 <div class="l-page"> 108 109 <div class="container-fluid"> 110 111 <div class="row"> 112 <div class="col-md-9"> 113 114 <div class="row"> 115 116 <div class="col-ms-7 col-sm-7"> 117 118 <div class="m-generalcontent" id="contactusContent"> 119 120 <h3>@GetString("Item.Heading.Value")</h3> 121 122 <p class="countryContent">@GetString("Item.Country_Content.Value")</p> 123 124 </div> <!-- m-generalcontent --> 125 126 </div> 127 128 129 <div class="col-ms-5 col-sm-5"> 130 131 <div class="m-worldwide-map" id="countryMap"> 132 133 @if (!String.IsNullOrEmpty(countryGroupMap)) 134 { 135 <img src="Files/@countryGroupMap" class="img-responsive"> 136 } 137 138 </div> 139 140 </div> 141 142 143 </div> <!-- row --> 144 145 <div class="m-generalcontent" id="buttonLinks"> 146 147 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" id="btnInsp" href="@GetString("Item.Inspiration_Button.Button_Link")" role="button">@GetString("Item.Inspiration_Button.Button_Text.Value")</a> 148 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" id="btnCtc" href="@GetString("Item.Contact_Button.Button_Link")" role="button">@GetString("Item.Contact_Button.Button_Text.Value")</a> 149 150 </div> <!-- m-generalcontent --> 151 152 <div id="adviceMessage"></div> 153 154 </div> 155 <div class="col-md-3" id="worldwideInfo"> 156 157 @if (countryUsers != null && countryUsers.Count > 0) 158 { 159 160 <div class="m-worldwide-info" id="worldwideInfo"> 161 162 <h3>@countryGroupName</h3> 163 164 <div id="Country" class="contactspanel"> 165 166 @foreach (var countryUser in countryUsers) 167 { 168 var name = countryUser.Name; 169 var address = countryUser.Address; 170 var address2 = countryUser.Address2; 171 var city = countryUser.City; 172 var zipCode = countryUser.Zip; 173 var state = countryUser.State; 174 var country = countryUser.Country; 175 var phone = countryUser.Phone.Trim(); 176 var fax = countryUser.Fax.Trim(); 177 var email = countryUser.Email.Trim(); 178 //var sort = user. 179 var webSite = countryUser.CustomFieldValues.Where(n => n.CustomField.SystemName == "AccessUser_UserWebsite") 180 .Select(n => n.Value).FirstOrDefault().ToString().Trim(); 181 182 <div class="m-generalcontent"> 183 <div class="h-card vcard"> 184 <div class="h-adr adr"> 185 186 <p> 187 @if (!String.IsNullOrWhiteSpace(name)) 188 { 189 <span class="fn p-org org">@name</span><br> 190 } 191 @*<span class="fn p-org org">SARL ABC Diffusion</span><br>*@ 192 @if (!String.IsNullOrWhiteSpace(address)) 193 { 194 <span class="p-street-address street-address">@address</span><br> 195 } 196 @*<span class="p-street-address street-address">Zi La Houche</span><br>*@ 197 @if (!String.IsNullOrWhiteSpace(city)) 198 { 199 <span class="p-street-address street-address">@city</span><br> 200 } 201 @if (!String.IsNullOrWhiteSpace(state)) 202 { 203 <span class="p-street-address street-address">@state</span><br> 204 } 205 206 @if (!String.IsNullOrWhiteSpace(zipCode)) 207 { 208 <span class="p-postal-code postal-code">@zipCode</span><span class="p-locality locality">@city</span><br> 209 } 210 @if (!String.IsNullOrWhiteSpace(country)) 211 { 212 <span class="p-locality locality">@country</span><br> 213 } 214 215 @*<span class="p-postal-code postal-code">702 40</span> <span class="p-locality locality">Aneby</span>*@ 216 </p> 217 </div> 218 </div> 219 <ul class="m-icon-links list-unstyled"> 220 @if (!String.IsNullOrWhiteSpace(phone)) 221 { 222 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png"><span>@phone</span></li> 223 } 224 @if (!String.IsNullOrWhiteSpace(fax)) 225 { 226 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png"><span>@fax</span></li> 227 } 228 229 @if (!String.IsNullOrWhiteSpace(email)) 230 { 231 <li><a href="mailto:@email" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" class="m-icon pull-left"><span>@email</span></a></li> 232 } 233 234 @if (!String.IsNullOrWhiteSpace(webSite)) 235 { 236 <li><a href="@webSite" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" class="m-icon pull-left"><span>@webSite</span></a></li> 237 } 238 239 </ul> 240 </div> <!-- m-generalcontent --> 241 } 242 243 </div> 244 245 246 <div id="Distributors" class="contactspanel" style="display: none;"> 247 248 @if (distributorUsers != null && distributorUsers.Count > 0) 249 { 250 foreach (var distributor in distributorUsers) 251 { 252 var name = distributor.Name; 253 var address = distributor.Address; 254 var address2 = distributor.Address2; 255 var city = distributor.City; 256 var zipCode = distributor.Zip; 257 var state = distributor.State; 258 var country = distributor.Country; 259 var phone = distributor.Phone.Trim(); 260 var fax = distributor.Fax.Trim(); 261 var email = distributor.Email.Trim(); 262 var webSite = distributor.CustomFieldValues.Where(n => n.CustomField.SystemName == "AccessUser_UserWebsite") 263 .Select(n => n.Value).FirstOrDefault().ToString().Trim(); 264 265 <div class="m-generalcontent"> 266 <div class="h-card vcard"> 267 <div class="h-adr adr"> 268 269 <p> 270 @if (!String.IsNullOrWhiteSpace(name)) 271 { 272 <span class="fn p-org org">@name</span><br> 273 } 274 @*<span class="fn p-org org">SARL ABC Diffusion</span><br>*@ 275 @if (!String.IsNullOrWhiteSpace(address)) 276 { 277 <span class="p-street-address street-address">@address</span><br> 278 } 279 @*<span class="p-street-address street-address">Zi La Houche</span><br>*@ 280 @if (!String.IsNullOrWhiteSpace(city)) 281 { 282 <span class="p-street-address street-address">@city</span><br> 283 } 284 @if (!String.IsNullOrWhiteSpace(state)) 285 { 286 <span class="p-street-address street-address">@state</span><br> 287 } 288 289 @if (!String.IsNullOrWhiteSpace(zipCode)) 290 { 291 <span class="p-postal-code postal-code">@zipCode</span><span class="p-locality locality">@city</span><br> 292 } 293 @if (!String.IsNullOrWhiteSpace(country)) 294 { 295 <span class="p-locality locality">@country</span><br> 296 } 297 298 @*<span class="p-postal-code postal-code">702 40</span> <span class="p-locality locality">Aneby</span>*@ 299 </p> 300 </div> 301 </div> 302 <ul class="m-icon-links list-unstyled"> 303 @if (!String.IsNullOrWhiteSpace(phone)) 304 { 305 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png"><span>@phone</span></li> 306 } 307 @if (!String.IsNullOrWhiteSpace(fax)) 308 { 309 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png"><span>@fax</span></li> 310 } 311 312 @if (!String.IsNullOrWhiteSpace(email)) 313 { 314 <li><a href="mailto:@email" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" class="m-icon pull-left"><span>@email</span></a></li> 315 } 316 317 @if (!String.IsNullOrWhiteSpace(webSite)) 318 { 319 <li><a href="@webSite" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" class="m-icon pull-left"><span>@webSite</span></a></li> 320 } 321 322 </ul> 323 </div> <!-- m-generalcontent --> 324 } 325 } 326 327 </div> 328 329 330 <div id="Subsidiaries" class="contactspanel" style="display: none;"> 331 @if (subsiduaryUsers != null && subsiduaryUsers.Count > 0) 332 { 333 foreach (var subsiduary in subsiduaryUsers) 334 { 335 var name = subsiduary.Name; 336 var address = subsiduary.Address; 337 var address2 = subsiduary.Address2; 338 var city = subsiduary.City; 339 var zipCode = subsiduary.Zip; 340 var state = subsiduary.State; 341 var country = subsiduary.Country; 342 var phone = subsiduary.Phone.Trim(); 343 var fax = subsiduary.Fax.Trim(); 344 var email = subsiduary.Email.Trim(); 345 var webSite = subsiduary.CustomFieldValues.Where(n => n.CustomField.SystemName == "AccessUser_UserWebsite") 346 .Select(n => n.Value).FirstOrDefault().ToString().Trim(); 347 348 <div class="m-generalcontent"> 349 <div class="h-card vcard"> 350 <div class="h-adr adr"> 351 352 <p> 353 @if (!String.IsNullOrWhiteSpace(name)) 354 { 355 <span class="fn p-org org">@name</span><br> 356 } 357 @*<span class="fn p-org org">SARL ABC Diffusion</span><br>*@ 358 @if (!String.IsNullOrWhiteSpace(address)) 359 { 360 <span class="p-street-address street-address">@address</span><br> 361 } 362 @*<span class="p-street-address street-address">Zi La Houche</span><br>*@ 363 @if (!String.IsNullOrWhiteSpace(city)) 364 { 365 <span class="p-street-address street-address">@city</span><br> 366 } 367 @if (!String.IsNullOrWhiteSpace(state)) 368 { 369 <span class="p-street-address street-address">@state</span><br> 370 } 371 372 @if (!String.IsNullOrWhiteSpace(zipCode)) 373 { 374 <span class="p-postal-code postal-code">@zipCode</span><span class="p-locality locality">@city</span><br> 375 } 376 @if (!String.IsNullOrWhiteSpace(country)) 377 { 378 <span class="p-locality locality">@country</span><br> 379 } 380 381 @*<span class="p-postal-code postal-code">702 40</span> <span class="p-locality locality">Aneby</span>*@ 382 </p> 383 </div> 384 </div> 385 <ul class="m-icon-links list-unstyled"> 386 @if (!String.IsNullOrWhiteSpace(phone)) 387 { 388 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/telephone.png"><span>@phone</span></li> 389 } 390 @if (!String.IsNullOrWhiteSpace(fax)) 391 { 392 <li><img class="clearfix m-icon pull-left" src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/fax.png"><span>@fax</span></li> 393 } 394 395 @if (!String.IsNullOrWhiteSpace(email)) 396 { 397 <li><a href="mailto:@email" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/email.png" class="m-icon pull-left"><span>@email</span></a></li> 398 } 399 400 @if (!String.IsNullOrWhiteSpace(webSite)) 401 { 402 <li><a href="@webSite" class="clearfix"><img src="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" data-nosvg="/Files/Templates/Designs/HagsCore/res/img/icons/contact/website.png" class="m-icon pull-left"><span>@webSite</span></a></li> 403 } 404 405 </ul> 406 </div> <!-- m-generalcontent --> 407 } 408 } 409 </div> 410 411 412 <div class="m-generalcontent" id="socialIcons"> 413 <p>@Translate("FollowHAGS", "Follow HAGS:")</p> 414 <div class="m-social"> 415 <ul class="list-inline"> 416 @foreach (Item prop in socialMediaList) 417 { 418 var linkUrl = prop["Social_Link"]; 419 string linkIcon = "/Files/Templates/Designs/HagsCore/res/img/icons/social/" + prop["Social_Icon"] + ".png"; 420 <li><a href="@linkUrl" target="_blank"><img src="@linkIcon" class="m-icon" /></a></li> 421 } 422 </ul> 423 </div> <!-- m-social --> 424 </div> <!-- m-generalcontent --> 425 426 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" data-ajax="Country" href="#" role="button" style="display: none;">@GetString("Item.Offices_Button.Button_Text.Value")</a> 427 428 @{ 429 var btnDistDisplay = "style='display: none;'"; 430 if (distributorUsers != null) 431 { 432 btnDistDisplay = "style='display: block; margin-bottom:5px'"; 433 } 434 } 435 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" data-ajax="Distributors" href="#" role="button" @btnDistDisplay>@GetString("Item.Distributors_Button.Button_Text.Value")</a> 436 437 @{ 438 var btnSubsDisplay = "style='display: none;'"; 439 if (subsiduaryUsers != null) 440 { 441 btnSubsDisplay = "style='display: block;'"; 442 } 443 } 444 <a class="m-btn-xs-more btn btn-default btn-xs text-uppercase" data-ajax="Subsidiaries" href="#" role="button" @btnSubsDisplay>@GetString("Item.Subsidiaries_Button.Button_Text.Value")</a> 445 446 447 </div><!-- m-worldwide-info --> 448 449 } 450 451 </div> 452 </div> <!-- row --> 453 454 </div> <!-- container-fluid --> 455 456 </div> <!-- l-page --> 457 458 </div> <!-- m-worldwide --> 459