• Para Profissionais de Beleza
  • Encomenda antes das 12h00, entregue no dia útil seguinte
  • Pagamento seguro
  • Pagamento seguro
Error compiling template "Designs/ProNails_generated/Paragraph/PoiUserDetails.cshtml"
Line 29: The type or namespace name 'Device' does not exist in the namespace 'System' (are you missing an assembly reference?)
Line 83: The type or namespace name 'GeoCoordinate' could not be found (are you missing a using directive or an assembly reference?)
Line 107: The type or namespace name 'GeoCoordinate' could not be found (are you missing a using directive or an assembly reference?)
Line 164: The type or namespace name 'GeoCoordinate' could not be found (are you missing a using directive or an assembly reference?)
Line 282: 'Country.Name' is obsolete: 'Use GetName'

1 //------------------------------------------------------------------------------ 2 // <auto-generated> 3 // This code was generated by a tool. 4 // Runtime Version:4.0.30319.42000 5 // 6 // Changes to this file may cause incorrect behavior and will be lost if 7 // the code is regenerated. 8 // </auto-generated> 9 //------------------------------------------------------------------------------ 10 11 namespace CompiledRazorTemplates.Dynamic { 12 using System; 13 using System.Collections.Generic; 14 using System.Linq; 15 16 #line 2 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 17 using System.Web; 18 19 #line default 20 #line hidden 21 22 #line 3 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 23 using System.Xml.Linq; 24 25 #line default 26 #line hidden 27 28 #line 4 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 29 using System.Device.Location; 30 31 #line default 32 #line hidden 33 34 #line 5 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 35 using Dynamicweb; 36 37 #line default 38 #line hidden 39 40 #line 6 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 41 using Dynamicweb.Content.Items; 42 43 #line default 44 #line hidden 45 46 #line 9 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 47 using Dynamicweb.Configuration; 48 49 #line default 50 #line hidden 51 52 #line 8 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 53 using Dynamicweb.Security.UserManagement; 54 55 #line default 56 #line hidden 57 58 #line 10 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 59 using Dynamicweb.Ecommerce.International; 60 61 #line default 62 #line hidden 63 64 #line 11 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 65 using Bluedesk.DynamicWeb.ItemTypes.Poi; 66 67 #line default 68 #line hidden 69 70 #line 12 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 71 using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 72 73 #line default 74 #line hidden 75 76 77 public class RazorEngine_c4afdd7d6dc14592b3327d6c56318bd0 : Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> { 78 79 #line hidden 80 81 #line 127 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 82 83 private static GeoCoordinate GetGeoLocationByAdress(string address) 84 { 85 // Get Google Maps API key from Settings > Control Panel > Maps 86 // Geocoding API needs to be activated for API key 87 var googlemapsAPI = SystemConfiguration.Instance.GetValue("/Globalsettings/Settings/GoogleMaps/GoogleMapsAPIKey"); 88 89 if (!string.IsNullOrWhiteSpace(googlemapsAPI)) 90 { 91 var geoxml = XDocument.Load("https://maps.google.com/maps/api/geocode/xml" + "?address=" + HttpUtility.UrlEncode(address) + "&sensor=false&key=" + googlemapsAPI); 92 93 if (geoxml.Descendants("result").Descendants("geometry").Descendants("location").Any()) 94 { 95 // Use LINQ to XML to extract the geocode values from the returned XML 96 var location = from part in geoxml.Descendants("result").Descendants("geometry").First().Descendants("location") 97 select new 98 { 99 lat = part.Element("lat").Value, 100 lng = part.Element("lng").Value 101 }; 102 103 if (location.Count() > 0) 104 { 105 double _lat = Double.Parse(location.First().lat, System.Globalization.CultureInfo.InvariantCulture); 106 double _lng = Double.Parse(location.First().lng, System.Globalization.CultureInfo.InvariantCulture); 107 var geo = new GeoCoordinate(_lat, _lng); 108 return geo; 109 } 110 } 111 } 112 113 return null; 114 } 115 116 #line default 117 #line hidden 118 119 120 public RazorEngine_c4afdd7d6dc14592b3327d6c56318bd0() { 121 } 122 123 public override void Execute() { 124 WriteLiteral("\r\n\r\n"); 125 126 127 #line 15 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 128 129 PoiUserDetails _data = ItemManager.Storage.GetById<PoiUserDetails>(Pageview.CurrentParagraph.ItemId ?? "0"); 130 var googlemapsAPI = Pageview.Area.Item["FrontendGoogleMapsApiKey"]?.ToString() ?? ""; 131 var countryService = new CountryService(); 132 133 string markerIcon = _data.MarkerIcon; 134 int mapZoom = _data.Zoom; 135 bool disableDefaultUI = _data.disableDefaultUI; 136 bool enableZoomControl = _data.enableZoomControl; 137 138 string userId = HttpContext.Current.Request.QueryString.Get("User") != null ? HttpContext.Current.Request.QueryString.Get("User") : ""; 139 User poiUser = !string.IsNullOrWhiteSpace(userId) ? Dynamicweb.Security.UserManagement.User.GetUserByID(int.Parse(userId)) : null; 140 bool isPoiGroup = poiUser != null ? poiUser.Groups.Any(g => g.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_POI_Group")?.Value?.ToString() == "True") : false; 141 142 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_name")?.Value?.ToString())) 143 { 144 poiUser.Name = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_name")?.Value?.ToString(); 145 } 146 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_address")?.Value?.ToString())) 147 { 148 poiUser.Address = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_address")?.Value?.ToString(); 149 } 150 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_number")?.Value?.ToString())) 151 { 152 poiUser.HouseNumber = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_number")?.Value?.ToString(); 153 } 154 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString())) 155 { 156 poiUser.Zip = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString(); 157 } 158 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_city")?.Value?.ToString())) 159 { 160 poiUser.City = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_city")?.Value?.ToString(); 161 } 162 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString())) 163 { 164 GeoCoordinate alternativeGeoLocation = GetGeoLocationByAdress($"{poiUser.Address} {poiUser.HouseNumber} {poiUser.Zip} { poiUser.City}"); 165 poiUser.GeolocationLatitude = alternativeGeoLocation.Latitude; 166 poiUser.GeolocationLongitude = alternativeGeoLocation.Longitude; 167 } 168 169 if(poiUser != null) { 170 if(!string.IsNullOrWhiteSpace(Pageview.Page.MetaTitle)) { 171 Pageview.Meta.Title = Pageview.Page.MetaTitle.Replace("{0}", poiUser.Name); 172 } else { 173 Pageview.Meta.Title = $"{Pageview.Page.MenuText} - {poiUser.Name}"; 174 } 175 } 176 177 string geolocationLatitude = poiUser.GeolocationLatitude.ToString().Replace(",", "."); 178 string geolocationLongitude = poiUser.GeolocationLongitude.ToString().Replace(",", "."); 179 180 181 182 #line default 183 #line hidden 184 WriteLiteral("\r\n\r\n<div>\r\n\r\n"); 185 186 WriteLiteral(" "); 187 188 189 #line 71 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 190 Write(SnippetStart("GoogleMapsScript")); 191 192 193 #line default 194 #line hidden 195 WriteLiteral("\r\n"); 196 197 198 #line 72 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 199 200 201 #line default 202 #line hidden 203 204 #line 72 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 205 if(!string.IsNullOrWhiteSpace(googlemapsAPI)) 206 { 207 208 209 #line default 210 #line hidden 211 WriteLiteral(" <script"); 212 213 WriteAttribute("src", Tuple.Create(" src=\"", 4274), Tuple.Create("\"", 4338) 214 , Tuple.Create(Tuple.Create("", 4280), Tuple.Create("https://maps.googleapis.com/maps/api/js?key=", 4280), true) 215 216 #line 74 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 217 , Tuple.Create(Tuple.Create("", 4324), Tuple.Create<System.Object, System.Int32>(googlemapsAPI 218 219 #line default 220 #line hidden 221 , 4324), false) 222 ); 223 224 WriteLiteral("></script>\r\n"); 225 226 227 #line 75 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 228 } 229 230 231 #line default 232 #line hidden 233 WriteLiteral(" "); 234 235 236 #line 76 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 237 Write(SnippetEnd("GoogleMapsScript")); 238 239 240 #line default 241 #line hidden 242 WriteLiteral("\r\n\r\n <div"); 243 244 WriteLiteral(" class=\"userpoidetail\""); 245 246 WriteLiteral(" data-lat=\""); 247 248 249 #line 78 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 250 Write(geolocationLatitude); 251 252 253 #line default 254 #line hidden 255 WriteLiteral("\""); 256 257 WriteLiteral(" data-lng=\""); 258 259 260 #line 78 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 261 Write(poiUser.GeolocationLongitude); 262 263 264 #line default 265 #line hidden 266 WriteLiteral("\""); 267 268 WriteLiteral(">\r\n"); 269 270 271 #line 79 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 272 273 274 #line default 275 #line hidden 276 277 #line 79 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 278 if(poiUser != null && isPoiGroup) 279 { 280 string userDescription = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Description").Value.ToString(); 281 string userWebsite = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Website").Value.ToString(); 282 string countryName = !string.IsNullOrWhiteSpace(poiUser.Country) ? countryService.GetCountry(poiUser.Country) != null ? countryService.GetCountry(poiUser.Country).Name : poiUser.Country : poiUser.Country; 283 284 285 286 #line default 287 #line hidden 288 WriteLiteral(" <div"); 289 290 WriteLiteral(" class=\"container userpoidetail__row\""); 291 292 WriteLiteral(">\r\n <section"); 293 294 WriteLiteral(" class=\"userpoidetail__info\""); 295 296 WriteLiteral(">\r\n <h1"); 297 298 WriteLiteral(" class=\"userpoidetail__name\""); 299 300 WriteLiteral(">"); 301 302 303 #line 87 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 304 Write(poiUser.Name); 305 306 307 #line default 308 #line hidden 309 WriteLiteral("</h1>\r\n\r\n"); 310 311 312 #line 89 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 313 314 315 #line default 316 #line hidden 317 318 #line 89 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 319 if(!string.IsNullOrWhiteSpace(userDescription)) 320 { 321 322 323 #line default 324 #line hidden 325 WriteLiteral(" <div"); 326 327 WriteLiteral(" class=\"userpoidetail__description\""); 328 329 WriteLiteral(">\r\n <p>"); 330 331 332 #line 92 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 333 Write(userDescription); 334 335 336 #line default 337 #line hidden 338 WriteLiteral("</p>\r\n </div>\r\n"); 339 340 341 #line 94 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 342 } 343 344 345 #line default 346 #line hidden 347 WriteLiteral("\r\n <div"); 348 349 WriteLiteral(" class=\"userpoidetail__address\""); 350 351 WriteLiteral(">\r\n <h3>"); 352 353 354 #line 97 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 355 Write(Translate("UserDetailPoi.Address", "Address")); 356 357 358 #line default 359 #line hidden 360 WriteLiteral("</h3>\r\n <p>"); 361 362 363 #line 98 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 364 Write(poiUser.Address); 365 366 367 #line default 368 #line hidden 369 WriteLiteral(" "); 370 371 372 #line 98 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 373 Write(poiUser.HouseNumber); 374 375 376 #line default 377 #line hidden 378 WriteLiteral("</p>\r\n <p>"); 379 380 381 #line 99 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 382 Write(poiUser.Zip); 383 384 385 #line default 386 #line hidden 387 WriteLiteral(" "); 388 389 390 #line 99 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 391 Write(poiUser.City); 392 393 394 #line default 395 #line hidden 396 WriteLiteral("</p>\r\n <p>"); 397 398 399 #line 100 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 400 Write(countryName); 401 402 403 #line default 404 #line hidden 405 WriteLiteral("</p>\r\n </div>\r\n\r\n <div"); 406 407 WriteLiteral(" class=\"userpoidetail__contact\""); 408 409 WriteLiteral(">\r\n <h3>"); 410 411 412 #line 104 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 413 Write(Translate("UserDetailPoi.Contact", "Contact")); 414 415 416 #line default 417 #line hidden 418 WriteLiteral("</h3>\r\n"); 419 420 421 #line 105 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 422 423 424 #line default 425 #line hidden 426 427 #line 105 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 428 if(!string.IsNullOrWhiteSpace(poiUser.Email)) 429 { 430 431 432 #line default 433 #line hidden 434 WriteLiteral(" <p><strong>"); 435 436 437 #line 107 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 438 Write(Translate("UserDetailPoi.Email", "Email:")); 439 440 441 #line default 442 #line hidden 443 WriteLiteral("</strong> <a"); 444 445 WriteAttribute("href", Tuple.Create(" href=\"", 6214), Tuple.Create("\"", 6242) 446 , Tuple.Create(Tuple.Create("", 6221), Tuple.Create("mailto:", 6221), true) 447 448 #line 107 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 449 , Tuple.Create(Tuple.Create("", 6228), Tuple.Create<System.Object, System.Int32>(poiUser.Email 450 451 #line default 452 #line hidden 453 , 6228), false) 454 ); 455 456 WriteLiteral(">"); 457 458 459 #line 107 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 460 Write(poiUser.Email); 461 462 463 #line default 464 #line hidden 465 WriteLiteral("</a></p>\r\n"); 466 467 468 #line 108 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 469 } 470 471 472 #line default 473 #line hidden 474 WriteLiteral(" "); 475 476 477 #line 109 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 478 if(!string.IsNullOrWhiteSpace(poiUser.Phone)) 479 { 480 481 482 #line default 483 #line hidden 484 WriteLiteral(" <p><strong>"); 485 486 487 #line 111 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 488 Write(Translate("UserDetailPoi.Phone", "Phone:")); 489 490 491 #line default 492 #line hidden 493 WriteLiteral("</strong> <a"); 494 495 WriteAttribute("href", Tuple.Create(" href=\"", 6489), Tuple.Create("\"", 6514) 496 , Tuple.Create(Tuple.Create("", 6496), Tuple.Create("tel:", 6496), true) 497 498 #line 111 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 499 , Tuple.Create(Tuple.Create("", 6500), Tuple.Create<System.Object, System.Int32>(poiUser.Phone 500 501 #line default 502 #line hidden 503 , 6500), false) 504 ); 505 506 WriteLiteral(">"); 507 508 509 #line 111 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 510 Write(poiUser.Phone); 511 512 513 #line default 514 #line hidden 515 WriteLiteral("</a></p>\r\n"); 516 517 518 #line 112 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 519 } 520 521 522 #line default 523 #line hidden 524 WriteLiteral(" "); 525 526 527 #line 113 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 528 if(!string.IsNullOrWhiteSpace(userWebsite)) 529 { 530 531 532 #line default 533 #line hidden 534 WriteLiteral(" <p><strong>"); 535 536 537 #line 115 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 538 Write(Translate("UserDetailPoi.Website", "Website")); 539 540 541 #line default 542 #line hidden 543 WriteLiteral(":</strong> <a"); 544 545 WriteAttribute("href", Tuple.Create(" href=\"", 6763), Tuple.Create("\"", 6782) 546 547 #line 115 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 548 , Tuple.Create(Tuple.Create("", 6770), Tuple.Create<System.Object, System.Int32>(userWebsite 549 550 #line default 551 #line hidden 552 , 6770), false) 553 ); 554 555 WriteLiteral(">"); 556 557 558 #line 115 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 559 Write(userWebsite); 560 561 562 #line default 563 #line hidden 564 WriteLiteral("</a></p>\r\n"); 565 566 567 #line 116 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 568 } 569 570 571 #line default 572 #line hidden 573 WriteLiteral(" </div>\r\n </section>\r\n <section"); 574 575 WriteLiteral(" class=\"userpoidetail__map\""); 576 577 WriteLiteral(">\r\n <div"); 578 579 WriteAttribute("id", Tuple.Create(" id=\"", 6967), Tuple.Create("\"", 6983) 580 , Tuple.Create(Tuple.Create("", 6972), Tuple.Create("map-", 6972), true) 581 582 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 583 , Tuple.Create(Tuple.Create("", 6976), Tuple.Create<System.Object, System.Int32>(userId 584 585 #line default 586 #line hidden 587 , 6976), false) 588 ); 589 590 WriteLiteral(" data-latitude=\""); 591 592 593 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 594 Write(geolocationLatitude); 595 596 597 #line default 598 #line hidden 599 WriteLiteral("\""); 600 601 WriteLiteral(" data-longitude=\""); 602 603 604 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 605 Write(poiUser.GeolocationLongitude); 606 607 608 #line default 609 #line hidden 610 WriteLiteral("\""); 611 612 WriteLiteral(" data-markericon=\""); 613 614 615 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 616 Write(markerIcon); 617 618 619 #line default 620 #line hidden 621 WriteLiteral("\""); 622 623 WriteLiteral(" data-zoom=\""); 624 625 626 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 627 Write(mapZoom); 628 629 630 #line default 631 #line hidden 632 WriteLiteral("\""); 633 634 WriteLiteral(" data-disableui=\""); 635 636 637 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 638 Write(disableDefaultUI); 639 640 641 #line default 642 #line hidden 643 WriteLiteral("\""); 644 645 WriteLiteral(" data-enablezoom=\""); 646 647 648 #line 120 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 649 Write(enableZoomControl); 650 651 652 #line default 653 #line hidden 654 WriteLiteral("\""); 655 656 WriteLiteral(" class=\"poi-map\""); 657 658 WriteLiteral("></div>\r\n </section>\r\n </div>\r\n"); 659 660 661 #line 123 "D:\dynamicweb.net\Solutions\Bluedesk\pronails.cloud.dynamicweb-cms.com\files\Templates\Designs\ProNails_generated\Paragraph\PoiUserDetails.cshtml" 662 } 663 664 665 #line default 666 #line hidden 667 WriteLiteral(" </div>\r\n</div>\r\n\r\n"); 668 669 } 670 } 671 } 672

