Rijpaard (springen en dressuur)














Tuigpaard





Gelders paard


Jong KWPN



Toepassen
Error executing template "/Designs/Kwpn/Paragraph/HorseDatabase.cshtml"
System.IO.IOException: The process cannot access the file 'D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Translations.xml' because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at Dynamicweb.Rendering.Translation.Source.WriteDocument(XmlDocument document)
at Dynamicweb.Rendering.Translation.Source.Save()
at Dynamicweb.Rendering.Translation.Source.UpdateTranslationSource(Source source, IEnumerable`1 newKeys, String designName, IEnumerable`1 cultures)
at Dynamicweb.Rendering.Template.TranslateText(String text, String defaultValue, String cultureName)
at Dynamicweb.Rendering.TemplateBase`1.Translate(String text, String defaultValue)
at CompiledRazorTemplates.Dynamic.RazorEngine_9e73a899d7654028b320c5ff7d3b45dd.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Paragraph\HorseDatabase.cshtml:line 373
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context, TextWriter reader)
at RazorEngine.Templating.RazorEngineService.RunCompile(ITemplateKey key, TextWriter writer, Type modelType, Object model, DynamicViewBag viewBag)
at RazorEngine.Templating.RazorEngineServiceExtensions.<>c__DisplayClass16_0.<RunCompile>b__0(TextWriter writer)
at RazorEngine.Templating.RazorEngineServiceExtensions.WithWriter(Action`1 withWriter)
at Dynamicweb.Rendering.RazorTemplateRenderingProvider.Render(Template template)
at Dynamicweb.Rendering.TemplateRenderingService.Render(Template template)
at Dynamicweb.Rendering.Template.RenderRazorTemplate()