1 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2 @using System.Web; 3 @using System.Xml.Linq; 4 @using System.Device.Location; 5 @using Dynamicweb; 6 @using Dynamicweb.Content.Items; 7 @using Dynamicweb.Configuration; 8 @using Dynamicweb.Security.UserManagement; 9 @using Dynamicweb.Configuration; 10 @using Dynamicweb.Ecommerce.International; 11 @using Bluedesk.DynamicWeb.ItemTypes.Poi; 12 @using Bluedesk.Tools.DynamicWeb.ExtensionMethods; 13 14 15 @{ 16 PoiUserDetails _data = ItemManager.Storage.GetById<PoiUserDetails>(Pageview.CurrentParagraph.ItemId ?? "0"); 17 var googlemapsAPI = Pageview.Area.Item["FrontendGoogleMapsApiKey"]?.ToString() ?? ""; 18 var countryService = new CountryService(); 19 20 string markerIcon = _data.MarkerIcon; 21 int mapZoom = _data.Zoom; 22 bool disableDefaultUI = _data.disableDefaultUI; 23 bool enableZoomControl = _data.enableZoomControl; 24 25 string userId = HttpContext.Current.Request.QueryString.Get("User") != null ? HttpContext.Current.Request.QueryString.Get("User") : ""; 26 User poiUser = !string.IsNullOrWhiteSpace(userId) ? Dynamicweb.Security.UserManagement.User.GetUserByID(int.Parse(userId)) : null; 27 bool isPoiGroup = poiUser != null ? poiUser.Groups.Any(g => g.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_POI_Group")?.Value?.ToString() == "True") : false; 28 29 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_name")?.Value?.ToString())) 30 { 31 poiUser.Name = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_name")?.Value?.ToString(); 32 } 33 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_address")?.Value?.ToString())) 34 { 35 poiUser.Address = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_address")?.Value?.ToString(); 36 } 37 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_number")?.Value?.ToString())) 38 { 39 poiUser.HouseNumber = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_number")?.Value?.ToString(); 40 } 41 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString())) 42 { 43 poiUser.Zip = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString(); 44 } 45 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_city")?.Value?.ToString())) 46 { 47 poiUser.City = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_city")?.Value?.ToString(); 48 } 49 if (poiUser != null && !string.IsNullOrWhiteSpace(poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Poi_locator_zipcode")?.Value?.ToString())) 50 { 51 GeoCoordinate alternativeGeoLocation = GetGeoLocationByAdress($"{poiUser.Address} {poiUser.HouseNumber} {poiUser.Zip} { poiUser.City}"); 52 poiUser.GeolocationLatitude = alternativeGeoLocation.Latitude; 53 poiUser.GeolocationLongitude = alternativeGeoLocation.Longitude; 54 } 55 56 if(poiUser != null) { 57 if(!string.IsNullOrWhiteSpace(Pageview.Page.MetaTitle)) { 58 Pageview.Meta.Title = Pageview.Page.MetaTitle.Replace("{0}", poiUser.Name); 59 } else { 60 Pageview.Meta.Title = $"{Pageview.Page.MenuText} - {poiUser.Name}"; 61 } 62 } 63 64 string geolocationLatitude = poiUser.GeolocationLatitude.ToString().Replace(",", "."); 65 string geolocationLongitude = poiUser.GeolocationLongitude.ToString().Replace(",", "."); 66 67 } 68 69 <div> 70 71 @SnippetStart("GoogleMapsScript") 72 @if(!string.IsNullOrWhiteSpace(googlemapsAPI)) 73 { 74 <script src="https://maps.googleapis.com/maps/api/js?key=@googlemapsAPI"></script> 75 } 76 @SnippetEnd("GoogleMapsScript") 77 78 <div class="userpoidetail" data-lat="@geolocationLatitude" data-lng="@poiUser.GeolocationLongitude"> 79 @if(poiUser != null && isPoiGroup) 80 { 81 string userDescription = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Description").Value.ToString(); 82 string userWebsite = poiUser.CustomFieldValues.FirstOrDefault(c => c.CustomField.SystemName == "AccessUser_Website").Value.ToString(); 83 string countryName = !string.IsNullOrWhiteSpace(poiUser.Country) ? countryService.GetCountry(poiUser.Country) != null ? countryService.GetCountry(poiUser.Country).Name : poiUser.Country : poiUser.Country; 84 85 <div class="container userpoidetail__row"> 86 <section class="userpoidetail__info"> 87 <h1 class="userpoidetail__name">@poiUser.Name</h1> 88 89 @if(!string.IsNullOrWhiteSpace(userDescription)) 90 { 91 <div class="userpoidetail__description"> 92 <p>@userDescription</p> 93 </div> 94 } 95 96 <div class="userpoidetail__address"> 97 <h3>@Translate("UserDetailPoi.Address", "Address")</h3> 98 <p>@poiUser.Address @poiUser.HouseNumber</p> 99 <p>@poiUser.Zip @poiUser.City</p> 100 <p>@countryName</p> 101 </div> 102 103 <div class="userpoidetail__contact"> 104 <h3>@Translate("UserDetailPoi.Contact", "Contact")</h3> 105 @if(!string.IsNullOrWhiteSpace(poiUser.Email)) 106 { 107 <p><strong>@Translate("UserDetailPoi.Email", "Email:")</strong> <a href="mailto:@poiUser.Email">@poiUser.Email</a></p> 108 } 109 @if(!string.IsNullOrWhiteSpace(poiUser.Phone)) 110 { 111 <p><strong>@Translate("UserDetailPoi.Phone", "Phone:")</strong> <a href="tel:@poiUser.Phone">@poiUser.Phone</a></p> 112 } 113 @if(!string.IsNullOrWhiteSpace(userWebsite)) 114 { 115 <p><strong>@Translate("UserDetailPoi.Website", "Website"):</strong> <a href="@userWebsite">@userWebsite</a></p> 116 } 117 </div> 118 </section> 119 <section class="userpoidetail__map"> 120 <div id="map-@userId" data-latitude="@geolocationLatitude" data-longitude="@poiUser.GeolocationLongitude" data-markericon="@markerIcon" data-zoom="@mapZoom" data-disableui="@disableDefaultUI" data-enablezoom="@enableZoomControl" class="poi-map"></div> 121 </section> 122 </div> 123 } 124 </div> 125 </div> 126 127 @functions { 128 private static GeoCoordinate GetGeoLocationByAdress(string address) 129 { 130 // Get Google Maps API key from Settings > Control Panel > Maps 131 // Geocoding API needs to be activated for API key 132 var googlemapsAPI = SystemConfiguration.Instance.GetValue("/Globalsettings/Settings/GoogleMaps/GoogleMapsAPIKey"); 133 134 if (!string.IsNullOrWhiteSpace(googlemapsAPI)) 135 { 136 var geoxml = XDocument.Load("https://maps.google.com/maps/api/geocode/xml" + "?address=" + HttpUtility.UrlEncode(address) + "&sensor=false&key=" + googlemapsAPI); 137 138 if (geoxml.Descendants("result").Descendants("geometry").Descendants("location").Any()) 139 { 140 // Use LINQ to XML to extract the geocode values from the returned XML 141 var location = from part in geoxml.Descendants("result").Descendants("geometry").First().Descendants("location") 142 select new 143 { 144 lat = part.Element("lat").Value, 145 lng = part.Element("lng").Value 146 }; 147 148 if (location.Count() > 0) 149 { 150 double _lat = Double.Parse(location.First().lat, System.Globalization.CultureInfo.InvariantCulture); 151 double _lng = Double.Parse(location.First().lng, System.Globalization.CultureInfo.InvariantCulture); 152 var geo = new GeoCoordinate(_lat, _lng); 153 return geo; 154 } 155 } 156 } 157 158 return null; 159 } 160 }

FIND US

ProNails Centers

ProNails shops and training centers are the ultimate destination for nail professionals seeking top-quality nail products and expert nail training. In our shops, discover a full range of professional nail products, including gel polish, BIAB, nail care essentials, and nail tools, everything you need to create stunning, long-lasting results for your clients.

At our training centers, join hands-on nail courses and nail workshops tailored to every skill level. Whether you're a beginner or looking to refine your advanced techniques, ProNails experts will guide you in elevating your nail salon services and taking your skills to the next level.

Para o topo