1 @using System 2 @using System.Linq 3 @using System.Text 4 @using Kwpn.Models.Constants 5 @using Kwpn.Repository.Helpers 6 @using Kwpn.Models.ApiModels @*Kwpn.Models.ApiModels is referenced because it is used in included pages - do not remove*@ 7 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 8 @functions { 9 string CreateHorseInfoTableRow(string label, string value, bool? capitalizeValue = false) 10 { 11 var capitalize = false; 12 if (capitalizeValue.HasValue && capitalizeValue.Value) 13 { 14 capitalize = true; 15 value = value.ToLower(); 16 } 17 var result = new StringBuilder(); 18 result.AppendLine("<div class=\"row\">"); 19 result.AppendFormat("<div class=\"col-xs-5 col-md-4\"><span class=\"label\">{0}</span></div>", label); 20 result.AppendFormat("<div class=\"col-xs-7 col-md-8\"><span class=\"value{0}\">{1}</span></div>", capitalize ? " capitalize" : "", string.IsNullOrWhiteSpace(value) ? "-" : value); 21 result.AppendLine("</div>"); 22 return result.ToString(); 23 } 24 25 string CreateInfoTableRow( 26 int sortNr, 27 string leftColumnValue, 28 string rightColumnValue, 29 bool? isHeader = false, 30 bool? capitalizeLeftColumn = false, 31 bool? capitilizeRightColumn = false, 32 bool boldLeftColumn = false, 33 bool colspanOnRightEmpty = false) 34 { 35 var capitalizeLeft = false; 36 var capitalizeRight = false; 37 38 var mod = "0"; 39 if (sortNr % 2 == 0) { mod = "1"; } 40 41 if (isHeader.HasValue && isHeader.Value) 42 { 43 leftColumnValue = string.Format("<b>{0}</b>", leftColumnValue.ToUpper()); 44 rightColumnValue = string.Format("<b>{0}</b>", rightColumnValue.ToUpper()); 45 capitalizeLeft = false; 46 capitalizeRight = false; 47 } 48 else 49 { 50 if (capitalizeLeftColumn.HasValue && capitalizeLeftColumn.Value) 51 { 52 capitalizeLeft = true; 53 leftColumnValue = leftColumnValue.ToLower(); 54 } 55 else 56 { 57 capitalizeLeft = false; 58 } 59 if (capitilizeRightColumn.HasValue && capitilizeRightColumn.Value) 60 { 61 capitalizeRight = true; 62 rightColumnValue = rightColumnValue.ToLower(); 63 } 64 else 65 { 66 capitalizeRight = false; 67 } 68 } 69 if (boldLeftColumn) 70 { 71 leftColumnValue = string.Format("<b>{0}</b>", leftColumnValue); 72 } 73 var result = new StringBuilder(); 74 result.AppendFormat("<div class=\"row mod-{0}\">", mod); 75 if (string.IsNullOrWhiteSpace(rightColumnValue) && colspanOnRightEmpty) 76 { 77 result.AppendFormat("<div class=\"col-xs-12\"><span class=\"leftValue{0}\">{1}</span></div>", capitalizeLeft ? " capitalize" : "", string.IsNullOrWhiteSpace(leftColumnValue) ? "-" : leftColumnValue); 78 } 79 else 80 { 81 result.AppendFormat("<div class=\"col-xs-5 col-md-4\"><span class=\"leftValue{0}\">{1}</span></div>", capitalizeLeft ? " capitalize" : "", string.IsNullOrWhiteSpace(leftColumnValue) ? "-" : leftColumnValue); 82 result.AppendFormat("<div class=\"col-xs-7 col-md-8\"><span class=\"rightValue{0}\">{1}</span></div>", capitalizeRight ? " capitalize" : "", string.IsNullOrWhiteSpace(rightColumnValue) ? "-" : rightColumnValue); 83 } 84 85 result.AppendLine("</div>"); 86 return result.ToString(); 87 } 88 89 } 90 @{ 91 var culture = GetGlobalValue("Global:Area.LongLang"); 92 var language = GetGlobalValue("Global:Area.Lang"); 93 94 var currentDatabaseUser = Kwpn.Repository.Repositories.KwpnUsers.CurrentUser(); 95 96 var pageService = new Dynamicweb.Content.PageService(); 97 var showGeneral = true; 98 99 // SEO: seoPage is used as base url for virtual pageviews 100 var seoPage = GetGlobalValue("Global:Pageview.Url"); 101 if (seoPage.Contains("?")) 102 { 103 seoPage = seoPage.Split('?')[0]; 104 } 105 106 // get animal code from querystring or form post, sample value: p-000306 107 var animalCode = System.Web.HttpContext.Current.Request.QueryString.Get(Translate("Horse", "Horse")); 108 if (string.IsNullOrWhiteSpace(animalCode)) { animalCode = System.Web.HttpContext.Current.Request.Form.Get(Translate("Horse", "Horse")); } 109 110 // get action from querystring or form post, sample value: evenementaanmelding 111 var actionParameter = "action"; 112 if (culture.Equals("nl-nl", StringComparison.InvariantCultureIgnoreCase)) { actionParameter = "actie"; } 113 var action = System.Web.HttpContext.Current.Request.QueryString.Get(actionParameter); 114 if (string.IsNullOrWhiteSpace(action)) { action = System.Web.HttpContext.Current.Request.Form.Get(actionParameter); } 115 116 // get action item id from querystring or form post: 117 var actionIdParameter = "actionid"; 118 if (culture.Equals("nl-nl", StringComparison.InvariantCultureIgnoreCase)) { actionIdParameter = "actieid"; } 119 var actionId = System.Web.HttpContext.Current.Request.QueryString.Get(actionIdParameter); 120 if (string.IsNullOrWhiteSpace(actionId)) { actionId = System.Web.HttpContext.Current.Request.Form.Get(actionIdParameter); } 121 122 // check redirect (for some features the user must be logged in) 123 LoginHelper.AuthorizeForDatabasePageContent(culture, action, actionId, animalCode); 124 125 var memberhipPageId = AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 126 127 128 var isCupEvent = action != null && action.Equals(Translate("ActionLink_SignUp_CupEvent"), StringComparison.OrdinalIgnoreCase); // cup events can have registrations for non kwpn horses 129 var noHorseNeeded = isCupEvent; 130 131 // actions (these values determine if an action is shown) 132 var horseHasMemberContentOverride = HorseHelper.HorseHasMemberContentOverride(animalCode); 133 var actionShow = false; 134 var actionRequestBreedingAdvice = false; 135 var actionSignUpInspectionEvent = false; 136 var actionSignUpCupEvent = isCupEvent; 137 var actionReportDeceasedHorse = false; 138 var actionRequestContinuedPassport = false; 139 var actionRequestDuplicate = false; 140 var actionRegisterHorseToName = false; 141 var actionRegisterEmbryo = false; 142 var actionRegisterFoal = false; 143 var actionReportHorseSold = false; 144 var actionVeterinarianRequestResearch = false; 145 var actionRequestGenomicBreedingValueTest = false; 146 var actionSellViaMarketplace = false; 147 var actionInbreedingCalculation = false; 148 var actionRequestPredicates = false; 149 var actionGetStallionAdvice = false; 150 var actionDnaPage = false; 151 var isMyHorse = false; 152 var isMyHorseAndConfirmed = false; 153 var isMare = false; 154 var isAlive = false; 155 var isApprovedStud = false; 156 var isBredByMe = false; 157 var isAvailableForResearch = false; 158 var showGeneticProfileBasedOnRegister = false; 159 var showGeneticProfileBasedOnOwnerSettings = true; 160 var hasBreeders = false; 161 var horseName = ""; 162 List<Kwpn.Models.ApiModels.PersonModel> breeders = null; 163 164 if (LoginHelper.MyKwpnIsOffline()) 165 { 166 <div class="break-grid content-container"> 167 <div class="break-grid-background"> 168 <div class="in-grid"> 169 <div class="row"> 170 <div class="col-xs-12 col-md-7"> 171 @Translate("MyKwpnIsOffline", "The back office is offline.") 172 </div> 173 </div> 174 </div> 175 </div> 176 </div> 177 } 178 else if (string.IsNullOrWhiteSpace(animalCode) && !noHorseNeeded) 179 { 180 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 181 <div class="break-grid content-container page-content-aside horse-search"> 182 @{ 183 var searchMyHorsesOnly = false; // this value is set by Kwpn.Repository.Helpers.SearchIntroHelper.GetSearchIntro 184 var searchTitle = Translate("SearchDatabaseFor", "Search database for"); 185 186 // get search form intro based on action 187 var formTitle = ""; 188 var formIntro = ""; 189 if (!string.IsNullOrWhiteSpace(action)) 190 { 191 formIntro = Kwpn.Repository.Helpers.SearchIntroHelper.GetSearchIntro( 192 action, 193 actionId, 194 GetGlobalValue("Global:Area.LongLang"), 195 out formTitle, 196 out searchMyHorsesOnly); 197 198 if (searchMyHorsesOnly) 199 { 200 searchTitle = Translate("SearchMyHorsesFor", "Search my horses for"); 201 } 202 203 } 204 205 var horsePageUrl = GetGlobalValue("Global:Pageview.Url.Raw"); 206 if (horsePageUrl.Contains("?")) 207 { 208 horsePageUrl = string.Format("{0}&{1}=", horsePageUrl, Translate("Horse", "Horse")); 209 } 210 else 211 { 212 horsePageUrl = string.Format("{0}?{1}=", horsePageUrl, Translate("Horse", "Horse")); 213 } 214 215 // if action is only for alive horses, then set hideShowDeceasedOption to false 216 var hideShowDeceasedOption = !string.IsNullOrWhiteSpace(action) && (bool)action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase); 217 218 bool isResearchAdd = !string.IsNullOrWhiteSpace(action) && (bool)action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase); 219 220 bool userisveterinarian = Kwpn.Repository.Helpers.UserHelper.CheckIfVeterinarian(); 221 222 bool isRegisterHorse = !string.IsNullOrWhiteSpace(action) && (bool)action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase); 223 224 if (searchMyHorsesOnly) 225 { 226 <div class="break-grid content-container hidden" id="refreshcontainer"> 227 <div class="break-grid-background"> 228 <div class="in-grid"> 229 <div class="row"> 230 <div class="col-xs-12 col-md-7"> 231 <i class='fa fa-refresh fa-spin fa-3x fa-fw'></i><span class="reloading-text">@Translate("HorseListReloading", "One moment please. We are fetching your horses from our back-end system.")</span> 232 </div> 233 </div> 234 </div> 235 </div> 236 </div> 237 } 238 } 239 240 @*SEARCH*@ 241 <div class="break-grid-background" id="horse-search-search"> 242 <div class="in-grid"> 243 <div class="row"> 244 <div class="background-head-aside-xs"> 245 246 <div class="background-head-xs"> 247 <div class="page-header"> 248 <div class="col-xs-12"> 249 <div class="row"> 250 <div class="col-xs-12"> 251 <h1>@searchTitle:</h1> 252 @if (!string.IsNullOrWhiteSpace(formIntro)) 253 { 254 <p>@formIntro</p> 255 } 256 </div> 257 </div> 258 </div> 259 </div> 260 </div> 261 262 <div class="background-aside-xs"> 263 <aside class="col-xs-12 col-md-4 col-md-push-8"> 264 265 @*MEMBERSHIP CALL TO ACTION*@ 266 @*<div class="page-aside"> 267 @if (!Kwpn.Repository.Helpers.LoginHelper.CurrentUserIsLoggedIn()) 268 { 269 var becomeMemberPageId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 270 if (!string.IsNullOrWhiteSpace(becomeMemberPageId)) 271 { 272 var becomeMemberPageUrl = string.Format("/Default.aspx?ID={0}", becomeMemberPageId); 273 <h2 id="become-member-list-header" data-childId="become-member-list" class="notactive"><span>@Translate("NoAccount?", "No KWPN Account?")</span></h2> 274 <ul id="become-member-list" class="aside-content notactive"> 275 <li><a href='@becomeMemberPageUrl'>@Translate("BecomeMemberNow", "Become a member now")</a></li> 276 </ul> 277 } 278 } 279 </div>*@ 280 281 <!-- /204473129/DatabaseZoekfunctie/Banner1 --> 282 <div id='div-gpt-ad-banner1-1' class="google-container google-container--size--b google-container--center google-container--margin-top"> 283 <script> 284 googletag.cmd.push(function () { googletag.display('div-gpt-ad-banner1-1'); }); 285 </script> 286 </div> 287 288 </aside> 289 </div> 290 291 </div> 292 293 <article class="col-xs-12 col-md-7 col-md-pull-4 page-content"> 294 @if (!searchMyHorsesOnly) 295 { 296 <div class="w-section inverse"> 297 <div class="w-box sign-in-wr bg-5"> 298 <div class="form-body"> 299 <div class="row"> 300 <div class="col-xs-12" id="DatabaseSearchForm"> 301 302 <div class="form-inline"> 303 304 <input type="radio" name="SearchTypeSelector" id="SearchTypeSelector_LifeNumber" value="LifeNumber" @((userisveterinarian || isRegisterHorse) ? "checked=\"checked\"" : "") /> 305 <label for="SearchTypeSelector_LifeNumber" class="radio-label">@Translate("DatabaseSearchForm_ChipLifeNumber", "Chip- or Life number")</label> 306 307 <br /> 308 309 <input type="radio" name="SearchTypeSelector" id="SearchTypeSelector_Pedigree" value="Pedigree" /> 310 <label for="SearchTypeSelector_Pedigree" class="radio-label">@Translate("DatabaseSearchForm_Pedigree", "Pedigree")</label> 311 312 <br /> 313 314 <input type="radio" name="SearchTypeSelector" id="SearchTypeSelector_FreeSearch" value="FreeSearch" @(!(userisveterinarian || isRegisterHorse) ? "checked=\"checked\"" : "") /> 315 <label for="SearchTypeSelector_FreeSearch" class="radio-label">@Translate("DatabaseSearchForm_FreeSearch", "Free search / studs")</label> 316 317 <br /> 318 319 <input type="radio" name="SearchTypeSelector" id="SearchTypeSelector_Database" value="Database" /> 320 <label for="SearchTypeSelector_Database" class="radio-label">@Translate("DatabaseSearchForm_Database", "Stud database")</label> 321 322 <br /> 323 324 <input type="radio" name="SearchTypeSelector" id="SearchTypeSelector_BreedingValues" value="BreedingValues" /> 325 <label for="SearchTypeSelector_BreedingValues" class="radio-label">@Translate("DatabaseSearchForm_BreedingValues", "Breeding values")</label> 326 327 </div> 328 329 330 </div> 331 </div> 332 </div> 333 334 @*CHIP/LIFENUMBER SEARCH*@ 335 <div id="DatabaseSearchForm_LifeNumber" class="form-body horse-search-form hidden"> 336 <form name="DatabaseSearchForm_LifeNumberForm" id="DatabaseSearchForm_LifeNumberForm"> 337 <div class="row"> 338 <div class="col-xs-12"> 339 340 @*CHIP/LIFENUMBER*@ 341 <div class="form-inline"> 342 <label class="control-label col-xs-12 col-md-4" 343 for="DatabaseSearchForm_LifeNumber_LifeNumber">@Translate("DatabaseSearchForm_ChipLifeNumber", "Chip- or Life number")</label> 344 <input type="text" 345 class="form-control hide-hints" 346 id="DatabaseSearchForm_LifeNumber_LifeNumber" 347 name="DatabaseSearchForm_LifeNumber_LifeNumber" 348 value="" 349 required /> 350 </div> 351 352 @*SUBMIT*@ 353 <button type="submit" 354 class="btn btn-search-submit" 355 id="DatabaseSearchForm_LifeNumber_Submit"> 356 @Translate("Search", "Search") 357 </button> 358 359 </div> 360 </div> 361 </form> 362 </div> 363 364 @*PEDIGREE SEARCH*@ 365 <div id="DatabaseSearchForm_Pedigree" class="form-body horse-search-form hidden"> 366 <form name="DatabaseSearchForm_PedigreeForm" id="DatabaseSearchForm_PedigreeForm"> 367 <div class="row"> 368 <div class="col-xs-12"> 369 370 @*FATHER*@ 371 <div class="form-inline"> 372 <label class="control-label col-xs-12 col-md-4" 373 for="DatabaseSearchForm_PedigreeForm_Father">@Translate("FathersName", "Father")</label> 374 <input type="text" 375 class="form-control hide-hints" 376 id="DatabaseSearchForm_PedigreeForm_Father" 377 name="DatabaseSearchForm_PedigreeForm_Father" 378 value="" 379 required /> 380 </div> 381 382 @*MOTHERSFATHER*@ 383 <div class="form-inline"> 384 <label class="control-label col-xs-12 col-md-4" 385 for="DatabaseSearchForm_PedigreeForm_MothersFather">@Translate("MothersFathersName", "Mothers father")</label> 386 <input type="text" 387 class="form-control hide-hints" 388 id="DatabaseSearchForm_PedigreeForm_MothersFather" 389 name="DatabaseSearchForm_PedigreeForm_MothersFather" 390 value="" 391 required /> 392 </div> 393 394 @*YEAROFBIRTH*@ 395 <div class="form-inline"> 396 <label class="control-label col-xs-12 col-md-4" 397 for="DatabaseSearchForm_PedigreeForm_YearOfBirth">@Translate("YearOfBirth", "Year of birth")</label> 398 <input type="text" 399 class="form-control" 400 id="DatabaseSearchForm_PedigreeForm_YearOfBirth" 401 name="DatabaseSearchForm_PedigreeForm_YearOfBirth" 402 value="" 403 pattern="^\d{4}$" /> 404 </div> 405 406 @*DECEASED HORSES*@ 407 @if (!hideShowDeceasedOption) 408 { 409 <div class="form-inline"> 410 <label class="control-label col-xs-12 col-md-4">@Translate("ShowDeceasedHorses", "Show deceased horses")</label> 411 <input type="checkbox" 412 id="DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses" 413 name="DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses" 414 value="true" /> 415 <label for="DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses" class="normal">@Translate("ShowDeceasedHorses_YesNo", "yes/no")</label> 416 </div> 417 } 418 419 @*SUBMIT*@ 420 <button type="submit" class="btn btn-search-submit" id="DatabaseSearchForm_Pedigree_Submit">@Translate("Search", "Search")</button> 421 </div> 422 </div> 423 </form> 424 </div> 425 426 @*FREE SEARCH*@ 427 <div id="DatabaseSearchForm_FreeSearch" class="form-body horse-search-form hidden"> 428 <form name="DatabaseSearchForm_FreeSearchForm" id="DatabaseSearchForm_FreeSearchForm"> 429 <div class="row"> 430 <div class="col-xs-12"> 431 432 @*SEARCH FOR*@ 433 <div class="form-inline"> 434 <label class="control-label col-xs-12 col-md-4" 435 for="DatabaseSearchForm_FreeSearchForm_Key">@Translate("SearchFor", "Search for")</label> 436 <input type="text" 437 class="form-control hide-hints" 438 id="DatabaseSearchForm_FreeSearchForm_Key" 439 name="DatabaseSearchForm_FreeSearchForm_Key" 440 value="" 441 placeholder="@Translate("SearchForPlaceholder", "(sports) name, father, mother, mothers father")" 442 required /> 443 </div> 444 445 @*BREEDING DIRECTION*@ 446 <div class="form-inline"> 447 <label class="control-label col-xs-12 col-md-4">@Translate("BreedingDirection", "Breeding direction")</label> 448 449 <div class="input-group"> 450 451 <input type="checkbox" 452 name="DatabaseSearchForm_FreeSearchForm_BreedingDirection" 453 id="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" 454 value="@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" /> 455 <label for="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" class="normal">@Translate("Dressage", "Dressage")</label> 456 457 <br /> 458 459 <input type="checkbox" 460 name="DatabaseSearchForm_FreeSearchForm_BreedingDirection" 461 id="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" 462 value="@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" /> 463 <label for="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" class="normal">@Translate("Geldinghorse", "Geldinghorse")</label> 464 465 <br /> 466 467 <input type="checkbox" 468 name="DatabaseSearchForm_FreeSearchForm_BreedingDirection" 469 id="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen" 470 value="@Kwpn.Models.Enumerations.BreedingDirection.Springen" /> 471 <label for="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen" class="normal">@Translate("Jumping", "Jumping")</label> 472 473 <br /> 474 475 <input type="checkbox" 476 name="DatabaseSearchForm_FreeSearchForm_BreedingDirection" 477 id="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" 478 value="@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" /> 479 <label for="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" class="normal">@Translate("HarnessHorse", "Harness horse")</label> 480 <br /> 481 <input type="checkbox" 482 name="DatabaseSearchForm_FreeSearchForm_BreedingDirection" 483 id="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" 484 value="@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" /> 485 <label for="DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" class="normal">@Translate("RidingHorse", "Riding horse")</label> 486 487 </div> 488 489 </div> 490 491 @*YEAROFBIRTH*@ 492 <div class="form-inline"> 493 <label class="control-label col-xs-12 col-md-4" 494 for="DatabaseSearchForm_FreeSearchForm_YearOfBirth">@Translate("YearOfBirth", "Year of birth")</label> 495 <input type="text" 496 class="form-control" 497 id="DatabaseSearchForm_FreeSearchForm_YearOfBirth" 498 name="DatabaseSearchForm_FreeSearchForm_YearOfBirth" 499 value="" 500 pattern="^\d{4}$" /> 501 </div> 502 503 504 @*DECEASED HORSES*@ 505 @if (!hideShowDeceasedOption) 506 { 507 <div class="form-inline"> 508 <label class="control-label col-xs-12 col-md-4">@Translate("ShowDeceasedHorses", "Show deceased horses")</label> 509 <input type="checkbox" 510 id="DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses" 511 name="DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses" 512 value="true" /> 513 <label for="DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses" class="normal">@Translate("ShowDeceasedHorses_YesNo", "yes/no")</label> 514 </div> 515 } 516 517 518 @*SUBMIT*@ 519 <button type="submit" class="btn btn-search-submit" id="DatabaseSearchForm_FreeSearch_Submit">@Translate("FreeSearch", "Search in all our horses")</button> 520 </div> 521 </div> 522 </form> 523 524 <div class="row"> 525 <div class="col-xs-12"> 526 <div class="google-container google-container--size--a google-container--center google-container--margin-top"> 527 <!--onderstaande afbeelding moet worden verwijderd en vervangen worden door google admanager data--> 528 </div> 529 </div> 530 </div> 531 </div> 532 533 @*DATABASE SEARCH*@ 534 <div id="DatabaseSearchForm_Database" class="form-body horse-search-form hidden"> 535 <form name="DatabaseSearchForm_DatabaseForm" id="DatabaseSearchForm_DatabaseForm"> 536 <div class="row"> 537 <div class="col-xs-12"> 538 539 @*SEARCH FOR*@ 540 <div class="form-inline"> 541 <label class="control-label col-xs-12 col-md-4" 542 for="DatabaseSearchForm_DatabaseForm_Key">@Translate("SearchFor", "Search for")<i class="fa fa-asterisk fixed" aria-hidden="true"></i></label> 543 <input type="text" 544 class="form-control hide-hints" 545 id="DatabaseSearchForm_DatabaseForm_Key" 546 name="DatabaseSearchForm_DatabaseForm_Key" 547 value="" 548 placeholder="@Translate("SearchForPlaceholder", "(sports) name, father, mother, mothers father")" 549 required /> 550 </div> 551 552 @*BREEDING DIRECTION*@ 553 <div class="form-inline"> 554 <label class="control-label col-xs-12 col-md-4">@Translate("BreedingDirection", "Breeding direction")<i class="fa fa-asterisk fixed" aria-hidden="true"></i></label> 555 556 <div class="input-group"> 557 <fieldset data-checkbox-list="DatabaseSearchForm_DatabaseForm_BreedingDirection" 558 data-checkbox-list-dependencies="DatabaseSearchForm_DatabaseForm_Key"> 559 560 <input type="checkbox" 561 name="DatabaseSearchForm_DatabaseForm_BreedingDirection" 562 id="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" 563 value="@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" 564 required /> 565 <label for="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur" class="normal">@Translate("Dressage", "Dressage")</label> 566 567 <br /> 568 569 <input type="checkbox" 570 name="DatabaseSearchForm_DatabaseForm_BreedingDirection" 571 id="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" 572 value="@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" 573 required /> 574 <label for="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard" class="normal">@Translate("Geldinghorse", "Geldinghorse")</label> 575 576 <br /> 577 578 <input type="checkbox" 579 name="DatabaseSearchForm_DatabaseForm_BreedingDirection" 580 id="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen" 581 value="@Kwpn.Models.Enumerations.BreedingDirection.Springen" 582 required /> 583 <label for="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen" class="normal">@Translate("Jumping", "Jumping")</label> 584 585 <br /> 586 587 <input type="checkbox" 588 name="DatabaseSearchForm_DatabaseForm_BreedingDirection" 589 id="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" 590 value="@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" 591 required /> 592 <label for="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard" class="normal">@Translate("HarnessHorse", "Harness horse")</label> 593 <br /> 594 <input type="checkbox" 595 name="DatabaseSearchForm_DatabaseForm_BreedingDirection" 596 id="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" 597 value="@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" 598 required /> 599 <label for="DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard" class="normal">@Translate("RidingHorse", "Riding horse")</label> 600 </fieldset> 601 </div> 602 603 </div> 604 605 @*YEAROFBIRTH*@ 606 <div class="form-inline"> 607 <label class="control-label col-xs-12 col-md-4" 608 for="DatabaseSearchForm_DatabaseForm_YearOfBirth">@Translate("YearOfBirth", "Year of birth")</label> 609 <input type="text" 610 class="form-control" 611 id="DatabaseSearchForm_DatabaseForm_YearOfBirth" 612 name="DatabaseSearchForm_DatabaseForm_YearOfBirth" 613 value="" 614 pattern="^\d{4}$" /> 615 </div> 616 617 @*DECEASED HORSES*@ 618 @if (!hideShowDeceasedOption) 619 { 620 <div class="form-inline"> 621 <label class="control-label col-xs-12 col-md-4">@Translate("ShowDeceasedHorses", "Show deceased horses")</label> 622 <input type="checkbox" 623 id="DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses" 624 name="DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses" 625 value="true" /> 626 <label for="DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses" class="normal">@Translate("ShowDeceasedHorses_YesNo", "yes/no")</label> 627 </div> 628 } 629 630 @*APPROVED STUDS*@ 631 <input type="hidden" id="DatabaseSearchForm_DatabaseForm_ApprovedStuds" name="DatabaseSearchForm_DatabaseForm_ApprovedStuds" value="true" /> 632 633 @*SUBMIT*@ 634 <button type="submit" class="btn btn-search-submit" id="DatabaseSearchForm_Database_Submit">@Translate("StudSearch", "Stud search")</button> 635 636 <div class="form-inline"> 637 <br /><small><i class="fa fa-asterisk fixed" aria-hidden="true"></i><i class="fa fa-asterisk fixed" aria-hidden="true"></i> @Translate("RequiredFieldOfTwoHorseSearch", "At least one is required")</small> 638 </div> 639 640 @*ALL STUDS*@ 641 <small>@Translate("ShowAllStudsIntro", "Get all approved stallions by using the link below:")</small> 642 <br /> 643 <a href="javascript:void(0);" id="btn-all-studs" class="orange_arrow_link">@Translate("ShowAllStuds", "Show all studs")</a> 644 </div> 645 </div> 646 </form> 647 </div> 648 649 650 651 @*BREEDING VALUES SEARCH*@ 652 <div id="DatabaseSearchForm_BreedingValues" class="form-body horse-search-form hidden"> 653 654 <p id="breedingValuesAdditionalText" class="hidden"> 655 @Translate("DatabaseSearchForm_BreedingValuesAdditionalText", "") 656 </p> 657 658 <form name="DatabaseSearchForm_BreedingValuesForm" id="DatabaseSearchForm_BreedingValuesForm"> 659 660 <div class="row hidden" id="DatabaseSearchForm_BreedingValuesForm_ReSearch"> 661 <div class="col-xs-12"> 662 <label class="control-label col-sm-4">&nbsp;</label> 663 <div class="breedingValueResearchButtonContainer"> 664 <button>@Translate("BreedingValuesReUse", "Re-use previous breeding value settings")</button> 665 <br /> 666 <br /> 667 <span>@Translate("BreedingValuesReUseOr", "Or")</span> 668 <br /> 669 <br /> 670 </div> 671 672 </div> 673 </div> 674 675 <div class="row"> 676 <div class="col-xs-12"> 677 678 <div class="form-group"> 679 <div class="form-inline not-in-form"> 680 <label class="control-label col-sm-4" for="DatabaseSearchForm_BreedingValues_BreedingDirection">@Translate("BreedingDirection", "Breeding direction")</label> 681 <select class="form-control hide-hints" id="DatabaseSearchForm_BreedingValues_BreedingDirection" name="DatabaseSearchForm_BreedingValues_BreedingDirection" required> 682 <option value="" selected>@Translate("Select")</option> 683 <option value="FOKR-000005">@Translate("Fokrichting_RPGP", "Riding horse / Gelderlander")</option> 684 <option value="FOKR-000007">@Translate("Fokrichting_TP", "Harness horse")</option> 685 </select> 686 </div> 687 </div> 688 689 <div class="form-group" id="list-breeding-values"></div> 690 691 692 @*SUBMIT*@ 693 <button type="submit" 694 class="btn btn-search-submit" 695 id="DatabaseSearchForm_BreedingValues_Submit"> 696 @Translate("Search", "Search") 697 </button> 698 699 </div> 700 </div> 701 </form> 702 </div> 703 704 </div> 705 </div> 706 707 } 708 </article> 709 710 </div> 711 </div> 712 </div> 713 714 @*RESULTS*@ 715 <div class="break-grid-background hidden" id="horse-search-results"> 716 <div class="in-grid"> 717 <div class="row"> 718 <div class="background-head-aside-xs"> 719 <div class="background-head-xs"> 720 <div class="page-header"> 721 <div class="col-xs-12"> 722 723 @if (searchMyHorsesOnly) 724 { 725 // show form intro based on action 726 <div class="row"> 727 <div class="col-xs-12"> 728 <span id="searched-for"></span> 729 <div id="search-result-count" data-default="@Translate("ZeroResults", "0 results")">@Translate("ZeroResults", "0 results")</div> 730 @{ 731 // show search form intro 732 if (!string.IsNullOrWhiteSpace(formTitle)) 733 { 734 <h1>@formTitle</h1> 735 if (!string.IsNullOrWhiteSpace(formTitle)) 736 { 737 <p>@formIntro</p> 738 } 739 } 740 else 741 { 742 <h1>@searchTitle:</h1> 743 } 744 } 745 </div> 746 </div> 747 } 748 else 749 { 750 // show search result header 751 <div class="row"> 752 <div class="col-xs-12 col-md-8"> 753 <div id="search-result-count" data-default="@Translate("ZeroResults", "0 results")">@Translate("ZeroResults", "0 results")</div> 754 <h1>@Translate("SearchResultsFor", "Search results for"): <span id="searched-for"></span></h1> 755 </div> 756 <div class="col-xs-12 col-md-4"> 757 <a href="javascript:void(0);" id="search-again" class="orange_arrow_link pull-right">@Translate("SearchAgain", "Search again")</a> 758 </div> 759 </div> 760 } 761 </div> 762 </div> 763 </div> 764 </div> 765 766 <article class="col-xs-12 page-content"> 767 <div class="row hidden" id="horseSearchResults"> 768 769 <div id="tooManyResults" class="col-xs-12 col-md-7 hidden"> 770 <p>@Translate("TooManySearchResults2", "Your search gave <span id='horseListCounter2'></span> results, of which we show the first 100.")</p> 771 </div> 772 773 <div id="noResults" class="col-xs-12 col-md-7 hidden">@Translate("ZeroResultsText", "Your search gave no results")</div> 774 775 <div id="refine" class="col-xs-12 col-md-7 hidden">@Translate("RefineSearch", "To many results found, please refine your search.")</div> 776 777 <div class="col-xs-12 form-body" id="result-filter"> 778 779 <div class="row resultStyling"> 780 781 @if (searchMyHorsesOnly) 782 { 783 // show filter for attributes, just like the "my horses" page 784 <div class="col-xs-12 col-md-6"> 785 <div class="form-inline"> 786 <label class="control-label">@Translate("Attributes", "Attributes")</label><br /> 787 <input type="text" class="form-control" id="horsesFilter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 788 </div> 789 </div> 790 <div class="col-xs-12 col-md-6"> 791 <a href="#" id="refresh-list-link"><i class="fa fa-refresh"></i> <abbr title="@Translate("Action_RefreshMyHorsesDataAbbr", "When refreshing the horse list we will fetch your horses from our back-end system. This may take a while.")">@Translate("Action_RefreshMyHorsesData", "Refresh my horses list")</abbr></a> 792 </div> 793 } 794 else 795 { 796 // show extended search options 797 <div class="col-xs-12 col-md-4"> 798 799 <div class="form-inline"> 800 <label class="control-label">@Translate("Attributes", "Attributes")</label><br /> 801 <input type="text" class="form-control" id="horsesFilter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 802 </div> 803 804 <div class="form-inline selectdiv" id="yearOfApproval"> 805 <label class="control-label" for="horseFilterByYearOfApproval">@Translate("YearOfApproval", "Year of approval")</label> 806 <select class="form-control" name="horseFilterByYearOfApproval" id="horseFilterByYearOfApproval"> 807 <option value="">@Translate("Select", "Select")</option> 808 @for (int i = DateTime.Today.Year - 25; i <= DateTime.Today.Year; i++) 809 { 810 <option value="@i">@i</option> 811 } 812 </select> 813 </div> 814 815 <div class="form-inline" id="approvedStud"> 816 <label class="control-label">@Translate("AcknowledgedStud", "Acknowledged stud")</label><br /> 817 <input type="checkbox" name="horseFilterByAcknowledged" id="horseFilterByAcknowledged" /> 818 <label for="horseFilterByAcknowledged" class="normal">@Translate("Apply", "Apply")</label> 819 </div> 820 821 </div> 822 823 <div class="col-xs-12 col-md-4"> 824 <div class="form-inline hidden" id="color-filter"> 825 <label class="control-label">@Translate("Color", "Color")</label><br /> 826 <div id="color-filter-items"></div> 827 </div> 828 </div> 829 830 <div class="col-xs-12 col-md-4"> 831 832 <div class="form-inline" id="gender-filter"> 833 <label class="control-label h2">@Translate("Gender", "Gender")</label><br /> 834 <div id="gender-filter-items"></div> 835 </div> 836 837 <div class="form-inline selectdiv" id="startingletter-filter"> 838 <label class="control-label h2">@Translate("StartingLetter", "Starting letter")</label><br /> 839 <select class="form-control" name="horseFilterByStartingLetter" id="horseFilterByStartingLetter"> 840 <option value="none" selected="selected">@Translate("Select", "Select")</option> 841 @for (char c = 'A'; c <= 'Z'; c++) 842 { 843 <option value="@c">@c</option> 844 } 845 </select> 846 </div> 847 848 </div> 849 850 } 851 852 </div> 853 854 </div> 855 856 <div class="col-xs-12" id="result-filter-reset"> 857 <a href="javascript:void(0);" id="resetFilterButton" class="orange_arrow_link pull-right">@Translate("ResetFilter", "Reset filter")</a> 858 <br /> 859 <br /> 860 </div> 861 862 <div class="col-xs-12"> 863 <div class="table-responsive"> 864 <table id="horsesTable"> 865 <caption>@Translate("SearchResultIntro", "Click on the name of the horse to continue:")</caption> 866 <thead> 867 <tr> 868 <th data-sortOn="Gender" data-sortBy="Asc"><span class="hidden-xs hidden-sm">@Translate("Gender", "Gender")<i class="fa"></i></span></th> 869 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 870 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 871 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 872 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 873 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 874 </tr> 875 </thead> 876 </table> 877 </div> 878 </div> 879 </div> 880 </article> 881 </div> 882 </div> 883 </div> 884 </div> 885 886 @SnippetStart("JavascriptsBottom") 887 <script> 888 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode()).ToLower()"); 889 </script> 890 <script id="listHorseTemplate" type="text/html"> 891 <tr class="${ClassName} clickable" onclick="document.location.href = '@horsePageUrl${HorseCode}';"> 892 <td class="nowrap"> 893 <i class="fa ${GenderClass}"></i><span class="hidden-xs hidden-sm"> ${GenderAbbr}</span> 894 {{if !IsAlive}} 895 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 896 {{/if}} 897 {{if IsApprovedStud}} 898 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 899 {{/if}} 900 </td> 901 <td>${AnimalName}</td> 902 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 903 <td>${Register}</td> 904 <td>${Color}</td> 905 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 906 </tr> 907 </script> 908 <script id="listSelectHorseTemplate" type="text/html"> 909 <tr class="${ClassName} horseRow clickable" data-horseCode="${HorseCode}"> 910 <td class="nowrap"> 911 <i class="fa ${GenderClass}"></i><span class="hidden-xs hidden-sm"> ${GenderAbbr}</span> 912 {{if !IsAlive}} 913 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 914 {{/if}} 915 {{if IsApprovedStud}} 916 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 917 {{/if}} 918 </td> 919 <td>${AnimalName}</td> 920 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 921 <td>${Register}</td> 922 <td>${Color}</td> 923 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 924 </tr> 925 </script> 926 <script id="valuesTemplate" type="text/html"> 927 <div class="form-group"> 928 <h3>${Type} <span class="toggler" data-identifyer="${TypeId}" data-typeclass="breeding-values-content"><i class="fa fa-plus"></i></span></h3> 929 <div class="breeding-values-content" id="${TypeId}"> 930 {{each(i,breedingValue) lstBreedingValues}} 931 <div class="form-inline "> 932 <label class="control-label col-sm-4" for="${breedingValue.BreedingValuecode}"> 933 ${breedingValue.Description}{{if breedingValue.Minimum != null && breedingValue.Maximum != null}}<br /><span class="minmax">${breedingValue.Minimum} - ${breedingValue.Maximum}</span>{{/if}} 934 </label> 935 <div class="selectdiv"> 936 <select class="form-control hide-hints input-sm" data-predicate="${breedingValue.BreedingValuecode}"> 937 <option value="gt">&gt;</option> 938 <option value="lt">&lt;</option> 939 <option value="et">=</option> 940 </select> 941 </div> 942 <input type="number" class="form-control hide-hints input-sm" min="0" id="${breedingValue.BreedingValuecode}" name="${breedingValue.BreedingValuecode}" value="" /> 943 </div> 944 {{/each}} 945 </div> 946 <br /> 947 </div> 948 </script> 949 <script> 950 951 var sortOn = "Weight"; 952 var sortBy = "Asc"; 953 var searchApi = ""; 954 var filterYear = 0; 955 var filterAcknowledgedStud = false; 956 var filterColor = "none"; 957 var filterGender = "none"; 958 var filterStartingLetter = "none"; 959 var clickedButtonId = ""; 960 var clickedButtonResetValue = ""; 961 962 $(function () { 963 var fieldsetSelector 964 $('fieldset[data-checkbox-list]') 965 .innovadisCheckboxList() 966 .on('changed', function (event, hasChecked) { 967 $('input[name=DatabaseSearchForm_DatabaseForm_Key]').prop('required', !hasChecked); 968 }); 969 }); 970 971 $(document).ready(function () { 972 973 @if (searchMyHorsesOnly) { 974 <text> 975 $("#refresh-list-link").off("click").on("click", function (e) { 976 e.preventDefault(); 977 $("#horse-search-search").addClass("hidden"); 978 $("#horse-search-results").addClass("hidden"); 979 $("#refreshcontainer").removeClass("hidden"); 980 var refreshHorse = "/kwpnwebapi/horses/refreshmyhorses/@culture"; 981 $.ajax(refreshHorse).always(function () { 982 window.location.href = "@System.Web.HttpContext.Current.Request.RawUrl"; 983 }); 984 return false; 985 }); 986 </text> 987 } 988 989 // show initial form 990 ShowHideForm(); 991 992 // change form 993 $("input[name=SearchTypeSelector]").change(function () { 994 ShowHideForm(); 995 }); 996 997 $("#search-again").click(function () { 998 $(".horse-search-form").addClass("hidden"); // hide all form fields 999 $("#horse-search-search").removeClass("hidden"); // show form type options 1000 $("#horse-search-results").addClass("hidden"); // hide results 1001 $("input[name=SearchTypeSelector]").prop('checked', false); 1002 ResetSearchFields() // clear previous search values 1003 ResetFilters(); // reset filter + sort options to default 1004 1005 // pre-select free search option 1006 $("#SearchTypeSelector_FreeSearch").prop("checked", true); 1007 $("#DatabaseSearchForm_FreeSearch").removeClass("hidden"); 1008 1009 return false; 1010 }); 1011 1012 $("#resetFilterButton") 1013 .click(function () { 1014 ResetFilters(); 1015 SearchHorses(); 1016 }); 1017 1018 // force orange borders 1019 $(".hide-hints").change(function () { 1020 $(this).removeClass("hide-hints"); 1021 }); 1022 1023 // form submits 1024 $("#DatabaseSearchForm_LifeNumber_Submit").click(function () { 1025 1026 $("#DatabaseSearchForm_LifeNumber .hide-hints").removeClass("hide-hints"); 1027 1028 if ($("#DatabaseSearchForm_LifeNumberForm")[0].checkValidity()) { 1029 1030 var lifeNumber = $("#DatabaseSearchForm_LifeNumber_LifeNumber").val(); 1031 1032 // show loading icon in buttom 1033 var lifeNumberSubmitButtonText = $("#DatabaseSearchForm_LifeNumber_Submit").html(); 1034 $("#DatabaseSearchForm_LifeNumber_Submit").html(lifeNumberSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1035 clickedButtonId = "DatabaseSearchForm_LifeNumber_Submit"; 1036 clickedButtonResetValue = lifeNumberSubmitButtonText; 1037 1038 // disable button 1039 $("#DatabaseSearchForm_LifeNumber_Submit").prop('disabled', true); 1040 1041 //set 'searched for' value 1042 $("#searched-for").html(lifeNumber); 1043 1044 //kwpnwebapi/horses/search/{culture}/{chipOrLifeNumber} 1045 searchApi = "/kwpnwebapi/horses/search/@GetGlobalValue("Global:Area.LongLang")/" + lifeNumber; 1046 1047 SearchHorses(); 1048 1049 // no filter 1050 $("#result-filter-reset").hide(); 1051 $("#yearOfApproval").hide(); 1052 $("#approvedStud").hide(); 1053 $("#gender-filter").show(); 1054 $("#startingletter-filter").hide(); 1055 1056 //seo 1057 SEO.trackPageView("@string.Format("{0}/{1}/{2}/", 1058 seoPage, 1059 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1060 Translate("DatabaseSearchForm_ChipLifeNumber", "Chip- or Life number").Replace(" ", "-").UrlEncode().ToLower())" + lifeNumber.toLowerCase()); 1061 1062 return false; 1063 } 1064 }); 1065 1066 $("#DatabaseSearchForm_Pedigree_Submit").click(function () { 1067 1068 $("#DatabaseSearchForm_Pedigree .hide-hints").removeClass("hide-hints"); 1069 1070 if ($("#DatabaseSearchForm_PedigreeForm")[0].checkValidity()) { 1071 1072 // show loading icon in buttom 1073 var pedigreeSubmitButtonText = $("#DatabaseSearchForm_Pedigree_Submit").html(); 1074 $("#DatabaseSearchForm_Pedigree_Submit").html(pedigreeSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1075 clickedButtonId = "DatabaseSearchForm_Pedigree_Submit"; 1076 clickedButtonResetValue = pedigreeSubmitButtonText; 1077 1078 // disable button 1079 $("#DatabaseSearchForm_Pedigree_Submit").prop('disabled', true); 1080 1081 // get values 1082 var year = parseInt($("#DatabaseSearchForm_PedigreeForm_YearOfBirth").val()); 1083 var father = $("#DatabaseSearchForm_PedigreeForm_Father").val(); 1084 var mothersFather = $("#DatabaseSearchForm_PedigreeForm_MothersFather").val(); 1085 1086 // set 'searched for' value 1087 var pedigree = father + " x " + mothersFather; 1088 $("#searched-for").html(pedigree); 1089 1090 1091 // set search api url 1092 searchApi = "/kwpnwebapi/horses/search/@GetGlobalValue("Global:Area.LongLang")/" + father + "/" + mothersFather + "/" + year + "/" + $("#DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses").is(':checked'); 1093 1094 // search 1095 SearchHorses(); 1096 1097 $("#yearOfApproval").hide(); 1098 $("#approvedStud").hide(); 1099 $("#gender-filter").show(); 1100 $("#startingletter-filter").hide(); 1101 1102 //seo 1103 SEO.trackPageView("@string.Format("{0}/{1}/{2}/", 1104 seoPage, 1105 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1106 Translate("DatabaseSearchForm_Pedigree", "Pedigree").Replace(" ", "-").UrlEncode().ToLower())" + father.toLowerCase() + "/" + mothersFather.toLowerCase() + "/" + year.toString().toLowerCase() + "/" + $("#DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses").is(':checked')); 1107 1108 1109 return false; 1110 } 1111 }); 1112 1113 $("#DatabaseSearchForm_FreeSearch_Submit").click(function () { 1114 1115 $("#DatabaseSearchForm_FreeSearch .hide-hints").removeClass("hide-hints"); 1116 1117 if ($("#DatabaseSearchForm_FreeSearchForm")[0].checkValidity()) { 1118 1119 // show loading icon in buttom 1120 var freeSearchSubmitButtonText = $("#DatabaseSearchForm_FreeSearch_Submit").html(); 1121 $("#DatabaseSearchForm_FreeSearch_Submit").html(freeSearchSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1122 clickedButtonId = "DatabaseSearchForm_FreeSearch_Submit"; 1123 clickedButtonResetValue = freeSearchSubmitButtonText; 1124 1125 // disable button 1126 $("#DatabaseSearchForm_FreeSearch_Submit").prop('disabled', true); 1127 1128 // get values 1129 var breedingDirection = []; 1130 breedingDirection.push("Dummy"); //prevent empty string 1131 if ($("#DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur").is(':checked')) { 1132 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000001.ToString("G")"); 1133 } 1134 if ($("#DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard").is(':checked')) { 1135 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000002.ToString("G")"); 1136 } 1137 if ($("#DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen").is(':checked')) { 1138 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000006.ToString("G")"); 1139 } 1140 if ($("#DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard").is(':checked')) { 1141 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000007.ToString("G")"); 1142 } 1143 if ($("#DatabaseSearchForm_FreeSearchForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard").is(':checked')) { 1144 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000005.ToString("G")"); 1145 } 1146 var year = parseInt($("#DatabaseSearchForm_FreeSearchForm_YearOfBirth").val()); 1147 1148 1149 $("#searched-for").html($("#DatabaseSearchForm_FreeSearchForm_Key").val()); 1150 1151 // set search api url 1152 searchApi = "/kwpnwebapi/horses/searchtext/@GetGlobalValue("Global:Area.LongLang")/false/" + $("#DatabaseSearchForm_FreeSearchForm_Key").val() + "/" + breedingDirection + "/" + year + "/" + $("#DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses").is(':checked') + "/false"; 1153 1154 // search 1155 SearchHorses(); 1156 $("#yearOfApproval").hide(); 1157 $("#approvedStud").hide(); 1158 $("#gender-filter").show(); 1159 $("#startingletter-filter").hide(); 1160 1161 //seo 1162 SEO.trackPageView("@string.Format("{0}/{1}/{2}/", 1163 seoPage, 1164 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1165 Translate("DatabaseSearchForm_FreeSearch", "Free search / studs").Replace(" ", "-").UrlEncode().ToLower())" + $("#DatabaseSearchForm_FreeSearchForm_Key").val().toLowerCase() + "/" + breedingDirection + "/" + year.toString().toLowerCase() + "/" + $("#DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses").is(':checked')); 1166 1167 return false; 1168 } 1169 }); 1170 1171 $("#DatabaseSearchForm_Database_Submit").click(function () { 1172 1173 $("#DatabaseSearchForm_Database .hide-hints").removeClass("hide-hints"); 1174 1175 if ($("#DatabaseSearchForm_DatabaseForm")[0].checkValidity()) { 1176 1177 // show loading icon in buttom 1178 var databaseSubmitButtonText = $("#DatabaseSearchForm_Database_Submit").html(); 1179 $("#DatabaseSearchForm_Database_Submit").html(databaseSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1180 clickedButtonId = "DatabaseSearchForm_Database_Submit"; 1181 clickedButtonResetValue = databaseSubmitButtonText; 1182 1183 // disable button 1184 $("#DatabaseSearchForm_Database_Submit").prop('disabled', true); 1185 1186 //get 'searched for' value 1187 var key = $("#DatabaseSearchForm_DatabaseForm_Key").val(); 1188 1189 var searchedFor = key; 1190 if (key === "") { 1191 key = "Dummy"; //prevent empty string 1192 } 1193 var noKeyword = (searchedFor === "" || searchedFor.toLowerCase() === "dummy"); 1194 1195 // get values 1196 var breedingDirection = []; 1197 if ($("#DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Dressuur").is(':checked')) { 1198 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000001.ToString("G")"); 1199 if (noKeyword) { 1200 // no search term, show searched breeding direction as 'searched for' 1201 if (searchedFor !== "") { searchedFor += ", "; } 1202 searchedFor += "@Translate("Dressage", "Dressage")"; 1203 } 1204 } 1205 if ($("#DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Gelders_paard").is(':checked')) { 1206 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000002.ToString("G")"); 1207 if (noKeyword) { 1208 // no search term, show searched breeding direction as 'searched for' 1209 if (searchedFor !== "") { searchedFor += ", "; } 1210 searchedFor += "@Translate("Geldinghorse", "Geldinghorse")"; 1211 } 1212 } 1213 if ($("#DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Springen").is(':checked')) { 1214 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000006.ToString("G")"); 1215 if (noKeyword) { 1216 // no search term, show searched breeding direction as 'searched for' 1217 if (searchedFor !== "") { searchedFor += ", "; } 1218 searchedFor += "@Translate("Jumping", "Jumping")"; 1219 } 1220 } 1221 if ($("#DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Tuigpaard").is(':checked')) { 1222 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000007.ToString("G")"); 1223 if (noKeyword) { 1224 // no search term, show searched breeding direction as 'searched for' 1225 if (searchedFor !== "") { searchedFor += ", "; } 1226 searchedFor += "@Translate("HarnessHorse", "Harness horse")"; 1227 } 1228 } 1229 if ($("#DatabaseSearchForm_DatabaseForm_BreedingDirection_@Kwpn.Models.Enumerations.BreedingDirection.Rijpaard").is(':checked')) { 1230 breedingDirection.push("@Kwpn.Models.Enumerations.EquisBreedingDirection.FOKR_000005.ToString("G")"); 1231 if (noKeyword) { 1232 // no search term, show searched breeding direction as 'searched for' 1233 if (searchedFor !== "") { 1234 searchedFor += ", "; 1235 } 1236 searchedFor += "@Translate("RidingHorse", "Riding horse")"; 1237 } 1238 } 1239 if (breedingDirection.length <= 0) { 1240 breedingDirection.push("Dummy"); //prevent empty string 1241 } 1242 1243 var year = parseInt($("#DatabaseSearchForm_DatabaseForm_YearOfBirth").val()); 1244 1245 // set 'searched for' value 1246 $("#searched-for").html(searchedFor); 1247 1248 // set search api url 1249 searchApi = "/kwpnwebapi/horses/searchtext/@GetGlobalValue("Global:Area.LongLang")/true/" + key + "/" + breedingDirection + "/" + year + "/" + $("#DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses").is(':checked') + "/false"; 1250 1251 // search 1252 SearchHorses(); 1253 $("#yearOfApproval").show(); 1254 $("#approvedStud").show(); 1255 $("#gender-filter").hide(); 1256 $("#startingletter-filter").show(); 1257 1258 //seo 1259 SEO.trackPageView("@string.Format("{0}/{1}/{2}/", 1260 seoPage, 1261 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1262 Translate("DatabaseSearchForm_Database", "Stud database").Replace(" ", "-").UrlEncode().ToLower())" + key.toLowerCase() + "/" + breedingDirection + "/" + year.toString().toLowerCase() + "/" + $("#DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses").is(':checked')); 1263 1264 return false; 1265 } 1266 }); 1267 1268 $("#btn-all-studs").click(function () { 1269 1270 // show loading icon in buttom 1271 var allStudsSubmitButtonText = $("#btn-all-studs").html(); 1272 $("#btn-all-studs").html(allStudsSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1273 clickedButtonId = "btn-all-studs"; 1274 clickedButtonResetValue = allStudsSubmitButtonText; 1275 1276 // set 'searched for' value 1277 $("#searched-for").html('@Translate("AllApprovedStuds", "All approved studs")'); 1278 1279 // set search api url 1280 searchApi = "/kwpnwebapi/horses/searchtext/@GetGlobalValue("Global:Area.LongLang")/true/Dummy/Dummy/0/" + $("#DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses").is(':checked') + "/true"; 1281 1282 // search 1283 SearchHorses(); 1284 $("#yearOfApproval").show(); 1285 $("#approvedStud").show(); 1286 $("#gender-filter").hide(); 1287 $("#startingletter-filter").show(); 1288 1289 //seo 1290 SEO.trackPageView("@string.Format("{0}/{1}/{2}/{3}", 1291 seoPage, 1292 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1293 Translate("DatabaseSearchForm_Database", "Stud database").Replace(" ", "-").UrlEncode().ToLower(), 1294 Translate("AllApprovedStuds", "All approved studs").Replace(" ", "-").UrlEncode().ToLower())"); 1295 1296 1297 return false; 1298 }); 1299 1300 $("#DatabaseSearchForm_BreedingValues_Submit").click(function () { 1301 $("#DatabaseSearchForm_BreedingValues .hide-hints").removeClass("hide-hints"); 1302 if ($("#DatabaseSearchForm_BreedingValuesForm")[0].checkValidity()) { 1303 1304 // show loading icon in buttom 1305 var breedingValuesSubmitButtonText = $("#DatabaseSearchForm_BreedingValues_Submit").html(); 1306 $("#DatabaseSearchForm_BreedingValues_Submit").html(breedingValuesSubmitButtonText + " <i class='fa fa-spinner fa-spin'></i>"); 1307 clickedButtonId = "DatabaseSearchForm_BreedingValues_Submit"; 1308 clickedButtonResetValue = breedingValuesSubmitButtonText; 1309 1310 // disable button 1311 $("#DatabaseSearchForm_BreedingValues_Submit").prop('disabled', true); 1312 1313 var selectedBreedingDirection = $("#DatabaseSearchForm_BreedingValues_BreedingDirection").val(); 1314 1315 //set 'searched for' value 1316 $("#searched-for").html('@Translate("DatabaseSearchForm_BreedingValues", "Breeding values")'); 1317 1318 // fill json object to store in local storage for re-search functionality 1319 var myBreedingValuesSearchObject = new Object(); 1320 myBreedingValuesSearchObject.breedingDirection = selectedBreedingDirection; 1321 myBreedingValuesSearchObject.breedingValues = []; 1322 1323 // put user values into semi-colon seperated string 1324 var stringPramaterArray = []; 1325 $(".form-inline", "#list-breeding-values").each(function () { 1326 var inputField = $(this).find("input[type=number]"); 1327 var code = inputField.attr("id"); 1328 var value = inputField.val(); 1329 var predicate = $(this).find("select").val(); 1330 stringPramaterArray = AddToStringPramater(stringPramaterArray, code, value, predicate); 1331 1332 // fill json object to store in local storage for re-search functionality 1333 if (!isNaN(parseInt(value))) { myBreedingValuesSearchObject.breedingValues.push(code + "," + predicate + "," + value); } 1334 }); 1335 1336 if (stringPramaterArray.length > 0) { 1337 1338 var stringParameter = stringPramaterArray.join(","); 1339 1340 //kwpnwebapi/horses/searchbreedingvalues/{culture}/{breedingDirection}/{params} 1341 searchApi = "/kwpnwebapi/horses/searchbreedingvalues/@GetGlobalValue("Global:Area.LongLang")/" + selectedBreedingDirection + "/" + stringParameter; 1342 1343 // fill local storage for refilling values on re-search 1344 var localStorageId = "lastSubmittedBreedingValues"; 1345 localStorage.removeItem(localStorageId); // remove previous search 1346 localStorage.setItem(localStorageId, JSON.stringify(myBreedingValuesSearchObject)); // add current search 1347 1348 // search 1349 SearchHorses(); 1350 } 1351 1352 // no filter 1353 $("#result-filter-reset").hide(); 1354 $("#yearOfApproval").show(); 1355 $("#approvedStud").show(); 1356 $("#gender-filter").hide(); 1357 $("#startingletter-filter").show(); 1358 1359 //seo 1360 SEO.trackPageView("@string.Format("{0}/{1}/{2}/", 1361 seoPage, 1362 Translate("SEO_TrackPageviewPage_Database_Horse_Search", "horse-search").UrlEncode().ToLower(), 1363 Translate("DatabaseSearchForm_BreedingValues", "Breeding values").Replace(" ", "-").UrlEncode().ToLower())" + selectedBreedingDirection + "/" + stringParameter.toLowerCase()); 1364 1365 return false; 1366 } 1367 }); 1368 1369 function AddToStringPramater(currentArray, code, value, predicate) { 1370 var result = currentArray; 1371 var val = parseInt(value); 1372 1373 if (!isNaN(val)) { 1374 var stringParameter = code; 1375 switch (predicate) { 1376 case "gt": stringParameter += "&gt;"; break; 1377 case "lt": stringParameter += "&lt;"; break; 1378 case "et": stringParameter += "="; break; 1379 } 1380 stringParameter += val; 1381 result.push(stringParameter); 1382 } 1383 1384 return result; 1385 } 1386 1387 1388 function SearchHorses() { 1389 1390 // horse action passed through 1391 var action = "@action"; 1392 if (action === "") { 1393 action = "none"; 1394 } 1395 1396 var apiUrl = searchApi + "/" + filterYear + "/" + filterAcknowledgedStud + "/" + filterColor + "/" + filterGender + "/" + filterStartingLetter + "/" + sortOn + "/" + sortBy + "/" + action + "/" + $("#horsesFilter").val(); 1397 1398 $.getJSON(apiUrl).done(function (result, status, metaData) { 1399 HandleSearchResult(result); 1400 }).fail(function (jqxhr, textStatus, error) { 1401 var err = textStatus + ", " + error; 1402 1403 console.error("Request SearchHorses Failed: " + err); 1404 }).always(function () { 1405 if (clickedButtonId != "") { 1406 $("#" + clickedButtonId).html(clickedButtonResetValue); // remove loading icon from button 1407 $("#" + clickedButtonId).prop('disabled', false); // enable button 1408 } 1409 $("#horse-search-search").addClass("hidden"); // hide form 1410 $("#horse-search-results").removeClass("hidden"); // show results 1411 }); 1412 } 1413 1414 function HandleSearchResult(result) { 1415 if (result.Count != 0 && result.Count != -1) { 1416 var resultCount = result.Count; 1417 if (resultCount < 0) { 1418 resultCount = -resultCount; // too many results, count is made negative, make positive for display 1419 $("#refine").removeClass("hidden"); // show refine your search text 1420 } 1421 else { 1422 $("#refine").addClass("hidden"); // hide refine your search text 1423 } 1424 var counterText = $("#search-result-count").attr("data-default").replace('0', resultCount); 1425 $("#noResults").addClass("hidden"); // hide no results text 1426 $("#search-result-count").html(counterText); // SET result count value 1427 if (result.Count > 100) { 1428 $("#tooManyResults").removeClass("hidden"); // SHOW too many results text 1429 $("#horseListCounter2").html(result.Count); // SET too many results text number values 1430 } else { 1431 $("#tooManyResults").addClass("hidden"); // hide too many results text 1432 } 1433 FillTable(result.Top100); // Fill horse output 1434 ShowFilter(result.Colors, result.Genders); // SHOW filter options 1435 ShowApprovedCheckBoxInFilter(result.Top100); // show/ hide approved filter option 1436 1437 $("#horsesTable").removeClass("hidden"); // SHOW horse output 1438 } else if (result.Count < 0) { // more than max returns a -1 value 1439 ShowRefineSearch(); 1440 } else { 1441 $("#search-result-count").html($("#search-result-count").attr("data-default")); 1442 ShowNoData(); 1443 } 1444 } 1445 1446 function ShowApprovedCheckBoxInFilter(values) { 1447 //var approvedStudFound = false; 1448 //for (i = 0; i < values.length; i++) { 1449 // if (values[i].IsApprovedStud === true) { 1450 // approvedStudFound = true; 1451 // } 1452 //} 1453 //if (approvedStudFound === false) { 1454 // $('#approvedStud').css('display', 'none'); 1455 //} 1456 } 1457 1458 function ShowFilter(colorList, genderList) { 1459 1460 // add color filter 1461 var colorFilter = $("#color-filter"); 1462 colorFilter.addClass("hidden"); 1463 var colorFilterItems = $("#color-filter-items", colorFilter); 1464 colorFilterItems.empty(); // clear existing color filter values 1465 if (colorList.length > 0) { 1466 for (i = 0; i < colorList.length; i++) { 1467 if (colorList.length > 0 && i == 5) { 1468 // add collapse container for more than 5 color items 1469 var collapseContainer = "<a href=\"javascript:void(0);\" id=\"color-filter-items-more-link\">@Translate("More", "more")</a><div id=\"color-filter-items-more\" class=\"hidden\"></div>"; 1470 colorFilterItems.append(collapseContainer); 1471 colorFilterItems = $("#color-filter-items-more", colorFilter); 1472 } 1473 var colorValue = colorList[i].Name; 1474 var colorId = colorValue.replace(/ /g, "-"); 1475 var colorSelected = ""; 1476 if (colorList[i].Selected) colorSelected = "checked"; 1477 var colorSelector = "<input type=\"checkbox\" name=\"horseFilterByColor\" id=\"horseFilterByColor_" + colorId + "\" value=\"" + colorValue + "\" " + colorSelected + " /> <label for=\"horseFilterByColor_" + colorId + "\" class=\"normal capitalize\">" + colorValue.toUpperCase() + "</label><br/>"; 1478 colorFilterItems.append(colorSelector); 1479 } 1480 colorFilter.removeClass("hidden"); 1481 } 1482 $("#color-filter-items-more-link").click(function () { 1483 $("#color-filter-items-more").removeClass("hidden"); 1484 $(this).remove(); 1485 }); 1486 1487 // add gender filter 1488 var genderFilter = $("#gender-filter"); 1489 genderFilter.addClass("hidden"); 1490 var genderFilterItems = $("#gender-filter-items", genderFilter); 1491 genderFilterItems.empty(); 1492 if (genderList.length > 0) { 1493 for (i = 0; i < genderList.length; i++) { 1494 var genderValue = genderList[i].Name; 1495 var genderId = genderValue.replace(/ /g, "-"); 1496 var genderSelected = ""; 1497 if (genderList[i].Selected) genderSelected = "checked"; 1498 1499 var genderLabel = genderValue; 1500 switch (genderLabel) { 1501 case "HENGST": genderLabel = '@Translate("HENGST").ToUpper()'; 1502 break; 1503 case "RUIN": genderLabel = '@Translate("RUIN").ToUpper()'; 1504 break; 1505 case "MERRIE": genderLabel = '@Translate("MERRIE").ToUpper()'; 1506 break; 1507 default: 1508 break; 1509 } 1510 1511 var genderSelector = "<input type=\"checkbox\" name=\"genderFilterByGender\" id=\"genderFilterByGender_" + genderId + "\" value=\"" + genderValue + "\" " + genderSelected + " /> <label for=\"genderFilterByGender_" + genderId + "\" class=\"normal capitalize\">" + genderLabel + "</label><br/>"; 1512 genderFilterItems.append(genderSelector); 1513 } 1514 genderFilter.removeClass("hidden"); 1515 } 1516 1517 $("input[name=horseFilterByColor]").change(function () { 1518 var selectedColors = ""; 1519 $.each($("input[name=horseFilterByColor]:checked"), function () { 1520 if (selectedColors !== "") selectedColors += ","; 1521 selectedColors += $(this).val(); 1522 }); 1523 if (selectedColors === "") selectedColors = "none"; 1524 filterColor = selectedColors; 1525 SearchHorses(); 1526 }); 1527 1528 1529 $("input[name=genderFilterByGender]").change(function () { 1530 var selectedGenders = ""; 1531 $.each($("input[name=genderFilterByGender]:checked"), function () { 1532 if (selectedGenders !== "") selectedGenders += ","; 1533 selectedGenders += $(this).val(); 1534 }); 1535 if (selectedGenders === "") selectedGenders = "none"; 1536 filterGender = selectedGenders; 1537 SearchHorses(); 1538 }); 1539 1540 $("#result-filter").removeClass("hidden"); // SHOW filter options 1541 1542 // filter reset 1543 $("#result-filter-reset").show(); 1544 } 1545 1546 function ShowNoData() { 1547 $("#tooManyResults").addClass("hidden"); // hide too many results text 1548 $("#result-filter").addClass("hidden"); // hide filter options 1549 $("#refine").addClass("hidden"); // hide refine your search text 1550 $("#horsesTable").addClass("hidden"); // hide horse output 1551 $("#noResults").removeClass("hidden"); // SHOW no results text 1552 $("#search-result-count").html($("#search-result-count").html()); // SET result count value 1553 $('#horsesTable tr:gt(0)').remove(); 1554 $("input[name='SearchTypeSelector']").prop('checked', false); // reset search type radio 1555 $("#horseSearchResults").removeClass("hidden"); 1556 } 1557 1558 function ShowRefineSearch() { 1559 $("#noResults").addClass("hidden"); // hide no results text 1560 $("#tooManyResults").addClass("hidden"); // hide too many results text 1561 $("#result-filter").addClass("hidden"); // hide filter options 1562 $("#horsesTable").addClass("hidden"); // hide horse output 1563 $("#refine").removeClass("hidden"); // SHOW refine your search text 1564 $("#search-result-count").html("---"); // SET result count value 1565 $("input[name='SearchTypeSelector']").prop('checked', false); // reset search type radio 1566 $("#horseSearchResults").removeClass("hidden"); 1567 } 1568 1569 function FillTable(data) { 1570 $('#horsesTable th.sorted').removeClass("sorted").find('i').removeClass("fa-chevron-circle-down fa-chevron-circle-up"); 1571 var directionClass = "fa-chevron-circle-down"; 1572 if (sortBy === "Desc") { 1573 directionClass = "fa-chevron-circle-up"; 1574 } 1575 $('#horsesTable th[data-sortOn="' + sortOn + '"]').addClass("sorted").find('i').addClass(directionClass); 1576 $('#horsesTable tr:gt(0)').remove(); 1577 @if (searchMyHorsesOnly) 1578 { 1579 <text> 1580 $("#listSelectHorseTemplate").tmpl(data).appendTo("#horsesTable"); 1581 1582 // add row click event 1583 $(".horseRow.clickable").click(function () { 1584 var horseCode = $(this).attr("data-horseCode"); 1585 @if (isResearchAdd) 1586 { 1587 // add to list, then go to page 1588 <text> 1589 var addHorseUrl = "/kwpnwebapi/forms/research/upserthorse/" + horseCode; 1590 $.getJSON(addHorseUrl).fail(function (jqxhr, textStatus, error) { 1591 var err = textStatus + ", " + error; 1592 console.error("Request AddHorse Failed: " + err); 1593 }).always(function () { 1594 document.location.href = '@horsePageUrl' + horseCode; 1595 }); 1596 </text> 1597 } 1598 else 1599 { 1600 // go to page 1601 <text>document.location.href = '@horsePageUrl' + horseCode;</text> 1602 } 1603 }); 1604 1605 </text> 1606 } 1607 else 1608 { 1609 <text> 1610 $("#listHorseTemplate").tmpl(data).appendTo("#horsesTable"); 1611 </text> 1612 } 1613 $(".horse-search-form").addClass("hidden"); 1614 $("#horseSearchResults").removeClass("hidden"); 1615 $("input[name='SearchTypeSelector']").prop('checked', false); 1616 1617 // tooltip initializer 1618 $("[data-toggle='tooltip']").tooltip(); 1619 1620 } 1621 1622 function ResetFilters() { 1623 sortOn = "Weight"; 1624 sortBy = "Asc"; 1625 filterYear = 0; 1626 filterAcknowledgedStud = false; 1627 filterColor = "none"; 1628 filterGender = "none"; 1629 filterStartingLetter = "none"; 1630 $("#horseFilterByYearOfApproval").val(""); 1631 $("#horseFilterByAcknowledged").prop('checked', false); 1632 $("#horsesFilter").val(""); 1633 $("#horseFilterByStartingLetter").val("none"); 1634 1635 @if (action != null && action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase)) { 1636 <text> 1637 filterGender = "@Kwpn.Models.Enumerations.Gender.MERRIE.ToString("g")"; 1638 </text> 1639 } 1640 1641 $('fieldset[data-checkbox-list]').trigger("reset"); 1642 } 1643 1644 // show form for seleted search type and hide others 1645 function ShowHideForm() { 1646 1647 $("#horseSearchResults").addClass("hidden"); 1648 1649 // hide 'fokwaarden' additional text; https://innovadis.atlassian.net/browse/KWPN-1824 1650 $("#breedingValuesAdditionalText").addClass("hidden"); 1651 1652 //hide forms and show selected 1653 var selectedSearchType = $("input[name=SearchTypeSelector]:checked").val(); 1654 $(".horse-search-form").each(function () { 1655 $(this).addClass("hidden"); 1656 }); 1657 1658 $("#DatabaseSearchForm_" + selectedSearchType).removeClass("hidden"); 1659 1660 // get breeding values 1661 ClearSearchBreedingValues(); 1662 1663 $("#DatabaseSearchForm_BreedingValues_Submit").prop('disabled', true); // gets enabled afted breeding direction selection and loading of values 1664 if (selectedSearchType == "BreedingValues") { 1665 1666 // add 'fokwaarden' additional text; https://innovadis.atlassian.net/browse/KWPN-1824 1667 $("#breedingValuesAdditionalText").removeClass("hidden"); 1668 1669 // add functionality to breeding direction selection 1670 $("#DatabaseSearchForm_BreedingValues_BreedingDirection").change(function () { 1671 $("#DatabaseSearchForm_BreedingValuesForm_ReSearch").addClass("hidden"); 1672 GetSearchBreedingValues(false); 1673 }); 1674 1675 // check if a previous breeding value search has been done to offer a change in those settings 1676 var localStorageId = "lastSubmittedBreedingValues"; 1677 var lastSubmittedBreedingValues = localStorage.getItem(localStorageId); 1678 if (lastSubmittedBreedingValues != null) { 1679 $("#DatabaseSearchForm_BreedingValuesForm_ReSearch").removeClass("hidden"); 1680 } 1681 } 1682 1683 //place asterisks after required labels 1684 $('input,textarea,select') 1685 .filter('[required]:visible') 1686 .closest(".form-inline") 1687 .children("label") 1688 .children("i:not(.fixed)") 1689 .remove() 1690 .end(); 1691 1692 $('#DatabaseSearchForm_' + selectedSearchType + ' input, #DatabaseSearchForm_' + selectedSearchType + ' textarea, #DatabaseSearchForm_' + selectedSearchType + ' select') 1693 .filter('[required]:visible') 1694 .closest(".form-inline") 1695 .children("label") 1696 .append("<i class=\"fa fa-asterisk\" aria-hidden=\"true\"></i>"); 1697 1698 1699 } 1700 1701 1702 1703 $("#horsesFilter").change(function () { 1704 SearchHorses(); 1705 }); 1706 1707 $("#horsesFilter").keypress(function (e) { 1708 var code = e.keyCode || e.which; 1709 if (code === 13) { 1710 // 13 = enter 1711 SearchHorses(); 1712 e.preventDefault(); 1713 return false; 1714 } 1715 return true; 1716 }); 1717 1718 $("#horseFilterByYearOfApproval") 1719 .change(function () { 1720 filterYear = parseInt($("#horseFilterByYearOfApproval").val()); 1721 if (filterYear === NaN) filterYear = 0; 1722 SearchHorses(); 1723 }); 1724 1725 $("#horseFilterByStartingLetter") 1726 .change(function () { 1727 filterStartingLetter = $("#horseFilterByStartingLetter").val(); 1728 SearchHorses(); 1729 }); 1730 1731 $("#horseFilterByAcknowledged") 1732 .change(function () { 1733 filterAcknowledgedStud = $("#horseFilterByAcknowledged").is(":checked"); 1734 SearchHorses(); 1735 }); 1736 1737 $("#horsesTable th").click(function () { 1738 if (sortOn === $(this).data("sorton")) { 1739 //reverse direction when same sortOn click again 1740 if ($(this).data("sortby") === "Asc") { 1741 $(this).data("sortby", "Desc") 1742 } else { 1743 $(this).data("sortby", "Asc") 1744 } 1745 } 1746 sortOn = $(this).data("sorton"); 1747 sortBy = $(this).data("sortby"); 1748 SearchHorses(); 1749 }); 1750 1751 1752 1753 @if (searchMyHorsesOnly) 1754 { 1755 bool showDeadHorses = false; 1756 if (isResearchAdd) 1757 { 1758 showDeadHorses = true; 1759 } 1760 1761 var genderFilter = action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) ? Kwpn.Models.Enumerations.Gender.MERRIE.ToString("g") : "none"; 1762 1763 <text> 1764 filterGender = "@genderFilter"; 1765 searchApi = "/kwpnwebapi/horses/getmyhorses/@GetGlobalValue("Global:Area.LongLang")/@showDeadHorses.ToString()"; 1766 SearchHorses(); 1767 </text> 1768 } 1769 1770 1771 function ResetSearchFields() { 1772 ResetLifeNumberSearchFields(); 1773 ResetPedigreeSearchFields(); 1774 ResetFreeSearchSearchFields(); 1775 ResetDatabaseSearchFields(); 1776 ResetBreedingValueseSearchFields(); 1777 } 1778 1779 function ResetLifeNumberSearchFields() { 1780 $("#DatabaseSearchForm_LifeNumber_LifeNumber").val(""); 1781 } 1782 1783 function ResetPedigreeSearchFields() { 1784 $("#DatabaseSearchForm_PedigreeForm_Father").val(""); 1785 $("#DatabaseSearchForm_PedigreeForm_MothersFather").val(""); 1786 $("#DatabaseSearchForm_PedigreeForm_YearOfBirth").val(""); 1787 $("#DatabaseSearchForm_PedigreeForm_ShowDeceasedHorses").prop('checked', false); 1788 } 1789 function ResetFreeSearchSearchFields() { 1790 $("#DatabaseSearchForm_FreeSearchForm_Key").val(""); 1791 $("input[name=DatabaseSearchForm_FreeSearchForm_BreedingDirection]").prop("checked", false); 1792 $("#DatabaseSearchForm_FreeSearchForm_ShowDeceasedHorses").prop("checked", false); 1793 $("#DatabaseSearchForm_FreeSearchForm_YearOfBirth").val(""); 1794 } 1795 1796 function ResetDatabaseSearchFields() { 1797 $("#DatabaseSearchForm_DatabaseForm_Key").val(""); 1798 $("input[name=DatabaseSearchForm_DatabaseForm_BreedingDirection]").prop("checked", false); 1799 $("#DatabaseSearchForm_DatabaseForm_YearOfBirth").val(""); 1800 $("#DatabaseSearchForm_DatabaseForm_ShowDeceasedHorses").prop("checked", false); 1801 } 1802 1803 function ResetBreedingValueseSearchFields() { 1804 $("#DatabaseSearchForm_BreedingValues_BreedingDirection").val(""); 1805 $("#list-breeding-values").html(""); 1806 } 1807 1808 function ClearSearchBreedingValues() { 1809 var valuesContainer = $("#list-breeding-values")[0]; 1810 if (valuesContainer) { 1811 $("#list-breeding-values").html(""); 1812 } 1813 $("#DatabaseSearchForm_BreedingValuesForm_ReSearch").addClass("hidden"); 1814 } 1815 1816 function GetSearchBreedingValues(refillPreviousValues) { 1817 1818 var valuesContainer = $("#list-breeding-values"); 1819 var selectedBreedingDirectionCode = $("#DatabaseSearchForm_BreedingValues_BreedingDirection").val(); 1820 1821 if (selectedBreedingDirectionCode == "") { 1822 valuesContainer.html(""); 1823 $("#DatabaseSearchForm_BreedingValues_Submit").prop("disabled", true); 1824 } else { 1825 valuesContainer.html("<i class=\"fa fa-spinner fa-spin\"></i>"); 1826 1827 var valuesAPiUrl = "/kwpnwebapi/horses/searchvaluesfordirection/@culture/" + selectedBreedingDirectionCode; 1828 1829 $.getJSON(valuesAPiUrl).done(function (data) { 1830 if (data != null && data.length > 0) { 1831 valuesContainer.html(""); // remove spinner 1832 $("#valuesTemplate").tmpl(data).appendTo("#list-breeding-values"); 1833 $("input", "#list-breeding-values").numeric(); // only number input 1834 $("#DatabaseSearchForm_BreedingValues_Submit").prop('disabled', false); // enable submit button 1835 1836 if (refillPreviousValues) { 1837 1838 var localStorageId = "lastSubmittedBreedingValues"; 1839 var lastSubmittedBreedingValues = localStorage.getItem(localStorageId); 1840 if (lastSubmittedBreedingValues != null) { 1841 1842 //parse to json 1843 lastSubmitted = JSON.parse(lastSubmittedBreedingValues); 1844 1845 var breedingValues = lastSubmitted.breedingValues; 1846 1847 if (breedingValues != null && breedingValues.length > 0) { 1848 $.each(breedingValues, function (i, item) { 1849 1850 var itemValues = item.split(","); 1851 if (itemValues.length == 3) { 1852 1853 var breedingValueCode = itemValues[0]; 1854 var predicate = itemValues[1]; 1855 var value = itemValues[2]; 1856 1857 // set predicate field 1858 $("select[data-predicate='" + breedingValueCode + "']", "#list-breeding-values").val(predicate); 1859 1860 // set values field 1861 $("#" + breedingValueCode, "#list-breeding-values").val(value); 1862 } 1863 }); 1864 } 1865 } 1866 } 1867 1868 // toggler initializer 1869 $(".toggler", "#list-breeding-values").click(function () { 1870 var contentId = $(this).attr("data-identifyer"); 1871 var typeClass = $(this).attr("data-typeclass"); 1872 $("." + typeClass).not("#" + contentId).hide(); 1873 $("." + typeClass).not("#" + contentId).prev().find("span.toggler i").removeClass("fa-minus").addClass("fa-plus"); 1874 $("#" + contentId).toggle(); 1875 var currentToggler = $("#" + contentId).prev().find("span.toggler i"); 1876 if (currentToggler.hasClass("fa-minus")) { 1877 currentToggler.removeClass("fa-minus").addClass("fa-plus"); 1878 } else { 1879 currentToggler.removeClass("fa-plus").addClass("fa-minus"); 1880 } 1881 }); 1882 1883 //default hide all toggler areas (except first) 1884 $(".breeding-values-content:not(:first)", "#list-breeding-values").hide(); 1885 $(".toggler:first i.fa", "#list-breeding-values").removeClass("fa-plus").addClass("fa-minus"); 1886 1887 } else { 1888 valuesContainer.html("Nothing found"); 1889 } 1890 }).fail(function (jqxhr, textStatus, error) { 1891 var err = textStatus + ", " + error; 1892 1893 console.error("Request GetSearchBreedingValues Failed: " + err); 1894 valuesContainer.html("An error occurred"); 1895 }).always(function () { 1896 //todo 1897 }); 1898 } 1899 } 1900 1901 $("#DatabaseSearchForm_BreedingValuesForm_ReSearch").click(function () { 1902 var localStorageId = "lastSubmittedBreedingValues"; 1903 var lastSubmittedBreedingValues = localStorage.getItem(localStorageId); 1904 if (lastSubmittedBreedingValues != null) { 1905 1906 //parse to json 1907 lastSubmitted = JSON.parse(lastSubmittedBreedingValues); 1908 1909 var breedingDirection = lastSubmitted.breedingDirection; 1910 1911 // set breeding direction 1912 $("#DatabaseSearchForm_BreedingValues_BreedingDirection").val(breedingDirection); 1913 1914 GetSearchBreedingValues(true); 1915 } 1916 return false; 1917 }); 1918 1919 function RestoreSearch() { 1920 var apiUrl = "/kwpnwebapi/horses/restoresearch/@action"; 1921 1922 $.getJSON(apiUrl).done(function (result, status, metaData) { 1923 if (result.LastSearchType >= 1 && result.LastSearchType <= 3) { 1924 $("#searched-for").html(result.SearchedFor.replace('Dummy', '')); 1925 searchApi = result.SearchApiUrl; 1926 if (result.LastSearchType === 1) { //chip or lifenumber 1927 $("#result-filter-reset").hide(); 1928 $("#yearOfApproval").hide(); 1929 $("#approvedStud").hide(); 1930 $("#gender-filter").show(); 1931 $("#startingletter-filter").hide(); 1932 } 1933 if (result.LastSearchType === 2) { //pedigree 1934 $("#yearOfApproval").hide(); 1935 $("#approvedStud").hide(); 1936 $("#gender-filter").show(); 1937 $("#startingletter-filter").hide(); 1938 } 1939 if (result.LastSearchType === 3) { //searchterm 1940 if (result.PreviousSearch.OnlyApprovedStallion) { 1941 $("#yearOfApproval").show(); 1942 $("#approvedStud").show(); 1943 $("#gender-filter").hide(); 1944 $("#startingletter-filter").show(); 1945 } 1946 else { 1947 $("#yearOfApproval").hide(); 1948 $("#approvedStud").hide(); 1949 $("#gender-filter").show(); 1950 $("#startingletter-filter").hide(); 1951 } 1952 1953 } 1954 if (result.PreviousSearch.FilterOn) $("#horsesFilter").val(result.PreviousSearch.FilterOn); 1955 HandleSearchResult(result.SearchResult); 1956 $("#horse-search-search").addClass("hidden"); // hide form 1957 $("#horse-search-results").removeClass("hidden"); // show results 1958 } 1959 }).fail(function (jqxhr, textStatus, error) { 1960 var err = textStatus + ", " + error; 1961 console.error("Request RestoreSearch Failed: " + err); 1962 }) 1963 }; 1964 1965 RestoreSearch(); 1966 }); 1967 1968 </script> 1969 1970 @SnippetEnd("JavascriptsBottom") 1971 } 1972 else 1973 { 1974 if (System.Web.HttpContext.Current.Request.QueryString.AllKeys.Contains("reset")) 1975 { //check if reset param = true and password param correct, if so reset cache for given horse 1976 Kwpn.Repository.Repositories.Horses.ResetHorseCache(animalCode); 1977 } 1978 var horse = HorseHelper.GetDatabasePageHorse(culture, animalCode, true); 1979 if (horse == null && !noHorseNeeded) 1980 { 1981 <div class="break-grid content-container"> 1982 <div class="break-grid-background"> 1983 <div class="in-grid"> 1984 <div class="row"> 1985 <div class="col-xs-12 col-md-7"> 1986 @Translate("HorseNotFound", "Horse not found") 1987 </div> 1988 </div> 1989 </div> 1990 </div> 1991 </div> 1992 1993 // seo 1994 seoPage = string.Format("{0}/{1}/{2}", seoPage, animalCode.UrlEncode(), Translate("SEO_TrackPageviewPage_Database_Horse_Not_Found", "horse-not-found").UrlEncode()).ToLower(); 1995 <Text> 1996 <script> 1997 SEO.trackPageView("@seoPage"); 1998 </script> 1999 </Text> 2000 } 2001 else if (horse == null && noHorseNeeded) 2002 { 2003 <div class="break-grid content-container page-content-aside horse-database"> 2004 <div class="break-grid-background"> 2005 <div class="in-grid"> 2006 2007 <div class="row"> 2008 <div class="col-xs-12"> 2009 <h1 class="pageTitle">&nbsp;</h1> 2010 </div> 2011 </div> 2012 2013 <div class="row"> 2014 <div class="col-xs-12"> 2015 <div class="notification"></div> 2016 </div> 2017 </div> 2018 2019 <div class="row"> 2020 <div class="col-xs-12 col-md-2 col-md-push-10 aside-page"> 2021 <div class="bg_aside closed"> 2022 <div class="aside_pullLabel">Menu<i class="fa fa-bars" aria-hidden="true"></i></div> 2023 <aside> 2024 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2025 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 2026 @*DEFAULT ASIDE*@ 2027 @if (string.IsNullOrWhiteSpace(action)) 2028 { 2029 #region TabLinks 2030 <h2 id="listheader-tabs" data-childId="view-list-tabs" class="notactive"><span>@Translate("Menu", "Menu")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2031 <div class="list-tabs"> 2032 <ul> 2033 <li data-tab="tab_general" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_general", "general-info").UrlEncode()" class="active"><a href="javascript:void(0);">@Translate("General", "General")</a></li> 2034 <li data-tab="tab_achievements" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_achievements", "achievements").UrlEncode()"><a href="javascript:void(0);">@Translate("Achievements", "Achievements")</a></li> 2035 <li data-tab="tab_achievements_motherline" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_achievements_motherline", "achievements-motherline").UrlEncode()"><a href="javascript:void(0);">@Translate("AchievementsMotherLine", "Achievements mother line")</a></li> 2036 @if (showGeneticProfileBasedOnRegister) 2037 { 2038 <li data-tab="tab_genetic_profile" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_genetic_profile", "genetic-profile").UrlEncode()"><a href="javascript:void(0);">@Translate("GeneticProfile", "Genetic profile")</a></li> 2039 } 2040 @if (isMare || isMyHorse) 2041 { 2042 <li data-tab="tab_offspring" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_offspring", "offspring").UrlEncode()"><a href="javascript:void(0);">@Translate("Offspring", "Offspring")</a></li> 2043 } 2044 @if (isApprovedStud) 2045 { 2046 <li data-tab="tab_breeding_registration" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_breeding_registration", "breeding-registration").UrlEncode()"><a href="javascript:void(0);">@Translate("BreedingRegistration", "Breeding registration")</a></li> 2047 <li data-tab="tab_approved_offspring" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_approved_offspring", "approved-offspring").UrlEncode()"><a href="javascript:void(0);">@Translate("ApprovedOffspring", "Approved offspring")</a></li> 2048 <li data-tab="tab_performance_report" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_performance_report", "performance-report").UrlEncode()"><a href="javascript:void(0);">@Translate("PerformanceReport", "Performance report")</a></li> 2049 <li data-tab="tab_performance_figures" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_performance_figures", "performance-figures").UrlEncode()"><a href="javascript:void(0);">@Translate("PerformanceFigures", "Performance figures")</a></li> 2050 <li data-tab="tab_availability" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_availability", "availability").UrlEncode()"><a href="javascript:void(0);">@Translate("Availability", "Availability")</a></li> 2051 <li data-tab="tab_descendant_report" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_descendant_report", "descendant-report").UrlEncode()"><a href="javascript:void(0);">@Translate("DescendantsReport", "Descendants report")</a></li> 2052 } 2053 @{ 2054 var asideBreeders = breeders?.Where(b => b.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(b.PersonCode)); 2055 if (asideBreeders != null && asideBreeders.Any()) 2056 { 2057 <li data-tab="tab_breeders_info"> 2058 <span class="list-item"> 2059 @(asideBreeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder")):<br /> 2060 @foreach (var breeder in asideBreeders) 2061 { 2062 <span class="breeder-link" data-personcode="@breeder.PersonCode">@breeder.PersonName</span> 2063 } 2064 </span> 2065 </li> 2066 } 2067 } 2068 </ul> 2069 </div> 2070 2071 @SnippetStart("JavascriptsBottom") 2072 <script id="videoTemplate" type="text/html"> 2073 {{if EmbedURL}} 2074 <div class="row"> 2075 <div class="col-xs-12 col-md-7"> 2076 {{if Title}} 2077 <h3>${Title}</h3> 2078 {{/if}} 2079 <div class="embed-responsive embed-responsive-16by9"> 2080 <iframe data-src="${EmbedURL}" class="embed-responsive-item" allowfullscreen></iframe> 2081 <div onclick="(function (elem) {const iframe = $(elem).prev('iframe');iframe.attr('src', iframe.attr('data-src'));$(elem).remove();})(this);"> 2082 <img src="${Thumb}" class="embed-responsive-item" /> 2083 <i class="play-button"></i> 2084 </div> 2085 </div> 2086 <div class="videoProperties"> 2087 <small> 2088 {{if Description && Description.length > 10}} 2089 <i>${Description}</i><br /> 2090 {{/if}} 2091 {{if Author}} 2092 @Translate("Author"): ${Author}<br /> 2093 {{/if}} 2094 {{if Views.All >= 0}} 2095 @Translate("Views"): ${Views.All}x <br /> 2096 {{/if}} 2097 </small> 2098 </div> 2099 <br /> 2100 </div> 2101 </div> 2102 {{/if}} 2103 </script> 2104 <script> 2105 $(document).ready(function () { 2106 // check for videos 2107 var getVideoCountUrl = "/kwpnwebapi/videos/getvideosbyhorsecount/@culture/@horse.AnimalCode"; 2108 $.getJSON(getVideoCountUrl).done(function (resultcount) { 2109 if (resultcount > 0) { 2110 $(".list-tabs ul").append("<li data-tab=\"tab_videos\"><a href=\"javascript:void(0);\">@Translate("Videos", "Videos")</a></li>"); 2111 2112 $(".list-tabs li[data-tab=tab_videos] a").click(function () { 2113 var listItem = $(this).parent(); 2114 var tab = listItem.attr("data-tab"); 2115 2116 // remove existing active from tab list 2117 $(".list-tabs li").removeClass("active"); 2118 2119 // add active 2120 listItem.addClass("active"); 2121 2122 // hide all content items 2123 $(".horse-detail-item").addClass("hidden"); 2124 2125 LoadVideos(); 2126 2127 // show items corresponding to current active tab 2128 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 2129 }); 2130 2131 } 2132 }).fail(function (jqxhr, textStatus, error) { 2133 var err = textStatus + ", " + error; 2134 console.error("Request AddHorse Failed: " + err); 2135 }); 2136 2137 function LoadVideos() { 2138 2139 var videoContent = $("#video-container", "#horse-detail-item-videos"); 2140 if (videoContent.html() === "") { // if not empty, the video's have already been loaded 2141 // add spinner 2142 videoContent.html("<i class=\"fa fa-spinner fa-spin\"></a>"); 2143 2144 // load videos 2145 var getVideoUrl = "/kwpnwebapi/videos/getvideosbyhorse/@culture/@horse.AnimalCode"; 2146 $.getJSON(getVideoUrl).done(function (videos) { 2147 videoContent.html(""); // remove spinner 2148 if (videos != null && videos.MediaList != null && videos.MediaList.Results.length > 0) { 2149 $.each(videos.MediaList.Results, function (i, video) { 2150 $("#videoTemplate").tmpl(video).appendTo("#video-container", "#horse-detail-item-videos"); 2151 }); 2152 } 2153 else { 2154 videoContent.html("<p>@Translate("VideoNotFound", "Videos not found")</p>"); 2155 } 2156 }).fail(function (jqxhr, textStatus, error) { 2157 var err = textStatus + ", " + error; 2158 console.error("Request AddHorse Failed: " + err); 2159 videoContent.html("<p>@Translate("AnErrorOccurred", "An error occurred")</p>"); 2160 }); 2161 } 2162 } 2163 2164 function ClearVideos() { 2165 var videoContent = $("#video-container", "#horse-detail-item-videos"); 2166 videoContent.html(""); 2167 } 2168 2169 $(".list-tabs a").click(function () { 2170 2171 var listItem = $(this).parent(); 2172 var tab = listItem.attr("data-tab"); 2173 var vp = listItem.attr("data-vp").toLowerCase(); 2174 2175 // remove existing active from tab list 2176 $(".list-tabs li").removeClass("active"); 2177 2178 // add active 2179 listItem.addClass("active"); 2180 2181 // hide all content items 2182 $(".horse-detail-item").addClass("hidden"); 2183 2184 // SEO VIRTUAL PAGE VIEW LOGGING 2185 SEO.trackPageView("@seoPage.ToLower()/" + vp); 2186 2187 // if item is "video", load videos 2188 if (tab == "tab_videos") { 2189 LoadVideos(); 2190 } 2191 else { 2192 ClearVideos(); 2193 } 2194 2195 // show items corresponding to current active tab 2196 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 2197 2198 }); 2199 }); 2200 </script> 2201 @SnippetEnd("JavascriptsBottom") 2202 #endregion 2203 } 2204 2205 @if (string.IsNullOrWhiteSpace(action) && actionShow) 2206 { 2207 #region ActionLinks 2208 <h2 id="listheader-actions" data-childId="list-actions" class="notactive"> 2209 <span>@Translate("Actions", "Actions")</span><i class="fa fa-chevron-down" aria-hidden="true"></i> 2210 </h2> 2211 <div class="list-actions"> 2212 <ul> 2213 @if (actionRegisterHorseToName) 2214 { 2215 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Register_HorseToName", "RegisterHorse"))">@Translate("Action_Register_HorseToName", "Register horse")</a></li> 2216 } 2217 @if (actionSignUpInspectionEvent) 2218 { 2219 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseEventsPageUrl(culture, horse.AnimalCode)">@Translate("Action_SignUp_InspectionEvent", "Sign up for inspection / event")</a></li> 2220 } 2221 2222 @*@if (actionGetStallionAdvice) 2223 { 2224 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"))">@Translate("Action_Request_StallionAdvice", "Stallion advice")</a></li> 2225 }*@ 2226 @if (actionRequestGenomicBreedingValueTest) 2227 { 2228 <li><a href="javascript:void(0);" onclick="javascript:AddHorseToGenomeBreedingValueTest();return false;">@Translate("Action_Request_GenomeBreedingValueTest", "Request DNA/OC research")</a></li> 2229 } 2230 @if (actionSellViaMarketplace) 2231 { 2232 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_SellViaMarketplace", "sell"))">@Translate("Action_SellViaMarketplace", "Sell via KWPN Marketplace")</a></li> 2233 } 2234 @if (actionReportHorseSold) 2235 { 2236 <li><a href="javascript:void(0);" class="horse-sold-button">@Translate("Action_Report_HorseSold", "Report horse as sold")</a></li> 2237 } 2238 @if (actionReportDeceasedHorse) 2239 { 2240 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Report_HorseDied", "HorseDied"))">@Translate("Action_Report_HorseDied", "Report horse died")</a></li> 2241 } 2242 @if (actionInbreedingCalculation) 2243 { 2244 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"))">@Translate("Action_InbreedingCalculation", "Inbreeding calculation")</a></li> 2245 } 2246 @if (actionRequestDuplicate) 2247 { 2248 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Duplicate", "Duplicate"))">@Translate("Action_Request_Duplicate", "Request duplicate")</a></li> 2249 } 2250 @if (actionRequestContinuedPassport) 2251 { 2252 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"))">@Translate("Action_Request_ContinuedPassport", "Requests for passport renewal")</a></li> 2253 } 2254 @if (actionRequestPredicates) 2255 { 2256 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Predicates", "RequestPredicates"))">@Translate("Action_Request_Predicates", "Request predicate(s)")</a></li> 2257 } 2258 @if (actionVeterinarianRequestResearch) 2259 { 2260 if (horse.HorseAtLeast2YearsOldOnAprilFirst()) 2261 { 2262 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=PROK">@Translate("Action_Request_PROK_Exam", "Request PROK examination")</a></li> 2263 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=SPST">@Translate("Action_Request_SPST_Exam", "Request SPST examination")</a></li> 2264 } 2265 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=OC">@Translate("Action_Request_OC_Exam", "Request OC examination")</a></li> 2266 } 2267 @if (isMyHorse) 2268 { 2269 <li class="refresh"><a href="#" id="refresh-link"><abbr title="@Translate("Action_RefreshHorseDataAbbr", "When refreshing the horse data we fetch the information from our back-end system. This may take a while.")">@Translate("Action_RefreshHorseData", "Refresh horse data")</abbr></a></li> 2270 } 2271 </ul> 2272 </div> 2273 @SnippetStart("JavascriptsBottom") 2274 <script> 2275 2276 @if (actionRequestGenomicBreedingValueTest) 2277 { 2278 <text> 2279 function AddHorseToGenomeBreedingValueTest() { 2280 var redirectUrl = '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"))'; 2281 // add horse to KwpnUser.GenomeBreedingValueItems 2282 var addHorseUrl = "/kwpnwebapi/forms/research/upserthorse/@horse.AnimalCode"; 2283 $.getJSON(addHorseUrl).done(function () { 2284 window.location.href = redirectUrl; 2285 }).fail(function (jqxhr, textStatus, error) { 2286 var err = textStatus + ", " + error; 2287 console.error("Request AddHorse Failed: " + err); 2288 }); 2289 } 2290 </text> 2291 } 2292 2293 $(document).ready(function () { 2294 2295 @if (isMyHorse) 2296 { 2297 <text> 2298 $("#refresh-link").off("click").on("click", function (e) { 2299 e.preventDefault(); 2300 $(".horse-database").addClass("hidden"); 2301 $("#refreshcontainer").removeClass("hidden"); 2302 var refreshHorse = "/kwpnwebapi/horses/refreshmyhorse/@culture/@horse.AnimalCode/@true"; 2303 $.ajax(refreshHorse).always(function () { 2304 window.location.href = "@System.Web.HttpContext.Current.Request.RawUrl"; 2305 }); 2306 return false; 2307 }); 2308 </text> 2309 } 2310 2311 @* 2312 2313 NOTE: 2314 WHENEVER THE DNA PAGE GOES LIVE AND THIS GETS UNCOMMENTED, 2315 THE 'check if document download links should be added to the action list and if so, do' 2316 JAVASCRIPT BENEITH MUST BE REMOVED !! 2317 2318 // check if any document is available. if so show the DNA page when it is your horse and it isn't an apporved stud 2319 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData() && isMyHorse && !isApprovedStud) 2320 { 2321 <text> 2322 //var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 2323 //$.getJSON(downloadsApiUrl).done(function (result) { 2324 // if (result != null && result.length > 0) { 2325 // var dnaPageListItem = '<li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode, Translate("ActionLink_DnaPage", "DNA-Page"))">@Translate("Action_Request_DnaPage", "DNA-Page")</a></li>'; 2326 // $("aside .list-actions ul").find(' > li:nth-last-child(1)').before(dnaPageListItem); // place at the end, but before the last, which is the refresh button 2327 // } 2328 // }).fail(function (jqxhr, textStatus, error) { 2329 // var err = textStatus + ", " + error; 2330 // console.error("Request Getdownloaddocuments Failed: " + err); 2331 // }); 2332 </text> 2333 }*@ 2334 2335 2336 // check if document download links should be added to the action list and if so, do 2337 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData()) 2338 { 2339 <text> 2340 // download documents 2341 $(".downloaddocument").remove(); 2342 var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 2343 $.getJSON(downloadsApiUrl).done(function (result) { 2344 if (result != null && result.length > 0) { 2345 $.each(result, function (i, downloadDocument) { 2346 var downloadDocumentUrl = downloadDocument.URL; 2347 if (downloadDocumentUrl != null) { 2348 downloadDocumentUrl = downloadDocumentUrl.replace(/\\/g, "/"); // fix slashes 2349 var downloadDocumentLabel = "@Translate("DownloadDocument", "Download document"): " + downloadDocument.TypeDocument; 2350 var downloadDocumentListItem = "<li class=\"downloaddocument\"><a href=\"" + downloadDocumentUrl + "\" download target=\"_blank\">" + downloadDocumentLabel + "</a></li>"; 2351 $("aside .list-actions ul").find(' > li:nth-last-child(1)').before(downloadDocumentListItem); // place at the end, but before the last, which is the refresh button 2352 } 2353 }); 2354 } 2355 }).fail(function (jqxhr, textStatus, error) { 2356 var err = textStatus + ", " + error; 2357 console.error("Request Getdownloaddocuments Failed: " + err); 2358 }); 2359 </text> 2360 } 2361 2362 2363 }); 2364 </script> 2365 @SnippetEnd("JavascriptsBottom") 2366 #endregion 2367 } 2368 2369 @*ACTION ASIDES*@ 2370 @if (!string.IsNullOrWhiteSpace(action)) 2371 { 2372 var productService = new Dynamicweb.Ecommerce.Products.ProductService(); 2373 var ecomLanguageId = Dynamicweb.Frontend.PageView.Current().Area.EcomLanguageId; 2374 2375 // EVENT SIGN UP 2376 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 2377 actionSignUpInspectionEvent) 2378 { 2379 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 2380 if (eventSignUpProduct != null) 2381 { 2382 <h2 id="event-signup-aside-info-header" data-childId="event-signup-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2383 <div class="list-actions"> 2384 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 2385 <colgroup> 2386 <col width="30" /> 2387 <col /> 2388 </colgroup> 2389 <tr class="head"> 2390 <th><i class="fa fa-info"></i></th> 2391 <th>@Translate("Product", "Product")</th> 2392 </tr> 2393 <tr> 2394 <td>&nbsp;</td> 2395 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 2396 </tr> 2397 <tr class="required-services hidden" data-subtotal=""> 2398 <td>&nbsp;</td> 2399 <td class="required-service"></td> 2400 </tr> 2401 <tr class="head"> 2402 <th><i class="fa fa-eur"></i></th> 2403 <th>@Translate("Price", "Price")</th> 2404 </tr> 2405 <tr> 2406 <td>&nbsp;</td> 2407 <td>&euro; <span id="eventSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 2408 </tr> 2409 </table> 2410 </div> 2411 } 2412 } 2413 2414 2415 // CUP EVENT SIGN UP 2416 if (actionSignUpCupEvent) 2417 { 2418 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 2419 if (eventSignUpProduct != null) 2420 { 2421 <h2 id="event-signup-aside-info-header" data-childId="event-signup-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2422 <div class="list-actions"> 2423 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 2424 <colgroup> 2425 <col width="30" /> 2426 <col /> 2427 </colgroup> 2428 <tr class="head"> 2429 <th><i class="fa fa-info"></i></th> 2430 <th>@Translate("Product", "Product")</th> 2431 </tr> 2432 <tr> 2433 <td>&nbsp;</td> 2434 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 2435 </tr> 2436 <tr class="required-services hidden" data-subtotal=""> 2437 <td>&nbsp;</td> 2438 <td class="required-service"></td> 2439 </tr> 2440 <tr class="head"> 2441 <th><i class="fa fa-eur"></i></th> 2442 <th>@Translate("Price", "Price")</th> 2443 </tr> 2444 <tr> 2445 <td>&nbsp;</td> 2446 <td><span id="eventCupSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 2447 </tr> 2448 </table> 2449 </div> 2450 } 2451 } 2452 2453 // STALLION ADVICE 2454 else if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2455 actionGetStallionAdvice) 2456 { 2457 <h2 id="stallion-advice-aside-info-header" data-childId="stallion-advice-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2458 <div class="list-actions"> 2459 <table id="stallion-advice-aside-info" class="aside-content aside-content-info notactive"> 2460 <colgroup> 2461 <col width="30" /> 2462 <col /> 2463 </colgroup> 2464 <tr class="head"> 2465 <th><i class="fa fa-info"></i></th> 2466 <th>Hengsten advies</th> 2467 </tr> 2468 <tr> 2469 <td>&nbsp;</td> 2470 <td>@horseName<br /><span id="stallion-advice-aside-breedingdirection-mare">@horse.BreedingDirection</span></td> 2471 </tr> 2472 </table> 2473 <ul class="aside-content notactive" id="stallion-advice-aside-links"> 2474 <li class="step-0 hidden"><a href='#' onclick="StallionAdvice.ShowStep(0); return false;">@Translate("StallionAdvice_BackToStep0_LinkText", "Explanation")</a></li> 2475 <li class="step-1 hidden"><a href='#' onclick="StallionAdvice.ShowStep(1); return false;">@Translate("StallionAdvice_BackToStep1_LinkText", "Step 1")</a></li> 2476 <li class="step-2 hidden"><a href='#' onclick="StallionAdvice.ShowStep(2); return false;">@Translate("StallionAdvice_BackToStep2_LinkText", "Step 2")</a></li> 2477 </ul> 2478 </div> 2479 } 2480 2481 // CONTINUED PASSPORT 2482 else if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 2483 actionRequestContinuedPassport) 2484 { 2485 var passportRenewalProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.PassportRenewal, ecomLanguageId); 2486 if (passportRenewalProduct != null) 2487 { 2488 <h2 id="passport-renewal-aside-info-header" data-childId="passport-renewal-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2489 <div class="list-actions"> 2490 <table id="passport-renewal-aside-info" class="aside-content aside-content-info notactive"> 2491 <colgroup> 2492 <col width="30" /> 2493 <col /> 2494 </colgroup> 2495 <tr class="head"> 2496 <th><i class="fa fa-info"></i></th> 2497 <th>@Translate("Product", "Product")</th> 2498 </tr> 2499 <tr> 2500 <td>&nbsp;</td> 2501 <td>@passportRenewalProduct.Name</td> 2502 </tr> 2503 <tr class="head"> 2504 <th><i class="fa fa-eur"></i></th> 2505 <th>@Translate("Price", "Price")</th> 2506 </tr> 2507 <tr> 2508 <td>&nbsp;</td> 2509 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(passportRenewalProduct)) (@Translate("VatIncluded", "VAT included"))</td> 2510 </tr> 2511 </table> 2512 </div> 2513 } 2514 } 2515 2516 // PASSPORT DUPLICATE 2517 else if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 2518 actionRequestDuplicate) 2519 { 2520 <h2 id="passport-duplicate-aside-info-header" data-childId="passport-duplicate-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2521 <div class="list-actions"> 2522 <table id="passport-duplicate-info" class="aside-content aside-content-info notactive"> 2523 <colgroup> 2524 <col width="30" /> 2525 <col /> 2526 </colgroup> 2527 <tr class="head"> 2528 <th><i class="fa fa-info"></i></th> 2529 <th>@Translate("Product", "Product")</th> 2530 </tr> 2531 <tr> 2532 <td>&nbsp;</td> 2533 <td id="passport-duplicate-product-name"><!--value is set by javascript based on form selection--></td> 2534 </tr> 2535 <tr class="head"> 2536 <th><i class="fa fa-eur"></i></th> 2537 <th>@Translate("Price", "Price")</th> 2538 </tr> 2539 <tr> 2540 <td>&nbsp;</td> 2541 <td> 2542 <span id="passport-duplicate-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2543 </td> 2544 </tr> 2545 </table> 2546 </div> 2547 } 2548 2549 // REGISTER HORSE TO NAME 2550 else if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 2551 actionRegisterHorseToName) 2552 { 2553 var registerHorseProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.RegisterHorse, ecomLanguageId); 2554 if (registerHorseProduct != null) 2555 { 2556 <h2 id="register-horse-aside-info-header" data-childId="register-horse-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2557 <div class="list-actions"> 2558 <table id="register-horse-aside-info" class="aside-content aside-content-info notactive"> 2559 <colgroup> 2560 <col width="30" /> 2561 <col /> 2562 </colgroup> 2563 <tr class="head"> 2564 <th><i class="fa fa-info"></i></th> 2565 <th>@Translate("Product", "Product")</th> 2566 </tr> 2567 <tr> 2568 <td>&nbsp;</td> 2569 <td>@registerHorseProduct.Name</td> 2570 </tr> 2571 <tr class="head"> 2572 <th><i class="fa fa-eur"></i></th> 2573 <th>@Translate("Price", "Price")</th> 2574 </tr> 2575 <tr> 2576 <td>&nbsp;</td> 2577 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(registerHorseProduct)) (@Translate("VatIncluded", "VAT included"))</td> 2578 </tr> 2579 </table> 2580 </div> 2581 } 2582 } 2583 2584 // REGISTER EMBRYO 2585 else if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 2586 actionRegisterEmbryo) 2587 { 2588 <h2 id="register-embryo-aside-info-header" data-childId="register-embryo-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2589 <div class="list-actions"> 2590 <table id="register-embryo-aside-info" class="aside-content aside-content-info notactive"> 2591 <colgroup> 2592 <col width="30" /> 2593 <col /> 2594 </colgroup> 2595 <tr class="head"> 2596 <th><i class="fa fa-info"></i></th> 2597 <th>@Translate("Product", "Product")</th> 2598 </tr> 2599 <tr> 2600 <td>&nbsp;</td> 2601 <td id="register-embryo-product-name"><!--value is set by javascript based on form selection--></td> 2602 </tr> 2603 <tr class="head"> 2604 <th><i class="fa fa-eur"></i></th> 2605 <th>@Translate("Price", "Price")</th> 2606 </tr> 2607 <tr> 2608 <td>&nbsp;</td> 2609 <td> 2610 <span id="register-embryo-product-price"><!--value is set by javascript based on form selection--></span> 2611 </td> 2612 </tr> 2613 </table> 2614 </div> 2615 } 2616 2617 // REGISTER FOAL 2618 else if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 2619 actionRegisterFoal) 2620 { 2621 <h2 id="register-foal-aside-info-header" data-childId="register-foal-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2622 <div class="list-actions"> 2623 <table id="register-foal-aside-info" class="aside-content aside-content-info notactive"> 2624 <colgroup> 2625 <col width="30" /> 2626 <col /> 2627 </colgroup> 2628 <tr class="head"> 2629 <th><i class="fa fa-info"></i></th> 2630 <th>@Translate("Product", "Product")</th> 2631 </tr> 2632 <tr> 2633 <td>&nbsp;</td> 2634 <td id="register-foal-product-name"><!--value is set by javascript based on form selection--></td> 2635 </tr> 2636 <tr class="head"> 2637 <th><i class="fa fa-eur"></i></th> 2638 <th>@Translate("Price", "Price")</th> 2639 </tr> 2640 <tr> 2641 <td>&nbsp;</td> 2642 <td> 2643 <span id="register-foal-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2644 </td> 2645 </tr> 2646 </table> 2647 </div> 2648 } 2649 2650 // REQUEST WFFS / GENOME BREEDING VALUE TEST 2651 else if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 2652 actionRequestGenomicBreedingValueTest) 2653 { 2654 <h2 id="genome-breeding-aside-info-header" data-childId="genome-breeding-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2655 <div class="list-actions"> 2656 <table id="genome-breeding-aside-info" class="aside-content aside-content-info notactive"> 2657 <colgroup> 2658 <col width="30" /> 2659 <col /> 2660 </colgroup> 2661 <tr class="head"> 2662 <th><i class="fa fa-info"></i></th> 2663 <th>@Translate("Product", "Product")</th> 2664 </tr> 2665 <tr> 2666 <td>&nbsp;</td> 2667 <td id="genome-breeding-product-name"><!--value is set by javascript based on form selection--></td> 2668 </tr> 2669 <tr class="head"> 2670 <th><i class="fa fa-eur"></i></th> 2671 <th>@Translate("Price", "Price")</th> 2672 </tr> 2673 <tr> 2674 <td>&nbsp;</td> 2675 <td> 2676 <span id="genome-breeding-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2677 </td> 2678 </tr> 2679 </table> 2680 </div> 2681 } 2682 2683 // SELL HORSE VIA MARKETPLACE 2684 else if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && 2685 actionSellViaMarketplace) 2686 { 2687 <h2 id="marketplace-aside-info-header" data-childId="marketplace-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2688 <div class="list-actions"> 2689 <table id="marketplace-aside-info" class="aside-content aside-content-info notactive"> 2690 <colgroup> 2691 <col width="30" /> 2692 <col /> 2693 </colgroup> 2694 <tr class="head"> 2695 <th><i class="fa fa-info"></i></th> 2696 <th>@Translate("Product", "Product")</th> 2697 </tr> 2698 <tr> 2699 <td>&nbsp;</td> 2700 <td class="product-name"><!--value is set by javascript based on form selection--></td> 2701 </tr> 2702 <tr class="head paymentInfo hidden"> 2703 <th><i class="fa fa-cc"></i></th> 2704 <th>@Translate("PaymentMethod", "Payment method")</th> 2705 </tr> 2706 <tr class="paymentInfo hidden"> 2707 <td>&nbsp;</td> 2708 <td>@Translate("PaymentMethod_Text_Online", "Pay directly online")</td> 2709 </tr> 2710 <tr class="head"> 2711 <th><i class="fa fa-eur"></i></th> 2712 <th>@Translate("Price", "Price")</th> 2713 </tr> 2714 <tr> 2715 <td>&nbsp;</td> 2716 <td> 2717 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2718 </td> 2719 </tr> 2720 </table> 2721 </div> 2722 } 2723 2724 // REQUEST PREDICATES 2725 else if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && 2726 actionRequestPredicates) 2727 { 2728 <h2 id="request-predicates-aside-info-header" data-childId="request-predicates-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2729 <div class="list-actions"> 2730 <table id="request-predicates-aside-info" class="aside-content aside-content-info notactive"> 2731 <colgroup> 2732 <col width="30" /> 2733 <col /> 2734 </colgroup> 2735 <tr class="head"> 2736 <th><i class="fa fa-info"></i></th> 2737 <th>@Translate("Product", "Product")</th> 2738 </tr> 2739 <tr> 2740 <td>&nbsp;</td> 2741 <td class="product-name"><!--value is set by javascript based on form selection--></td> 2742 </tr> 2743 <tr class="head"> 2744 <th><i class="fa fa-eur"></i></th> 2745 <th>@Translate("Price", "Price")</th> 2746 </tr> 2747 <tr> 2748 <td>&nbsp;</td> 2749 <td> 2750 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2751 </td> 2752 </tr> 2753 </table> 2754 </div> 2755 } 2756 } 2757 2758 @*BACK TO DETAILS*@ 2759 @if (!string.IsNullOrWhiteSpace(action)) 2760 { 2761 <h2 id="back-to-info-header" data-childId="back-to-info-list" class="notactive"><span>@Translate("HorseInfo", "Horse info")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2762 <div class="list-actions"> 2763 <ul id="back-to-info-list" class="aside-content notactive"> 2764 <li><a href='@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode)'>@Translate("ShowHorseDetails", "Show horse details")</a></li> 2765 </ul> 2766 </div> 2767 } 2768 2769 @*MEMBERSHIP CALL TO ACTION*@ 2770 @*@if (!string.IsNullOrWhiteSpace(action) && (!Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData())) 2771 { 2772 var becomeMemberPageId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 2773 if (!string.IsNullOrWhiteSpace(becomeMemberPageId)) 2774 { 2775 var becomeMemberPageUrl = string.Format("/Default.aspx?ID={0}", becomeMemberPageId); 2776 <h2 id="become-member-list-header" data-childId="become-member-list" class="notactive"><span>@Translate("NoAccount?", "No KWPN Account?")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 2777 <div class="list-actions"> 2778 <ul id="become-member-list" class="aside-content notactive"> 2779 <li><a href='@becomeMemberPageUrl'>@Translate("BecomeMemberNow", "Become a member now")</a></li> 2780 </ul> 2781 </div> 2782 } 2783 }*@ 2784 2785 </aside> 2786 </div> 2787 </div> 2788 <article class="col-xs-12 col-md-10 page-content"> 2789 <div>@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2790 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/showGeneral" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 2791 @if (!string.IsNullOrWhiteSpace(action)) 2792 { 2793 2794 // BREEDING ADVICE 2795 if (action.Equals(Translate("ActionLink_Request_BreedingAdvice", "BreedingAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2796 actionRequestBreedingAdvice) 2797 { 2798 var pageIdFormBreedingAdvice = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.BreedingAdvice); 2799 if (!string.IsNullOrWhiteSpace(pageIdFormBreedingAdvice)) 2800 { 2801 showGeneral = false; 2802 2803 // SEO VIRTUAL PAGE VIEW LOGGING 2804 <Text> 2805 <script> 2806 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_breeding_advice", "breeding-advice").UrlEncode()).ToLower()"); 2807 </script> 2808 </Text> 2809 2810 @RenderPageContent(Convert.ToInt32(pageIdFormBreedingAdvice)) 2811 } 2812 } 2813 2814 // STALLION ADVICE 2815 @*if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2816 actionGetStallionAdvice) 2817 { 2818 var pageIdGetStallionAdvice = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.StallionAdvice)?.ID ?? 0; 2819 if (pageIdGetStallionAdvice > 0) 2820 { 2821 showGeneral = false; 2822 2823 // SEO VIRTUAL PAGE VIEW LOGGING 2824 <Text> 2825 <script> 2826 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_stalliob_advice", "stallion-advice").UrlEncode()).ToLower()"); 2827 </script> 2828 </Text> 2829 2830 @RenderPageContent(pageIdGetStallionAdvice) 2831 } 2832 }*@ 2833 2834 // EVENT SIGN UP 2835 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 2836 actionSignUpInspectionEvent) 2837 { 2838 var pageIdFormEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.EventSignUp); 2839 if (!string.IsNullOrWhiteSpace(pageIdFormEventSignUp) && !string.IsNullOrWhiteSpace(actionId)) 2840 { 2841 showGeneral = false; 2842 2843 // SEO VIRTUAL PAGE VIEW LOGGING 2844 <Text> 2845 <script> 2846 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 2847 </script> 2848 </Text> 2849 2850 @RenderPageContent(Convert.ToInt32(pageIdFormEventSignUp)) 2851 } 2852 } 2853 2854 // CUP EVENT SIGN UP 2855 if (actionSignUpCupEvent) 2856 { 2857 var pageIdFormCupEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.CupEventSignUp); 2858 if (!string.IsNullOrWhiteSpace(pageIdFormCupEventSignUp)) 2859 { 2860 showGeneral = false; 2861 2862 // SEO VIRTUAL PAGE VIEW LOGGING 2863 <Text> 2864 <script> 2865 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 2866 </script> 2867 </Text> 2868 2869 @RenderPageContent(Convert.ToInt32(pageIdFormCupEventSignUp)) 2870 } 2871 } 2872 2873 // REPORT DECEASED HORSE 2874 if (action.Equals(Translate("ActionLink_Report_HorseDied", "HorseDied"), StringComparison.InvariantCultureIgnoreCase) && 2875 actionReportDeceasedHorse) 2876 { 2877 var pageIdReportDeceased = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.ReportDeceased); 2878 if (!string.IsNullOrWhiteSpace(pageIdReportDeceased)) 2879 { 2880 showGeneral = false; 2881 2882 // SEO VIRTUAL PAGE VIEW LOGGING 2883 <Text> 2884 <script> 2885 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_report_deceased_horse", "report-deceased-horse").UrlEncode()).ToLower()"); 2886 </script> 2887 </Text> 2888 2889 @RenderPageContent(Convert.ToInt32(pageIdReportDeceased)) 2890 } 2891 } 2892 2893 // CONINUED PASSPORT 2894 if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 2895 actionRequestContinuedPassport) 2896 { 2897 var pageIdPassportRenewal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportRenewal); 2898 if (!string.IsNullOrWhiteSpace(pageIdPassportRenewal)) 2899 { 2900 showGeneral = false; 2901 2902 // SEO VIRTUAL PAGE VIEW LOGGING 2903 <Text> 2904 <script> 2905 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_continued_passport", "continued-passport").UrlEncode()).ToLower()"); 2906 </script> 2907 </Text> 2908 2909 @RenderPageContent(Convert.ToInt32(pageIdPassportRenewal)) 2910 } 2911 } 2912 2913 // REQUEST DUPLICATE 2914 if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 2915 actionRequestDuplicate) 2916 { 2917 var pageIdPassportDuplicate = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportDuplicate); 2918 if (!string.IsNullOrWhiteSpace(pageIdPassportDuplicate)) 2919 { 2920 showGeneral = false; 2921 2922 // SEO VIRTUAL PAGE VIEW LOGGING 2923 <Text> 2924 <script> 2925 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_duplicate", "request-duplicate").UrlEncode()).ToLower()"); 2926 </script> 2927 </Text> 2928 2929 @RenderPageContent(Convert.ToInt32(pageIdPassportDuplicate)) 2930 } 2931 } 2932 2933 // REGISTER HORSE TO NAME 2934 if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 2935 actionRegisterHorseToName) 2936 { 2937 var pageIdFormRegisterHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterHorse); 2938 if (!string.IsNullOrWhiteSpace(pageIdFormRegisterHorse)) 2939 { 2940 showGeneral = false; 2941 2942 // SEO VIRTUAL PAGE VIEW LOGGING 2943 <Text> 2944 <script> 2945 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_horse", "register-horse").UrlEncode()).ToLower()"); 2946 </script> 2947 </Text> 2948 2949 @RenderPageContent(Convert.ToInt32(pageIdFormRegisterHorse)) 2950 } 2951 } 2952 2953 // REGISTER EMBRYO 2954 if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 2955 actionRegisterEmbryo) 2956 { 2957 2958 var pageRegisterEmbryo = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterEmbryo); 2959 var pageIdRegisterEmbryo = pageRegisterEmbryo?.ID ?? 0; 2960 if (pageIdRegisterEmbryo > 0) 2961 { 2962 showGeneral = false; 2963 2964 // SEO VIRTUAL PAGE VIEW LOGGING 2965 <Text> 2966 <script> 2967 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_embryo", "register-embryo").UrlEncode()).ToLower()"); 2968 </script> 2969 </Text> 2970 2971 @RenderPageContent(pageIdRegisterEmbryo) 2972 } 2973 } 2974 2975 // REGISTER FOAL 2976 if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 2977 actionRegisterFoal) 2978 { 2979 var pageIdRegisterFoal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterFoal); 2980 if (!string.IsNullOrWhiteSpace(pageIdRegisterFoal)) 2981 { 2982 showGeneral = false; 2983 2984 // SEO VIRTUAL PAGE VIEW LOGGING 2985 <Text> 2986 <script> 2987 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_foal", "register-foal").UrlEncode()).ToLower()"); 2988 </script> 2989 </Text> 2990 2991 @RenderPageContent(Convert.ToInt32(pageIdRegisterFoal)) 2992 } 2993 } 2994 2995 // REQUEST GENOME BREEDING VALUE OC (DNA-TEST) 2996 if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 2997 actionRequestGenomicBreedingValueTest) 2998 { 2999 var pageIdGenomicBreedingValueTest = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RequestGenomeBreedingValueTest); 3000 if (!string.IsNullOrWhiteSpace(pageIdGenomicBreedingValueTest)) 3001 { 3002 showGeneral = false; 3003 3004 // SEO VIRTUAL PAGE VIEW LOGGING 3005 <Text> 3006 <script> 3007 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_dna_test", "request-dna-test").UrlEncode()).ToLower()"); 3008 </script> 3009 </Text> 3010 3011 @RenderPageContent(Convert.ToInt32(pageIdGenomicBreedingValueTest)) 3012 } 3013 } 3014 3015 // SELL HORSE VIA MARKETPLACE 3016 if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace) 3017 { 3018 var pageIdSellHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.SellHorse); 3019 if (!string.IsNullOrWhiteSpace(pageIdSellHorse)) 3020 { 3021 showGeneral = false; 3022 3023 // SEO VIRTUAL PAGE VIEW LOGGING 3024 <Text> 3025 <script> 3026 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_sell_horse", "sell-horse").UrlEncode()).ToLower()"); 3027 </script> 3028 </Text> 3029 3030 @RenderPageContent(Convert.ToInt32(pageIdSellHorse)) 3031 } 3032 } 3033 3034 // INBREED CALCULATION 3035 if (action.Equals(Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"), StringComparison.InvariantCultureIgnoreCase) && actionInbreedingCalculation) 3036 { 3037 var pageIdInbreedCalculation = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.InbreedCalculationPageId); 3038 if (!string.IsNullOrWhiteSpace(pageIdInbreedCalculation)) 3039 { 3040 showGeneral = false; 3041 3042 // SEO VIRTUAL PAGE VIEW LOGGING 3043 <Text> 3044 <script> 3045 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_inbreed_calculation", "inbreed-calculation").UrlEncode()).ToLower()"); 3046 </script> 3047 </Text> 3048 3049 @RenderPageContent(Convert.ToInt32(pageIdInbreedCalculation)) 3050 } 3051 } 3052 3053 // REQUEST PREDICATES 3054 if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && actionRequestPredicates) 3055 { 3056 var pageIdRequestPredicates = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.PredicatesRequestPageId); 3057 if (!string.IsNullOrWhiteSpace(pageIdRequestPredicates)) 3058 { 3059 showGeneral = false; 3060 3061 // SEO VIRTUAL PAGE VIEW LOGGING 3062 <Text> 3063 <script> 3064 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_predicates", "request-predicates").UrlEncode()).ToLower()"); 3065 </script> 3066 </Text> 3067 3068 @RenderPageContent(Convert.ToInt32(pageIdRequestPredicates)) 3069 } 3070 } 3071 3072 3073 // DNA PAGE 3074 @*if (action.Equals(Translate("ActionLink_DnaPage", "DNA-Page"), StringComparison.InvariantCultureIgnoreCase) && actionDnaPage) 3075 { 3076 var dnaPageId = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.DnaPage)?.ID ?? 0; 3077 if (dnaPageId > 0) 3078 { 3079 showGeneral = false; 3080 3081 // SEO VIRTUAL PAGE VIEW LOGGING 3082 <Text> 3083 <script> 3084 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_dnapage", "dna-page").UrlEncode()).ToLower()"); 3085 </script> 3086 </Text> 3087 3088 @RenderPageContent(dnaPageId) 3089 } 3090 }*@ 3091 } 3092 <script> 3093 var pageTitle = $('.paragraphTitel h1, .paragraphText h1').text(); 3094 $('.paragraphTitel h1, .paragraphText h1').remove(); 3095 $('.pageTitle').text(pageTitle); 3096 </script></div> 3097 </article> 3098 </div> 3099 <div class="row"> 3100 <div class="col-xs-12 col-md-10 page-content print-disclaimer"> 3101 @Translate("Print-Disclaimer", "<strong>KWPN Database - &copy; 2017 - Content: KWPN</strong><br /><p>Niets uit de KWPN Database mag zonder uitdrukkelijke toestemming van het KWPN worden overgenomen, vermenigvuldigd en/of openbaar gemaakt, of gebruikt voor herberekening of onderzoek op welke wijze dan ook, met uitzondering van hetgeen in de Auteurswet bepaald is met betrekking tot het reprorecht.</p><p>Het KWPN aanvaardt geen aansprakelijkheid voor schade van welke aard dan ook, die het gevolg is van handelingen en/of beslissingen gebaseerd op informatie van deze site. De door het KWPN verstrekte informatie en berekende fokwaarden op deze website zijn eigendom van het KWPN. De informatie en de fokwaarden zijn bedoeld als voorlichtingsmateriaal en geadviseerd wordt om deze te gebruiken als één van de hulpmiddelen voor selectiedoeleinden. De onderliggende gegevens zijn verzameld in en/of ten behoeve van de KWPN-populatie en de fokwaarden die hieruit zijn voortgekomen zijn van toepassing op de KWPN-populatie. Het KWPN heeft uiterste zorgvuldigheid betracht bij de totstandkoming van de gepresenteerde informatie. De berekeningen hebben plaatsgevonden op basis van de beschikbare kennis van de populatiegenetica en de regels van uitvoering zijn vastgelegd in de reglementen en/of besluiten van bevoegde organen van het KWPN.</p>") 3102 </div> 3103 </div> 3104 </div> 3105 </div> 3106 </div> 3107 } 3108 else 3109 { 3110 isMyHorse = HorseHelper.CheckIfMyHorse(animalCode) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3111 isMyHorseAndConfirmed = HorseHelper.CheckIfMyHorseAndConfirmed(animalCode) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); //voorkom dat mensen gelijk na op naam zetten paard kunnen verkopen 3112 isMare = false; 3113 isAlive = !horse.DateOfDeath.HasValue; 3114 isApprovedStud = horse.ApprovedStallion; 3115 isBredByMe = HorseHelper.CheckifBredByMe(horse.Breeders) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3116 isAvailableForResearch = HorseHelper.horseIsAvailableForResearch(animalCode); 3117 3118 // HEADER DATA 3119 var genderClass = "fa-question"; 3120 var genderAbbr = ""; 3121 var gender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 3122 Enum.TryParse(horse.Gender.ToUpper(), out gender); 3123 switch (gender) 3124 { 3125 case Kwpn.Models.Enumerations.Gender.HENGST: 3126 genderClass = "fa-mars"; 3127 genderAbbr = Translate("Stallion", "Stallion"); 3128 break; 3129 case Kwpn.Models.Enumerations.Gender.MERRIE: 3130 genderClass = "fa-venus"; 3131 genderAbbr = Translate("Mare", "Mare"); 3132 isMare = true; 3133 break; 3134 case Kwpn.Models.Enumerations.Gender.RUIN: 3135 genderClass = "fa-mars"; //fa-mars-stroke-h 3136 genderAbbr = Translate("Gelding", "Gelding"); 3137 break; 3138 } 3139 horseName = HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, horse.DateOfBirth.Value); 3140 var fatherName = ""; 3141 var father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 3142 if (father != null) { fatherName = father.AnimalName; } else { fatherName = Translate("Unknown", "Unknown"); } 3143 var fatherNameAbbr = Translate("FathersName", "Fathers name").JsEncode(); 3144 var mothersFatherName = ""; 3145 var mothersFather = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather); 3146 if (mothersFather != null) { mothersFatherName = mothersFather.AnimalName; } else { mothersFatherName = Translate("Unknown", "Unknown"); } 3147 var mothersFatherNameAbbr = Translate("MothersFathersName", "Mothers fathers name").JsEncode(); 3148 3149 // HORSE INFO TABLE DATA 3150 var placeOfBirth = horse.PlaceOfBirth; 3151 var chipNumber = horse.ChipNumber; 3152 var register = horse.Register; 3153 var breedingDirection = horse.BreedingDirection; 3154 var lifeNumber = horse.Lifenumber; 3155 if (!string.IsNullOrWhiteSpace(horse.LifenumberComplete)) { lifeNumber = horse.LifenumberComplete; } 3156 var dateOfBirth = ""; 3157 if (horse.DateOfBirth.HasValue && !dateOfBirth.Equals(DateTime.MinValue)) { dateOfBirth = horse.DateOfBirth.Value.ToShortDateString(); } 3158 var color = ""; 3159 var colorInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Color); 3160 if (colorInfo != null) { color = colorInfo.Description; } 3161 var wffs = horse.WFFSResearchInformation; 3162 var withers = ""; 3163 var heightInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Height); 3164 if (heightInfo != null) { withers = heightInfo.Description; } 3165 if (!string.IsNullOrWhiteSpace(withers)) { withers = HorseHelper.ConvertWithers(withers); } 3166 breeders = horse.Breeders; 3167 hasBreeders = breeders != null && breeders.Any(); 3168 3169 // descendent- and performance report 3170 var reports = horse.AnimalReports; 3171 3172 int currentAge = FormatHelpers.CalculateAgeAsInt(horse.DateOfBirth.Value); 3173 3174 showGeneticProfileBasedOnRegister = HorseHelper.IsAllowedRegister(horse.Register) || string.Equals(horse.Register, "ZE", StringComparison.OrdinalIgnoreCase); 3175 showGeneticProfileBasedOnOwnerSettings = !HorseHelper.GeneticProfileIsHidden(animalCode, currentAge); 3176 3177 // validate actions 3178 actionRequestBreedingAdvice = isAlive && isMare; 3179 actionSignUpInspectionEvent = isAlive && isMyHorse; 3180 actionReportDeceasedHorse = isAlive && isMyHorse; 3181 actionRequestContinuedPassport = (!isApprovedStud || isMyHorse) && isAlive; 3182 actionRequestDuplicate = (!isApprovedStud || isMyHorse) && isAlive; 3183 actionRequestPredicates = (!isApprovedStud || isMyHorse); 3184 actionRegisterHorseToName = LoginHelper.IsFullMember() && !isApprovedStud && isAlive && !isMyHorse && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3185 actionRegisterFoal = isMyHorse && isAlive && isMare; 3186 actionRegisterEmbryo = isMyHorse && isAlive && isMare; 3187 actionReportHorseSold = isAlive && isMyHorse; 3188 actionVeterinarianRequestResearch = UserHelper.CheckIfVeterinarian(); 3189 actionRequestGenomicBreedingValueTest = isMyHorseAndConfirmed && isAvailableForResearch; 3190 actionSellViaMarketplace = isAlive && (UserHelper.CheckIfMarketplaceManager() || (isMyHorseAndConfirmed && HorseHelper.IsAllowedRegister(horse.Register))) && !MarketplaceHelper.AnimalHasActiveMarketplaceAdvert(horse.AnimalCode); 3191 actionInbreedingCalculation = !string.IsNullOrWhiteSpace(horse.BreedingDirection) && 3192 isMyHorse && 3193 isMare && 3194 isAlive && 3195 currentAge > 2 && 3196 currentAge < 26 && 3197 ( 3198 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_GelderHorse", "Gelder Horse")) || 3199 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_HarnessHorse", "Harness Horse")) || 3200 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_RidingHorse", "Riding Horse")) || 3201 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_DressageHorse", "Dressage Horse")) || 3202 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_JumperHorse", "Jumper Horse")) 3203 ); 3204 actionGetStallionAdvice = isAlive && isMyHorse && isMare && currentAge > 2 && currentAge < 26; 3205 actionDnaPage = isMyHorse && !isApprovedStud; 3206 actionShow = ( 3207 actionRequestBreedingAdvice || 3208 actionSignUpInspectionEvent || 3209 actionReportDeceasedHorse || 3210 actionRequestContinuedPassport || 3211 actionRequestDuplicate || 3212 actionRegisterHorseToName || 3213 actionRegisterEmbryo || 3214 actionRegisterFoal || 3215 actionReportHorseSold || 3216 actionVeterinarianRequestResearch || 3217 actionRequestGenomicBreedingValueTest || 3218 actionSellViaMarketplace || 3219 actionInbreedingCalculation || 3220 actionRequestPredicates || 3221 actionGetStallionAdvice || 3222 actionDnaPage); 3223 3224 // add horse info to seo page 3225 seoPage = string.Format("{0}/{1}/{2}", seoPage, animalCode.UrlEncode(), HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, null).Replace(" ", "-").UrlEncode()); 3226 3227 if (actionReportHorseSold) 3228 { 3229 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3230 <div class="modal fade" id="confirm-sold" tabindex="-1" role="dialog" aria-labelledby="horse-sold-modal" aria-hidden="true"> 3231 <div class="modal-dialog"> 3232 <div class="modal-content"> 3233 <div class="modal-header">@Translate("HorseSoldModalHeader", "Report horse as sold")</div> 3234 <div class="modal-body" data-default="@Translate("HorseSoldModalText", "Are you sure you would like to report your horse <span class='horseInfo'>{horse}</span> as sold?")"></div> 3235 <div class="modal-footer"> 3236 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("Cancel", "Cancel")</a> 3237 <a class="orange_balloon_link modal-ok" href="javascript:void(0);">@Translate("ReportAsSold", "Report as sold")</a> 3238 </div> 3239 </div> 3240 </div> 3241 </div> 3242 @SnippetStart("JavascriptsBottom") 3243 <script> 3244 $(document).ready(function () { 3245 3246 $(".horse-sold-button").click(function (e) { 3247 3248 // set modal text 3249 var horseInfo = "@horseName (@lifeNumber)"; 3250 var modalBody = $("#confirm-sold .modal-body").attr("data-default"); 3251 var newModalBody = modalBody.replace("{horse}", horseInfo); 3252 $("#confirm-sold .modal-body").html(newModalBody); 3253 3254 // seo tracking 3255 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_horse_sold", "horse-sold").UrlEncode()).ToLower()"); 3256 3257 // set modal ok button value 3258 var horseCode = "@animalCode"; 3259 var horseSoldApi = "/kwpnwebapi/horses/reportsold/@culture/" + horseCode; 3260 var okButton = $("#confirm-sold .modal-footer .modal-ok"); 3261 okButton.unbind("click"); 3262 okButton.click(function () { 3263 $.getJSON(horseSoldApi).done(function (result, status, metaData) { 3264 if (result) { 3265 location.reload(); // reload page to change isMyhorse options 3266 } 3267 if (!result) { 3268 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 3269 } 3270 }).fail(function (jqxhr, textStatus, error) { 3271 var err = textStatus + ", " + error; 3272 console.error("Request Reportsold Failed: " + err); 3273 }); 3274 $("#confirm-sold").modal("hide"); 3275 }); 3276 3277 // show modal 3278 $("#confirm-sold").modal("show"); 3279 3280 }); 3281 }); 3282 </script> 3283 @SnippetEnd("JavascriptsBottom") 3284 } 3285 <div class="break-grid content-container page-content-aside horse-database"> 3286 <div class="break-grid-background"> 3287 <div class="in-grid"> 3288 3289 <div class="row"> 3290 <div class="col-xs-12"> 3291 <h1 class="pageTitle">&nbsp;</h1> 3292 </div> 3293 </div> 3294 3295 <div class="row"> 3296 <div class="col-xs-12"> 3297 <div class="notification"></div> 3298 </div> 3299 </div> 3300 3301 @if (string.IsNullOrWhiteSpace(action)) 3302 { 3303 var horseNameTitle = horseName; 3304 if (isApprovedStud) 3305 { 3306 horseNameTitle = string.Format("{0} <img class='icon-weapon' src='/Files/Templates/Designs/Kwpn/Images/wapen.svg' /> ", horseNameTitle); 3307 } 3308 <div class="row"> 3309 <div class="col-xs-12 col-md-7"> 3310 <a class="go-back orange_arrow_link arrowleft pull-right hidden-md hidden-lg" href="#">@Translate("Back", "Back")</a> 3311 <h1>@horseNameTitle</h1> 3312 </div> 3313 <div class="hidden-xs hidden-sm col-md-4 col-lg-3"> 3314 <a class="go-back orange_arrow_link arrowleft pull-right" href="#">@Translate("Back", "Back")</a> 3315 </div> 3316 </div> 3317 <div class="row"> 3318 <div class="col-xs-12 col-md-2"> 3319 <span class="gender"><i class="fa @genderClass" title='@genderAbbr.JsEncode()'></i> @genderAbbr.ToUpper()</span>@if (!isAlive) 3320 {<span class="deceased" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"><img src="/Files/Templates/Designs/Kwpn/Images/deceased-icon.png" /></span>} 3321 </div> 3322 <div class="col-xs-12 col-md-10"> 3323 <span class="pedigree"><i class="fa fa-tag"></i> <abbr title='@fatherNameAbbr'>@fatherName</abbr> x <abbr title='@mothersFatherNameAbbr'>@mothersFatherName</abbr></span> 3324 </div> 3325 </div> 3326 } 3327 3328 <div class="row"> 3329 <div class="col-xs-12 col-md-2 col-md-push-10 aside-page"> 3330 <div class="bg_aside closed"> 3331 <div class="aside_pullLabel">Menu<i class="fa fa-bars" aria-hidden="true"></i></div> 3332 <aside> 3333 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3334 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 3335 @*DEFAULT ASIDE*@ 3336 @if (string.IsNullOrWhiteSpace(action)) 3337 { 3338 #region TabLinks 3339 <h2 id="listheader-tabs" data-childId="view-list-tabs" class="notactive"><span>@Translate("Menu", "Menu")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3340 <div class="list-tabs"> 3341 <ul> 3342 <li data-tab="tab_general" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_general", "general-info").UrlEncode()" class="active"><a href="javascript:void(0);">@Translate("General", "General")</a></li> 3343 <li data-tab="tab_achievements" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_achievements", "achievements").UrlEncode()"><a href="javascript:void(0);">@Translate("Achievements", "Achievements")</a></li> 3344 <li data-tab="tab_achievements_motherline" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_achievements_motherline", "achievements-motherline").UrlEncode()"><a href="javascript:void(0);">@Translate("AchievementsMotherLine", "Achievements mother line")</a></li> 3345 @if (showGeneticProfileBasedOnRegister) 3346 { 3347 <li data-tab="tab_genetic_profile" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_genetic_profile", "genetic-profile").UrlEncode()"><a href="javascript:void(0);">@Translate("GeneticProfile", "Genetic profile")</a></li> 3348 } 3349 @if (isMare || isMyHorse) 3350 { 3351 <li data-tab="tab_offspring" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_offspring", "offspring").UrlEncode()"><a href="javascript:void(0);">@Translate("Offspring", "Offspring")</a></li> 3352 } 3353 @if (isApprovedStud) 3354 { 3355 <li data-tab="tab_breeding_registration" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_breeding_registration", "breeding-registration").UrlEncode()"><a href="javascript:void(0);">@Translate("BreedingRegistration", "Breeding registration")</a></li> 3356 <li data-tab="tab_approved_offspring" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_approved_offspring", "approved-offspring").UrlEncode()"><a href="javascript:void(0);">@Translate("ApprovedOffspring", "Approved offspring")</a></li> 3357 <li data-tab="tab_performance_report" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_performance_report", "performance-report").UrlEncode()"><a href="javascript:void(0);">@Translate("PerformanceReport", "Performance report")</a></li> 3358 <li data-tab="tab_performance_figures" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_performance_figures", "performance-figures").UrlEncode()"><a href="javascript:void(0);">@Translate("PerformanceFigures", "Performance figures")</a></li> 3359 <li data-tab="tab_availability" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_availability", "availability").UrlEncode()"><a href="javascript:void(0);">@Translate("Availability", "Availability")</a></li> 3360 <li data-tab="tab_descendant_report" data-vp="@Translate("SEO_TrackPageviewPage_Database_tab_descendant_report", "descendant-report").UrlEncode()"><a href="javascript:void(0);">@Translate("DescendantsReport", "Descendants report")</a></li> 3361 } 3362 @{ 3363 var asideBreeders = breeders?.Where(b => b.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(b.PersonCode)); 3364 if (asideBreeders != null && asideBreeders.Any()) 3365 { 3366 <li data-tab="tab_breeders_info"> 3367 <span class="list-item"> 3368 @(asideBreeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder")):<br /> 3369 @foreach (var breeder in asideBreeders) 3370 { 3371 <span class="breeder-link" data-personcode="@breeder.PersonCode">@breeder.PersonName</span> 3372 } 3373 </span> 3374 </li> 3375 } 3376 } 3377 </ul> 3378 </div> 3379 3380 @SnippetStart("JavascriptsBottom") 3381 <script id="videoTemplate" type="text/html"> 3382 {{if EmbedURL}} 3383 <div class="row"> 3384 <div class="col-xs-12 col-md-7"> 3385 {{if Title}} 3386 <h3>${Title}</h3> 3387 {{/if}} 3388 <div class="embed-responsive embed-responsive-16by9"> 3389 <iframe data-src="${EmbedURL}" class="embed-responsive-item" allowfullscreen></iframe> 3390 <div onclick="(function (elem) {const iframe = $(elem).prev('iframe');iframe.attr('src', iframe.attr('data-src'));$(elem).remove();})(this);"> 3391 <img src="${Thumb}" class="embed-responsive-item" /> 3392 <i class="play-button"></i> 3393 </div> 3394 </div> 3395 <div class="videoProperties"> 3396 <small> 3397 {{if Description && Description.length > 10}} 3398 <i>${Description}</i><br /> 3399 {{/if}} 3400 {{if Author}} 3401 @Translate("Author"): ${Author}<br /> 3402 {{/if}} 3403 {{if Views.All >= 0}} 3404 @Translate("Views"): ${Views.All}x <br /> 3405 {{/if}} 3406 </small> 3407 </div> 3408 <br /> 3409 </div> 3410 </div> 3411 {{/if}} 3412 </script> 3413 <script> 3414 $(document).ready(function () { 3415 // check for videos 3416 var getVideoCountUrl = "/kwpnwebapi/videos/getvideosbyhorsecount/@culture/@horse.AnimalCode"; 3417 $.getJSON(getVideoCountUrl).done(function (resultcount) { 3418 if (resultcount > 0) { 3419 $(".list-tabs ul").append("<li data-tab=\"tab_videos\"><a href=\"javascript:void(0);\">@Translate("Videos", "Videos")</a></li>"); 3420 3421 $(".list-tabs li[data-tab=tab_videos] a").click(function () { 3422 var listItem = $(this).parent(); 3423 var tab = listItem.attr("data-tab"); 3424 3425 // remove existing active from tab list 3426 $(".list-tabs li").removeClass("active"); 3427 3428 // add active 3429 listItem.addClass("active"); 3430 3431 // hide all content items 3432 $(".horse-detail-item").addClass("hidden"); 3433 3434 LoadVideos(); 3435 3436 // show items corresponding to current active tab 3437 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 3438 }); 3439 3440 } 3441 }).fail(function (jqxhr, textStatus, error) { 3442 var err = textStatus + ", " + error; 3443 console.error("Request AddHorse Failed: " + err); 3444 }); 3445 3446 function LoadVideos() { 3447 3448 var videoContent = $("#video-container", "#horse-detail-item-videos"); 3449 if (videoContent.html() === "") { // if not empty, the video's have already been loaded 3450 // add spinner 3451 videoContent.html("<i class=\"fa fa-spinner fa-spin\"></a>"); 3452 3453 // load videos 3454 var getVideoUrl = "/kwpnwebapi/videos/getvideosbyhorse/@culture/@horse.AnimalCode"; 3455 $.getJSON(getVideoUrl).done(function (videos) { 3456 videoContent.html(""); // remove spinner 3457 if (videos != null && videos.MediaList != null && videos.MediaList.Results.length > 0) { 3458 $.each(videos.MediaList.Results, function (i, video) { 3459 $("#videoTemplate").tmpl(video).appendTo("#video-container", "#horse-detail-item-videos"); 3460 }); 3461 } 3462 else { 3463 videoContent.html("<p>@Translate("VideoNotFound", "Videos not found")</p>"); 3464 } 3465 }).fail(function (jqxhr, textStatus, error) { 3466 var err = textStatus + ", " + error; 3467 console.error("Request AddHorse Failed: " + err); 3468 videoContent.html("<p>@Translate("AnErrorOccurred", "An error occurred")</p>"); 3469 }); 3470 } 3471 } 3472 3473 function ClearVideos() { 3474 var videoContent = $("#video-container", "#horse-detail-item-videos"); 3475 videoContent.html(""); 3476 } 3477 3478 $(".list-tabs a").click(function () { 3479 3480 var listItem = $(this).parent(); 3481 var tab = listItem.attr("data-tab"); 3482 var vp = listItem.attr("data-vp").toLowerCase(); 3483 3484 // remove existing active from tab list 3485 $(".list-tabs li").removeClass("active"); 3486 3487 // add active 3488 listItem.addClass("active"); 3489 3490 // hide all content items 3491 $(".horse-detail-item").addClass("hidden"); 3492 3493 // SEO VIRTUAL PAGE VIEW LOGGING 3494 SEO.trackPageView("@seoPage.ToLower()/" + vp); 3495 3496 // if item is "video", load videos 3497 if (tab == "tab_videos") { 3498 LoadVideos(); 3499 } 3500 else { 3501 ClearVideos(); 3502 } 3503 3504 // show items corresponding to current active tab 3505 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 3506 3507 }); 3508 }); 3509 </script> 3510 @SnippetEnd("JavascriptsBottom") 3511 #endregion 3512 } 3513 3514 @if (string.IsNullOrWhiteSpace(action) && actionShow) 3515 { 3516 #region ActionLinks 3517 <h2 id="listheader-actions" data-childId="list-actions" class="notactive"> 3518 <span>@Translate("Actions", "Actions")</span><i class="fa fa-chevron-down" aria-hidden="true"></i> 3519 </h2> 3520 <div class="list-actions"> 3521 <ul> 3522 @if (actionRegisterHorseToName) 3523 { 3524 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Register_HorseToName", "RegisterHorse"))">@Translate("Action_Register_HorseToName", "Register horse")</a></li> 3525 } 3526 @if (actionSignUpInspectionEvent) 3527 { 3528 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseEventsPageUrl(culture, horse.AnimalCode)">@Translate("Action_SignUp_InspectionEvent", "Sign up for inspection / event")</a></li> 3529 } 3530 3531 @*@if (actionGetStallionAdvice) 3532 { 3533 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"))">@Translate("Action_Request_StallionAdvice", "Stallion advice")</a></li> 3534 }*@ 3535 @if (actionRequestGenomicBreedingValueTest) 3536 { 3537 <li><a href="javascript:void(0);" onclick="javascript:AddHorseToGenomeBreedingValueTest();return false;">@Translate("Action_Request_GenomeBreedingValueTest", "Request DNA/OC research")</a></li> 3538 } 3539 @if (actionSellViaMarketplace) 3540 { 3541 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_SellViaMarketplace", "sell"))">@Translate("Action_SellViaMarketplace", "Sell via KWPN Marketplace")</a></li> 3542 } 3543 @if (actionReportHorseSold) 3544 { 3545 <li><a href="javascript:void(0);" class="horse-sold-button">@Translate("Action_Report_HorseSold", "Report horse as sold")</a></li> 3546 } 3547 @if (actionReportDeceasedHorse) 3548 { 3549 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Report_HorseDied", "HorseDied"))">@Translate("Action_Report_HorseDied", "Report horse died")</a></li> 3550 } 3551 @if (actionInbreedingCalculation) 3552 { 3553 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"))">@Translate("Action_InbreedingCalculation", "Inbreeding calculation")</a></li> 3554 } 3555 @if (actionRequestDuplicate) 3556 { 3557 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Duplicate", "Duplicate"))">@Translate("Action_Request_Duplicate", "Request duplicate")</a></li> 3558 } 3559 @if (actionRequestContinuedPassport) 3560 { 3561 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"))">@Translate("Action_Request_ContinuedPassport", "Requests for passport renewal")</a></li> 3562 } 3563 @if (actionRequestPredicates) 3564 { 3565 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Predicates", "RequestPredicates"))">@Translate("Action_Request_Predicates", "Request predicate(s)")</a></li> 3566 } 3567 @if (actionVeterinarianRequestResearch) 3568 { 3569 if (horse.HorseAtLeast2YearsOldOnAprilFirst()) 3570 { 3571 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=PROK">@Translate("Action_Request_PROK_Exam", "Request PROK examination")</a></li> 3572 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=SPST">@Translate("Action_Request_SPST_Exam", "Request SPST examination")</a></li> 3573 } 3574 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=OC">@Translate("Action_Request_OC_Exam", "Request OC examination")</a></li> 3575 } 3576 @if (isMyHorse) 3577 { 3578 <li class="refresh"><a href="#" id="refresh-link"><abbr title="@Translate("Action_RefreshHorseDataAbbr", "When refreshing the horse data we fetch the information from our back-end system. This may take a while.")">@Translate("Action_RefreshHorseData", "Refresh horse data")</abbr></a></li> 3579 } 3580 </ul> 3581 </div> 3582 @SnippetStart("JavascriptsBottom") 3583 <script> 3584 3585 @if (actionRequestGenomicBreedingValueTest) 3586 { 3587 <text> 3588 function AddHorseToGenomeBreedingValueTest() { 3589 var redirectUrl = '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"))'; 3590 // add horse to KwpnUser.GenomeBreedingValueItems 3591 var addHorseUrl = "/kwpnwebapi/forms/research/upserthorse/@horse.AnimalCode"; 3592 $.getJSON(addHorseUrl).done(function () { 3593 window.location.href = redirectUrl; 3594 }).fail(function (jqxhr, textStatus, error) { 3595 var err = textStatus + ", " + error; 3596 console.error("Request AddHorse Failed: " + err); 3597 }); 3598 } 3599 </text> 3600 } 3601 3602 $(document).ready(function () { 3603 3604 @if (isMyHorse) 3605 { 3606 <text> 3607 $("#refresh-link").off("click").on("click", function (e) { 3608 e.preventDefault(); 3609 $(".horse-database").addClass("hidden"); 3610 $("#refreshcontainer").removeClass("hidden"); 3611 var refreshHorse = "/kwpnwebapi/horses/refreshmyhorse/@culture/@horse.AnimalCode/@true"; 3612 $.ajax(refreshHorse).always(function () { 3613 window.location.href = "@System.Web.HttpContext.Current.Request.RawUrl"; 3614 }); 3615 return false; 3616 }); 3617 </text> 3618 } 3619 3620 @* 3621 3622 NOTE: 3623 WHENEVER THE DNA PAGE GOES LIVE AND THIS GETS UNCOMMENTED, 3624 THE 'check if document download links should be added to the action list and if so, do' 3625 JAVASCRIPT BENEITH MUST BE REMOVED !! 3626 3627 // check if any document is available. if so show the DNA page when it is your horse and it isn't an apporved stud 3628 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData() && isMyHorse && !isApprovedStud) 3629 { 3630 <text> 3631 //var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 3632 //$.getJSON(downloadsApiUrl).done(function (result) { 3633 // if (result != null && result.length > 0) { 3634 // var dnaPageListItem = '<li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode, Translate("ActionLink_DnaPage", "DNA-Page"))">@Translate("Action_Request_DnaPage", "DNA-Page")</a></li>'; 3635 // $("aside .list-actions ul").find(' > li:nth-last-child(1)').before(dnaPageListItem); // place at the end, but before the last, which is the refresh button 3636 // } 3637 // }).fail(function (jqxhr, textStatus, error) { 3638 // var err = textStatus + ", " + error; 3639 // console.error("Request Getdownloaddocuments Failed: " + err); 3640 // }); 3641 </text> 3642 }*@ 3643 3644 3645 // check if document download links should be added to the action list and if so, do 3646 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData()) 3647 { 3648 <text> 3649 // download documents 3650 $(".downloaddocument").remove(); 3651 var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 3652 $.getJSON(downloadsApiUrl).done(function (result) { 3653 if (result != null && result.length > 0) { 3654 $.each(result, function (i, downloadDocument) { 3655 var downloadDocumentUrl = downloadDocument.URL; 3656 if (downloadDocumentUrl != null) { 3657 downloadDocumentUrl = downloadDocumentUrl.replace(/\\/g, "/"); // fix slashes 3658 var downloadDocumentLabel = "@Translate("DownloadDocument", "Download document"): " + downloadDocument.TypeDocument; 3659 var downloadDocumentListItem = "<li class=\"downloaddocument\"><a href=\"" + downloadDocumentUrl + "\" download target=\"_blank\">" + downloadDocumentLabel + "</a></li>"; 3660 $("aside .list-actions ul").find(' > li:nth-last-child(1)').before(downloadDocumentListItem); // place at the end, but before the last, which is the refresh button 3661 } 3662 }); 3663 } 3664 }).fail(function (jqxhr, textStatus, error) { 3665 var err = textStatus + ", " + error; 3666 console.error("Request Getdownloaddocuments Failed: " + err); 3667 }); 3668 </text> 3669 } 3670 3671 3672 }); 3673 </script> 3674 @SnippetEnd("JavascriptsBottom") 3675 #endregion 3676 } 3677 3678 @*ACTION ASIDES*@ 3679 @if (!string.IsNullOrWhiteSpace(action)) 3680 { 3681 var productService = new Dynamicweb.Ecommerce.Products.ProductService(); 3682 var ecomLanguageId = Dynamicweb.Frontend.PageView.Current().Area.EcomLanguageId; 3683 3684 // EVENT SIGN UP 3685 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 3686 actionSignUpInspectionEvent) 3687 { 3688 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 3689 if (eventSignUpProduct != null) 3690 { 3691 <h2 id="event-signup-aside-info-header" data-childId="event-signup-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3692 <div class="list-actions"> 3693 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 3694 <colgroup> 3695 <col width="30" /> 3696 <col /> 3697 </colgroup> 3698 <tr class="head"> 3699 <th><i class="fa fa-info"></i></th> 3700 <th>@Translate("Product", "Product")</th> 3701 </tr> 3702 <tr> 3703 <td>&nbsp;</td> 3704 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 3705 </tr> 3706 <tr class="required-services hidden" data-subtotal=""> 3707 <td>&nbsp;</td> 3708 <td class="required-service"></td> 3709 </tr> 3710 <tr class="head"> 3711 <th><i class="fa fa-eur"></i></th> 3712 <th>@Translate("Price", "Price")</th> 3713 </tr> 3714 <tr> 3715 <td>&nbsp;</td> 3716 <td>&euro; <span id="eventSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 3717 </tr> 3718 </table> 3719 </div> 3720 } 3721 } 3722 3723 3724 // CUP EVENT SIGN UP 3725 if (actionSignUpCupEvent) 3726 { 3727 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 3728 if (eventSignUpProduct != null) 3729 { 3730 <h2 id="event-signup-aside-info-header" data-childId="event-signup-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3731 <div class="list-actions"> 3732 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 3733 <colgroup> 3734 <col width="30" /> 3735 <col /> 3736 </colgroup> 3737 <tr class="head"> 3738 <th><i class="fa fa-info"></i></th> 3739 <th>@Translate("Product", "Product")</th> 3740 </tr> 3741 <tr> 3742 <td>&nbsp;</td> 3743 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 3744 </tr> 3745 <tr class="required-services hidden" data-subtotal=""> 3746 <td>&nbsp;</td> 3747 <td class="required-service"></td> 3748 </tr> 3749 <tr class="head"> 3750 <th><i class="fa fa-eur"></i></th> 3751 <th>@Translate("Price", "Price")</th> 3752 </tr> 3753 <tr> 3754 <td>&nbsp;</td> 3755 <td><span id="eventCupSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 3756 </tr> 3757 </table> 3758 </div> 3759 } 3760 } 3761 3762 // STALLION ADVICE 3763 else if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 3764 actionGetStallionAdvice) 3765 { 3766 <h2 id="stallion-advice-aside-info-header" data-childId="stallion-advice-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3767 <div class="list-actions"> 3768 <table id="stallion-advice-aside-info" class="aside-content aside-content-info notactive"> 3769 <colgroup> 3770 <col width="30" /> 3771 <col /> 3772 </colgroup> 3773 <tr class="head"> 3774 <th><i class="fa fa-info"></i></th> 3775 <th>Hengsten advies</th> 3776 </tr> 3777 <tr> 3778 <td>&nbsp;</td> 3779 <td>@horseName<br /><span id="stallion-advice-aside-breedingdirection-mare">@horse.BreedingDirection</span></td> 3780 </tr> 3781 </table> 3782 <ul class="aside-content notactive" id="stallion-advice-aside-links"> 3783 <li class="step-0 hidden"><a href='#' onclick="StallionAdvice.ShowStep(0); return false;">@Translate("StallionAdvice_BackToStep0_LinkText", "Explanation")</a></li> 3784 <li class="step-1 hidden"><a href='#' onclick="StallionAdvice.ShowStep(1); return false;">@Translate("StallionAdvice_BackToStep1_LinkText", "Step 1")</a></li> 3785 <li class="step-2 hidden"><a href='#' onclick="StallionAdvice.ShowStep(2); return false;">@Translate("StallionAdvice_BackToStep2_LinkText", "Step 2")</a></li> 3786 </ul> 3787 </div> 3788 } 3789 3790 // CONTINUED PASSPORT 3791 else if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 3792 actionRequestContinuedPassport) 3793 { 3794 var passportRenewalProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.PassportRenewal, ecomLanguageId); 3795 if (passportRenewalProduct != null) 3796 { 3797 <h2 id="passport-renewal-aside-info-header" data-childId="passport-renewal-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3798 <div class="list-actions"> 3799 <table id="passport-renewal-aside-info" class="aside-content aside-content-info notactive"> 3800 <colgroup> 3801 <col width="30" /> 3802 <col /> 3803 </colgroup> 3804 <tr class="head"> 3805 <th><i class="fa fa-info"></i></th> 3806 <th>@Translate("Product", "Product")</th> 3807 </tr> 3808 <tr> 3809 <td>&nbsp;</td> 3810 <td>@passportRenewalProduct.Name</td> 3811 </tr> 3812 <tr class="head"> 3813 <th><i class="fa fa-eur"></i></th> 3814 <th>@Translate("Price", "Price")</th> 3815 </tr> 3816 <tr> 3817 <td>&nbsp;</td> 3818 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(passportRenewalProduct)) (@Translate("VatIncluded", "VAT included"))</td> 3819 </tr> 3820 </table> 3821 </div> 3822 } 3823 } 3824 3825 // PASSPORT DUPLICATE 3826 else if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 3827 actionRequestDuplicate) 3828 { 3829 <h2 id="passport-duplicate-aside-info-header" data-childId="passport-duplicate-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3830 <div class="list-actions"> 3831 <table id="passport-duplicate-info" class="aside-content aside-content-info notactive"> 3832 <colgroup> 3833 <col width="30" /> 3834 <col /> 3835 </colgroup> 3836 <tr class="head"> 3837 <th><i class="fa fa-info"></i></th> 3838 <th>@Translate("Product", "Product")</th> 3839 </tr> 3840 <tr> 3841 <td>&nbsp;</td> 3842 <td id="passport-duplicate-product-name"><!--value is set by javascript based on form selection--></td> 3843 </tr> 3844 <tr class="head"> 3845 <th><i class="fa fa-eur"></i></th> 3846 <th>@Translate("Price", "Price")</th> 3847 </tr> 3848 <tr> 3849 <td>&nbsp;</td> 3850 <td> 3851 <span id="passport-duplicate-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3852 </td> 3853 </tr> 3854 </table> 3855 </div> 3856 } 3857 3858 // REGISTER HORSE TO NAME 3859 else if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 3860 actionRegisterHorseToName) 3861 { 3862 var registerHorseProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.RegisterHorse, ecomLanguageId); 3863 if (registerHorseProduct != null) 3864 { 3865 <h2 id="register-horse-aside-info-header" data-childId="register-horse-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3866 <div class="list-actions"> 3867 <table id="register-horse-aside-info" class="aside-content aside-content-info notactive"> 3868 <colgroup> 3869 <col width="30" /> 3870 <col /> 3871 </colgroup> 3872 <tr class="head"> 3873 <th><i class="fa fa-info"></i></th> 3874 <th>@Translate("Product", "Product")</th> 3875 </tr> 3876 <tr> 3877 <td>&nbsp;</td> 3878 <td>@registerHorseProduct.Name</td> 3879 </tr> 3880 <tr class="head"> 3881 <th><i class="fa fa-eur"></i></th> 3882 <th>@Translate("Price", "Price")</th> 3883 </tr> 3884 <tr> 3885 <td>&nbsp;</td> 3886 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(registerHorseProduct)) (@Translate("VatIncluded", "VAT included"))</td> 3887 </tr> 3888 </table> 3889 </div> 3890 } 3891 } 3892 3893 // REGISTER EMBRYO 3894 else if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 3895 actionRegisterEmbryo) 3896 { 3897 <h2 id="register-embryo-aside-info-header" data-childId="register-embryo-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3898 <div class="list-actions"> 3899 <table id="register-embryo-aside-info" class="aside-content aside-content-info notactive"> 3900 <colgroup> 3901 <col width="30" /> 3902 <col /> 3903 </colgroup> 3904 <tr class="head"> 3905 <th><i class="fa fa-info"></i></th> 3906 <th>@Translate("Product", "Product")</th> 3907 </tr> 3908 <tr> 3909 <td>&nbsp;</td> 3910 <td id="register-embryo-product-name"><!--value is set by javascript based on form selection--></td> 3911 </tr> 3912 <tr class="head"> 3913 <th><i class="fa fa-eur"></i></th> 3914 <th>@Translate("Price", "Price")</th> 3915 </tr> 3916 <tr> 3917 <td>&nbsp;</td> 3918 <td> 3919 <span id="register-embryo-product-price"><!--value is set by javascript based on form selection--></span> 3920 </td> 3921 </tr> 3922 </table> 3923 </div> 3924 } 3925 3926 // REGISTER FOAL 3927 else if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 3928 actionRegisterFoal) 3929 { 3930 <h2 id="register-foal-aside-info-header" data-childId="register-foal-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3931 <div class="list-actions"> 3932 <table id="register-foal-aside-info" class="aside-content aside-content-info notactive"> 3933 <colgroup> 3934 <col width="30" /> 3935 <col /> 3936 </colgroup> 3937 <tr class="head"> 3938 <th><i class="fa fa-info"></i></th> 3939 <th>@Translate("Product", "Product")</th> 3940 </tr> 3941 <tr> 3942 <td>&nbsp;</td> 3943 <td id="register-foal-product-name"><!--value is set by javascript based on form selection--></td> 3944 </tr> 3945 <tr class="head"> 3946 <th><i class="fa fa-eur"></i></th> 3947 <th>@Translate("Price", "Price")</th> 3948 </tr> 3949 <tr> 3950 <td>&nbsp;</td> 3951 <td> 3952 <span id="register-foal-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3953 </td> 3954 </tr> 3955 </table> 3956 </div> 3957 } 3958 3959 // REQUEST WFFS / GENOME BREEDING VALUE TEST 3960 else if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 3961 actionRequestGenomicBreedingValueTest) 3962 { 3963 <h2 id="genome-breeding-aside-info-header" data-childId="genome-breeding-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3964 <div class="list-actions"> 3965 <table id="genome-breeding-aside-info" class="aside-content aside-content-info notactive"> 3966 <colgroup> 3967 <col width="30" /> 3968 <col /> 3969 </colgroup> 3970 <tr class="head"> 3971 <th><i class="fa fa-info"></i></th> 3972 <th>@Translate("Product", "Product")</th> 3973 </tr> 3974 <tr> 3975 <td>&nbsp;</td> 3976 <td id="genome-breeding-product-name"><!--value is set by javascript based on form selection--></td> 3977 </tr> 3978 <tr class="head"> 3979 <th><i class="fa fa-eur"></i></th> 3980 <th>@Translate("Price", "Price")</th> 3981 </tr> 3982 <tr> 3983 <td>&nbsp;</td> 3984 <td> 3985 <span id="genome-breeding-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3986 </td> 3987 </tr> 3988 </table> 3989 </div> 3990 } 3991 3992 // SELL HORSE VIA MARKETPLACE 3993 else if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && 3994 actionSellViaMarketplace) 3995 { 3996 <h2 id="marketplace-aside-info-header" data-childId="marketplace-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 3997 <div class="list-actions"> 3998 <table id="marketplace-aside-info" class="aside-content aside-content-info notactive"> 3999 <colgroup> 4000 <col width="30" /> 4001 <col /> 4002 </colgroup> 4003 <tr class="head"> 4004 <th><i class="fa fa-info"></i></th> 4005 <th>@Translate("Product", "Product")</th> 4006 </tr> 4007 <tr> 4008 <td>&nbsp;</td> 4009 <td class="product-name"><!--value is set by javascript based on form selection--></td> 4010 </tr> 4011 <tr class="head paymentInfo hidden"> 4012 <th><i class="fa fa-cc"></i></th> 4013 <th>@Translate("PaymentMethod", "Payment method")</th> 4014 </tr> 4015 <tr class="paymentInfo hidden"> 4016 <td>&nbsp;</td> 4017 <td>@Translate("PaymentMethod_Text_Online", "Pay directly online")</td> 4018 </tr> 4019 <tr class="head"> 4020 <th><i class="fa fa-eur"></i></th> 4021 <th>@Translate("Price", "Price")</th> 4022 </tr> 4023 <tr> 4024 <td>&nbsp;</td> 4025 <td> 4026 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 4027 </td> 4028 </tr> 4029 </table> 4030 </div> 4031 } 4032 4033 // REQUEST PREDICATES 4034 else if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && 4035 actionRequestPredicates) 4036 { 4037 <h2 id="request-predicates-aside-info-header" data-childId="request-predicates-aside-info" class="notactive"><span>@Translate("Information", "Information")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 4038 <div class="list-actions"> 4039 <table id="request-predicates-aside-info" class="aside-content aside-content-info notactive"> 4040 <colgroup> 4041 <col width="30" /> 4042 <col /> 4043 </colgroup> 4044 <tr class="head"> 4045 <th><i class="fa fa-info"></i></th> 4046 <th>@Translate("Product", "Product")</th> 4047 </tr> 4048 <tr> 4049 <td>&nbsp;</td> 4050 <td class="product-name"><!--value is set by javascript based on form selection--></td> 4051 </tr> 4052 <tr class="head"> 4053 <th><i class="fa fa-eur"></i></th> 4054 <th>@Translate("Price", "Price")</th> 4055 </tr> 4056 <tr> 4057 <td>&nbsp;</td> 4058 <td> 4059 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 4060 </td> 4061 </tr> 4062 </table> 4063 </div> 4064 } 4065 } 4066 4067 @*BACK TO DETAILS*@ 4068 @if (!string.IsNullOrWhiteSpace(action)) 4069 { 4070 <h2 id="back-to-info-header" data-childId="back-to-info-list" class="notactive"><span>@Translate("HorseInfo", "Horse info")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 4071 <div class="list-actions"> 4072 <ul id="back-to-info-list" class="aside-content notactive"> 4073 <li><a href='@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode)'>@Translate("ShowHorseDetails", "Show horse details")</a></li> 4074 </ul> 4075 </div> 4076 } 4077 4078 @*MEMBERSHIP CALL TO ACTION*@ 4079 @*@if (!string.IsNullOrWhiteSpace(action) && (!Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData())) 4080 { 4081 var becomeMemberPageId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 4082 if (!string.IsNullOrWhiteSpace(becomeMemberPageId)) 4083 { 4084 var becomeMemberPageUrl = string.Format("/Default.aspx?ID={0}", becomeMemberPageId); 4085 <h2 id="become-member-list-header" data-childId="become-member-list" class="notactive"><span>@Translate("NoAccount?", "No KWPN Account?")</span><i class="fa fa-chevron-down" aria-hidden="true"></i></h2> 4086 <div class="list-actions"> 4087 <ul id="become-member-list" class="aside-content notactive"> 4088 <li><a href='@becomeMemberPageUrl'>@Translate("BecomeMemberNow", "Become a member now")</a></li> 4089 </ul> 4090 </div> 4091 } 4092 }*@ 4093 4094 @if (action == null) 4095 { 4096 <!-- /204473129/DatabaseDetail/Banner1 --> 4097 <div id='div-gpt-ad-banner1-1' class="google-container google-container--size--b google-container--databasedetail"> 4098 <script> 4099 googletag.cmd.push(function () { googletag.display('div-gpt-ad-banner1-1'); }); 4100 </script> 4101 </div> 4102 } 4103 </aside> 4104 </div> 4105 </div> 4106 <article class="col-xs-12 col-md-10 page-content"> 4107 @if ( 4108 !isApprovedStud || 4109 isMyHorse || 4110 (action != null && action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace)) 4111 { 4112 <div>@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4113 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/showGeneral" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 4114 @if (!string.IsNullOrWhiteSpace(action)) 4115 { 4116 4117 // BREEDING ADVICE 4118 if (action.Equals(Translate("ActionLink_Request_BreedingAdvice", "BreedingAdvice"), StringComparison.InvariantCultureIgnoreCase) && 4119 actionRequestBreedingAdvice) 4120 { 4121 var pageIdFormBreedingAdvice = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.BreedingAdvice); 4122 if (!string.IsNullOrWhiteSpace(pageIdFormBreedingAdvice)) 4123 { 4124 showGeneral = false; 4125 4126 // SEO VIRTUAL PAGE VIEW LOGGING 4127 <Text> 4128 <script> 4129 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_breeding_advice", "breeding-advice").UrlEncode()).ToLower()"); 4130 </script> 4131 </Text> 4132 4133 @RenderPageContent(Convert.ToInt32(pageIdFormBreedingAdvice)) 4134 } 4135 } 4136 4137 // STALLION ADVICE 4138 @*if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 4139 actionGetStallionAdvice) 4140 { 4141 var pageIdGetStallionAdvice = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.StallionAdvice)?.ID ?? 0; 4142 if (pageIdGetStallionAdvice > 0) 4143 { 4144 showGeneral = false; 4145 4146 // SEO VIRTUAL PAGE VIEW LOGGING 4147 <Text> 4148 <script> 4149 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_stalliob_advice", "stallion-advice").UrlEncode()).ToLower()"); 4150 </script> 4151 </Text> 4152 4153 @RenderPageContent(pageIdGetStallionAdvice) 4154 } 4155 }*@ 4156 4157 // EVENT SIGN UP 4158 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 4159 actionSignUpInspectionEvent) 4160 { 4161 var pageIdFormEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.EventSignUp); 4162 if (!string.IsNullOrWhiteSpace(pageIdFormEventSignUp) && !string.IsNullOrWhiteSpace(actionId)) 4163 { 4164 showGeneral = false; 4165 4166 // SEO VIRTUAL PAGE VIEW LOGGING 4167 <Text> 4168 <script> 4169 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 4170 </script> 4171 </Text> 4172 4173 @RenderPageContent(Convert.ToInt32(pageIdFormEventSignUp)) 4174 } 4175 } 4176 4177 // CUP EVENT SIGN UP 4178 if (actionSignUpCupEvent) 4179 { 4180 var pageIdFormCupEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.CupEventSignUp); 4181 if (!string.IsNullOrWhiteSpace(pageIdFormCupEventSignUp)) 4182 { 4183 showGeneral = false; 4184 4185 // SEO VIRTUAL PAGE VIEW LOGGING 4186 <Text> 4187 <script> 4188 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 4189 </script> 4190 </Text> 4191 4192 @RenderPageContent(Convert.ToInt32(pageIdFormCupEventSignUp)) 4193 } 4194 } 4195 4196 // REPORT DECEASED HORSE 4197 if (action.Equals(Translate("ActionLink_Report_HorseDied", "HorseDied"), StringComparison.InvariantCultureIgnoreCase) && 4198 actionReportDeceasedHorse) 4199 { 4200 var pageIdReportDeceased = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.ReportDeceased); 4201 if (!string.IsNullOrWhiteSpace(pageIdReportDeceased)) 4202 { 4203 showGeneral = false; 4204 4205 // SEO VIRTUAL PAGE VIEW LOGGING 4206 <Text> 4207 <script> 4208 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_report_deceased_horse", "report-deceased-horse").UrlEncode()).ToLower()"); 4209 </script> 4210 </Text> 4211 4212 @RenderPageContent(Convert.ToInt32(pageIdReportDeceased)) 4213 } 4214 } 4215 4216 // CONINUED PASSPORT 4217 if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 4218 actionRequestContinuedPassport) 4219 { 4220 var pageIdPassportRenewal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportRenewal); 4221 if (!string.IsNullOrWhiteSpace(pageIdPassportRenewal)) 4222 { 4223 showGeneral = false; 4224 4225 // SEO VIRTUAL PAGE VIEW LOGGING 4226 <Text> 4227 <script> 4228 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_continued_passport", "continued-passport").UrlEncode()).ToLower()"); 4229 </script> 4230 </Text> 4231 4232 @RenderPageContent(Convert.ToInt32(pageIdPassportRenewal)) 4233 } 4234 } 4235 4236 // REQUEST DUPLICATE 4237 if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 4238 actionRequestDuplicate) 4239 { 4240 var pageIdPassportDuplicate = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportDuplicate); 4241 if (!string.IsNullOrWhiteSpace(pageIdPassportDuplicate)) 4242 { 4243 showGeneral = false; 4244 4245 // SEO VIRTUAL PAGE VIEW LOGGING 4246 <Text> 4247 <script> 4248 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_duplicate", "request-duplicate").UrlEncode()).ToLower()"); 4249 </script> 4250 </Text> 4251 4252 @RenderPageContent(Convert.ToInt32(pageIdPassportDuplicate)) 4253 } 4254 } 4255 4256 // REGISTER HORSE TO NAME 4257 if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 4258 actionRegisterHorseToName) 4259 { 4260 var pageIdFormRegisterHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterHorse); 4261 if (!string.IsNullOrWhiteSpace(pageIdFormRegisterHorse)) 4262 { 4263 showGeneral = false; 4264 4265 // SEO VIRTUAL PAGE VIEW LOGGING 4266 <Text> 4267 <script> 4268 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_horse", "register-horse").UrlEncode()).ToLower()"); 4269 </script> 4270 </Text> 4271 4272 @RenderPageContent(Convert.ToInt32(pageIdFormRegisterHorse)) 4273 } 4274 } 4275 4276 // REGISTER EMBRYO 4277 if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 4278 actionRegisterEmbryo) 4279 { 4280 4281 var pageRegisterEmbryo = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterEmbryo); 4282 var pageIdRegisterEmbryo = pageRegisterEmbryo?.ID ?? 0; 4283 if (pageIdRegisterEmbryo > 0) 4284 { 4285 showGeneral = false; 4286 4287 // SEO VIRTUAL PAGE VIEW LOGGING 4288 <Text> 4289 <script> 4290 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_embryo", "register-embryo").UrlEncode()).ToLower()"); 4291 </script> 4292 </Text> 4293 4294 @RenderPageContent(pageIdRegisterEmbryo) 4295 } 4296 } 4297 4298 // REGISTER FOAL 4299 if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 4300 actionRegisterFoal) 4301 { 4302 var pageIdRegisterFoal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterFoal); 4303 if (!string.IsNullOrWhiteSpace(pageIdRegisterFoal)) 4304 { 4305 showGeneral = false; 4306 4307 // SEO VIRTUAL PAGE VIEW LOGGING 4308 <Text> 4309 <script> 4310 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_foal", "register-foal").UrlEncode()).ToLower()"); 4311 </script> 4312 </Text> 4313 4314 @RenderPageContent(Convert.ToInt32(pageIdRegisterFoal)) 4315 } 4316 } 4317 4318 // REQUEST GENOME BREEDING VALUE OC (DNA-TEST) 4319 if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 4320 actionRequestGenomicBreedingValueTest) 4321 { 4322 var pageIdGenomicBreedingValueTest = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RequestGenomeBreedingValueTest); 4323 if (!string.IsNullOrWhiteSpace(pageIdGenomicBreedingValueTest)) 4324 { 4325 showGeneral = false; 4326 4327 // SEO VIRTUAL PAGE VIEW LOGGING 4328 <Text> 4329 <script> 4330 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_dna_test", "request-dna-test").UrlEncode()).ToLower()"); 4331 </script> 4332 </Text> 4333 4334 @RenderPageContent(Convert.ToInt32(pageIdGenomicBreedingValueTest)) 4335 } 4336 } 4337 4338 // SELL HORSE VIA MARKETPLACE 4339 if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace) 4340 { 4341 var pageIdSellHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.SellHorse); 4342 if (!string.IsNullOrWhiteSpace(pageIdSellHorse)) 4343 { 4344 showGeneral = false; 4345 4346 // SEO VIRTUAL PAGE VIEW LOGGING 4347 <Text> 4348 <script> 4349 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_sell_horse", "sell-horse").UrlEncode()).ToLower()"); 4350 </script> 4351 </Text> 4352 4353 @RenderPageContent(Convert.ToInt32(pageIdSellHorse)) 4354 } 4355 } 4356 4357 // INBREED CALCULATION 4358 if (action.Equals(Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"), StringComparison.InvariantCultureIgnoreCase) && actionInbreedingCalculation) 4359 { 4360 var pageIdInbreedCalculation = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.InbreedCalculationPageId); 4361 if (!string.IsNullOrWhiteSpace(pageIdInbreedCalculation)) 4362 { 4363 showGeneral = false; 4364 4365 // SEO VIRTUAL PAGE VIEW LOGGING 4366 <Text> 4367 <script> 4368 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_inbreed_calculation", "inbreed-calculation").UrlEncode()).ToLower()"); 4369 </script> 4370 </Text> 4371 4372 @RenderPageContent(Convert.ToInt32(pageIdInbreedCalculation)) 4373 } 4374 } 4375 4376 // REQUEST PREDICATES 4377 if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && actionRequestPredicates) 4378 { 4379 var pageIdRequestPredicates = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.PredicatesRequestPageId); 4380 if (!string.IsNullOrWhiteSpace(pageIdRequestPredicates)) 4381 { 4382 showGeneral = false; 4383 4384 // SEO VIRTUAL PAGE VIEW LOGGING 4385 <Text> 4386 <script> 4387 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_predicates", "request-predicates").UrlEncode()).ToLower()"); 4388 </script> 4389 </Text> 4390 4391 @RenderPageContent(Convert.ToInt32(pageIdRequestPredicates)) 4392 } 4393 } 4394 4395 4396 // DNA PAGE 4397 @*if (action.Equals(Translate("ActionLink_DnaPage", "DNA-Page"), StringComparison.InvariantCultureIgnoreCase) && actionDnaPage) 4398 { 4399 var dnaPageId = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.DnaPage)?.ID ?? 0; 4400 if (dnaPageId > 0) 4401 { 4402 showGeneral = false; 4403 4404 // SEO VIRTUAL PAGE VIEW LOGGING 4405 <Text> 4406 <script> 4407 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_dnapage", "dna-page").UrlEncode()).ToLower()"); 4408 </script> 4409 </Text> 4410 4411 @RenderPageContent(dnaPageId) 4412 } 4413 }*@ 4414 } 4415 <script> 4416 var pageTitle = $('.paragraphTitel h1, .paragraphText h1').text(); 4417 $('.paragraphTitel h1, .paragraphText h1').remove(); 4418 $('.pageTitle').text(pageTitle); 4419 </script></div> 4420 } 4421 @if (showGeneral) 4422 { 4423 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4424 <div class="horse-detail-item" id="horse-detail-item-stud-photo" data-content="tab_general"> 4425 @if (horse.HasImage) 4426 { 4427 var studPhoto = string.Format("images/horseimage.ashx?pc={0}", horse.AnimalCode); 4428 <div class="row"> 4429 <div class="col-xs-12"> 4430 <img src="@studPhoto" alt="@horseName" /> 4431 </div> 4432 </div> 4433 } 4434 </div> 4435 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4436 <div class="horse-detail-item" id="horse-detail-item-general-info" data-content="tab_general"> 4437 @{ 4438 var publicSportsLevels = Kwpn.Repository.Helpers.FormatHelpers.CreateSportniveauList(horse.SportResults); 4439 var kinship = Kwpn.Repository.Helpers.HorseHelper.GetKinshipPercentage(horse, Dynamicweb.Frontend.PageView.Current().Area.Culture); 4440 } 4441 @CreateHorseInfoTableRow(Translate("LifeNumber", "Life number"), lifeNumber) 4442 @CreateHorseInfoTableRow(Translate("DateOfBirth", "Date of birth"), dateOfBirth) 4443 @CreateHorseInfoTableRow(Translate("BreedingDirection", "Breeding direction"), breedingDirection) 4444 @CreateHorseInfoTableRow(Translate("Register", "Register"), register) 4445 @if (!string.IsNullOrEmpty(kinship)) 4446 { 4447 var kinshipLabel = Translate("Kinship", "Kinship"); 4448 var kinshipValue = kinship; 4449 if (kinship.Contains(":")) { 4450 kinshipLabel = kinship.Split(':')[0].Trim(); 4451 kinshipValue = kinship.Split(':')[1].Trim(); 4452 } 4453 @CreateHorseInfoTableRow(kinshipLabel, kinshipValue) 4454 } 4455 @if (!string.IsNullOrWhiteSpace(publicSportsLevels)) 4456 { 4457 @CreateHorseInfoTableRow(Translate("SportStandings", "Sport standings"), publicSportsLevels) 4458 } 4459 @CreateHorseInfoTableRow(Translate("Withers", "Withers"), withers) 4460 @CreateHorseInfoTableRow(Translate("Color", "Color"), color) 4461 @if (!string.IsNullOrWhiteSpace(wffs)) 4462 { 4463 @CreateHorseInfoTableRow(Translate("WFFS", "WFFS"), wffs.ToLower()) 4464 } 4465 @if (isMyHorse || isBredByMe) 4466 { 4467 @CreateHorseInfoTableRow(Translate("ChipNumber", "Chip number"), chipNumber) 4468 } 4469 </div> 4470 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4471 <div class="horse-detail-item" id="horse-detail-item-breeders" data-content="tab_general"> 4472 <div class="breedersinfo infotable"> 4473 4474 @if (hasBreeders) 4475 { 4476 var showBreederLinks = breeders.Any(breeder => breeder.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(breeder.PersonCode)); 4477 4478 <h2>@(breeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder"))</h2> 4479 4480 if (showBreederLinks) 4481 { 4482 <p>@Translate("Breeders_ClickOnNameText", "Click the breeder name to get more info about this breeder.")</p> 4483 } 4484 4485 var breederCounter = 0; 4486 @CreateInfoTableRow(breederCounter, Translate("Name", "Name"), "", true) 4487 foreach (var breeder in breeders) 4488 { 4489 if (breeder.AllowedOwnerBreeder) 4490 { 4491 var linkData = Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(breeder.PersonCode) ? $" class=\"breeder-link\" data-personcode=\"{breeder.PersonCode}\"" : ""; // only link to breeders which are member 4492 @CreateInfoTableRow(breederCounter, $"<span{linkData}>{breeder.PersonName}</span>", "", false, false, false, false, true) 4493 } 4494 else 4495 { 4496 @CreateInfoTableRow(breederCounter, Translate("Breeders_Anonymous", "Anonymous"), "", false, false, false, false, true) 4497 } 4498 breederCounter++; 4499 } 4500 } 4501 4502 4503 @{ 4504 // if horse is approved stud or horse is mine or minimal 1 owner has given approval to be shown, then show owners 4505 List<Kwpn.Models.ApiModels.PersonModel> owners = horse.Owners; 4506 var hasOwners = owners != null && owners.Any(); 4507 4508 if (hasOwners) 4509 { 4510 var showOwnerLinks = owners.Any(owner => owner.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode)); 4511 4512 <h2>@(owners.Count > 1 ? Translate("Registered2", "Registered") : Translate("Registered", "Registered"))</h2> 4513 4514 if (showOwnerLinks) 4515 { 4516 <p>@Translate("Registered_ClickOnNameText", "Click the name to get more info about this registered owner.")</p> 4517 } 4518 4519 var registeredCounter = 0; 4520 @CreateInfoTableRow(registeredCounter, Translate("Name", "Name"), "", true) 4521 foreach (var owner in owners) 4522 { 4523 if (owner.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode)) 4524 { 4525 var linkData = Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode) ? $" class=\"registered-link\" data-personcode=\"{owner.PersonCode}\"" : ""; // only link to owners which are member 4526 @CreateInfoTableRow(registeredCounter, $"<span{linkData}>{owner.PersonName}</span>", "", false, false, false, false, true) 4527 } 4528 else 4529 { 4530 @CreateInfoTableRow(registeredCounter, Translate("Owner_Anonymous", "Anonymous"), "", false, false, false, false, true) 4531 } 4532 registeredCounter++; 4533 } 4534 } 4535 } 4536 </div> 4537 </div> 4538 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4539 @*note: variables like "horse/culture" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 4540 <div class="horse-detail-item" id="horse-detail-item-pedigree" data-content="tab_general"> 4541 @{ 4542 var pedigree_Me = Kwpn.Repository.Helpers.HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, DateTime.MinValue); 4543 var pedigree_Father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 4544 var pedigree_Mother = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Mother); 4545 } 4546 @if (pedigree_Father != null && pedigree_Mother != null) 4547 { 4548 <script type="text/javascript"> 4549 4550 $(document).ready(function () { 4551 4552 var jsGender = ''; 4553 if ('@genderClass' == 'fa-mars') { 4554 jsGender = 'male' 4555 } else { 4556 jsGender = 'female' 4557 } 4558 4559 var datasource = { 4560 'name': '@horse.Lifenumber.JsEncode()', 4561 'title': '@horse.AnimalName.JsEncode()', 4562 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.Register)) 4563 { 4564 <text>'subtext': '@horse.Register.JsEncode()',</text> 4565 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode)',</text> 4566 } 4567 else 4568 { 4569 <text>'subtext': '-',</text> 4570 <text>'link': '',</text> 4571 } 4572 'sex': jsGender, 4573 'children': [ 4574 { 4575 'name': '@pedigree_Father.Lifenumber.JsEncode()', 4576 'title': '@pedigree_Father.AnimalName.JsEncode()', 4577 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Father.Register)) 4578 { 4579 <text>'subtext': '@pedigree_Father.Register.JsEncode()',</text> 4580 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Father.AnimalCode)',</text> 4581 } 4582 else 4583 { 4584 <text>'subtext': '-',</text> 4585 <text>'link': '',</text> 4586 } 4587 'sex': 'male', 4588 'children': [ 4589 { 4590 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Lifenumber.JsEncode()', 4591 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalName.JsEncode()', 4592 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register)) 4593 { 4594 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register.JsEncode()',</text> 4595 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalCode)',</text> 4596 } 4597 else 4598 { 4599 <text>'subtext': '-',</text> 4600 <text>'link': '',</text> 4601 } 4602 'sex': 'male', 4603 'children': [ 4604 { 4605 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Lifenumber.JsEncode()', 4606 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalName.JsEncode()', 4607 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register)) 4608 { 4609 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register.JsEncode()',</text> 4610 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalCode)',</text> 4611 } 4612 else 4613 { 4614 <text>'subtext': '-',</text> 4615 <text>'link': '',</text> 4616 } 4617 'sex': 'male' 4618 }, { 4619 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Lifenumber.JsEncode()', 4620 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalName.JsEncode()', 4621 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register)) 4622 { 4623 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register.JsEncode()',</text> 4624 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalCode)',</text> 4625 } 4626 else 4627 { 4628 <text>'subtext': '-',</text> 4629 <text>'link': '',</text> 4630 } 4631 'sex': 'female' 4632 } 4633 ] 4634 }, { 4635 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Lifenumber.JsEncode()', 4636 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalName.JsEncode()', 4637 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register)) 4638 { 4639 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register.JsEncode()',</text> 4640 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalCode)',</text> 4641 } 4642 else 4643 { 4644 <text>'subtext': '-',</text> 4645 <text>'link': '',</text> 4646 } 4647 'sex': 'female', 4648 'children': [ 4649 { 4650 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Lifenumber.JsEncode()', 4651 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalName.JsEncode()', 4652 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register)) 4653 { 4654 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register.JsEncode()',</text> 4655 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalCode)',</text> 4656 } 4657 else 4658 { 4659 <text>'subtext': '-',</text> 4660 <text>'link': '',</text> 4661 } 4662 'sex': 'male' 4663 }, { 4664 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Lifenumber.JsEncode()', 4665 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalName.JsEncode()', 4666 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register)) 4667 { 4668 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register.JsEncode()',</text> 4669 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalCode)',</text> 4670 } 4671 else 4672 { 4673 <text>'subtext': '-',</text> 4674 <text>'link': '',</text> 4675 } 4676 'sex': 'female' 4677 }] 4678 }] 4679 }, 4680 { 4681 'name': '@pedigree_Mother.Lifenumber.JsEncode()', 4682 'title': '@pedigree_Mother.AnimalName.JsEncode()', 4683 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Mother.Register)) 4684 { 4685 <text>'subtext': '@pedigree_Mother.Register.JsEncode()',</text> 4686 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Mother.AnimalCode)',</text> 4687 } 4688 else 4689 { 4690 <text>'subtext': '-',</text> 4691 <text>'link': '',</text> 4692 } 4693 'sex': 'female', 4694 'children': [ 4695 { 4696 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Lifenumber.JsEncode()', 4697 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalName.JsEncode()', 4698 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register)) 4699 { 4700 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register.JsEncode()',</text> 4701 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalCode)',</text> 4702 } 4703 else 4704 { 4705 <text>'subtext': '-',</text> 4706 <text>'link': '',</text> 4707 } 4708 'sex': 'male', 4709 'children': [ 4710 { 4711 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Lifenumber.JsEncode().JsEncode()', 4712 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalName.JsEncode().JsEncode()', 4713 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register)) 4714 { 4715 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register.JsEncode().JsEncode()',</text> 4716 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalCode)',</text> 4717 } 4718 else 4719 { 4720 <text>'subtext': '-',</text> 4721 <text>'link': '',</text> 4722 } 4723 'sex': 'male' 4724 }, { 4725 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Lifenumber.JsEncode()', 4726 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalName.JsEncode()', 4727 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register)) 4728 { 4729 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register.JsEncode()',</text> 4730 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalCode)',</text> 4731 } 4732 else 4733 { 4734 <text>'subtext': '-',</text> 4735 <text>'link': '',</text> 4736 } 4737 'sex': 'female' 4738 } 4739 ] 4740 }, { 4741 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Lifenumber.JsEncode()', 4742 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalName.JsEncode()', 4743 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register)) 4744 { 4745 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register.JsEncode()',</text> 4746 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalCode)',</text> 4747 } 4748 else 4749 { 4750 <text>'subtext': '-',</text> 4751 <text>'link': '',</text> 4752 } 4753 'sex': 'female', 4754 'children': [ 4755 { 4756 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Lifenumber.JsEncode()', 4757 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalName.JsEncode()', 4758 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register)) 4759 { 4760 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register.JsEncode()',</text> 4761 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalCode)',</text> 4762 } 4763 else 4764 { 4765 <text>'subtext': '-',</text> 4766 <text>'link': '',</text> 4767 } 4768 'sex': 'male' 4769 }, { 4770 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Lifenumber.JsEncode()', 4771 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalName.JsEncode()', 4772 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register)) 4773 { 4774 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register.JsEncode()',</text> 4775 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalCode)',</text> 4776 } 4777 else 4778 { 4779 <text>'subtext': '-',</text> 4780 <text>'link': '',</text> 4781 } 4782 'sex': 'female' 4783 } 4784 ] 4785 } 4786 ] 4787 }] 4788 }; 4789 4790 4791 $('#chart-container').orgchart({ 4792 data: datasource, 4793 direction: 'l2r', 4794 nodeContent: 'title', 4795 parentNodeSymbol: '', 4796 createNode: function ($node, data) { 4797 var icon = '<div class="imagecontainer"><i class="fa fa-' + (data.sex === 'male' ? 'mars' : 'venus') + '"></i></div>'; 4798 var subtext = '<div class="subtext">' + data.subtext + '</div></div>'; 4799 $node.find('i[class^="edge"], i[class^="fa"]').remove(); 4800 $node.prepend(icon); 4801 $node.append(subtext); 4802 $node.find('.imagecontainer').nextAll().wrapAll('<div class="contextcontainer"/>'); 4803 4804 if (data.link.length > 0) { 4805 $node.css('cursor', 'pointer'); 4806 $node.on('click', function (event) { 4807 location.href = data.link; 4808 }); 4809 } 4810 4811 $node.on('mouseenter', function () { 4812 $('#custom_tooltip').css('display', 'block'); 4813 $('#custom_tooltip').find('.title').text(data.title); 4814 $('#custom_tooltip').find('.subtext').text(data.subtext); 4815 }); 4816 4817 $node.on('mouseleave', function () { 4818 $('#custom_tooltip').css('display', 'none'); 4819 }); 4820 } 4821 }); 4822 4823 $('.tooltip').on('shown.bs.tooltip', function () { 4824 console.log('tooltip show'); 4825 }); 4826 4827 4828 }); 4829 4830 $(window).on('mousemove', function (e) { 4831 var mouseX = e.clientX + 10; 4832 var mouseY = e.clientY + 20; 4833 $('#custom_tooltip').css('left', mouseX); 4834 $('#custom_tooltip').css('top', mouseY); 4835 }); 4836 </script> 4837 <div class="pedigreetree"> 4838 <div id="custom_tooltip"> 4839 <div class="title"></div> 4840 <div class="subtext"></div> 4841 </div> 4842 <h2>@Translate("Pedigree", "Pedigree")</h2> 4843 <div id="chart-container"></div> 4844 </div> 4845 } 4846 </div> 4847 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4848 <div class="horse-detail-item" id="horse-detail-item-markings" data-content="tab_general"> 4849 @if (isMyHorse || isBredByMe) 4850 { 4851 // MARKINGS DATA 4852 var showMarkings = false; 4853 var head = ""; 4854 var headInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.Head); 4855 if (headInfo != null) 4856 { 4857 head = headInfo.Description; 4858 showMarkings = true; 4859 } 4860 var frontLeft = ""; 4861 var frontLeftInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.FrontLeft); 4862 if (frontLeftInfo != null) 4863 { 4864 frontLeft = frontLeftInfo.Description; 4865 showMarkings = true; 4866 } 4867 var frontRight = ""; 4868 var frontRightInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.FrontRight); 4869 if (frontRightInfo != null) 4870 { 4871 frontRight = frontRightInfo.Description; 4872 showMarkings = true; 4873 } 4874 var rearLeft = ""; 4875 var rearLeftInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.RearLeft); 4876 if (rearLeftInfo != null) 4877 { 4878 rearLeft = rearLeftInfo.Description; 4879 showMarkings = true; 4880 } 4881 var rearRight = ""; 4882 var rearRightInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.RearRight); 4883 if (rearRightInfo != null) 4884 { 4885 rearRight = rearRightInfo.Description; 4886 showMarkings = true; 4887 } 4888 var misc = ""; 4889 var miscInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.Misc); 4890 if (miscInfo != null) 4891 { 4892 misc = miscInfo.Description; 4893 showMarkings = true; 4894 } 4895 4896 if (showMarkings) 4897 { 4898 var markingsCounter = 0; 4899 <div class="breedersinfo infotable"> 4900 <h2>@Translate("Markings", "Markings")</h2> 4901 @CreateInfoTableRow(markingsCounter, Translate("MarkingLocation", "Location"), Translate("MarkingDescription", "Description"), true) 4902 @if (!string.IsNullOrWhiteSpace(head)) 4903 { 4904 @CreateInfoTableRow(markingsCounter, Translate("MarkingHead", "Head"), head, false, false, false) 4905 markingsCounter++; 4906 } 4907 @if (!string.IsNullOrWhiteSpace(frontLeft)) 4908 { 4909 @CreateInfoTableRow(markingsCounter, Translate("MarkingFrontLeft", "Front left"), frontLeft, false, false, false) 4910 markingsCounter++; 4911 } 4912 @if (!string.IsNullOrWhiteSpace(frontRight)) 4913 { 4914 @CreateInfoTableRow(markingsCounter, Translate("MarkingFrontRight", "Front right"), frontRight, false, false, false) 4915 markingsCounter++; 4916 } 4917 @if (!string.IsNullOrWhiteSpace(rearLeft)) 4918 { 4919 @CreateInfoTableRow(markingsCounter, Translate("MarkingRearLeft", "Rear left"), rearLeft, false, false, false) 4920 markingsCounter++; 4921 } 4922 @if (!string.IsNullOrWhiteSpace(rearRight)) 4923 { 4924 @CreateInfoTableRow(markingsCounter, Translate("MarkingRearRight", "Rear right"), rearRight, false, false, false) 4925 markingsCounter++; 4926 } 4927 @if (!string.IsNullOrWhiteSpace(misc)) 4928 { 4929 @CreateInfoTableRow(markingsCounter, Translate("MarkingMiscellaneous", "Miscellaneous"), misc, false, false, false) 4930 markingsCounter++; 4931 } 4932 </div> 4933 } 4934 } 4935 </div> 4936 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4937 <div class="horse-detail-item" id="horse-detail-item-register" data-content="tab_general"> 4938 @if (isMyHorse || isBredByMe) 4939 { 4940 var predicates = horse.Predicates; 4941 if (predicates != null && predicates.Any()) 4942 { 4943 predicates = predicates.OrderByDescending(p => p.Date).ToList(); 4944 4945 var predicateCounter = 0; 4946 <div class="breedersinfo infotable"> 4947 <h2>@Translate("RegisterHistory", "Register history")</h2> 4948 @CreateInfoTableRow(predicateCounter, Translate("Register", "Register"), Translate("FromDate", "From date"), true) 4949 @foreach (var predicate in predicates) 4950 { 4951 var date = ""; 4952 if (predicate.Date != null && !predicate.Date.Equals(DateTime.MinValue)) 4953 { 4954 date = predicate.Date.ToShortDateString(); 4955 } 4956 4957 @CreateInfoTableRow(predicateCounter, predicate.PredicateName, date, false, false, false) 4958 predicateCounter++; 4959 } 4960 </div> 4961 } 4962 } 4963 </div> 4964 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4965 <div class="horse-detail-item" id="horse-detail-item-breeding-direction" data-content="tab_general"> 4966 @*NIET BESCHIKBAAR*@ 4967 </div> 4968 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4969 <div class="horse-detail-item hidden" id="horse-detail-item-achievements" data-content="tab_achievements"> 4970 @{ 4971 var getInspectionLineairScores = false; 4972 var myPerformanceInfo = horse.SportPerformanceMotherline; 4973 var mySportsLevels = Kwpn.Repository.Helpers.FormatHelpers.CreateSportniveauList(horse.SportResults); 4974 List<Kwpn.Models.ApiModels.InspectionInformationModel> inspections = horse.Inspections; 4975 List<Kwpn.Models.ApiModels.InspectionInformationModel> abilityTests = horse.AbilityTests; 4976 } 4977 <h2>@Translate("Achievements", "Achievements")</h2> 4978 4979 @*SportsInfo*@ 4980 <div class="achievements infotable"> 4981 @CreateInfoTableRow(0, Translate("SportsName", "Sportsname"), horse.SportsName, false, false, false, false) 4982 @CreateInfoTableRow(1, Translate("SportsLevel", "Sports level"), mySportsLevels, false, false, false, false) 4983 </div> 4984 4985 @*Inspections*@ 4986 @if (!isApprovedStud && inspections != null && inspections.Any()) 4987 { 4988 getInspectionLineairScores = true; 4989 var inspectionCounter = 0; 4990 <h2>@Translate("Inspections", "Inspections")</h2> 4991 <div class="table-responsive"> 4992 <table id="inspectionstable"> 4993 <tr class="tableheader"> 4994 <th>@Translate("DateAndInspectionType", "Date and inspection type")</th> 4995 <th>@Translate("Location", "Location")</th> 4996 <th>@Translate("Scores", "Scores")</th> 4997 <th>@Translate("Result", "Result")</th> 4998 <td>&nbsp;</td> 4999 </tr> 5000 @foreach (Kwpn.Models.ApiModels.InspectionInformationModel inspection in inspections.OrderByDescending(i => i.DateFrom)) 5001 { 5002 var inspectionDateLocation = ""; 5003 if (inspection.DateFrom != null) 5004 { 5005 inspectionDateLocation = inspection.DateFrom.ToShortDateString(); 5006 } 5007 if (!string.IsNullOrWhiteSpace(inspection.InspectionDescription)) 5008 { 5009 if (!string.IsNullOrWhiteSpace(inspectionDateLocation)) 5010 { 5011 inspectionDateLocation = string.Format("{0},<br />", inspectionDateLocation); 5012 } 5013 inspectionDateLocation = string.Format("{0}{1}", inspectionDateLocation, inspection.InspectionDescription); 5014 } 5015 string premiumPlacing = ""; 5016 if (inspection.Participations != null && inspection.Participations.Count > 0) 5017 { 5018 premiumPlacing = string.Format("{0} {1}", inspection.Participations[0].Premium, inspection.Participations[0].Placing).Trim(); 5019 } 5020 5021 // modulo for row color display 5022 var mod = "0"; 5023 if (inspectionCounter % 2 == 0) 5024 { 5025 mod = "1"; 5026 } 5027 <tr class="mod-@mod"> 5028 <td>@inspectionDateLocation</td> 5029 <td>@inspection.Place</td> 5030 <td class="scores" data-inspectioncode="@inspection.InspectionCode"></td> 5031 <td>@premiumPlacing</td> 5032 <td class="center"> 5033 @if (inspection.Participations != null && inspection.Participations.Count > 0 && 5034 inspection.Participations[0].ResultAppreciatives != null && inspection.Participations[0].ResultAppreciatives.Count > 0) 5035 { 5036 <span class="toggler" data-identifyer='insp-@inspection.InspectionCode-@inspectionCounter' data-typeclass="inspection-details"><i class="fa fa-plus"></i></span> 5037 } 5038 </td> 5039 </tr> 5040 <tr id="insp-@inspection.InspectionCode-@inspectionCounter" class="inspection-details mod-@mod"> 5041 <td>&nbsp;</td> 5042 <td>&nbsp;</td> 5043 <td colspan="3"> 5044 @if (inspection.Rubrics != null && inspection.Rubrics.Count > 0) 5045 { 5046 @*<b>@inspection.Rubrics[0].Description</b><br />*@ 5047 } 5048 @if (inspection.Participations != null && inspection.Participations.Count > 0) 5049 { 5050 var participation = inspection.Participations[0]; 5051 if (participation.ResultAppreciatives != null && participation.ResultAppreciatives.Count > 0) 5052 { 5053 <div class="inspection-summary"> 5054 <table> 5055 <thead> 5056 <tr> 5057 <th>@Translate("Description", "Description")</th> 5058 <th>@Translate("Value", "Value")</th> 5059 </tr> 5060 </thead> 5061 <tbody> 5062 @foreach (var ResultAppreciative in participation.ResultAppreciatives) 5063 { 5064 <tr> 5065 <td>@ResultAppreciative.Description</td> 5066 <td>@ResultAppreciative.Value</td> 5067 </tr> 5068 } 5069 </tbody> 5070 </table> 5071 </div> 5072 } 5073 } 5074 </td> 5075 </tr> 5076 inspectionCounter++; 5077 } 5078 </table> 5079 </div> 5080 } 5081 5082 @*SportResults*@ 5083 @if (abilityTests != null && abilityTests.Count > 0) 5084 { 5085 var abilityCounter = 0; 5086 <h2>@Translate("AbilityTests", "Ability tests")</h2> 5087 <div class="table-responsive"> 5088 <table id="abilitytesttable"> 5089 <tr class="tableheader"> 5090 <th>@Translate("DateAndInspectionType", "Date and inspection type")</th> 5091 <th>@Translate("Location", "Location")</th> 5092 <th>&nbsp;</th> 5093 <td>&nbsp;</td> 5094 </tr> 5095 @foreach (Kwpn.Models.ApiModels.InspectionInformationModel inspection in abilityTests.OrderByDescending(i => i.DateFrom)) 5096 { 5097 var inspectionDateLocation = ""; 5098 if (inspection.DateFrom != null) 5099 { 5100 inspectionDateLocation = inspection.DateFrom.ToShortDateString(); 5101 } 5102 if (!string.IsNullOrWhiteSpace(inspection.InspectionDescription)) 5103 { 5104 if (!string.IsNullOrWhiteSpace(inspectionDateLocation)) 5105 { 5106 inspectionDateLocation = string.Format("{0},<br />", inspectionDateLocation); 5107 } 5108 inspectionDateLocation = string.Format("{0}{1}", inspectionDateLocation, inspection.InspectionDescription); 5109 } 5110 5111 // modulo for row color display 5112 var mod = "0"; 5113 if (abilityCounter % 2 == 0) 5114 { 5115 mod = "1"; 5116 } 5117 <tr class="mod-@mod"> 5118 <td>@inspectionDateLocation</td> 5119 <td>@inspection.Place</td> 5120 <td>&nbsp;</td> 5121 <td class="center"> 5122 @if (inspection.Participations != null && inspection.Participations.Count > 0 && 5123 inspection.Participations[0].ResultAppreciatives != null && inspection.Participations[0].ResultAppreciatives.Count > 0) 5124 { 5125 <span class="toggler" data-identifyer='at-@inspection.InspectionCode-@abilityCounter' data-typeclass="ability-details"><i class="fa fa-plus"></i></span> 5126 } 5127 </td> 5128 </tr> 5129 <tr id="at-@inspection.InspectionCode-@abilityCounter" class="ability-details mod-@mod"> 5130 <td>&nbsp;</td> 5131 <td colspan="3"> 5132 @if (inspection.Rubrics != null && inspection.Rubrics.Count > 0) 5133 { 5134 @*<b>@inspection.Rubrics[0].Description</b><br />*@ 5135 } 5136 @if (inspection.Participations != null && inspection.Participations.Count > 0) 5137 { 5138 var participation = inspection.Participations[0]; 5139 if (participation.ResultAppreciatives != null && participation.ResultAppreciatives.Count > 0) 5140 { 5141 <div class="ability-summary"> 5142 <table> 5143 <thead> 5144 <tr> 5145 <th>@Translate("Description", "Description")</th> 5146 <th>@Translate("Value", "Value")</th> 5147 </tr> 5148 </thead> 5149 <tbody> 5150 @foreach (var ResultAppreciative in participation.ResultAppreciatives) 5151 { 5152 <tr> 5153 <td>@ResultAppreciative.Description</td> 5154 <td>@ResultAppreciative.Value</td> 5155 </tr> 5156 } 5157 </tbody> 5158 </table> 5159 </div> 5160 } 5161 } 5162 </td> 5163 </tr> 5164 abilityCounter++; 5165 } 5166 </table> 5167 </div> 5168 } 5169 </div> 5170 @SnippetStart("JavascriptsBottom") 5171 5172 <script type="text/javascript"> 5173 $(document).ready(function () { 5174 5175 // toggler initializer 5176 $(".toggler", "#horse-detail-item-achievements").click(function () { 5177 var contentId = $(this).attr("data-identifyer"); 5178 var typeClass = $(this).attr("data-typeclass"); 5179 $("." + typeClass).not("#" + contentId).hide(); 5180 $("." + typeClass).not("#" + contentId).prev().find("span.toggler i").removeClass("fa-minus").addClass("fa-plus"); 5181 var currentToggler = $("#" + contentId).prev().find("span.toggler i"); 5182 if (currentToggler.hasClass("fa-minus")) { 5183 currentToggler.removeClass("fa-minus").addClass("fa-plus"); 5184 } else { 5185 currentToggler.removeClass("fa-plus").addClass("fa-minus"); 5186 } 5187 }); 5188 5189 // Get inspection lineair score documents and attach to inspection 5190 @if (getInspectionLineairScores) 5191 { 5192 <text> 5193 $(".inspectionlineairscore").remove(); 5194 var inspectionlineairscoreApiUrl = "/kwpnwebapi/horses/getinspectionlineairscore/@culture/@animalCode"; 5195 $.getJSON(inspectionlineairscoreApiUrl).done(function (result) { 5196 if (result != null && result.length > 0) { 5197 $.each(result, function (i, inspectionLineairScore) { 5198 var inspectionCode = inspectionLineairScore.Reference; 5199 var inspectionLineairScoreUrl = inspectionLineairScore.URL; 5200 if (inspectionCode != null && inspectionLineairScoreUrl != null) { 5201 var $achievement = $("td.scores[data-inspectioncode=" + inspectionCode + "]", "#inspectionstable"); 5202 if ($achievement.length) { 5203 inspectionLineairScoreUrl = inspectionLineairScoreUrl.replace(/\\/g, "/"); // fix slashes 5204 var inspectionLineairScoreListItem = "<a href=\"" + inspectionLineairScoreUrl + "\" download target=\"_blank\">@Translate("ScoreForm", "Score form")</a><br/>"; 5205 $achievement.append(inspectionLineairScoreListItem); 5206 } 5207 } 5208 }); 5209 } 5210 }).fail(function (jqxhr, textStatus, error) { 5211 var err = textStatus + ", " + error; 5212 console.error("Request GetInspectionLineairScore Failed: " + err); 5213 }); 5214 </text> 5215 } 5216 5217 }); 5218 </script> 5219 @SnippetEnd("JavascriptsBottom") 5220 5221 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5222 <div class="horse-detail-item hidden" id="horse-detail-item-achievements-motherline" data-content="tab_achievements_motherline"> 5223 @{ 5224 var performanceInfo = horse.SportPerformanceMotherline; 5225 var performanceItems = performanceInfo.lstItems; 5226 var achievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(performanceItems, culture); 5227 5228 var motherName = performanceInfo.MAnimalname; 5229 var motherItems = performanceInfo.lstItemsM; 5230 var motherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(motherItems, culture); 5231 5232 var grandMotherName = performanceInfo.MMAnimalname; 5233 var grandMotherItems = performanceInfo.lstItemsMM; 5234 var grandMotherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(grandMotherItems, culture); 5235 5236 var greatGrandMotherName = performanceInfo.MMMAnimalname; 5237 var greatGrandMotherItems = performanceInfo.lstItemsMMM; 5238 var greatGrandMotherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(greatGrandMotherItems, culture); 5239 } 5240 5241 <h2>@Translate("AchievementsMotherLine", "Achievements mother line")</h2> 5242 5243 @if (performanceItems != null && performanceItems.Any()) 5244 { 5245 var name = Kwpn.Repository.Helpers.HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, null); 5246 5247 <div class="motherline infotable"> 5248 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), name, false, false, false) 5249 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), achievements, false, false, false) 5250 </div> 5251 } 5252 <br /> 5253 <div class="motherline-mother infotable"> 5254 <h3>@Translate("Mother", "Mother")</h3> 5255 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), motherName, false, false, false) 5256 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), motherAchievements, false, false, false) 5257 </div> 5258 <br /> 5259 <div class="motherline-mother infotable"> 5260 <h3>@Translate("MothersMother", "Mothers mother")</h3> 5261 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), grandMotherName, false, false, false) 5262 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), grandMotherAchievements, false, false, false) 5263 </div> 5264 <br /> 5265 <div class="motherline-mother infotable"> 5266 <h3>@Translate("MothersMothersMother", "Mothers mothers mother")</h3> 5267 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), greatGrandMotherName, false, false, false) 5268 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), greatGrandMotherAchievements, false, false, false) 5269 </div> 5270 </div> 5271 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5272 <div class="horse-detail-item hidden" id="horse-detail-item-genetic-profile" data-content="tab_genetic_profile"> 5273 @if (Kwpn.Repository.Helpers.HorseHelper.CheckIfMyHorse(animalCode) && FormatHelpers.CalculateAgeAsInt(horse.DateOfBirth.Value) < 3) 5274 { 5275 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5276 <div class="modal fade" id="extra-settings" tabindex="-1" role="dialog" aria-labelledby="extra-settings-modal" aria-hidden="true"> 5277 <div class="modal-dialog"> 5278 <div class="modal-content"> 5279 <div class="modal-header">@Translate("ExtraSettingsModalHeader", "Extra settings")</div> 5280 <div class="modal-body"> 5281 <div> 5282 <h2 class="name"></h2> 5283 </div> 5284 <div id="modal-genetic-profile-loading"> 5285 <i class='fa fa-spinner fa-spin'></i> 5286 </div> 5287 <div id="modal-genetic-profile" class="hidden"> 5288 @Translate("ExtraSettingsModal_GeneticProfileText", "") 5289 <input type="checkbox" name="genetic-profile-hidden" id="genetic-profile-hidden" /> 5290 <label for="genetic-profile-hidden">@Translate("ExtraSettingsModal_GeneticProfileLabel", "The genetic profile is hidden")</label> 5291 <br /> 5292 <div id="genetic-profile-moderator" class="hidden small">@Translate("ExtraSettingsModal_GeneticProfileLastEditedBy", "Last change by ")<span class="small"></span></div> 5293 </div> 5294 </div> 5295 <div class="modal-footer"> 5296 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("Close", "Close")</a> 5297 </div> 5298 </div> 5299 </div> 5300 </div> 5301 <p> 5302 <button type="button" 5303 class="btn btn-settings-gp" 5304 data-horsecode="@animalCode" 5305 data-horseinfo="@horseName (@lifeNumber)" 5306 data-toggle="tooltip" 5307 data-genetic-profile="true" 5308 title="@Translate("HorseSettings", "Extra settings").JsEncode().ToUpper()"> 5309 <i class="fa fa-gear"></i> 5310 </button> 5311 </p> 5312 @SnippetStart("JavascriptsBottom") 5313 <script> 5314 5315 var geneticProfileSettingChanged = false; 5316 5317 function MailGeneticProfileSetting(animalcode, value) { 5318 var geneticProfileSettingsApi = "/kwpnwebapi/horses/mailgeneticprofilesetting/@Dynamicweb.Frontend.PageView.Current().AreaID/" + animalcode + "/" + value; 5319 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5320 if (!result) { 5321 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrongSendingEmail", "Something went wrong while sending email")", customClass: layout.notifyCopyrightMessageClass }); 5322 } 5323 }).fail(function (jqxhr, textStatus, error) { 5324 var err = textStatus + ", " + error; 5325 console.error("MailGeneticProfileSetting Failed: " + err); 5326 }); 5327 } 5328 5329 function SetGeneticProfileSetting(animalcode, value) { 5330 5331 var geneticProfileSettingsApi = "/kwpnwebapi/horses/setgeneticprofilesetting/" + animalcode + "/" + value; 5332 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5333 if (result != null) { 5334 $("#genetic-profile-moderator span").text(result.HideGeneticProfileLastChangedBy); 5335 $("#genetic-profile-moderator").removeClass("hidden"); 5336 geneticProfileSettingChanged = true; 5337 MailGeneticProfileSetting(animalcode, value); 5338 } else { 5339 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 5340 } 5341 }).fail(function (jqxhr, textStatus, error) { 5342 var err = textStatus + ", " + error; 5343 console.error("SetGeneticProfileSetting Failed: " + err); 5344 }); 5345 } 5346 5347 function ActivateExtraSettingsButtons() { 5348 5349 $(".btn-settings-gp").click(function (e) { 5350 5351 // defaults 5352 $("#modal-genetic-profile-loading").removeClass("hidden"); 5353 $("#genetic-profile-hidden").prop("checked", false); 5354 $("#modal-genetic-profile").addClass("hidden"); 5355 $("#genetic-profile-moderator").addClass("hidden"); 5356 $("#genetic-profile-moderator span").empty(); 5357 5358 // set modal text 5359 var horseInfo = $(this).attr("data-horseinfo"); 5360 $("#extra-settings h2").text(horseInfo); 5361 5362 var showGeneticProfile = $(this).attr("data-genetic-profile"); 5363 if (showGeneticProfile === "true") { 5364 5365 // get current value 5366 var horseCode = $(this).attr("data-horsecode"); 5367 var geneticProfileSettingsApi = "/kwpnwebapi/horses/getgeneticprofilesetting/" + horseCode; 5368 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5369 if (result) { 5370 5371 if (result.HideGeneticProfile) { 5372 $("#genetic-profile-hidden").prop("checked", true); 5373 } 5374 5375 if (result.HideGeneticProfileLastChangedBy.length > 0) { 5376 $("#genetic-profile-moderator span").text(result.HideGeneticProfileLastChangedBy); 5377 $("#genetic-profile-moderator").removeClass("hidden") 5378 } 5379 5380 $("#genetic-profile-hidden").off("click").on("click", function () { 5381 SetGeneticProfileSetting(horseCode, $('#genetic-profile-hidden').is(':checked')); 5382 }); 5383 5384 $("#modal-genetic-profile").removeClass("hidden"); 5385 } else { 5386 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 5387 } 5388 5389 $("#modal-genetic-profile-loading").addClass("hidden"); 5390 }).fail(function (jqxhr, textStatus, error) { 5391 var err = textStatus + ", " + error; 5392 console.error("GetGeneticProfileSettings Failed: " + err); 5393 }); 5394 } 5395 5396 // show modal 5397 $("#extra-settings").modal("show"); 5398 5399 // prevent row click 5400 e.stopPropagation(); 5401 5402 }); 5403 5404 $(document).on('hide.bs.modal', '#extra-settings', function () { 5405 if (geneticProfileSettingChanged) { 5406 if (!alert("@Translate("ReloadForChanges", "The page must be refreshed for the change to take effect.")")) location.reload(); 5407 } 5408 5409 }); 5410 } 5411 5412 $(document).ready(function () { 5413 ActivateExtraSettingsButtons(); 5414 }); 5415 5416 </script> 5417 @SnippetEnd("JavascriptsBottom") 5418 } 5419 @if (showGeneticProfileBasedOnRegister) 5420 { 5421 List<BreedingValuesModel> geneticProfile = horse.BreedingValues; 5422 if (geneticProfile != null && geneticProfile.Any()) 5423 { 5424 var geneticProfileIntro = Translate("GeneticProfileIntro", ""); 5425 var geneticProfileRowCounter = 0; 5426 5427 var legend = Kwpn.Repository.Helpers.HorseHelper.GetGeneticProfileLegend(culture); 5428 var sportIndex = geneticProfile.Where(profile => 5429 { 5430 var val = profile.BreedingValues.Where(breedingVal => breedingVal.Description.Contains("Sport index")).ToList(); 5431 return val.Count > 0; 5432 }).ToList(); 5433 5434 var dressageJumping = geneticProfile.Where(profile => 5435 { 5436 var val = profile.BreedingValues.Where(breedingVal => breedingVal.Description == "Dressuur (GFW)" || breedingVal.Description == "Springen (GFW)").ToList(); 5437 return val.Count > 0; 5438 }).ToList(); 5439 5440 var userIsLoggedIn = Dynamicweb.Frontend.LogOnHandler.IsUserLoggedIn; 5441 5442 if (sportIndex.Count > 0) 5443 { 5444 <h2>@Translate("Sportindex", "Sportindex")</h2> 5445 <p>@Translate("Sportindex_intro", "")</p> 5446 5447 foreach (var breedingValuesTable in sportIndex) 5448 { 5449 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description.Contains("Sport index"))) 5450 { 5451 var breedingValueValue = 0; 5452 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5453 5454 var description = breedingValue.Description + ": " + breedingValueValue; 5455 if(breedingValue.Reliability != null) 5456 { 5457 description += "(" + breedingValue.Reliability + ")"; 5458 } 5459 5460 <p>@description</p> 5461 } 5462 } 5463 } 5464 5465 <h2>@Translate("GeneticProfile", "Genetic profile")</h2> 5466 5467 if (horse.PublicationTypes != null && horse.PublicationTypes.Any()) 5468 { 5469 foreach (var publicationTypes in horse.PublicationTypes) 5470 { 5471 @Translate($"GeneticProfile_Intro_{publicationTypes}", "") 5472 } 5473 } 5474 5475 if (!string.IsNullOrWhiteSpace(geneticProfileIntro) && !geneticProfileIntro.Equals("GeneticProfileIntro")) 5476 { 5477 if (!geneticProfileIntro.StartsWith("<p>", StringComparison.InvariantCultureIgnoreCase)) 5478 { 5479 geneticProfileIntro = string.Format("<p>{0}</p>", geneticProfileIntro); 5480 } 5481 if (!string.IsNullOrWhiteSpace(geneticProfileIntro) && geneticProfileIntro.Contains("{legend}") && !string.IsNullOrEmpty(legend)) 5482 { 5483 geneticProfileIntro = geneticProfileIntro.Replace("{legend}", $"<a href='javascript:void(0);' class='legend-opener'>{Translate("GeneticProfileIntro_LegendLinkText", "legend")}</a>"); 5484 } 5485 @geneticProfileIntro 5486 } 5487 5488 <div class="table-responsive"> 5489 <table width="600" class="genetic-profile-table"> 5490 <colgroup> 5491 <col class="description" /> 5492 <col class="percentage" /> 5493 <col class="minimum" /> 5494 <col class="value" /> 5495 <col class="value" /> 5496 <col class="value" /> 5497 <col class="value" /> 5498 <col class="value" /> 5499 <col class="value" /> 5500 <col class="value" /> 5501 <col class="value" /> 5502 <col class="value" /> 5503 <col class="value" /> 5504 <col class="maximum" /> 5505 </colgroup> 5506 <tr class="index"> 5507 <td>&nbsp;</td> 5508 <th>@Translate("Btbh.", "Btbh.")</th> 5509 <td>&nbsp;</td> 5510 <th class="value stars">***</th> 5511 <th class="value stars">**</th> 5512 <th class="value stars">*</th> 5513 <th colspan="4" class="average">@Translate("Avarage", "Avarage")</th> 5514 <th class="value stars">*</th> 5515 <th class="value stars">**</th> 5516 <th class="value stars">***</th> 5517 <td>&nbsp;</td> 5518 </tr> 5519 <tr class="spacer"> 5520 <td>&nbsp;</td> 5521 <td>&nbsp;</td> 5522 <td>&nbsp;</td> 5523 <td>&nbsp;</td> 5524 <td>&nbsp;</td> 5525 <td>&nbsp;</td> 5526 <td>&nbsp;</td> 5527 <td>&nbsp;</td> 5528 <td>&nbsp;</td> 5529 <td>&nbsp;</td> 5530 <td>&nbsp;</td> 5531 <td>&nbsp;</td> 5532 <td>&nbsp;</td> 5533 <td>&nbsp;</td> 5534 </tr> 5535 5536 @if (userIsLoggedIn && isMyHorse && dressageJumping.Count > 0) 5537 { 5538 foreach (var breedingValuesTable in dressageJumping) 5539 { 5540 5541 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description == "Dressuur (GFW)" || breedingVal.Description == "Springen (GFW)")) 5542 { 5543 // modulo for row color display 5544 var mod = "0"; 5545 if (geneticProfileRowCounter % 2 == 0) { mod = "1"; } 5546 5547 var breedingValueValue = 0; 5548 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5549 5550 var description = breedingValue.Description; 5551 if (!string.IsNullOrWhiteSpace(breedingValue.TypeCalculation)) 5552 { 5553 description = $"{description} ({breedingValue.TypeCalculation})"; 5554 } 5555 5556 <tr class="table-row mod-@mod"> 5557 <td class="description nowrap">@description</td> 5558 <td class="percentage"> 5559 @if (breedingValuesTable == geneticProfile.First()) 5560 { 5561 @breedingValue.Reliability 5562 } 5563 </td> 5564 <td class="minimum">@breedingValue.Minimum</td> 5565 @HorseHelper.GetGeneticProfileValues(breedingValueValue, breedingValue.Differentiation, showGeneticProfileBasedOnOwnerSettings) 5566 <td class="maximum">@breedingValue.Maximum</td> 5567 </tr> 5568 5569 geneticProfileRowCounter++; 5570 } 5571 5572 } 5573 <tr class="spacer"> 5574 <td>&nbsp;</td> 5575 <td>&nbsp;</td> 5576 <td>&nbsp;</td> 5577 <td>&nbsp;</td> 5578 <td>&nbsp;</td> 5579 <td>&nbsp;</td> 5580 <td>&nbsp;</td> 5581 <td>&nbsp;</td> 5582 <td>&nbsp;</td> 5583 <td>&nbsp;</td> 5584 <td>&nbsp;</td> 5585 <td>&nbsp;</td> 5586 <td>&nbsp;</td> 5587 <td>&nbsp;</td> 5588 </tr> 5589 } 5590 @foreach (var breedingValuesTable in geneticProfile) 5591 { 5592 if (breedingValuesTable.BreedingValues != null && breedingValuesTable.BreedingValues.Count > 0) 5593 { 5594 geneticProfileRowCounter = 0; 5595 <tr class="table-caption"> 5596 <th colspan="14"> 5597 @breedingValuesTable.Type 5598 @if (breedingValuesTable != geneticProfile.First()) 5599 { 5600 var relia = breedingValuesTable.BreedingValues.FirstOrDefault(); 5601 if (relia != null) 5602 { 5603 @relia.Reliability 5604 } 5605 } 5606 </th> 5607 </tr> 5608 } 5609 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description != "Dressuur (GFW)" && breedingVal.Description != "Springen (GFW)" && !breedingVal.Description.Contains("Sport index"))) 5610 { 5611 5612 // modulo for row color display 5613 var mod = "0"; 5614 if (geneticProfileRowCounter % 2 == 0) { mod = "1"; } 5615 5616 var breedingValueValue = 0; 5617 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5618 5619 var description = breedingValue.Description; 5620 if (!string.IsNullOrWhiteSpace(breedingValue.TypeCalculation)) 5621 { 5622 description = $"{description} ({breedingValue.TypeCalculation})"; 5623 } 5624 5625 <tr class="table-row mod-@mod"> 5626 <td class="description nowrap">@description</td> 5627 <td class="percentage"> 5628 @if (breedingValuesTable == geneticProfile.First()) 5629 { 5630 @breedingValue.Reliability 5631 } 5632 </td> 5633 <td class="minimum">@breedingValue.Minimum</td> 5634 @HorseHelper.GetGeneticProfileValues(breedingValueValue, breedingValue.Differentiation, showGeneticProfileBasedOnOwnerSettings) 5635 <td class="maximum">@breedingValue.Maximum</td> 5636 </tr> 5637 5638 geneticProfileRowCounter++; 5639 } 5640 <tr class="spacer"> 5641 <td>&nbsp;</td> 5642 <td>&nbsp;</td> 5643 <td>&nbsp;</td> 5644 <td>&nbsp;</td> 5645 <td>&nbsp;</td> 5646 <td>&nbsp;</td> 5647 <td>&nbsp;</td> 5648 <td>&nbsp;</td> 5649 <td>&nbsp;</td> 5650 <td>&nbsp;</td> 5651 <td>&nbsp;</td> 5652 <td>&nbsp;</td> 5653 <td>&nbsp;</td> 5654 <td>&nbsp;</td> 5655 </tr> 5656 } 5657 </table> 5658 </div> 5659 5660 if (!string.IsNullOrWhiteSpace(legend)) 5661 { 5662 <div class="modal fade" id="legend" tabindex="-1" role="dialog" aria-labelledby="legend-modal" aria-hidden="true"> 5663 <div class="modal-dialog"> 5664 <div class="modal-content"> 5665 <div class="modal-header"> 5666 @Translate("GeneticProfileIntro_LegendHeader", "Legend") 5667 <a class="orange_arrow_link close-model" data-dismiss="modal" href="javascript:void(0);">@Translate("GeneticProfileIntro_LegendClose", "Close")</a> 5668 </div> 5669 <div class="modal-body legend-body"> 5670 @legend 5671 </div> 5672 <div class="modal-footer"> 5673 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("GeneticProfileIntro_LegendClose", "Close")</a> 5674 </div> 5675 </div> 5676 </div> 5677 </div> 5678 @SnippetStart("JavascriptsBottom") 5679 <script> 5680 $(document).ready(function () { 5681 // legend modal opener 5682 $(".legend-opener").off("click").on("click", function () { 5683 $("#legend").modal("show"); 5684 }); 5685 }); 5686 </script> 5687 @SnippetEnd("JavascriptsBottom") 5688 } 5689 } 5690 } 5691 </div> 5692 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5693 @* 5694 Note: 5695 5696 Variables like "action/isAlive/isMyHorse/isMare/horse/culture/animalCode/showMemberContent/etc..." are set in the parent: Paragraph/HorseDatabase.cshtml 5697 5698 This content is ALWAYS available for mares. 5699 This content is available if the horse is mine 5700 5701 Always show: 5702 - gender 5703 - horse name 5704 - date of birth 5705 - register 5706 - sports level <-- NOT AVAILABLE IN SearchAnimalResultItemModel 5707 When the parent is a mare then show: 5708 - father name 5709 When the parent is NOT a mare then show: 5710 - mother name <-- NOT AVAILABLE IN SearchAnimalResultItemModel 5711 - mothers father name 5712 *@ 5713 <div class="horse-detail-item hidden" id="horse-detail-item-offspring" data-content="tab_offspring"> 5714 @if (isMare || isMyHorse) 5715 { 5716 var offspring = horse.Offspring; 5717 <h2>@Translate("Offspring", "Offspring")</h2> 5718 <div class="table-responsive"> 5719 @if (offspring != null && offspring.Any()) 5720 { 5721 <table id="offspringTable" class="horsesTable"> 5722 <thead> 5723 <tr> 5724 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5725 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5726 @if (isMare) 5727 { 5728 <th data-sortOn="Father" data-sortBy="Asc">@Translate("Father", "Father")<i class="fa"></i></th> 5729 } 5730 else 5731 { 5732 @*<th data-sortOn="Mother" data-sortBy="Asc">@Translate("Mother", "Mother")<i class="fa"></i></th>*@ 5733 <th data-sortOn="MothersFather" data-sortBy="Asc">@Translate("MothersFather", "Mothers father")<i class="fa"></i></th> 5734 } 5735 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5736 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 5737 <th data-sortOn="SportsLevel" data-sortBy="Asc">@Translate("SportsLevel", "Sports level")<i class="fa"></i></th> 5738 5739 </tr> 5740 </thead> 5741 5742 @foreach (var child in offspring.OrderByDescending(c => c.DateOfBirth)) 5743 { 5744 var childGenderClass = "fa-question"; 5745 var childGenderImage = ""; 5746 var childGenderAbbr = ""; 5747 var childGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5748 var childIsAlive = child.DateOfDeath == null; 5749 Enum.TryParse(child.Gender.ToUpper(), out childGender); 5750 switch (childGender) 5751 { 5752 case Kwpn.Models.Enumerations.Gender.HENGST: 5753 childGenderClass = "fa-mars"; 5754 childGenderAbbr = Translate("Stallion", "Stallion"); 5755 break; 5756 case Kwpn.Models.Enumerations.Gender.MERRIE: 5757 childGenderClass = "fa-venus"; 5758 childGenderAbbr = Translate("Mare", "Mare"); 5759 break; 5760 case Kwpn.Models.Enumerations.Gender.RUIN: 5761 childGenderClass = "fa-mars"; 5762 childGenderAbbr = Translate("Gelding", "Gelding"); 5763 break; 5764 case Kwpn.Models.Enumerations.Gender.EMBRYO: 5765 childGenderClass = ""; 5766 childGenderAbbr = Translate("Embryo", "Embryo"); 5767 childGenderImage = "<img src=\"/Files/Templates/Designs/Kwpn/Images/StyleElements/Icon_Embryo_20x20.png\" />"; 5768 break; 5769 } 5770 5771 var childIsApprovedStud = child.ApprovedStallion; 5772 var childName = child.AnimalName; // KWPN-1825: DOn't use child.SportsName for offspring 5773 var childDoBirth = ""; 5774 var childYoBirth = ""; 5775 if (child.DateOfBirth.HasValue && !child.DateOfBirth.Value.Equals(DateTime.MinValue)) 5776 { 5777 childDoBirth = child.DateOfBirth.Value.ToShortDateString(); 5778 childYoBirth = child.DateOfBirth.Value.Year.ToString(); 5779 } 5780 5781 var childsFather = child.Father; 5782 var childsMothersFather = child.MothersFather; 5783 var childSportsLevel = child.SportResult; 5784 5785 <tr @(!childGender.Equals(Kwpn.Models.Enumerations.Gender.EMBRYO) ? $" class=\"clickable\" onclick=\"document.location.href='{Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, child.AnimalCode)}';\"" : "") data-horsecode="@child.AnimalCode"> 5786 <td class="nowrap"> 5787 <i class="fa @childGenderClass">@childGenderImage</i> 5788 @if (!childIsAlive) 5789 { 5790 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5791 } 5792 @if (childIsApprovedStud) 5793 { 5794 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5795 } 5796 </td> 5797 <td class="nowrap">@childName</td> 5798 @if (isMare) 5799 { 5800 <td>@childsFather</td> 5801 } 5802 else 5803 { 5804 @*<td>-</td> mother*@ 5805 <td>@childsMothersFather</td> 5806 } 5807 <td><div data-toggle="tooltip" @(!childGender.Equals(Kwpn.Models.Enumerations.Gender.EMBRYO) ? $" title='{childDoBirth}'" : "")>@childYoBirth</div></td> 5808 <td style="width:150px" class="ellipsis"><div data-toggle="tooltip" title="@child.Register.JsEncode()">@child.Register</div></td> 5809 <td>@childSportsLevel</td> 5810 5811 </tr> 5812 } 5813 </table> 5814 } 5815 else 5816 { 5817 <p>@Translate("NoRegisteredOffspring", "No registered offspring")</p> 5818 } 5819 </div> 5820 } 5821 </div> 5822 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5823 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 5824 <div class="horse-detail-item hidden" id="horse-detail-item-approved-offspring" data-content="tab_approved_offspring"> 5825 @if (isApprovedStud) 5826 { 5827 var approvedOffspring = horse.ApprovedOffspring; 5828 var approvedOffspring2ndGen = horse.ApprovedOffspringGrandchild; 5829 5830 if ((approvedOffspring != null && approvedOffspring.Any()) || (approvedOffspring2ndGen != null && approvedOffspring2ndGen.Any())) 5831 { 5832 if (approvedOffspring != null && approvedOffspring.Any()) 5833 { 5834 <h2>@Translate("ApprovedOffspring1stGen", "Approved offspring 1st generation")</h2> 5835 <div class="table-responsive"> 5836 <table id="offspring1GenTable" class="horsesTable"> 5837 <thead> 5838 <tr> 5839 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5840 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5841 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5842 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 5843 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 5844 @*<th data-sortOn="Mother" data-sortBy="Asc">@Translate("MothersMotherFatherName", "Mothers mothers father")<i class="fa"></i></th>*@ 5845 </tr> 5846 </thead> 5847 @foreach (var offspring1Gen in approvedOffspring) 5848 { 5849 // SearchAnimalResultModel 5850 5851 var offspring1GenGenderClass = "fa-question"; 5852 var offspring1GenGenderAbbr = ""; 5853 var offspring1GenGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5854 var offspring1GenIsAlive = offspring1Gen.DateOfDeath == null; 5855 Enum.TryParse(offspring1Gen.Gender.ToUpper(), out offspring1GenGender); 5856 switch (offspring1GenGender) 5857 { 5858 case Kwpn.Models.Enumerations.Gender.HENGST: 5859 offspring1GenGenderClass = "fa-mars"; 5860 offspring1GenGenderAbbr = Translate("Stallion", "Stallion"); 5861 break; 5862 case Kwpn.Models.Enumerations.Gender.MERRIE: 5863 offspring1GenGenderClass = "fa-venus"; 5864 offspring1GenGenderAbbr = Translate("Mare", "Mare"); 5865 break; 5866 case Kwpn.Models.Enumerations.Gender.RUIN: 5867 offspring1GenGenderClass = "fa-mars"; //fa-mars-stroke-h 5868 offspring1GenGenderAbbr = Translate("Gelding", "Gelding"); 5869 break; 5870 } 5871 5872 var offspring1GenName = offspring1Gen.AnimalName; 5873 if (!string.IsNullOrWhiteSpace(offspring1Gen.SportsName)) 5874 { 5875 offspring1GenName = offspring1Gen.SportsName; 5876 } 5877 5878 var offspring1GenDoBirth = ""; 5879 var offspring1GenYoBirth = ""; 5880 if (offspring1Gen.DateOfBirth.HasValue && !offspring1Gen.DateOfBirth.Value.Equals(DateTime.MinValue)) 5881 { 5882 offspring1GenDoBirth = offspring1Gen.DateOfBirth.Value.ToShortDateString(); 5883 offspring1GenYoBirth = offspring1Gen.DateOfBirth.Value.Year.ToString(); 5884 } 5885 5886 var offspring1GenFather = offspring1Gen.Father; 5887 var offspring1GenMothersFather = offspring1Gen.MothersFather; 5888 var offspring1GenIsApprovedStud = offspring1Gen.ApprovedStallion; 5889 5890 <tr class="clickable" onclick="document.location.href='@HorseHelper.GetHorseInfoPageUrl(culture, offspring1Gen.AnimalCode)';" data-horsecode="@offspring1Gen.AnimalCode"> 5891 <td class="nowrap"> 5892 <i class="fa @offspring1GenGenderClass"></i> 5893 @if (!offspring1GenIsAlive) 5894 { 5895 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5896 } 5897 @if (offspring1GenIsApprovedStud) 5898 { 5899 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5900 } 5901 </td> 5902 <td>@offspring1GenName</td> 5903 <td><div data-toggle="tooltip" title="@offspring1GenDoBirth">@offspring1GenYoBirth</div></td> 5904 <td>@offspring1Gen.Color</td> 5905 <td><span class="nowrap">@offspring1GenFather</span> x <span class="nowrap">@offspring1GenMothersFather</span></td> 5906 </tr> 5907 } 5908 </table> 5909 </div> 5910 } 5911 5912 if (approvedOffspring2ndGen != null && approvedOffspring2ndGen.Any()) 5913 { 5914 <h2>@Translate("ApprovedOffspring2ndGen", "Approved offspring 2nd generation")</h2> 5915 <div class="table-responsive"> 5916 <table id="offspring2GenTable" class="horsesTable"> 5917 <thead> 5918 <tr> 5919 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5920 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5921 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5922 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 5923 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 5924 </tr> 5925 </thead> 5926 @foreach (var offspring2Gen in approvedOffspring2ndGen) 5927 { 5928 // SearchAnimalResultModel 5929 var offspring2GenGenderClass = "fa-question"; 5930 var offspring2GenGenderAbbr = ""; 5931 var offspring2GenGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5932 var offspring2GenIsAlive = offspring2Gen.DateOfDeath == null; 5933 Enum.TryParse(offspring2Gen.Gender.ToUpper(), out offspring2GenGender); 5934 switch (offspring2GenGender) 5935 { 5936 case Kwpn.Models.Enumerations.Gender.HENGST: 5937 offspring2GenGenderClass = "fa-mars"; 5938 offspring2GenGenderAbbr = Translate("Stallion", "Stallion"); 5939 break; 5940 case Kwpn.Models.Enumerations.Gender.MERRIE: 5941 offspring2GenGenderClass = "fa-venus"; 5942 offspring2GenGenderAbbr = Translate("Mare", "Mare"); 5943 break; 5944 case Kwpn.Models.Enumerations.Gender.RUIN: 5945 offspring2GenGenderClass = "fa-mars"; 5946 offspring2GenGenderAbbr = Translate("Gelding", "Gelding"); 5947 break; 5948 } 5949 5950 var offspring2GenName = offspring2Gen.AnimalName; 5951 if (!string.IsNullOrWhiteSpace(offspring2Gen.SportsName)) 5952 { 5953 offspring2GenName = offspring2Gen.SportsName; 5954 } 5955 5956 var offspring2GenDoBirth = ""; 5957 var offspring2GenYoBirth = ""; 5958 if (offspring2Gen.DateOfBirth.HasValue && !offspring2Gen.DateOfBirth.Value.Equals(DateTime.MinValue)) 5959 { 5960 offspring2GenDoBirth = offspring2Gen.DateOfBirth.Value.ToShortDateString(); 5961 offspring2GenYoBirth = offspring2Gen.DateOfBirth.Value.Year.ToString(); 5962 } 5963 5964 var offspring2GenFather = offspring2Gen.Father; 5965 var offspring2GenMothersFather = offspring2Gen.MothersFather; 5966 var offspring2GenIsApprovedStud = offspring2Gen.ApprovedStallion; 5967 5968 <tr class="clickable" onclick="document.location.href='@HorseHelper.GetHorseInfoPageUrl(culture, offspring2Gen.AnimalCode)';" data-horsecode="@offspring2Gen.AnimalCode"> 5969 <td class="nowrap"> 5970 <i class="fa @offspring2GenGenderClass"></i> 5971 @if (!offspring2GenIsAlive) 5972 { 5973 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5974 } 5975 @if (offspring2GenIsApprovedStud) 5976 { 5977 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5978 } 5979 </td> 5980 <td class="nowrap">@offspring2GenName</td> 5981 <td><div data-toggle="tooltip" title="@offspring2GenDoBirth">@offspring2GenYoBirth</div></td> 5982 <td>@offspring2Gen.Color</td> 5983 <td><span class="nowrap">@offspring2GenFather</span> x <span class="nowrap">@offspring2GenMothersFather</span></td> 5984 </tr> 5985 } 5986 </table> 5987 </div> 5988 } 5989 } 5990 else 5991 { 5992 <h2>@Translate("ApprovedOffspring", "Approved offspring")</h2> 5993 <p>@Translate("NoApprovedOffspring", "No approved offspring")</p> 5994 } 5995 } 5996 </div> 5997 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5998 @*note: variables like "showMemberContent/horseHasMemberContentOverride/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 5999 <div class="horse-detail-item hidden" id="horse-detail-item-performance-report" data-content="tab_performance_report"> 6000 @if (isApprovedStud) 6001 { 6002 <h2>@Translate("PerformanceReport", "Performance report")</h2> 6003 var performanceReportText = ""; 6004 if (reports != null) 6005 { 6006 var performanceReport = reports.Where( 6007 r => r.Language.Equals(language, StringComparison.OrdinalIgnoreCase) && 6008 r.Type.Equals(Kwpn.Models.Enumerations.ReportType.Verrichtingsverslag.ToString(), StringComparison.OrdinalIgnoreCase) 6009 ).FirstOrDefault(); 6010 6011 if (performanceReport != null) 6012 { 6013 performanceReportText = Kwpn.Repository.Helpers.FormatHelpers.CleanEquisText(performanceReport.Report); 6014 } 6015 } 6016 if (!string.IsNullOrWhiteSpace(performanceReportText)) 6017 { 6018 @performanceReportText 6019 } 6020 else 6021 { 6022 <p>@Translate("NoPerformanceReport", "No registered performance report")</p> 6023 } 6024 } 6025 </div> 6026 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6027 @*note: variables like "showMemberContent/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 6028 <div class="horse-detail-item hidden" id="horse-detail-item-performance-figures" data-content="tab_performance_figures"> 6029 @if (isApprovedStud) 6030 { 6031 var performanceFigures = horse.PerformancetestScores; 6032 if (performanceFigures != null && performanceFigures.Any()) 6033 { 6034 var performanceFigureCounter = 0; 6035 <h2>@Translate("PerformanceFigures", "Performance test scores")</h2> 6036 <div class="performance-figures infotable"> 6037 @CreateInfoTableRow(performanceFigureCounter, Translate("Description", "Description"), Translate("Value", "Value"), true) 6038 @foreach (var figure in performanceFigures) 6039 { 6040 //PerformancetestScoreModel 6041 @CreateInfoTableRow(performanceFigureCounter, figure.Description, figure.Value, false, false, false) 6042 performanceFigureCounter++; 6043 } 6044 </div> 6045 } 6046 else 6047 { 6048 <p>@Translate("NoPerformanceFigures", "No registered test scores")</p> 6049 } 6050 } 6051 </div> 6052 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6053 <div class="horse-detail-item hidden" id="horse-detail-item-breeding-registration" data-content="tab_breeding_registration"> 6054 @if (isApprovedStud) 6055 { 6056 var breedingRegistrations = horse.BreedingRegistrations; 6057 if (breedingRegistrations != null && breedingRegistrations.Any()) 6058 { 6059 var breedingRegistrationCounter = 0; 6060 <div class="breedingRegistrations infotable"> 6061 <h2>@Translate("BreedingRegistration", "Breeding registration")</h2> 6062 @foreach (var breedingRegistration in breedingRegistrations) 6063 { 6064 @CreateInfoTableRow(breedingRegistrationCounter, breedingRegistration.Description, breedingRegistration.Value, false, false, false) 6065 breedingRegistrationCounter++; 6066 } 6067 </div> 6068 } 6069 } 6070 </div> 6071 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6072 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 6073 <div class="horse-detail-item hidden" id="horse-detail-item-descendant-report" data-content="tab_descendant_report"> 6074 @if (isApprovedStud) 6075 { 6076 <h2>@Translate("DescendantsReport", "Descendants report")</h2> 6077 var descendantsReportText = ""; 6078 if (reports != null) 6079 { 6080 var descendantsReport = reports.Where( 6081 r => r.Language.Equals(language, StringComparison.OrdinalIgnoreCase) && 6082 r.Type.Equals(Kwpn.Models.Enumerations.ReportType.Afstammelingenrapport.ToString(), StringComparison.OrdinalIgnoreCase) 6083 ).FirstOrDefault(); 6084 6085 if (descendantsReport != null) 6086 { 6087 descendantsReportText = Kwpn.Repository.Helpers.FormatHelpers.CleanEquisText(descendantsReport.Report); 6088 } 6089 } 6090 6091 if (!string.IsNullOrWhiteSpace(descendantsReportText)) 6092 { 6093 @descendantsReportText 6094 } 6095 else 6096 { 6097 <p>@Translate("NoDescendantsReport", "No registered descendants report")</p> 6098 } 6099 } 6100 </div> 6101 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6102 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 6103 <div class="horse-detail-item hidden" id="horse-detail-item-availability" data-content="tab_availability"> 6104 @if (isApprovedStud) 6105 { 6106 <h2>@Translate("Availability", "Availability")</h2> 6107 var spermAvailables = horse.SpermAvailables; 6108 if (spermAvailables != null && spermAvailables.Any()) 6109 { 6110 <div class="table-responsive"> 6111 <table id="availability-sperm"> 6112 <thead> 6113 <tr> 6114 <th>@Translate("Type", "Type")</th> 6115 <th>@Translate("StudStation", "Stud station")</th> 6116 <th>@Translate("TelephoneNumber", "Telephone number")</th> 6117 <th>@Translate("Website", "Website")</th> 6118 </tr> 6119 </thead> 6120 6121 @foreach (var spermAvailability in spermAvailables) 6122 { 6123 //SpermAvailableModel 6124 var telephone = spermAvailability.Telephone; 6125 if (!string.IsNullOrWhiteSpace(spermAvailability.Mobile)) 6126 { 6127 if (!string.IsNullOrWhiteSpace(telephone) && !telephone.Equals(spermAvailability.Mobile)) 6128 { 6129 telephone = string.Format("{0}, ", telephone); 6130 telephone = string.Format("{0}{1}", telephone, spermAvailability.Mobile); 6131 } 6132 else 6133 { 6134 telephone = spermAvailability.Mobile; 6135 } 6136 } 6137 if (string.IsNullOrWhiteSpace(telephone)) 6138 { 6139 telephone = "-"; 6140 } 6141 6142 var website = spermAvailability.Website; 6143 if (!string.IsNullOrWhiteSpace(website)) 6144 { 6145 var websiteText = ""; 6146 var websiteUrl = ""; 6147 website = website.ToLower(); 6148 if (website.Contains("://")) 6149 { 6150 websiteText = new Uri(website).PathAndQuery; 6151 websiteUrl = website; 6152 } 6153 else 6154 { 6155 websiteText = website; 6156 websiteUrl = string.Format("http://{0}", website); 6157 } 6158 website = string.Format("<a href=\"{0}\" target=\"blank\" title=\"{2}: {1}\">{2}</a>", websiteUrl, websiteText, Translate("GoToWebsite", "Go to website").JsEncode()); 6159 } 6160 else 6161 { 6162 website = "-"; 6163 } 6164 <tr> 6165 <td>@spermAvailability.Type</td> 6166 <td>@spermAvailability.StallionOwner</td> 6167 <td>@telephone</td> 6168 <td>@website</td> 6169 </tr> 6170 } 6171 </table> 6172 </div> 6173 } 6174 else 6175 { 6176 <p>@Translate("AvailabilityUnknown", "Availability unknown")</p> 6177 } 6178 } 6179 </div> 6180 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6181 <div class="horse-detail-item hidden" id="horse-detail-item-breederinfo" data-content="tab_breeders_info" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6182 <div class="breederinfo-panel hidden" id="breeder-data"> 6183 <div class="row"> 6184 <div class="col-xs-12"> 6185 <h2>@Translate("BreederInfo_Title", "About") <span class="breeder-name"></span></h2> 6186 <table> 6187 <tr id="breeder-website-row" class="hidden"> 6188 <td>@Translate("BreederInfo_Website", "Website"):</td> 6189 <td class="js-content" id="breeder-website"></td> 6190 </tr> 6191 </table> 6192 </div> 6193 </div> 6194 <div class="row"> 6195 @{ 6196 var currentUrl = System.Web.HttpContext.Current.Request.Url.PathAndQuery; 6197 } 6198 <div class="col-xs-12" id="quick-links"> 6199 <i class="fa fa-spinner fa-spin" id="quick-links-loader"></i> 6200 <a class="hidden" href="#breeder-products">@Translate("BreederInfo_QuickLink_BreedingProducts", "Breeding products")</a> 6201 <a class="hidden" href="#breeder-horses">@Translate("BreederInfo_QuickLink_Horses", "Owned horses")</a> 6202 <a class="hidden" href="#breeder-horsesforsale">@Translate("BreederInfo_QuickLink_HorsesForSale", "Horses for sale")</a> 6203 <a class="hidden" href="#breeder-horsenews">@Translate("BreederInfo_QuickLink_HorsesNews", "Horses to name and breeding products in the news")</a> 6204 <a class="hidden" href="#breeder-performance">@Translate("BreederInfo_QuickLink_Performance", "")</a> 6205 <a class="hidden" href="#breeder-contact">@Translate("BreederInfo_QuickLink_Contact", "Contact this breeder")</a> 6206 </div> 6207 </div> 6208 </div> 6209 <div class="breederinfo-panel hidden" id="breeder-products" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6210 <div class="background"> 6211 <div class="row"> 6212 <div class="col-xs-12"> 6213 <h2> 6214 <a href="javascript:void(0);" class="breeder-products-toggler"> 6215 @Translate("BreederInfo_BreedingProducts", "Breeding products") <span id="breeder-products-counter" class="js-content"></span> 6216 <i class="fa fa-chevron-down rotated"></i> 6217 </a> 6218 </h2> 6219 </div> 6220 </div> 6221 @{ 6222 var productsIntro = Translate("BreederInfo_BreedingProductsIntro", ""); 6223 if (!string.IsNullOrWhiteSpace(productsIntro)) 6224 { 6225 <div class="row breeder-products-data"> 6226 <div class="col-xs-12"> 6227 @productsIntro 6228 </div> 6229 </div> 6230 } 6231 } 6232 <div class="row filter-row breeder-products-data"> 6233 <div id="breeder-products-too-many-results" class="col-xs-12 hidden"> 6234 <p>@Translate("BreederInfo_Products_TooManySearchResults", "Your search gave <span id='breeder-products-too-many-results2'></span> results, of which we show the first 100. Please use filtering and sorting to find what you are looking for.")</p> 6235 </div> 6236 <div class="col-xs-12 col-md-4"> 6237 <div class="input-group"> 6238 <input type="text" class="form-control" id="breeder-products-filter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 6239 <span class="input-group-addon" id="btn-breeder-products-filter"><i class="fa fa-search"></i></span> 6240 </div> 6241 </div> 6242 <div class="col-xs-12 col-md-4"> 6243 <div class="input-group"> 6244 <input type="checkbox" class="form-control" id="breeder-products-showdeadhorses" /> 6245 <label for="breeder-products-showdeadhorses">@Translate("ShowDeadHorses", "Show dead horses")</label> 6246 </div> 6247 </div> 6248 </div> 6249 <div class="row breeder-products-data"> 6250 <div class="col-xs-12"> 6251 <div class="table-responsive" style="zoom: 0.9;"> 6252 <table id="breeder-products-table"> 6253 <thead> 6254 <tr> 6255 <th data-sortOn="Gender" data-sortBy="Asc"><span class="hidden-xs hidden-sm">@Translate("Gender", "Gender")<i class="fa"></i></span></th> 6256 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6257 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6258 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6259 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6260 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6261 </tr> 6262 </thead> 6263 <tbody class="js-content"></tbody> 6264 </table> 6265 </div> 6266 </div> 6267 </div> 6268 </div> 6269 </div> 6270 <div class="breederinfo-panel hidden" id="breeder-horses" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6271 <div class="background"> 6272 <div class="row"> 6273 <div class="col-xs-12"> 6274 <h2> 6275 <a href="javascript:void(0);" class="breeder-horses-toggler"> 6276 @Translate("BreederInfo_Horses", "Owned horses") <span id="breeder-horses-counter" class="js-content"></span> 6277 <i class="fa fa-chevron-down rotated"></i> 6278 </a> 6279 </h2> 6280 </div> 6281 </div> 6282 @{ 6283 var horsesIntro = Translate("BreederInfo_HorsesIntro", ""); 6284 if (!string.IsNullOrWhiteSpace(horsesIntro)) 6285 { 6286 <div class="row breeder-horses-data"> 6287 <div class="col-xs-12"> 6288 @horsesIntro 6289 </div> 6290 </div> 6291 } 6292 } 6293 <div class="row filter-row breeder-horses-data"> 6294 <div id="breeder-horses-too-many-results" class="col-xs-12 hidden"> 6295 <p>@Translate("BreederInfo_Horses_TooManySearchResults", "Your search gave <span id='breeder-horses-too-many-results2'></span> results, of which we show the first 100. Please use filtering and sorting to find what you are looking for.")</p> 6296 </div> 6297 <div class="col-xs-12 col-md-4"> 6298 <div class="input-group"> 6299 <input type="text" class="form-control" id="breeder-horses-filter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 6300 <span class="input-group-addon" id="btn-breeder-horses-filter"><i class="fa fa-search"></i></span> 6301 </div> 6302 </div> 6303 <div class="col-xs-12 col-md-4"> 6304 <div class="input-group"> 6305 <input type="checkbox" class="form-control" id="breeder-horses-showdeadhorses" /> 6306 <label for="breeder-horses-showdeadhorses">@Translate("ShowDeadHorses", "Show dead horses")</label> 6307 </div> 6308 </div> 6309 </div> 6310 <div class="row breeder-horses-data"> 6311 <div class="col-xs-12"> 6312 <div class="table-responsive" style="zoom: 0.9;"> 6313 <table id="breeder-horses-table"> 6314 <thead> 6315 <tr> 6316 <th data-sortOn="Gender" data-sortBy="Asc"><span class="hidden-xs hidden-sm">@Translate("Gender", "Gender")<i class="fa"></i></span></th> 6317 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6318 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6319 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6320 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6321 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6322 </tr> 6323 </thead> 6324 <tbody class="js-content"></tbody> 6325 </table> 6326 </div> 6327 </div> 6328 </div> 6329 </div> 6330 </div> 6331 <div class="breederinfo-panel marketplace-topx hidden" id="breeder-horsesforsale"> 6332 <div class="row"> 6333 <div class="col-xs-12"> 6334 <h2> 6335 <a href="javascript:void(0);" class="breeder-horsesforsale-toggler"> 6336 @Translate("BreederInfo_HorsesForSale", "Horses for sale") <span id="breeder-horsesforsale-counter" class="js-content"></span> 6337 <i class="fa fa-chevron-down rotated"></i> 6338 </a> 6339 </h2> 6340 </div> 6341 </div> 6342 @{ 6343 var forSaleIntro = Translate("BreederInfo_HorsesForSaleIntro", ""); 6344 if (!string.IsNullOrWhiteSpace(forSaleIntro)) 6345 { 6346 <div class="row breeder-horsesforsale-data"> 6347 <div class="col-xs-12"> 6348 @forSaleIntro 6349 </div> 6350 </div> 6351 } 6352 } 6353 <div class="row breeder-horsesforsale-data"> 6354 <div class="col-xs-12 result-container js-content" id="breeder-horsesforsale-adverts"> 6355 </div> 6356 </div> 6357 </div> 6358 <div class="breederinfo-panel hidden" id="breeder-horsenews"> 6359 <div class="row"> 6360 <div class="col-xs-12"> 6361 <h2> 6362 <a href="javascript:void(0);" class="breeder-horsenews-toggler"> 6363 @Translate("BreederInfo_HorsesNews", "Horses to name and breeding products in the news") <span id="breeder-horsenews-counter" class="js-content"></span> 6364 <i class="fa fa-chevron-down rotated"></i> 6365 </a> 6366 </h2> 6367 </div> 6368 </div> 6369 @{ 6370 var newsIntro = Translate("BreederInfo_NewsIntro", ""); 6371 if (!string.IsNullOrWhiteSpace(newsIntro)) 6372 { 6373 <div class="row breeder-horsenews-data"> 6374 <div class="col-xs-12"> 6375 @newsIntro 6376 </div> 6377 </div> 6378 } 6379 } 6380 <div class="row breeder-horsenews-data"> 6381 <div class="col-xs-12 js-content" id="breeder-horsenews-items"> 6382 6383 </div> 6384 </div> 6385 </div> 6386 <div class="breederinfo-panel hidden" id="breeder-performance"> 6387 <div class="row"> 6388 <div class="col-xs-12"> 6389 <h2> 6390 <a href="javascript:void(0);" class="breeder-performance-toggler"> 6391 @Translate("BreederInfo_Performance", "Performance") <i class="fa fa-chevron-down rotated"></i> 6392 </a> 6393 </h2> 6394 </div> 6395 </div> 6396 @{ 6397 var performanceIntro = Translate("BreederInfoPerformanceIntro", ""); 6398 if (!string.IsNullOrWhiteSpace(performanceIntro)) 6399 { 6400 <div class="row breeder-performance-data"> 6401 <div class="col-xs-12"> 6402 @performanceIntro 6403 </div> 6404 </div> 6405 } 6406 } 6407 <div class="row breeder-performance-data"> 6408 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g").ToLower()"> 6409 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g"))</h3> 6410 <div class="table-responsive" style="zoom: 0.9;"> 6411 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g").ToLower()-table"> 6412 <thead> 6413 <tr> 6414 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6415 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6416 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6417 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6418 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6419 </tr> 6420 </thead> 6421 <tbody class="js-content"></tbody> 6422 </table> 6423 </div> 6424 </div> 6425 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g").ToLower()"> 6426 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g"))</h3> 6427 <div class="table-responsive" style="zoom: 0.9;"> 6428 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g").ToLower()-table"> 6429 <thead> 6430 <tr> 6431 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6432 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6433 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6434 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6435 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6436 </tr> 6437 </thead> 6438 <tbody class="js-content"></tbody> 6439 </table> 6440 </div> 6441 </div> 6442 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g").ToLower()"> 6443 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g"))</h3> 6444 <div class="table-responsive" style="zoom: 0.9;"> 6445 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g").ToLower()-table"> 6446 <thead> 6447 <tr> 6448 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6449 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6450 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6451 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6452 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6453 </tr> 6454 </thead> 6455 <tbody class="js-content"></tbody> 6456 </table> 6457 </div> 6458 </div> 6459 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g").ToLower()"> 6460 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g"))</h3> 6461 <div class="table-responsive" style="zoom: 0.9;"> 6462 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g").ToLower()-table"> 6463 <thead> 6464 <tr> 6465 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6466 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6467 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6468 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6469 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6470 </tr> 6471 </thead> 6472 <tbody class="js-content"></tbody> 6473 </table> 6474 </div> 6475 </div> 6476 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()"> 6477 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g"))</h3> 6478 <div class="table-responsive" style="zoom: 0.9;"> 6479 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()-table"> 6480 <thead> 6481 <tr> 6482 <td></td> 6483 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6484 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6485 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6486 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6487 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6488 </tr> 6489 </thead> 6490 <tbody class="js-content"></tbody> 6491 </table> 6492 </div> 6493 </div> 6494 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g").ToLower()"> 6495 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g"))</h3> 6496 <div class="table-responsive" style="zoom: 0.9;"> 6497 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g").ToLower()-table"> 6498 <thead> 6499 <tr> 6500 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6501 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6502 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6503 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6504 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6505 </tr> 6506 </thead> 6507 <tbody class="js-content"></tbody> 6508 </table> 6509 </div> 6510 </div> 6511 </div> 6512 </div> 6513 <div class="breederinfo-panel hidden" id="breeder-contact"> 6514 <div class="row"> 6515 <div class="col-xs-12"> 6516 <h2> 6517 <a href="javascript:void(0);" class="breeder-contact-toggler"> 6518 @Translate("BreederInfo_Contact", "Contact") <span class="breeder-name"></span> 6519 <i class="fa fa-chevron-down rotated"></i> 6520 </a> 6521 </h2> 6522 </div> 6523 </div> 6524 @{ 6525 var contactIntro = Translate("BreederInfo_ContactIntro", ""); 6526 if (!string.IsNullOrWhiteSpace(contactIntro)) 6527 { 6528 <div class="row breeder-contact-data"> 6529 <div class="col-xs-12"> 6530 @contactIntro 6531 </div> 6532 </div> 6533 } 6534 } 6535 <div class="row breeder-contact-data form-body"> 6536 <div class="col-xs-12"> 6537 <div class="form-group"> 6538 6539 @*NAME*@ 6540 <div class="form-inline"> 6541 <label class="control-label col-sm-3" for="Breeder_Contact_Name">@Translate("BreederInfo_Contact_Name", "Name") *</label> 6542 <input type="text" class="form-control hide-hints" id="Breeder_Contact_Name" name="Breeder_Contact_Name" value="" required /> 6543 </div> 6544 6545 @*EMAIL*@ 6546 <div class="form-inline"> 6547 <label class="control-label col-sm-3" for="Breeder_Contact_EmailAddress">@Translate("BreederInfo_Contact_EmailAddress", "Email address") *</label> 6548 <input type="email" class="form-control hide-hints" id="Breeder_Contact_EmailAddress" name="Breeder_Contact_EmailAddress" value="" required /> 6549 </div> 6550 6551 @*PHONE*@ 6552 <div class="form-inline"> 6553 <label class="control-label col-sm-3" for="Breeder_Contact_Phone">@Translate("BreederInfo_Contact_Phone", "Phone number")</label> 6554 <input type="text" class="form-control hide-hints" id="Breeder_Contact_Phone" name="Breeder_Contact_Phone" value="" /> 6555 </div> 6556 6557 @*City*@ 6558 <div class="form-inline"> 6559 <label class="control-label col-sm-3" for="Breeder_Contact_City">@Translate("City", "City")</label> 6560 <input type="text" class="form-control hide-hints" id="Breeder_Contact_City" name="Breeder_Contact_City" value="" /> 6561 </div> 6562 6563 @*QUESTION*@ 6564 <div class="form-inline"> 6565 <label class="control-label col-sm-3" for="Breeder_Contact_Question">@Translate("BreederInfo_Contact_Question", "Question") *</label> 6566 <textarea class="form-control hide-hints" id="Breeder_Contact_Question" name="Breeder_Contact_Question" placeholder="@Translate("BreederInfo_Contact_Question_Placeholder", "What's on your mind?")" cols="36" rows="5" required></textarea> 6567 </div> 6568 6569 <div class="form-inline"> 6570 <div class="col-sm-offset-3 form-end"> 6571 6572 @{ 6573 var reCaptchaSiteKey = Kwpn.Models.Constants.StringConstants.ApplicationVariables.RecaptchaSiteKey; 6574 var useReCaptcha = !string.IsNullOrEmpty(reCaptchaSiteKey); 6575 6576 if (useReCaptcha) 6577 { 6578 <button class="submitBtn g-recaptcha" 6579 id="Breeder_Contact_Submit" 6580 name="Breeder_Contact_Submit" 6581 data-sitekey="@reCaptchaSiteKey" 6582 data-callback="breederContactCheckReCaptcha" 6583 data-action="submit" 6584 data-badge="inline" 6585 defaultText="@Translate("BreederInfo_Contact_Submit", "Submit").JsEncode()"> 6586 @Translate("BreederInfo_Contact_Submit", "Submit") 6587 </button> 6588 6589 @SnippetStart("JavascriptsBottom") 6590 <script> 6591 function breederContactCheckReCaptcha(token) { 6592 BreederInfoHelper.SubmitContactForm(token); 6593 } 6594 6595 $(document).ready(function () { 6596 6597 // handle recaptcha terms 6598 $("input[type=text], input[type=email]", ".breeder-contact-data").focusin(function () { 6599 $("body > div > .grecaptcha-badge").css("visibility", "visible"); 6600 }); 6601 $("input[type=text], input[type=email]", ".breeder-contact-data").focusout(function () { 6602 $("body > div > .grecaptcha-badge").css("visibility", "hidden"); 6603 }); 6604 }); 6605 </script> 6606 @SnippetEnd("JavascriptsBottom") 6607 } 6608 else 6609 { 6610 <button id="Breeder_Contact_Submit" 6611 class="g-recaptcha submitBtn" 6612 type="button" 6613 defaultText="@Translate("BreederInfo_Contact_Submit", "Submit").JsEncode()" 6614 onclick="BreederInfoHelper.SubmitContactForm();"> 6615 @Translate("BreederInfo_Contact_Submit", "Submit") 6616 </button> 6617 } 6618 6619 6620 } 6621 6622 6623 6624 </div> 6625 </div> 6626 6627 <div class="error"> 6628 <div class="col-sm-offset-3"> 6629 <span class="all-required hidden">@Translate("BreederInfo_Contact_AllFieldsRequired", "All fields are required")</span> 6630 <span class="email-invalid hidden">@Translate("BreederInfo_Contact_EmailInvalid", "The emailaddress is invalid")</span> 6631 <span class="send-error hidden">@Translate("BreederInfo_Contact_SendError", "Something went wrong")</span> 6632 </div> 6633 </div> 6634 </div> 6635 <div class="confirm-text hidden"> 6636 @Translate("BreederInfo_Contact_ConfirmationText", "Thanks. KWPN will send your question to this breeder.") 6637 </div> 6638 </div> 6639 </div> 6640 </div> 6641 <div class="breederinfo-panel hidden static" id="breeder-loadfailed"> 6642 <p>@Translate("BreederInfo_LoadFailed", "Something went wrong while loading the breeder data.")</p> 6643 </div> 6644 @SnippetStart("JavascriptsBottom") 6645 <script id="breeder-horses-item-template" type="text/html"> 6646 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6647 <td class="nowrap"> 6648 <i class="fa ${GenderClass}"></i><span class="hidden-xs hidden-sm"> ${GenderAbbr}</span> 6649 {{if !IsAlive}} 6650 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 6651 {{/if}} 6652 {{if IsApprovedStud}} 6653 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 6654 {{/if}} 6655 </td> 6656 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6657 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6658 <td>${Register}</td> 6659 <td>${Color}</td> 6660 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6661 </tr> 6662 </script> 6663 <script id="breeder-advert-template" type="text/html"> 6664 <div class="col-xs-12 col-sm-6 col-md-3"> 6665 <a href="${advertLink}" data-horsecode="${animalCode}"> 6666 <div class="advert {{if isTopAdvert}} topadvert {{/if}}"> 6667 <div class="photo" style="background-image: url('{{if photo1 > ""}}${photo1}{{else}}/Files/Templates/Designs/Kwpn/Images/Marketplace_NoImg.jpg{{/if}}');"> 6668 {{if isTopAdvert}}<div class="topadd">@Translate("Marketplace_TopAdvertIndicator", "Top add")</div>{{/if}} 6669 <div class="datesince">@Translate("Marketplace_Since", "Since") ${MarketplaceHelper.GetSinceDate(dateFrom, "@Dynamicweb.Frontend.PageView.Current().Area.Culture.ToLower()")} </div> 6670 </div> 6671 <div class="specs"> 6672 <div class="row"> 6673 <div class="col-xs-3 text-center"> 6674 <div class="gender"> 6675 {{if gender == '@Kwpn.Models.Enumerations.Gender.HENGST.ToString()'}} 6676 <i class="fa fa-mars" title="@Translate(Kwpn.Models.Enumerations.Gender.HENGST.ToString())"></i> 6677 {{/if}} 6678 {{if gender == '@Kwpn.Models.Enumerations.Gender.RUIN.ToString()'}} 6679 <i class="fa fa-mars" title="@Translate(Kwpn.Models.Enumerations.Gender.RUIN.ToString())"></i> 6680 {{/if}} 6681 {{if gender == '@Kwpn.Models.Enumerations.Gender.MERRIE.ToString()'}} 6682 <i class="fa fa-venus" title="@Translate(Kwpn.Models.Enumerations.Gender.MERRIE.ToString())"></i> 6683 {{/if}} 6684 </div> 6685 </div> 6686 <div class="col-xs-9 text-left" style="margin-left: -15px;"> 6687 <div class="name"> 6688 ${animalName}{{if age >= 0}}, ${age} @Translate("Marketplace_Years", "Years"){{/if}} 6689 </div> 6690 <div class="pedigree"> 6691 ${fatherName} x ${mothersFatherName} 6692 </div> 6693 <div class="price">${priceLabel}</div> 6694 </div> 6695 </div> 6696 </div> 6697 </div> 6698 </a> 6699 </div> 6700 </script> 6701 <script id="breeder-horsenews-template" type="text/html"> 6702 <div class="col-xs-12"> 6703 <span class="date">${MarketplaceHelper.GetSinceDate(NewsDate, "@Dynamicweb.Frontend.PageView.Current().Area.Culture.ToLower()")}</span> 6704 <span class="horses"> 6705 {{each(key, value) Horses}} 6706 <span class="horse"><a href="${key}">${value}</a></span> 6707 {{/each}} 6708 </span> 6709 <a href="${NewsLink}"> 6710 <span class="title">${NewsTitle}</span> 6711 </a> 6712 </div> 6713 </script> 6714 <script id="breeder-performance-item-template" type="text/html"> 6715 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6716 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6717 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6718 <td>${Register}</td> 6719 <td>${Color}</td> 6720 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6721 </tr> 6722 </script> 6723 <script id="breeder-performance-item-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()-template" type="text/html"> 6724 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6725 <td><img src="images/horseimage.ashx?pc=${HorseCode}" alt="${AnimalName}" /></td> 6726 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6727 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6728 <td>${Register}</td> 6729 <td>${Color}</td> 6730 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6731 </tr> 6732 </script> 6733 @SnippetEnd("JavascriptsBottom") 6734 </div> 6735 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6736 <div class="horse-detail-item hidden" id="horse-detail-item-videos" data-content="tab_videos"> 6737 <div id="video-container"></div> 6738 </div> 6739 6740 // SEO VIRTUAL PAGE VIEW LOGGING: GENERALINFO 6741 <Text> 6742 <script> 6743 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_tab_general", "general-info").UrlEncode()).ToLower()"); 6744 </script> 6745 </Text> 6746 6747 } 6748 </article> 6749 </div> 6750 <div class="row"> 6751 <div class="col-xs-12 col-md-10 page-content print-disclaimer"> 6752 @Translate("Print-Disclaimer", "<strong>KWPN Database - &copy; 2017 - Content: KWPN</strong><br /><p>Niets uit de KWPN Database mag zonder uitdrukkelijke toestemming van het KWPN worden overgenomen, vermenigvuldigd en/of openbaar gemaakt, of gebruikt voor herberekening of onderzoek op welke wijze dan ook, met uitzondering van hetgeen in de Auteurswet bepaald is met betrekking tot het reprorecht.</p><p>Het KWPN aanvaardt geen aansprakelijkheid voor schade van welke aard dan ook, die het gevolg is van handelingen en/of beslissingen gebaseerd op informatie van deze site. De door het KWPN verstrekte informatie en berekende fokwaarden op deze website zijn eigendom van het KWPN. De informatie en de fokwaarden zijn bedoeld als voorlichtingsmateriaal en geadviseerd wordt om deze te gebruiken als één van de hulpmiddelen voor selectiedoeleinden. De onderliggende gegevens zijn verzameld in en/of ten behoeve van de KWPN-populatie en de fokwaarden die hieruit zijn voortgekomen zijn van toepassing op de KWPN-populatie. Het KWPN heeft uiterste zorgvuldigheid betracht bij de totstandkoming van de gepresenteerde informatie. De berekeningen hebben plaatsgevonden op basis van de beschikbare kennis van de populatiegenetica en de regels van uitvoering zijn vastgelegd in de reglementen en/of besluiten van bevoegde organen van het KWPN.</p>") 6753 </div> 6754 </div> 6755 </div> 6756 </div> 6757 </div> 6758 6759 if (isMyHorse) 6760 { 6761 <div class="break-grid content-container hidden" id="refreshcontainer"> 6762 <div class="break-grid-background"> 6763 <div class="in-grid"> 6764 <div class="row"> 6765 <div class="col-xs-12 col-md-7"> 6766 <i class='fa fa-refresh fa-spin fa-3x fa-fw'></i><span class="reloading-text">@Translate("HorseDetailsReloading", "One moment please. We are fetching the horse data from our back-end system.")</span> 6767 </div> 6768 </div> 6769 </div> 6770 </div> 6771 </div> 6772 } 6773 6774 <script> 6775 6776 // We only want the menu interaction on Desktop, so we disable it on mobile screens 6777 // the breakpoint is 991 px. 6778 var pageId = '@Dynamicweb.Frontend.PageView.Current().Page.ID'; 6779 var _mx = 991; 6780 var screenWidth = window.innerWidth; 6781 checkWidth(); 6782 6783 $(window).on('resize', function () { 6784 screenWidth = window.innerWidth 6785 checkWidth(); 6786 openAsideOnFirstPagevisit(); 6787 }); 6788 6789 function enable_menu_slide() { 6790 $(".aside-page").on('click', function () { 6791 $(this).find('.bg_aside').toggleClass("closed") 6792 $(this).find('.bg_aside').toggleClass("open") 6793 }); 6794 } 6795 6796 function checkWidth() { 6797 if (screenWidth > _mx) { 6798 enable_menu_slide(); 6799 } else { 6800 $(".aside-page").unbind(); 6801 } 6802 } 6803 6804 function openAsideOnFirstPagevisit() { 6805 if (sessionStorage.getItem('popState' + pageId) != 'shown' && screenWidth > _mx && screenWidth <= '1346') { 6806 $(".bg_aside").delay(2000).toggleClass("closed open"); 6807 sessionStorage.setItem('popState' + pageId, 'shown'); 6808 } 6809 } 6810 6811 $(document).ready(function () { 6812 6813 // Open aside menu on first page visit 6814 openAsideOnFirstPagevisit(); 6815 6816 // Open and close tabs 6817 $('i.fa-chevron-down').on('click', function () { 6818 $(this).toggleClass('fa-rotate-180'); 6819 $(this).parent().next().toggleClass('open_tab'); 6820 }); 6821 6822 // Handle go back 6823 $(".go-back").click(function (event) { 6824 event.preventDefault(); 6825 history.back(1); 6826 }); 6827 6828 // Handle breeder click 6829 @if (hasBreeders) { 6830 <text> 6831 $(".breeder-link").off("click").on("click", function () { 6832 var breederPersonCode = $(this).data("personcode"); 6833 BreederInfoHelper.InitializeBreeder(breederPersonCode, false); 6834 // SEO VIRTUAL PAGE VIEW LOGGING 6835 SEO.trackPageView("@seoPage.ToLower()/@Translate("SEO_TrackPageviewPage_Database_tab_breeders_info", "breeders-info").UrlEncode()"); 6836 }); 6837 $(".registered-link").off("click").on("click", function () { 6838 var registeredPersonCode = $(this).data("personcode"); 6839 BreederInfoHelper.InitializeBreeder(registeredPersonCode, true); 6840 // SEO VIRTUAL PAGE VIEW LOGGING 6841 SEO.trackPageView("@seoPage.ToLower()/@Translate("SEO_TrackPageviewPage_Database_tab_registered_info", "registered-info").UrlEncode()"); 6842 }); 6843 </text> 6844 } 6845 }); 6846 </script> 6847 } 6848 } 6849 }

Lidmaatschap KWPN

  • Iedere maand het KWPN Magazine - In de Strengen
  • Onbeperkt toegang tot KWPN.tv
  • Gratis advertenties plaatsen op KWPN Horses for Sale
Word nu lid
€22,- per jaar

JongKWPN lidmaatschap

  • Ben jij tussen de 16 en 30 jaar?
  • Ben jij geïnteresseerd in fokkerij en sport? 

Dan is JongKWPN vast en zeker iets voor jou! JongKWPN biedt een gevarieerd programma. 

Word nu lid

Official Partners


Het KWPN maakt gebruik van cookies

Wij vragen uw akkoord voor het gebruik van cookies op onze website. Meer informatie is beschikbaar in ons cookiebeleid.

Cookiebeleid