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)
at CompiledRazorTemplates.Dynamic.RazorEngine_95904d65be37428a963074b9c8b5de83.Execute() in D:\inetpub\wwwroot\www.kwpn.nl\Files\Templates\Designs\Kwpn\Paragraph\HorseDatabase.cshtml:line 128
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 @using System.Web.Mvc; 2025 @using Kwpn.Core.Services.Abstract; 2026 @using Kwpn.Models.Enumerations; 2027 @using Kwpn.Core.Helpers; 2028 2029 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2030 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 2031 @*DEFAULT ASIDE*@ 2032 2033 @{ 2034 var currentUser = Kwpn.Repository.Repositories.KwpnUsers.CurrentUser(); 2035 var jumpVideoService = DependencyResolver.Current.GetService<IJumpPortalVideoService>(); 2036 2037 var collection = new Kwpn.Models.Jump.VideoResponse[0]; 2038 if (horse != null && !string.IsNullOrEmpty(horse.AnimalCode)) 2039 { 2040 collection = jumpVideoService.GetVideosByTag(horse.AnimalCode); 2041 } 2042 } 2043 2044 2045 2046 @if (string.IsNullOrWhiteSpace(action)) 2047 { 2048 #region TabLinks 2049 <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> 2050 <div class="list-tabs"> 2051 <ul> 2052 <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> 2053 <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> 2054 <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> 2055 @if (showGeneticProfileBasedOnRegister) 2056 { 2057 <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> 2058 } 2059 @if (isMare || isMyHorse) 2060 { 2061 <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> 2062 } 2063 @if (isApprovedStud) 2064 { 2065 <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> 2066 <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> 2067 <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> 2068 <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> 2069 <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> 2070 <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> 2071 } 2072 @{ 2073 var asideBreeders = breeders?.Where(b => b.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(b.PersonCode)); 2074 if (asideBreeders != null && asideBreeders.Any()) 2075 { 2076 <li data-tab="tab_breeders_info"> 2077 <span class="list-item"> 2078 @(asideBreeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder")):<br /> 2079 @foreach (var breeder in asideBreeders) 2080 { 2081 <span class="breeder-link" data-personcode="@breeder.PersonCode">@breeder.PersonName</span> 2082 } 2083 </span> 2084 </li> 2085 } 2086 2087 } 2088 </ul> 2089 </div> 2090 2091 <script> 2092 $(document).ready(function () { 2093 @if (collection != null && collection.Any()) 2094 { 2095 <text> 2096 $(".list-tabs ul").append("<li data-tab=\"tab_videos\"><a href=\"javascript:void(0);\">@Translate("Videos", "Videos")</a></li>"); 2097 2098 $(".list-tabs li[data-tab=tab_videos] a").click(function () { 2099 var listItem = $(this).parent(); 2100 var tab = listItem.attr("data-tab"); 2101 2102 // remove existing active from tab list 2103 $(".list-tabs li").removeClass("active"); 2104 2105 // add active 2106 listItem.addClass("active"); 2107 2108 // hide all content items 2109 $(".horse-detail-item").addClass("hidden"); 2110 2111 LoadVideos(); 2112 2113 // show items corresponding to current active tab 2114 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 2115 }); 2116 </text> 2117 } 2118 2119 2120 function LoadVideos() { 2121 2122 var videoContent = $("#video-container", "#horse-detail-item-videos"); 2123 2124 } 2125 2126 function ClearVideos() { 2127 var videoContent = $("#video-container", "#horse-detail-item-videos"); 2128 videoContent.html(""); 2129 } 2130 2131 $(".list-tabs a").click(function () { 2132 2133 var listItem = $(this).parent(); 2134 var tab = listItem.attr("data-tab"); 2135 var vp = listItem.attr("data-vp").toLowerCase(); 2136 2137 // remove existing active from tab list 2138 $(".list-tabs li").removeClass("active"); 2139 2140 // add active 2141 listItem.addClass("active"); 2142 2143 // hide all content items 2144 $(".horse-detail-item").addClass("hidden"); 2145 2146 // SEO VIRTUAL PAGE VIEW LOGGING 2147 SEO.trackPageView("@seoPage.ToLower()/" + vp); 2148 2149 // if item is "video", load videos 2150 if (tab == "tab_videos") { 2151 LoadVideos(); 2152 } 2153 else { 2154 ClearVideos(); 2155 } 2156 2157 // show items corresponding to current active tab 2158 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 2159 2160 }); 2161 }); 2162 </script> 2163 @SnippetEnd("JavascriptsBottom") 2164 #endregion 2165 } 2166 2167 @if (string.IsNullOrWhiteSpace(action) && actionShow) 2168 { 2169 #region ActionLinks 2170 <h2 id="listheader-actions" data-childId="list-actions" class="notactive"> 2171 <span>@Translate("Actions", "Actions")</span><i class="fa fa-chevron-down" aria-hidden="true"></i> 2172 </h2> 2173 <div class="list-actions"> 2174 <ul> 2175 @if (actionRegisterHorseToName) 2176 { 2177 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Register_HorseToName", "RegisterHorse"))">@Translate("Action_Register_HorseToName", "Register horse")</a></li> 2178 } 2179 @if (actionSignUpInspectionEvent) 2180 { 2181 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseEventsPageUrl(culture, horse.AnimalCode)">@Translate("Action_SignUp_InspectionEvent", "Sign up for inspection / event")</a></li> 2182 } 2183 2184 @*@if (actionGetStallionAdvice) 2185 { 2186 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"))">@Translate("Action_Request_StallionAdvice", "Stallion advice")</a></li> 2187 }*@ 2188 @if (actionRequestGenomicBreedingValueTest) 2189 { 2190 <li><a href="javascript:void(0);" onclick="javascript:AddHorseToGenomeBreedingValueTest();return false;">@Translate("Action_Request_GenomeBreedingValueTest", "Request DNA/OC research")</a></li> 2191 } 2192 @if (actionSellViaMarketplace) 2193 { 2194 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_SellViaMarketplace", "sell"))">@Translate("Action_SellViaMarketplace", "Sell via KWPN Marketplace")</a></li> 2195 } 2196 @if (actionReportHorseSold) 2197 { 2198 <li><a href="javascript:void(0);" class="horse-sold-button">@Translate("Action_Report_HorseSold", "Report horse as sold")</a></li> 2199 } 2200 @if (actionReportDeceasedHorse) 2201 { 2202 <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> 2203 } 2204 @if (actionInbreedingCalculation) 2205 { 2206 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"))">@Translate("Action_InbreedingCalculation", "Inbreeding calculation")</a></li> 2207 } 2208 @if (actionRequestDuplicate) 2209 { 2210 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Duplicate", "Duplicate"))">@Translate("Action_Request_Duplicate", "Request duplicate")</a></li> 2211 } 2212 @if (actionRequestContinuedPassport) 2213 { 2214 <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> 2215 } 2216 @if (actionRequestPredicates) 2217 { 2218 <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> 2219 } 2220 2221 @if (currentUser != null && currentUser.IsVeterinarian) 2222 { 2223 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.PROK_Research_General">@Translate("Action_PROK_Research_General", "Request PROK")</a></li> 2224 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.PROK_Research_Mares">@Translate("Action_PROK_Research_Mares", "Request PROK mares")</a></li> 2225 2226 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.SPST">@Translate("Action_Request_SPST_Exam", "Request SPST examination")</a></li> 2227 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.OC">@Translate("Action_Request_OC_Exam", "Request OC examination")</a></li> 2228 2229 } 2230 2231 2232 2233 @if (isMyHorse) 2234 { 2235 <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> 2236 } 2237 </ul> 2238 </div> 2239 @SnippetStart("JavascriptsBottom") 2240 <script> 2241 2242 @if (actionRequestGenomicBreedingValueTest) 2243 { 2244 <text> 2245 function AddHorseToGenomeBreedingValueTest() { 2246 var redirectUrl = '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"))'; 2247 // add horse to KwpnUser.GenomeBreedingValueItems 2248 var addHorseUrl = "/kwpnwebapi/forms/research/upserthorse/@horse.AnimalCode"; 2249 $.getJSON(addHorseUrl).done(function () { 2250 window.location.href = redirectUrl; 2251 }).fail(function (jqxhr, textStatus, error) { 2252 var err = textStatus + ", " + error; 2253 console.error("Request AddHorse Failed: " + err); 2254 }); 2255 } 2256 </text> 2257 } 2258 2259 $(document).ready(function () { 2260 2261 @if (isMyHorse) 2262 { 2263 <text> 2264 $("#refresh-link").off("click").on("click", function (e) { 2265 e.preventDefault(); 2266 $(".horse-database").addClass("hidden"); 2267 $("#refreshcontainer").removeClass("hidden"); 2268 var refreshHorse = "/kwpnwebapi/horses/refreshmyhorse/@culture/@horse.AnimalCode/@true"; 2269 $.ajax(refreshHorse).always(function () { 2270 window.location.href = "@System.Web.HttpContext.Current.Request.RawUrl"; 2271 }); 2272 return false; 2273 }); 2274 </text> 2275 } 2276 2277 @* 2278 2279 NOTE: 2280 WHENEVER THE DNA PAGE GOES LIVE AND THIS GETS UNCOMMENTED, 2281 THE 'check if document download links should be added to the action list and if so, do' 2282 JAVASCRIPT BENEITH MUST BE REMOVED !! 2283 2284 // check if any document is available. if so show the DNA page when it is your horse and it isn't an apporved stud 2285 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData() && isMyHorse && !isApprovedStud) 2286 { 2287 <text> 2288 //var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 2289 //$.getJSON(downloadsApiUrl).done(function (result) { 2290 // if (result != null && result.length > 0) { 2291 // 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>'; 2292 // $("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 2293 // } 2294 // }).fail(function (jqxhr, textStatus, error) { 2295 // var err = textStatus + ", " + error; 2296 // console.error("Request Getdownloaddocuments Failed: " + err); 2297 // }); 2298 </text> 2299 }*@ 2300 2301 2302 // check if document download links should be added to the action list and if so, do 2303 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData()) 2304 { 2305 <text> 2306 // download documents 2307 $(".downloaddocument").remove(); 2308 var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 2309 $.getJSON(downloadsApiUrl).done(function (result) { 2310 if (result != null && result.length > 0) { 2311 $.each(result, function (i, downloadDocument) { 2312 var downloadDocumentUrl = downloadDocument.URL; 2313 if (downloadDocumentUrl != null) { 2314 downloadDocumentUrl = downloadDocumentUrl.replace(/\\/g, "/"); // fix slashes 2315 var downloadDocumentLabel = "@Translate("DownloadDocument", "Download document"): " + downloadDocument.TypeDocument; 2316 var downloadDocumentListItem = "<li class=\"downloaddocument\"><a href=\"" + downloadDocumentUrl + "\" download target=\"_blank\">" + downloadDocumentLabel + "</a></li>"; 2317 $("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 2318 } 2319 }); 2320 } 2321 }).fail(function (jqxhr, textStatus, error) { 2322 var err = textStatus + ", " + error; 2323 console.error("Request Getdownloaddocuments Failed: " + err); 2324 }); 2325 </text> 2326 } 2327 2328 2329 }); 2330 </script> 2331 @SnippetEnd("JavascriptsBottom") 2332 #endregion 2333 } 2334 2335 @*ACTION ASIDES*@ 2336 @if (!string.IsNullOrWhiteSpace(action)) 2337 { 2338 var productService = new Dynamicweb.Ecommerce.Products.ProductService(); 2339 var ecomLanguageId = Dynamicweb.Frontend.PageView.Current().Area.EcomLanguageId; 2340 2341 // EVENT SIGN UP 2342 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 2343 actionSignUpInspectionEvent) 2344 { 2345 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 2346 if (eventSignUpProduct != null) 2347 { 2348 <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> 2349 <div class="list-actions"> 2350 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 2351 <colgroup> 2352 <col width="30" /> 2353 <col /> 2354 </colgroup> 2355 <tr class="head"> 2356 <th><i class="fa fa-info"></i></th> 2357 <th>@Translate("Product", "Product")</th> 2358 </tr> 2359 <tr> 2360 <td>&nbsp;</td> 2361 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 2362 </tr> 2363 <tr class="required-services hidden" data-subtotal=""> 2364 <td>&nbsp;</td> 2365 <td class="required-service"></td> 2366 </tr> 2367 <tr class="head"> 2368 <th><i class="fa fa-eur"></i></th> 2369 <th>@Translate("Price", "Price")</th> 2370 </tr> 2371 <tr> 2372 <td>&nbsp;</td> 2373 <td>&euro; <span id="eventSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 2374 </tr> 2375 </table> 2376 </div> 2377 } 2378 } 2379 2380 2381 // CUP EVENT SIGN UP 2382 if (actionSignUpCupEvent) 2383 { 2384 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 2385 if (eventSignUpProduct != null) 2386 { 2387 <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> 2388 <div class="list-actions"> 2389 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 2390 <colgroup> 2391 <col width="30" /> 2392 <col /> 2393 </colgroup> 2394 <tr class="head"> 2395 <th><i class="fa fa-info"></i></th> 2396 <th>@Translate("Product", "Product")</th> 2397 </tr> 2398 <tr> 2399 <td>&nbsp;</td> 2400 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 2401 </tr> 2402 <tr class="required-services hidden" data-subtotal=""> 2403 <td>&nbsp;</td> 2404 <td class="required-service"></td> 2405 </tr> 2406 <tr class="head"> 2407 <th><i class="fa fa-eur"></i></th> 2408 <th>@Translate("Price", "Price")</th> 2409 </tr> 2410 <tr> 2411 <td>&nbsp;</td> 2412 <td><span id="eventCupSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 2413 </tr> 2414 </table> 2415 </div> 2416 } 2417 } 2418 2419 // STALLION ADVICE 2420 else if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2421 actionGetStallionAdvice) 2422 { 2423 <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> 2424 <div class="list-actions"> 2425 <table id="stallion-advice-aside-info" class="aside-content aside-content-info notactive"> 2426 <colgroup> 2427 <col width="30" /> 2428 <col /> 2429 </colgroup> 2430 <tr class="head"> 2431 <th><i class="fa fa-info"></i></th> 2432 <th>Hengsten advies</th> 2433 </tr> 2434 <tr> 2435 <td>&nbsp;</td> 2436 <td>@horseName<br /><span id="stallion-advice-aside-breedingdirection-mare">@horse.BreedingDirection</span></td> 2437 </tr> 2438 </table> 2439 <ul class="aside-content notactive" id="stallion-advice-aside-links"> 2440 <li class="step-0 hidden"><a href='#' onclick="StallionAdvice.ShowStep(0); return false;">@Translate("StallionAdvice_BackToStep0_LinkText", "Explanation")</a></li> 2441 <li class="step-1 hidden"><a href='#' onclick="StallionAdvice.ShowStep(1); return false;">@Translate("StallionAdvice_BackToStep1_LinkText", "Step 1")</a></li> 2442 <li class="step-2 hidden"><a href='#' onclick="StallionAdvice.ShowStep(2); return false;">@Translate("StallionAdvice_BackToStep2_LinkText", "Step 2")</a></li> 2443 </ul> 2444 </div> 2445 } 2446 2447 // CONTINUED PASSPORT 2448 else if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 2449 actionRequestContinuedPassport) 2450 { 2451 var passportRenewalProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.PassportRenewal, ecomLanguageId); 2452 if (passportRenewalProduct != null) 2453 { 2454 <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> 2455 <div class="list-actions"> 2456 <table id="passport-renewal-aside-info" class="aside-content aside-content-info notactive"> 2457 <colgroup> 2458 <col width="30" /> 2459 <col /> 2460 </colgroup> 2461 <tr class="head"> 2462 <th><i class="fa fa-info"></i></th> 2463 <th>@Translate("Product", "Product")</th> 2464 </tr> 2465 <tr> 2466 <td>&nbsp;</td> 2467 <td>@passportRenewalProduct.Name</td> 2468 </tr> 2469 <tr class="head"> 2470 <th><i class="fa fa-eur"></i></th> 2471 <th>@Translate("Price", "Price")</th> 2472 </tr> 2473 <tr> 2474 <td>&nbsp;</td> 2475 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(passportRenewalProduct)) (@Translate("VatIncluded", "VAT included"))</td> 2476 </tr> 2477 </table> 2478 </div> 2479 } 2480 } 2481 2482 // PASSPORT DUPLICATE 2483 else if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 2484 actionRequestDuplicate) 2485 { 2486 <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> 2487 <div class="list-actions"> 2488 <table id="passport-duplicate-info" class="aside-content aside-content-info notactive"> 2489 <colgroup> 2490 <col width="30" /> 2491 <col /> 2492 </colgroup> 2493 <tr class="head"> 2494 <th><i class="fa fa-info"></i></th> 2495 <th>@Translate("Product", "Product")</th> 2496 </tr> 2497 <tr> 2498 <td>&nbsp;</td> 2499 <td id="passport-duplicate-product-name"><!--value is set by javascript based on form selection--></td> 2500 </tr> 2501 <tr class="head"> 2502 <th><i class="fa fa-eur"></i></th> 2503 <th>@Translate("Price", "Price")</th> 2504 </tr> 2505 <tr> 2506 <td>&nbsp;</td> 2507 <td> 2508 <span id="passport-duplicate-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2509 </td> 2510 </tr> 2511 </table> 2512 </div> 2513 } 2514 2515 // REGISTER HORSE TO NAME 2516 else if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 2517 actionRegisterHorseToName) 2518 { 2519 var registerHorseProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.RegisterHorse, ecomLanguageId); 2520 if (registerHorseProduct != null) 2521 { 2522 <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> 2523 <div class="list-actions"> 2524 <table id="register-horse-aside-info" class="aside-content aside-content-info notactive"> 2525 <colgroup> 2526 <col width="30" /> 2527 <col /> 2528 </colgroup> 2529 <tr class="head"> 2530 <th><i class="fa fa-info"></i></th> 2531 <th>@Translate("Product", "Product")</th> 2532 </tr> 2533 <tr> 2534 <td>&nbsp;</td> 2535 <td>@registerHorseProduct.Name</td> 2536 </tr> 2537 <tr class="head"> 2538 <th><i class="fa fa-eur"></i></th> 2539 <th>@Translate("Price", "Price")</th> 2540 </tr> 2541 <tr> 2542 <td>&nbsp;</td> 2543 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(registerHorseProduct)) (@Translate("VatIncluded", "VAT included"))</td> 2544 </tr> 2545 </table> 2546 </div> 2547 } 2548 } 2549 2550 // REGISTER EMBRYO 2551 else if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 2552 actionRegisterEmbryo) 2553 { 2554 <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> 2555 <div class="list-actions"> 2556 <table id="register-embryo-aside-info" class="aside-content aside-content-info notactive"> 2557 <colgroup> 2558 <col width="30" /> 2559 <col /> 2560 </colgroup> 2561 <tr class="head"> 2562 <th><i class="fa fa-info"></i></th> 2563 <th>@Translate("Product", "Product")</th> 2564 </tr> 2565 <tr> 2566 <td>&nbsp;</td> 2567 <td id="register-embryo-product-name"><!--value is set by javascript based on form selection--></td> 2568 </tr> 2569 <tr class="head"> 2570 <th><i class="fa fa-eur"></i></th> 2571 <th>@Translate("Price", "Price")</th> 2572 </tr> 2573 <tr> 2574 <td>&nbsp;</td> 2575 <td> 2576 <span id="register-embryo-product-price"><!--value is set by javascript based on form selection--></span> 2577 </td> 2578 </tr> 2579 </table> 2580 </div> 2581 } 2582 2583 // REGISTER FOAL 2584 else if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 2585 actionRegisterFoal) 2586 { 2587 <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> 2588 <div class="list-actions"> 2589 <table id="register-foal-aside-info" class="aside-content aside-content-info notactive"> 2590 <colgroup> 2591 <col width="30" /> 2592 <col /> 2593 </colgroup> 2594 <tr class="head"> 2595 <th><i class="fa fa-info"></i></th> 2596 <th>@Translate("Product", "Product")</th> 2597 </tr> 2598 <tr> 2599 <td>&nbsp;</td> 2600 <td id="register-foal-product-name"><!--value is set by javascript based on form selection--></td> 2601 </tr> 2602 <tr class="head"> 2603 <th><i class="fa fa-eur"></i></th> 2604 <th>@Translate("Price", "Price")</th> 2605 </tr> 2606 <tr> 2607 <td>&nbsp;</td> 2608 <td> 2609 <span id="register-foal-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2610 </td> 2611 </tr> 2612 </table> 2613 </div> 2614 } 2615 2616 // REQUEST WFFS / GENOME BREEDING VALUE TEST 2617 else if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 2618 actionRequestGenomicBreedingValueTest) 2619 { 2620 <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> 2621 <div class="list-actions"> 2622 <table id="genome-breeding-aside-info" class="aside-content aside-content-info notactive"> 2623 <colgroup> 2624 <col width="30" /> 2625 <col /> 2626 </colgroup> 2627 <tr class="head"> 2628 <th><i class="fa fa-info"></i></th> 2629 <th>@Translate("Product", "Product")</th> 2630 </tr> 2631 <tr> 2632 <td>&nbsp;</td> 2633 <td id="genome-breeding-product-name"><!--value is set by javascript based on form selection--></td> 2634 </tr> 2635 <tr class="head"> 2636 <th><i class="fa fa-eur"></i></th> 2637 <th>@Translate("Price", "Price")</th> 2638 </tr> 2639 <tr> 2640 <td>&nbsp;</td> 2641 <td> 2642 <span id="genome-breeding-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2643 </td> 2644 </tr> 2645 </table> 2646 </div> 2647 } 2648 2649 // SELL HORSE VIA MARKETPLACE 2650 else if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && 2651 actionSellViaMarketplace) 2652 { 2653 <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> 2654 <div class="list-actions"> 2655 <table id="marketplace-aside-info" class="aside-content aside-content-info notactive"> 2656 <colgroup> 2657 <col width="30" /> 2658 <col /> 2659 </colgroup> 2660 <tr class="head"> 2661 <th><i class="fa fa-info"></i></th> 2662 <th>@Translate("Product", "Product")</th> 2663 </tr> 2664 <tr> 2665 <td>&nbsp;</td> 2666 <td class="product-name"><!--value is set by javascript based on form selection--></td> 2667 </tr> 2668 <tr class="head paymentInfo hidden"> 2669 <th><i class="fa fa-cc"></i></th> 2670 <th>@Translate("PaymentMethod", "Payment method")</th> 2671 </tr> 2672 <tr class="paymentInfo hidden"> 2673 <td>&nbsp;</td> 2674 <td>@Translate("PaymentMethod_Text_Online", "Pay directly online")</td> 2675 </tr> 2676 <tr class="head"> 2677 <th><i class="fa fa-eur"></i></th> 2678 <th>@Translate("Price", "Price")</th> 2679 </tr> 2680 <tr> 2681 <td>&nbsp;</td> 2682 <td> 2683 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2684 </td> 2685 </tr> 2686 </table> 2687 </div> 2688 } 2689 2690 // REQUEST PREDICATES 2691 else if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && 2692 actionRequestPredicates) 2693 { 2694 <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> 2695 <div class="list-actions"> 2696 <table id="request-predicates-aside-info" class="aside-content aside-content-info notactive"> 2697 <colgroup> 2698 <col width="30" /> 2699 <col /> 2700 </colgroup> 2701 <tr class="head"> 2702 <th><i class="fa fa-info"></i></th> 2703 <th>@Translate("Product", "Product")</th> 2704 </tr> 2705 <tr> 2706 <td>&nbsp;</td> 2707 <td class="product-name"><!--value is set by javascript based on form selection--></td> 2708 </tr> 2709 <tr class="head"> 2710 <th><i class="fa fa-eur"></i></th> 2711 <th>@Translate("Price", "Price")</th> 2712 </tr> 2713 <tr> 2714 <td>&nbsp;</td> 2715 <td> 2716 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 2717 </td> 2718 </tr> 2719 </table> 2720 </div> 2721 } 2722 } 2723 2724 @*BACK TO DETAILS*@ 2725 @if (!string.IsNullOrWhiteSpace(action)) 2726 { 2727 <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> 2728 <div class="list-actions"> 2729 <ul id="back-to-info-list" class="aside-content notactive"> 2730 <li><a href='@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode)'>@Translate("ShowHorseDetails", "Show horse details")</a></li> 2731 </ul> 2732 </div> 2733 } 2734 2735 @*MEMBERSHIP CALL TO ACTION*@ 2736 @*@if (!string.IsNullOrWhiteSpace(action) && (!Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData())) 2737 { 2738 var becomeMemberPageId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 2739 if (!string.IsNullOrWhiteSpace(becomeMemberPageId)) 2740 { 2741 var becomeMemberPageUrl = string.Format("/Default.aspx?ID={0}", becomeMemberPageId); 2742 <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> 2743 <div class="list-actions"> 2744 <ul id="become-member-list" class="aside-content notactive"> 2745 <li><a href='@becomeMemberPageUrl'>@Translate("BecomeMemberNow", "Become a member now")</a></li> 2746 </ul> 2747 </div> 2748 } 2749 }*@ 2750 2751 </aside> 2752 </div> 2753 </div> 2754 <article class="col-xs-12 col-md-10 page-content"> 2755 <div>@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 2756 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/showGeneral" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 2757 @if (!string.IsNullOrWhiteSpace(action)) 2758 { 2759 2760 // BREEDING ADVICE 2761 if (action.Equals(Translate("ActionLink_Request_BreedingAdvice", "BreedingAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2762 actionRequestBreedingAdvice) 2763 { 2764 var pageIdFormBreedingAdvice = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.BreedingAdvice); 2765 if (!string.IsNullOrWhiteSpace(pageIdFormBreedingAdvice)) 2766 { 2767 showGeneral = false; 2768 2769 // SEO VIRTUAL PAGE VIEW LOGGING 2770 <Text> 2771 <script> 2772 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_breeding_advice", "breeding-advice").UrlEncode()).ToLower()"); 2773 </script> 2774 </Text> 2775 2776 @RenderPageContent(Convert.ToInt32(pageIdFormBreedingAdvice)) 2777 } 2778 } 2779 2780 // STALLION ADVICE 2781 @*if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 2782 actionGetStallionAdvice) 2783 { 2784 var pageIdGetStallionAdvice = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.StallionAdvice)?.ID ?? 0; 2785 if (pageIdGetStallionAdvice > 0) 2786 { 2787 showGeneral = false; 2788 2789 // SEO VIRTUAL PAGE VIEW LOGGING 2790 <Text> 2791 <script> 2792 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_stalliob_advice", "stallion-advice").UrlEncode()).ToLower()"); 2793 </script> 2794 </Text> 2795 2796 @RenderPageContent(pageIdGetStallionAdvice) 2797 } 2798 }*@ 2799 2800 // EVENT SIGN UP 2801 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 2802 actionSignUpInspectionEvent) 2803 { 2804 var pageIdFormEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.EventSignUp); 2805 if (!string.IsNullOrWhiteSpace(pageIdFormEventSignUp) && !string.IsNullOrWhiteSpace(actionId)) 2806 { 2807 showGeneral = false; 2808 2809 // SEO VIRTUAL PAGE VIEW LOGGING 2810 <Text> 2811 <script> 2812 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 2813 </script> 2814 </Text> 2815 2816 @RenderPageContent(Convert.ToInt32(pageIdFormEventSignUp)) 2817 } 2818 } 2819 2820 // CUP EVENT SIGN UP 2821 if (actionSignUpCupEvent) 2822 { 2823 var pageIdFormCupEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.CupEventSignUp); 2824 if (!string.IsNullOrWhiteSpace(pageIdFormCupEventSignUp)) 2825 { 2826 showGeneral = false; 2827 2828 // SEO VIRTUAL PAGE VIEW LOGGING 2829 <Text> 2830 <script> 2831 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 2832 </script> 2833 </Text> 2834 2835 @RenderPageContent(Convert.ToInt32(pageIdFormCupEventSignUp)) 2836 } 2837 } 2838 2839 // REPORT DECEASED HORSE 2840 if (action.Equals(Translate("ActionLink_Report_HorseDied", "HorseDied"), StringComparison.InvariantCultureIgnoreCase) && 2841 actionReportDeceasedHorse) 2842 { 2843 var pageIdReportDeceased = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.ReportDeceased); 2844 if (!string.IsNullOrWhiteSpace(pageIdReportDeceased)) 2845 { 2846 showGeneral = false; 2847 2848 // SEO VIRTUAL PAGE VIEW LOGGING 2849 <Text> 2850 <script> 2851 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_report_deceased_horse", "report-deceased-horse").UrlEncode()).ToLower()"); 2852 </script> 2853 </Text> 2854 2855 @RenderPageContent(Convert.ToInt32(pageIdReportDeceased)) 2856 } 2857 } 2858 2859 // CONINUED PASSPORT 2860 if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 2861 actionRequestContinuedPassport) 2862 { 2863 var pageIdPassportRenewal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportRenewal); 2864 if (!string.IsNullOrWhiteSpace(pageIdPassportRenewal)) 2865 { 2866 showGeneral = false; 2867 2868 // SEO VIRTUAL PAGE VIEW LOGGING 2869 <Text> 2870 <script> 2871 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_continued_passport", "continued-passport").UrlEncode()).ToLower()"); 2872 </script> 2873 </Text> 2874 2875 @RenderPageContent(Convert.ToInt32(pageIdPassportRenewal)) 2876 } 2877 } 2878 2879 // REQUEST DUPLICATE 2880 if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 2881 actionRequestDuplicate) 2882 { 2883 var pageIdPassportDuplicate = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportDuplicate); 2884 if (!string.IsNullOrWhiteSpace(pageIdPassportDuplicate)) 2885 { 2886 showGeneral = false; 2887 2888 // SEO VIRTUAL PAGE VIEW LOGGING 2889 <Text> 2890 <script> 2891 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_duplicate", "request-duplicate").UrlEncode()).ToLower()"); 2892 </script> 2893 </Text> 2894 2895 @RenderPageContent(Convert.ToInt32(pageIdPassportDuplicate)) 2896 } 2897 } 2898 2899 // REGISTER HORSE TO NAME 2900 if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 2901 actionRegisterHorseToName) 2902 { 2903 var pageIdFormRegisterHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterHorse); 2904 if (!string.IsNullOrWhiteSpace(pageIdFormRegisterHorse)) 2905 { 2906 showGeneral = false; 2907 2908 // SEO VIRTUAL PAGE VIEW LOGGING 2909 <Text> 2910 <script> 2911 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_horse", "register-horse").UrlEncode()).ToLower()"); 2912 </script> 2913 </Text> 2914 2915 @RenderPageContent(Convert.ToInt32(pageIdFormRegisterHorse)) 2916 } 2917 } 2918 2919 // REGISTER EMBRYO 2920 if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 2921 actionRegisterEmbryo) 2922 { 2923 2924 var pageRegisterEmbryo = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterEmbryo); 2925 var pageIdRegisterEmbryo = pageRegisterEmbryo?.ID ?? 0; 2926 if (pageIdRegisterEmbryo > 0) 2927 { 2928 showGeneral = false; 2929 2930 // SEO VIRTUAL PAGE VIEW LOGGING 2931 <Text> 2932 <script> 2933 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_embryo", "register-embryo").UrlEncode()).ToLower()"); 2934 </script> 2935 </Text> 2936 2937 @RenderPageContent(pageIdRegisterEmbryo) 2938 } 2939 } 2940 2941 // REGISTER FOAL 2942 if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 2943 actionRegisterFoal) 2944 { 2945 var pageIdRegisterFoal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterFoal); 2946 if (!string.IsNullOrWhiteSpace(pageIdRegisterFoal)) 2947 { 2948 showGeneral = false; 2949 2950 // SEO VIRTUAL PAGE VIEW LOGGING 2951 <Text> 2952 <script> 2953 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_foal", "register-foal").UrlEncode()).ToLower()"); 2954 </script> 2955 </Text> 2956 2957 @RenderPageContent(Convert.ToInt32(pageIdRegisterFoal)) 2958 } 2959 } 2960 2961 // REQUEST GENOME BREEDING VALUE OC (DNA-TEST) 2962 if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 2963 actionRequestGenomicBreedingValueTest) 2964 { 2965 var pageIdGenomicBreedingValueTest = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RequestGenomeBreedingValueTest); 2966 if (!string.IsNullOrWhiteSpace(pageIdGenomicBreedingValueTest)) 2967 { 2968 showGeneral = false; 2969 2970 // SEO VIRTUAL PAGE VIEW LOGGING 2971 <Text> 2972 <script> 2973 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_dna_test", "request-dna-test").UrlEncode()).ToLower()"); 2974 </script> 2975 </Text> 2976 2977 @RenderPageContent(Convert.ToInt32(pageIdGenomicBreedingValueTest)) 2978 } 2979 } 2980 2981 // SELL HORSE VIA MARKETPLACE 2982 if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace) 2983 { 2984 var pageIdSellHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.SellHorse); 2985 if (!string.IsNullOrWhiteSpace(pageIdSellHorse)) 2986 { 2987 showGeneral = false; 2988 2989 // SEO VIRTUAL PAGE VIEW LOGGING 2990 <Text> 2991 <script> 2992 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_sell_horse", "sell-horse").UrlEncode()).ToLower()"); 2993 </script> 2994 </Text> 2995 2996 @RenderPageContent(Convert.ToInt32(pageIdSellHorse)) 2997 } 2998 } 2999 3000 // INBREED CALCULATION 3001 if (action.Equals(Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"), StringComparison.InvariantCultureIgnoreCase) && actionInbreedingCalculation) 3002 { 3003 var pageIdInbreedCalculation = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.InbreedCalculationPageId); 3004 if (!string.IsNullOrWhiteSpace(pageIdInbreedCalculation)) 3005 { 3006 showGeneral = false; 3007 3008 // SEO VIRTUAL PAGE VIEW LOGGING 3009 <Text> 3010 <script> 3011 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_inbreed_calculation", "inbreed-calculation").UrlEncode()).ToLower()"); 3012 </script> 3013 </Text> 3014 3015 @RenderPageContent(Convert.ToInt32(pageIdInbreedCalculation)) 3016 } 3017 } 3018 3019 // REQUEST PREDICATES 3020 if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && actionRequestPredicates) 3021 { 3022 var pageIdRequestPredicates = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.PredicatesRequestPageId); 3023 if (!string.IsNullOrWhiteSpace(pageIdRequestPredicates)) 3024 { 3025 showGeneral = false; 3026 3027 // SEO VIRTUAL PAGE VIEW LOGGING 3028 <Text> 3029 <script> 3030 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_predicates", "request-predicates").UrlEncode()).ToLower()"); 3031 </script> 3032 </Text> 3033 3034 @RenderPageContent(Convert.ToInt32(pageIdRequestPredicates)) 3035 } 3036 } 3037 3038 3039 // DNA PAGE 3040 @*if (action.Equals(Translate("ActionLink_DnaPage", "DNA-Page"), StringComparison.InvariantCultureIgnoreCase) && actionDnaPage) 3041 { 3042 var dnaPageId = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.DnaPage)?.ID ?? 0; 3043 if (dnaPageId > 0) 3044 { 3045 showGeneral = false; 3046 3047 // SEO VIRTUAL PAGE VIEW LOGGING 3048 <Text> 3049 <script> 3050 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_dnapage", "dna-page").UrlEncode()).ToLower()"); 3051 </script> 3052 </Text> 3053 3054 @RenderPageContent(dnaPageId) 3055 } 3056 }*@ 3057 } 3058 <script> 3059 var pageTitle = $('.paragraphTitel h1, .paragraphText h1').text(); 3060 $('.paragraphTitel h1, .paragraphText h1').remove(); 3061 $('.pageTitle').text(pageTitle); 3062 </script></div> 3063 </article> 3064 </div> 3065 <div class="row"> 3066 <div class="col-xs-12 col-md-10 page-content print-disclaimer"> 3067 @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>") 3068 </div> 3069 </div> 3070 </div> 3071 </div> 3072 </div> 3073 } 3074 else 3075 { 3076 isMyHorse = HorseHelper.CheckIfMyHorse(animalCode) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3077 isMyHorseAndConfirmed = HorseHelper.CheckIfMyHorseAndConfirmed(animalCode) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); //voorkom dat mensen gelijk na op naam zetten paard kunnen verkopen 3078 isMare = false; 3079 isAlive = !horse.DateOfDeath.HasValue; 3080 isApprovedStud = horse.ApprovedStallion; 3081 isBredByMe = HorseHelper.CheckifBredByMe(horse.Breeders) && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3082 isAvailableForResearch = HorseHelper.horseIsAvailableForResearch(animalCode); 3083 3084 // HEADER DATA 3085 var genderClass = "fa-question"; 3086 var genderAbbr = ""; 3087 var gender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 3088 Enum.TryParse(horse.Gender.ToUpper(), out gender); 3089 switch (gender) 3090 { 3091 case Kwpn.Models.Enumerations.Gender.HENGST: 3092 genderClass = "fa-mars"; 3093 genderAbbr = Translate("Stallion", "Stallion"); 3094 break; 3095 case Kwpn.Models.Enumerations.Gender.MERRIE: 3096 genderClass = "fa-venus"; 3097 genderAbbr = Translate("Mare", "Mare"); 3098 isMare = true; 3099 break; 3100 case Kwpn.Models.Enumerations.Gender.RUIN: 3101 genderClass = "fa-mars"; //fa-mars-stroke-h 3102 genderAbbr = Translate("Gelding", "Gelding"); 3103 break; 3104 } 3105 horseName = HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, horse.DateOfBirth.Value); 3106 var fatherName = ""; 3107 var father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 3108 if (father != null) { fatherName = father.AnimalName; } else { fatherName = Translate("Unknown", "Unknown"); } 3109 var fatherNameAbbr = Translate("FathersName", "Fathers name").JsEncode(); 3110 var mothersFatherName = ""; 3111 var mothersFather = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather); 3112 if (mothersFather != null) { mothersFatherName = mothersFather.AnimalName; } else { mothersFatherName = Translate("Unknown", "Unknown"); } 3113 var mothersFatherNameAbbr = Translate("MothersFathersName", "Mothers fathers name").JsEncode(); 3114 3115 // HORSE INFO TABLE DATA 3116 var placeOfBirth = horse.PlaceOfBirth; 3117 var chipNumber = horse.ChipNumber; 3118 var register = horse.Register; 3119 var breedingDirection = horse.BreedingDirection; 3120 var lifeNumber = horse.Lifenumber; 3121 if (!string.IsNullOrWhiteSpace(horse.LifenumberComplete)) { lifeNumber = horse.LifenumberComplete; } 3122 var dateOfBirth = ""; 3123 if (horse.DateOfBirth.HasValue && !dateOfBirth.Equals(DateTime.MinValue)) { dateOfBirth = horse.DateOfBirth.Value.ToShortDateString(); } 3124 var color = ""; 3125 var colorInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Color); 3126 if (colorInfo != null) { color = colorInfo.Description; } 3127 var wffs = isMyHorse ? horse.WFFSResearchInformation.ToLower() : isApprovedStud ? horse.WFFSResearchInformation.ToLower() : Translate("SensitiveInformation", "Informatie afgeschermd"); 3128 var withers = ""; 3129 var heightInfo = horse.GetMarkingByType(StringConstants.MarkingTypes.Height); 3130 if (heightInfo != null) { withers = heightInfo.Description; } 3131 if (!string.IsNullOrWhiteSpace(withers)) { withers = HorseHelper.ConvertWithers(withers); } 3132 breeders = horse.Breeders; 3133 hasBreeders = breeders != null && breeders.Any(); 3134 3135 // descendent- and performance report 3136 var reports = horse.AnimalReports; 3137 3138 int currentAge = FormatHelpers.CalculateAgeAsInt(horse.DateOfBirth.Value); 3139 3140 showGeneticProfileBasedOnRegister = HorseHelper.IsAllowedRegister(horse.Register) || string.Equals(horse.Register, "ZE", StringComparison.OrdinalIgnoreCase); 3141 showGeneticProfileBasedOnOwnerSettings = !HorseHelper.GeneticProfileIsHidden(animalCode, currentAge); 3142 3143 // validate actions 3144 actionRequestBreedingAdvice = isAlive && isMare; 3145 actionSignUpInspectionEvent = isAlive && isMyHorse; 3146 actionReportDeceasedHorse = isAlive && isMyHorse; 3147 actionRequestContinuedPassport = (!isApprovedStud || isMyHorse) && isAlive; 3148 actionRequestDuplicate = (!isApprovedStud || isMyHorse) && isAlive; 3149 actionRequestPredicates = (!isApprovedStud || isMyHorse); 3150 actionRegisterHorseToName = LoginHelper.IsFullMember() && !isApprovedStud && isAlive && !isMyHorse && !Kwpn.Repository.Helpers.LoginHelper.IsBlocked(); 3151 actionRegisterFoal = isMyHorse && isAlive && isMare; 3152 actionRegisterEmbryo = isMyHorse && isAlive && isMare; 3153 actionReportHorseSold = isAlive && isMyHorse; 3154 actionVeterinarianRequestResearch = UserHelper.CheckIfVeterinarian(); 3155 actionRequestGenomicBreedingValueTest = isMyHorseAndConfirmed && isAvailableForResearch; 3156 actionSellViaMarketplace = isAlive && (UserHelper.CheckIfMarketplaceManager() || (isMyHorseAndConfirmed && HorseHelper.IsAllowedRegister(horse.Register))) && !MarketplaceHelper.AnimalHasActiveMarketplaceAdvert(horse.AnimalCode); 3157 actionInbreedingCalculation = !string.IsNullOrWhiteSpace(horse.BreedingDirection) && 3158 isMyHorse && 3159 isMare && 3160 isAlive && 3161 currentAge > 2 && 3162 currentAge < 26 && 3163 ( 3164 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_GelderHorse", "Gelder Horse")) || 3165 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_HarnessHorse", "Harness Horse")) || 3166 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_RidingHorse", "Riding Horse")) || 3167 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_DressageHorse", "Dressage Horse")) || 3168 horse.BreedingDirection.Equals(Translate("EquisBreedingDirection_JumperHorse", "Jumper Horse")) 3169 ); 3170 actionGetStallionAdvice = isAlive && isMyHorse && isMare && currentAge > 2 && currentAge < 26; 3171 actionDnaPage = isMyHorse && !isApprovedStud; 3172 actionShow = ( 3173 actionRequestBreedingAdvice || 3174 actionSignUpInspectionEvent || 3175 actionReportDeceasedHorse || 3176 actionRequestContinuedPassport || 3177 actionRequestDuplicate || 3178 actionRegisterHorseToName || 3179 actionRegisterEmbryo || 3180 actionRegisterFoal || 3181 actionReportHorseSold || 3182 actionVeterinarianRequestResearch || 3183 actionRequestGenomicBreedingValueTest || 3184 actionSellViaMarketplace || 3185 actionInbreedingCalculation || 3186 actionRequestPredicates || 3187 actionGetStallionAdvice || 3188 actionDnaPage); 3189 3190 // add horse info to seo page 3191 seoPage = string.Format("{0}/{1}/{2}", seoPage, animalCode.UrlEncode(), HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, null).Replace(" ", "-").UrlEncode()); 3192 3193 if (actionReportHorseSold) 3194 { 3195 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3196 <div class="modal fade" id="confirm-sold" tabindex="-1" role="dialog" aria-labelledby="horse-sold-modal" aria-hidden="true"> 3197 <div class="modal-dialog"> 3198 <div class="modal-content"> 3199 <div class="modal-header">@Translate("HorseSoldModalHeader", "Report horse as sold")</div> 3200 <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> 3201 <div class="modal-footer"> 3202 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("Cancel", "Cancel")</a> 3203 <a class="orange_balloon_link modal-ok" href="javascript:void(0);">@Translate("ReportAsSold", "Report as sold")</a> 3204 </div> 3205 </div> 3206 </div> 3207 </div> 3208 @SnippetStart("JavascriptsBottom") 3209 <script> 3210 $(document).ready(function () { 3211 3212 $(".horse-sold-button").click(function (e) { 3213 3214 // set modal text 3215 var horseInfo = "@horseName (@lifeNumber)"; 3216 var modalBody = $("#confirm-sold .modal-body").attr("data-default"); 3217 var newModalBody = modalBody.replace("{horse}", horseInfo); 3218 $("#confirm-sold .modal-body").html(newModalBody); 3219 3220 // seo tracking 3221 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_horse_sold", "horse-sold").UrlEncode()).ToLower()"); 3222 3223 // set modal ok button value 3224 var horseCode = "@animalCode"; 3225 var horseSoldApi = "/kwpnwebapi/horses/reportsold/@culture/" + horseCode; 3226 var okButton = $("#confirm-sold .modal-footer .modal-ok"); 3227 okButton.unbind("click"); 3228 okButton.click(function () { 3229 $.getJSON(horseSoldApi).done(function (result, status, metaData) { 3230 if (result) { 3231 location.reload(); // reload page to change isMyhorse options 3232 } 3233 if (!result) { 3234 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 3235 } 3236 }).fail(function (jqxhr, textStatus, error) { 3237 var err = textStatus + ", " + error; 3238 console.error("Request Reportsold Failed: " + err); 3239 }); 3240 $("#confirm-sold").modal("hide"); 3241 }); 3242 3243 // show modal 3244 $("#confirm-sold").modal("show"); 3245 3246 }); 3247 }); 3248 </script> 3249 @SnippetEnd("JavascriptsBottom") 3250 } 3251 <div class="break-grid content-container page-content-aside horse-database"> 3252 <div class="break-grid-background"> 3253 <div class="in-grid"> 3254 3255 <div class="row"> 3256 <div class="col-xs-12"> 3257 <h1 class="pageTitle">&nbsp;</h1> 3258 </div> 3259 </div> 3260 3261 <div class="row"> 3262 <div class="col-xs-12"> 3263 <div class="notification"></div> 3264 </div> 3265 </div> 3266 3267 @if (string.IsNullOrWhiteSpace(action)) 3268 { 3269 var horseNameTitle = horseName; 3270 if (isApprovedStud) 3271 { 3272 horseNameTitle = string.Format("{0} <img class='icon-weapon' src='/Files/Templates/Designs/Kwpn/Images/wapen.svg' /> ", horseNameTitle); 3273 } 3274 <div class="row"> 3275 <div class="col-xs-12 col-md-7"> 3276 <a class="go-back orange_arrow_link arrowleft pull-right hidden-md hidden-lg" href="#">@Translate("Back", "Back")</a> 3277 <h1>@horseNameTitle</h1> 3278 </div> 3279 <div class="hidden-xs hidden-sm col-md-4 col-lg-3"> 3280 <a class="go-back orange_arrow_link arrowleft pull-right" href="#">@Translate("Back", "Back")</a> 3281 </div> 3282 </div> 3283 <div class="row"> 3284 <div class="col-xs-12 col-md-2"> 3285 <span class="gender"><i class="fa @genderClass" title='@genderAbbr.JsEncode()'></i> @genderAbbr.ToUpper()</span>@if (!isAlive) 3286 {<span class="deceased" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"><img src="/Files/Templates/Designs/Kwpn/Images/deceased-icon.png" /></span>} 3287 </div> 3288 <div class="col-xs-12 col-md-10"> 3289 <span class="pedigree"><i class="fa fa-tag"></i> <abbr title='@fatherNameAbbr'>@fatherName</abbr> x <abbr title='@mothersFatherNameAbbr'>@mothersFatherName</abbr></span> 3290 </div> 3291 </div> 3292 } 3293 3294 <div class="row"> 3295 <div class="col-xs-12 col-md-2 col-md-push-10 aside-page"> 3296 <div class="bg_aside closed"> 3297 <div class="aside_pullLabel">Menu<i class="fa fa-bars" aria-hidden="true"></i></div> 3298 <aside> 3299 @using System.Web.Mvc; 3300 @using Kwpn.Core.Services.Abstract; 3301 @using Kwpn.Models.Enumerations; 3302 @using Kwpn.Core.Helpers; 3303 3304 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 3305 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 3306 @*DEFAULT ASIDE*@ 3307 3308 @{ 3309 var currentUser = Kwpn.Repository.Repositories.KwpnUsers.CurrentUser(); 3310 var jumpVideoService = DependencyResolver.Current.GetService<IJumpPortalVideoService>(); 3311 3312 var collection = new Kwpn.Models.Jump.VideoResponse[0]; 3313 if (horse != null && !string.IsNullOrEmpty(horse.AnimalCode)) 3314 { 3315 collection = jumpVideoService.GetVideosByTag(horse.AnimalCode); 3316 } 3317 } 3318 3319 3320 3321 @if (string.IsNullOrWhiteSpace(action)) 3322 { 3323 #region TabLinks 3324 <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> 3325 <div class="list-tabs"> 3326 <ul> 3327 <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> 3328 <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> 3329 <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> 3330 @if (showGeneticProfileBasedOnRegister) 3331 { 3332 <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> 3333 } 3334 @if (isMare || isMyHorse) 3335 { 3336 <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> 3337 } 3338 @if (isApprovedStud) 3339 { 3340 <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> 3341 <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> 3342 <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> 3343 <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> 3344 <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> 3345 <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> 3346 } 3347 @{ 3348 var asideBreeders = breeders?.Where(b => b.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(b.PersonCode)); 3349 if (asideBreeders != null && asideBreeders.Any()) 3350 { 3351 <li data-tab="tab_breeders_info"> 3352 <span class="list-item"> 3353 @(asideBreeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder")):<br /> 3354 @foreach (var breeder in asideBreeders) 3355 { 3356 <span class="breeder-link" data-personcode="@breeder.PersonCode">@breeder.PersonName</span> 3357 } 3358 </span> 3359 </li> 3360 } 3361 3362 } 3363 </ul> 3364 </div> 3365 3366 <script> 3367 $(document).ready(function () { 3368 @if (collection != null && collection.Any()) 3369 { 3370 <text> 3371 $(".list-tabs ul").append("<li data-tab=\"tab_videos\"><a href=\"javascript:void(0);\">@Translate("Videos", "Videos")</a></li>"); 3372 3373 $(".list-tabs li[data-tab=tab_videos] a").click(function () { 3374 var listItem = $(this).parent(); 3375 var tab = listItem.attr("data-tab"); 3376 3377 // remove existing active from tab list 3378 $(".list-tabs li").removeClass("active"); 3379 3380 // add active 3381 listItem.addClass("active"); 3382 3383 // hide all content items 3384 $(".horse-detail-item").addClass("hidden"); 3385 3386 LoadVideos(); 3387 3388 // show items corresponding to current active tab 3389 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 3390 }); 3391 </text> 3392 } 3393 3394 3395 function LoadVideos() { 3396 3397 var videoContent = $("#video-container", "#horse-detail-item-videos"); 3398 3399 } 3400 3401 function ClearVideos() { 3402 var videoContent = $("#video-container", "#horse-detail-item-videos"); 3403 videoContent.html(""); 3404 } 3405 3406 $(".list-tabs a").click(function () { 3407 3408 var listItem = $(this).parent(); 3409 var tab = listItem.attr("data-tab"); 3410 var vp = listItem.attr("data-vp").toLowerCase(); 3411 3412 // remove existing active from tab list 3413 $(".list-tabs li").removeClass("active"); 3414 3415 // add active 3416 listItem.addClass("active"); 3417 3418 // hide all content items 3419 $(".horse-detail-item").addClass("hidden"); 3420 3421 // SEO VIRTUAL PAGE VIEW LOGGING 3422 SEO.trackPageView("@seoPage.ToLower()/" + vp); 3423 3424 // if item is "video", load videos 3425 if (tab == "tab_videos") { 3426 LoadVideos(); 3427 } 3428 else { 3429 ClearVideos(); 3430 } 3431 3432 // show items corresponding to current active tab 3433 $(".horse-detail-item[data-content=" + tab + "]").removeClass("hidden"); 3434 3435 }); 3436 }); 3437 </script> 3438 @SnippetEnd("JavascriptsBottom") 3439 #endregion 3440 } 3441 3442 @if (string.IsNullOrWhiteSpace(action) && actionShow) 3443 { 3444 #region ActionLinks 3445 <h2 id="listheader-actions" data-childId="list-actions" class="notactive"> 3446 <span>@Translate("Actions", "Actions")</span><i class="fa fa-chevron-down" aria-hidden="true"></i> 3447 </h2> 3448 <div class="list-actions"> 3449 <ul> 3450 @if (actionRegisterHorseToName) 3451 { 3452 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Register_HorseToName", "RegisterHorse"))">@Translate("Action_Register_HorseToName", "Register horse")</a></li> 3453 } 3454 @if (actionSignUpInspectionEvent) 3455 { 3456 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseEventsPageUrl(culture, horse.AnimalCode)">@Translate("Action_SignUp_InspectionEvent", "Sign up for inspection / event")</a></li> 3457 } 3458 3459 @*@if (actionGetStallionAdvice) 3460 { 3461 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"))">@Translate("Action_Request_StallionAdvice", "Stallion advice")</a></li> 3462 }*@ 3463 @if (actionRequestGenomicBreedingValueTest) 3464 { 3465 <li><a href="javascript:void(0);" onclick="javascript:AddHorseToGenomeBreedingValueTest();return false;">@Translate("Action_Request_GenomeBreedingValueTest", "Request DNA/OC research")</a></li> 3466 } 3467 @if (actionSellViaMarketplace) 3468 { 3469 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_SellViaMarketplace", "sell"))">@Translate("Action_SellViaMarketplace", "Sell via KWPN Marketplace")</a></li> 3470 } 3471 @if (actionReportHorseSold) 3472 { 3473 <li><a href="javascript:void(0);" class="horse-sold-button">@Translate("Action_Report_HorseSold", "Report horse as sold")</a></li> 3474 } 3475 @if (actionReportDeceasedHorse) 3476 { 3477 <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> 3478 } 3479 @if (actionInbreedingCalculation) 3480 { 3481 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"))">@Translate("Action_InbreedingCalculation", "Inbreeding calculation")</a></li> 3482 } 3483 @if (actionRequestDuplicate) 3484 { 3485 <li><a href="@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_Duplicate", "Duplicate"))">@Translate("Action_Request_Duplicate", "Request duplicate")</a></li> 3486 } 3487 @if (actionRequestContinuedPassport) 3488 { 3489 <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> 3490 } 3491 @if (actionRequestPredicates) 3492 { 3493 <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> 3494 } 3495 3496 @if (currentUser != null && currentUser.IsVeterinarian) 3497 { 3498 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.PROK_Research_General">@Translate("Action_PROK_Research_General", "Request PROK")</a></li> 3499 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.PROK_Research_Mares">@Translate("Action_PROK_Research_Mares", "Request PROK mares")</a></li> 3500 3501 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.SPST">@Translate("Action_Request_SPST_Exam", "Request SPST examination")</a></li> 3502 <li><a href="/aanmelden-onderzoek?@Translate("Horse", "Horse")=@horse.AnimalCode&amp;type=@ResearchType.OC">@Translate("Action_Request_OC_Exam", "Request OC examination")</a></li> 3503 3504 } 3505 3506 3507 3508 @if (isMyHorse) 3509 { 3510 <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> 3511 } 3512 </ul> 3513 </div> 3514 @SnippetStart("JavascriptsBottom") 3515 <script> 3516 3517 @if (actionRequestGenomicBreedingValueTest) 3518 { 3519 <text> 3520 function AddHorseToGenomeBreedingValueTest() { 3521 var redirectUrl = '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode, Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"))'; 3522 // add horse to KwpnUser.GenomeBreedingValueItems 3523 var addHorseUrl = "/kwpnwebapi/forms/research/upserthorse/@horse.AnimalCode"; 3524 $.getJSON(addHorseUrl).done(function () { 3525 window.location.href = redirectUrl; 3526 }).fail(function (jqxhr, textStatus, error) { 3527 var err = textStatus + ", " + error; 3528 console.error("Request AddHorse Failed: " + err); 3529 }); 3530 } 3531 </text> 3532 } 3533 3534 $(document).ready(function () { 3535 3536 @if (isMyHorse) 3537 { 3538 <text> 3539 $("#refresh-link").off("click").on("click", function (e) { 3540 e.preventDefault(); 3541 $(".horse-database").addClass("hidden"); 3542 $("#refreshcontainer").removeClass("hidden"); 3543 var refreshHorse = "/kwpnwebapi/horses/refreshmyhorse/@culture/@horse.AnimalCode/@true"; 3544 $.ajax(refreshHorse).always(function () { 3545 window.location.href = "@System.Web.HttpContext.Current.Request.RawUrl"; 3546 }); 3547 return false; 3548 }); 3549 </text> 3550 } 3551 3552 @* 3553 3554 NOTE: 3555 WHENEVER THE DNA PAGE GOES LIVE AND THIS GETS UNCOMMENTED, 3556 THE 'check if document download links should be added to the action list and if so, do' 3557 JAVASCRIPT BENEITH MUST BE REMOVED !! 3558 3559 // check if any document is available. if so show the DNA page when it is your horse and it isn't an apporved stud 3560 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData() && isMyHorse && !isApprovedStud) 3561 { 3562 <text> 3563 //var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 3564 //$.getJSON(downloadsApiUrl).done(function (result) { 3565 // if (result != null && result.length > 0) { 3566 // 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>'; 3567 // $("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 3568 // } 3569 // }).fail(function (jqxhr, textStatus, error) { 3570 // var err = textStatus + ", " + error; 3571 // console.error("Request Getdownloaddocuments Failed: " + err); 3572 // }); 3573 </text> 3574 }*@ 3575 3576 3577 // check if document download links should be added to the action list and if so, do 3578 @if (Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData()) 3579 { 3580 <text> 3581 // download documents 3582 $(".downloaddocument").remove(); 3583 var downloadsApiUrl = "/kwpnwebapi/horses/getdownloaddocuments/@culture/@animalCode"; 3584 $.getJSON(downloadsApiUrl).done(function (result) { 3585 if (result != null && result.length > 0) { 3586 $.each(result, function (i, downloadDocument) { 3587 var downloadDocumentUrl = downloadDocument.URL; 3588 if (downloadDocumentUrl != null) { 3589 downloadDocumentUrl = downloadDocumentUrl.replace(/\\/g, "/"); // fix slashes 3590 var downloadDocumentLabel = "@Translate("DownloadDocument", "Download document"): " + downloadDocument.TypeDocument; 3591 var downloadDocumentListItem = "<li class=\"downloaddocument\"><a href=\"" + downloadDocumentUrl + "\" download target=\"_blank\">" + downloadDocumentLabel + "</a></li>"; 3592 $("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 3593 } 3594 }); 3595 } 3596 }).fail(function (jqxhr, textStatus, error) { 3597 var err = textStatus + ", " + error; 3598 console.error("Request Getdownloaddocuments Failed: " + err); 3599 }); 3600 </text> 3601 } 3602 3603 3604 }); 3605 </script> 3606 @SnippetEnd("JavascriptsBottom") 3607 #endregion 3608 } 3609 3610 @*ACTION ASIDES*@ 3611 @if (!string.IsNullOrWhiteSpace(action)) 3612 { 3613 var productService = new Dynamicweb.Ecommerce.Products.ProductService(); 3614 var ecomLanguageId = Dynamicweb.Frontend.PageView.Current().Area.EcomLanguageId; 3615 3616 // EVENT SIGN UP 3617 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 3618 actionSignUpInspectionEvent) 3619 { 3620 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 3621 if (eventSignUpProduct != null) 3622 { 3623 <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> 3624 <div class="list-actions"> 3625 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 3626 <colgroup> 3627 <col width="30" /> 3628 <col /> 3629 </colgroup> 3630 <tr class="head"> 3631 <th><i class="fa fa-info"></i></th> 3632 <th>@Translate("Product", "Product")</th> 3633 </tr> 3634 <tr> 3635 <td>&nbsp;</td> 3636 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 3637 </tr> 3638 <tr class="required-services hidden" data-subtotal=""> 3639 <td>&nbsp;</td> 3640 <td class="required-service"></td> 3641 </tr> 3642 <tr class="head"> 3643 <th><i class="fa fa-eur"></i></th> 3644 <th>@Translate("Price", "Price")</th> 3645 </tr> 3646 <tr> 3647 <td>&nbsp;</td> 3648 <td>&euro; <span id="eventSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 3649 </tr> 3650 </table> 3651 </div> 3652 } 3653 } 3654 3655 3656 // CUP EVENT SIGN UP 3657 if (actionSignUpCupEvent) 3658 { 3659 var eventSignUpProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.EventSignUp, ecomLanguageId); 3660 if (eventSignUpProduct != null) 3661 { 3662 <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> 3663 <div class="list-actions"> 3664 <table id="event-signup-aside-aside-info" class="aside-content aside-content-info notactive"> 3665 <colgroup> 3666 <col width="30" /> 3667 <col /> 3668 </colgroup> 3669 <tr class="head"> 3670 <th><i class="fa fa-info"></i></th> 3671 <th>@Translate("Product", "Product")</th> 3672 </tr> 3673 <tr> 3674 <td>&nbsp;</td> 3675 <td>@eventSignUpProduct.Name <span class="inspection-price"></span></td> 3676 </tr> 3677 <tr class="required-services hidden" data-subtotal=""> 3678 <td>&nbsp;</td> 3679 <td class="required-service"></td> 3680 </tr> 3681 <tr class="head"> 3682 <th><i class="fa fa-eur"></i></th> 3683 <th>@Translate("Price", "Price")</th> 3684 </tr> 3685 <tr> 3686 <td>&nbsp;</td> 3687 <td><span id="eventCupSignUpPriceAside">@Translate("NotYetKnown", "n.y.k.")</span> (@Translate("VatIncluded", "VAT included"))</td> 3688 </tr> 3689 </table> 3690 </div> 3691 } 3692 } 3693 3694 // STALLION ADVICE 3695 else if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 3696 actionGetStallionAdvice) 3697 { 3698 <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> 3699 <div class="list-actions"> 3700 <table id="stallion-advice-aside-info" class="aside-content aside-content-info notactive"> 3701 <colgroup> 3702 <col width="30" /> 3703 <col /> 3704 </colgroup> 3705 <tr class="head"> 3706 <th><i class="fa fa-info"></i></th> 3707 <th>Hengsten advies</th> 3708 </tr> 3709 <tr> 3710 <td>&nbsp;</td> 3711 <td>@horseName<br /><span id="stallion-advice-aside-breedingdirection-mare">@horse.BreedingDirection</span></td> 3712 </tr> 3713 </table> 3714 <ul class="aside-content notactive" id="stallion-advice-aside-links"> 3715 <li class="step-0 hidden"><a href='#' onclick="StallionAdvice.ShowStep(0); return false;">@Translate("StallionAdvice_BackToStep0_LinkText", "Explanation")</a></li> 3716 <li class="step-1 hidden"><a href='#' onclick="StallionAdvice.ShowStep(1); return false;">@Translate("StallionAdvice_BackToStep1_LinkText", "Step 1")</a></li> 3717 <li class="step-2 hidden"><a href='#' onclick="StallionAdvice.ShowStep(2); return false;">@Translate("StallionAdvice_BackToStep2_LinkText", "Step 2")</a></li> 3718 </ul> 3719 </div> 3720 } 3721 3722 // CONTINUED PASSPORT 3723 else if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 3724 actionRequestContinuedPassport) 3725 { 3726 var passportRenewalProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.PassportRenewal, ecomLanguageId); 3727 if (passportRenewalProduct != null) 3728 { 3729 <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> 3730 <div class="list-actions"> 3731 <table id="passport-renewal-aside-info" class="aside-content aside-content-info notactive"> 3732 <colgroup> 3733 <col width="30" /> 3734 <col /> 3735 </colgroup> 3736 <tr class="head"> 3737 <th><i class="fa fa-info"></i></th> 3738 <th>@Translate("Product", "Product")</th> 3739 </tr> 3740 <tr> 3741 <td>&nbsp;</td> 3742 <td>@passportRenewalProduct.Name</td> 3743 </tr> 3744 <tr class="head"> 3745 <th><i class="fa fa-eur"></i></th> 3746 <th>@Translate("Price", "Price")</th> 3747 </tr> 3748 <tr> 3749 <td>&nbsp;</td> 3750 <td>@Kwpn.Repository.Helpers.ProductHelper.FormatPrice(Kwpn.Repository.Helpers.ProductHelper.GetProductPrice(passportRenewalProduct)) (@Translate("VatIncluded", "VAT included"))</td> 3751 </tr> 3752 </table> 3753 </div> 3754 } 3755 } 3756 3757 // PASSPORT DUPLICATE 3758 else if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 3759 actionRequestDuplicate) 3760 { 3761 <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> 3762 <div class="list-actions"> 3763 <table id="passport-duplicate-info" class="aside-content aside-content-info notactive"> 3764 <colgroup> 3765 <col width="30" /> 3766 <col /> 3767 </colgroup> 3768 <tr class="head"> 3769 <th><i class="fa fa-info"></i></th> 3770 <th>@Translate("Product", "Product")</th> 3771 </tr> 3772 <tr> 3773 <td>&nbsp;</td> 3774 <td id="passport-duplicate-product-name"><!--value is set by javascript based on form selection--></td> 3775 </tr> 3776 <tr class="head"> 3777 <th><i class="fa fa-eur"></i></th> 3778 <th>@Translate("Price", "Price")</th> 3779 </tr> 3780 <tr> 3781 <td>&nbsp;</td> 3782 <td> 3783 <span id="passport-duplicate-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3784 </td> 3785 </tr> 3786 </table> 3787 </div> 3788 } 3789 3790 // REGISTER HORSE TO NAME 3791 else if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 3792 actionRegisterHorseToName) 3793 { 3794 var registerHorseProduct = productService.GetProductByNumber(Kwpn.Models.Constants.StringConstants.ProductNumbers.RegisterHorse, ecomLanguageId); 3795 if (registerHorseProduct != null) 3796 { 3797 <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> 3798 <div class="list-actions"> 3799 <table id="register-horse-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>@registerHorseProduct.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(registerHorseProduct)) (@Translate("VatIncluded", "VAT included"))</td> 3819 </tr> 3820 </table> 3821 </div> 3822 } 3823 } 3824 3825 // REGISTER EMBRYO 3826 else if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 3827 actionRegisterEmbryo) 3828 { 3829 <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> 3830 <div class="list-actions"> 3831 <table id="register-embryo-aside-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="register-embryo-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="register-embryo-product-price"><!--value is set by javascript based on form selection--></span> 3852 </td> 3853 </tr> 3854 </table> 3855 </div> 3856 } 3857 3858 // REGISTER FOAL 3859 else if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 3860 actionRegisterFoal) 3861 { 3862 <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> 3863 <div class="list-actions"> 3864 <table id="register-foal-aside-info" class="aside-content aside-content-info notactive"> 3865 <colgroup> 3866 <col width="30" /> 3867 <col /> 3868 </colgroup> 3869 <tr class="head"> 3870 <th><i class="fa fa-info"></i></th> 3871 <th>@Translate("Product", "Product")</th> 3872 </tr> 3873 <tr> 3874 <td>&nbsp;</td> 3875 <td id="register-foal-product-name"><!--value is set by javascript based on form selection--></td> 3876 </tr> 3877 <tr class="head"> 3878 <th><i class="fa fa-eur"></i></th> 3879 <th>@Translate("Price", "Price")</th> 3880 </tr> 3881 <tr> 3882 <td>&nbsp;</td> 3883 <td> 3884 <span id="register-foal-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3885 </td> 3886 </tr> 3887 </table> 3888 </div> 3889 } 3890 3891 // REQUEST WFFS / GENOME BREEDING VALUE TEST 3892 else if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 3893 actionRequestGenomicBreedingValueTest) 3894 { 3895 <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> 3896 <div class="list-actions"> 3897 <table id="genome-breeding-aside-info" class="aside-content aside-content-info notactive"> 3898 <colgroup> 3899 <col width="30" /> 3900 <col /> 3901 </colgroup> 3902 <tr class="head"> 3903 <th><i class="fa fa-info"></i></th> 3904 <th>@Translate("Product", "Product")</th> 3905 </tr> 3906 <tr> 3907 <td>&nbsp;</td> 3908 <td id="genome-breeding-product-name"><!--value is set by javascript based on form selection--></td> 3909 </tr> 3910 <tr class="head"> 3911 <th><i class="fa fa-eur"></i></th> 3912 <th>@Translate("Price", "Price")</th> 3913 </tr> 3914 <tr> 3915 <td>&nbsp;</td> 3916 <td> 3917 <span id="genome-breeding-product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3918 </td> 3919 </tr> 3920 </table> 3921 </div> 3922 } 3923 3924 // SELL HORSE VIA MARKETPLACE 3925 else if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && 3926 actionSellViaMarketplace) 3927 { 3928 <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> 3929 <div class="list-actions"> 3930 <table id="marketplace-aside-info" class="aside-content aside-content-info notactive"> 3931 <colgroup> 3932 <col width="30" /> 3933 <col /> 3934 </colgroup> 3935 <tr class="head"> 3936 <th><i class="fa fa-info"></i></th> 3937 <th>@Translate("Product", "Product")</th> 3938 </tr> 3939 <tr> 3940 <td>&nbsp;</td> 3941 <td class="product-name"><!--value is set by javascript based on form selection--></td> 3942 </tr> 3943 <tr class="head paymentInfo hidden"> 3944 <th><i class="fa fa-cc"></i></th> 3945 <th>@Translate("PaymentMethod", "Payment method")</th> 3946 </tr> 3947 <tr class="paymentInfo hidden"> 3948 <td>&nbsp;</td> 3949 <td>@Translate("PaymentMethod_Text_Online", "Pay directly online")</td> 3950 </tr> 3951 <tr class="head"> 3952 <th><i class="fa fa-eur"></i></th> 3953 <th>@Translate("Price", "Price")</th> 3954 </tr> 3955 <tr> 3956 <td>&nbsp;</td> 3957 <td> 3958 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3959 </td> 3960 </tr> 3961 </table> 3962 </div> 3963 } 3964 3965 // REQUEST PREDICATES 3966 else if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && 3967 actionRequestPredicates) 3968 { 3969 <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> 3970 <div class="list-actions"> 3971 <table id="request-predicates-aside-info" class="aside-content aside-content-info notactive"> 3972 <colgroup> 3973 <col width="30" /> 3974 <col /> 3975 </colgroup> 3976 <tr class="head"> 3977 <th><i class="fa fa-info"></i></th> 3978 <th>@Translate("Product", "Product")</th> 3979 </tr> 3980 <tr> 3981 <td>&nbsp;</td> 3982 <td class="product-name"><!--value is set by javascript based on form selection--></td> 3983 </tr> 3984 <tr class="head"> 3985 <th><i class="fa fa-eur"></i></th> 3986 <th>@Translate("Price", "Price")</th> 3987 </tr> 3988 <tr> 3989 <td>&nbsp;</td> 3990 <td> 3991 <span class="product-price"><!--value is set by javascript based on form selection--></span> (@Translate("VatIncluded", "VAT included")) 3992 </td> 3993 </tr> 3994 </table> 3995 </div> 3996 } 3997 } 3998 3999 @*BACK TO DETAILS*@ 4000 @if (!string.IsNullOrWhiteSpace(action)) 4001 { 4002 <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> 4003 <div class="list-actions"> 4004 <ul id="back-to-info-list" class="aside-content notactive"> 4005 <li><a href='@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, animalCode)'>@Translate("ShowHorseDetails", "Show horse details")</a></li> 4006 </ul> 4007 </div> 4008 } 4009 4010 @*MEMBERSHIP CALL TO ACTION*@ 4011 @*@if (!string.IsNullOrWhiteSpace(action) && (!Kwpn.Repository.Helpers.LoginHelper.HasAccessToExtendedHorseData())) 4012 { 4013 var becomeMemberPageId = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.BecomeMemberPageId); 4014 if (!string.IsNullOrWhiteSpace(becomeMemberPageId)) 4015 { 4016 var becomeMemberPageUrl = string.Format("/Default.aspx?ID={0}", becomeMemberPageId); 4017 <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> 4018 <div class="list-actions"> 4019 <ul id="become-member-list" class="aside-content notactive"> 4020 <li><a href='@becomeMemberPageUrl'>@Translate("BecomeMemberNow", "Become a member now")</a></li> 4021 </ul> 4022 </div> 4023 } 4024 }*@ 4025 4026 @if (action == null) 4027 { 4028 <!-- /204473129/DatabaseDetail/Banner1 --> 4029 <div id='div-gpt-ad-banner1-1' class="google-container google-container--size--b google-container--databasedetail"> 4030 <script> 4031 googletag.cmd.push(function () { googletag.display('div-gpt-ad-banner1-1'); }); 4032 </script> 4033 </div> 4034 } 4035 </aside> 4036 </div> 4037 </div> 4038 <article class="col-xs-12 col-md-10 page-content"> 4039 @if ( 4040 !isApprovedStud || 4041 isMyHorse || 4042 (action != null && action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace)) 4043 { 4044 <div>@inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4045 @*note: variables like "action/isAlive/isMyHorse/horse/culture/animalCode/showGeneral" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 4046 @if (!string.IsNullOrWhiteSpace(action)) 4047 { 4048 4049 // BREEDING ADVICE 4050 if (action.Equals(Translate("ActionLink_Request_BreedingAdvice", "BreedingAdvice"), StringComparison.InvariantCultureIgnoreCase) && 4051 actionRequestBreedingAdvice) 4052 { 4053 var pageIdFormBreedingAdvice = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.BreedingAdvice); 4054 if (!string.IsNullOrWhiteSpace(pageIdFormBreedingAdvice)) 4055 { 4056 showGeneral = false; 4057 4058 // SEO VIRTUAL PAGE VIEW LOGGING 4059 <Text> 4060 <script> 4061 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_breeding_advice", "breeding-advice").UrlEncode()).ToLower()"); 4062 </script> 4063 </Text> 4064 4065 @RenderPageContent(Convert.ToInt32(pageIdFormBreedingAdvice)) 4066 } 4067 } 4068 4069 // STALLION ADVICE 4070 @*if (action.Equals(Translate("ActionLink_Get_StallionAdvice", "StallionAdvice"), StringComparison.InvariantCultureIgnoreCase) && 4071 actionGetStallionAdvice) 4072 { 4073 var pageIdGetStallionAdvice = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.StallionAdvice)?.ID ?? 0; 4074 if (pageIdGetStallionAdvice > 0) 4075 { 4076 showGeneral = false; 4077 4078 // SEO VIRTUAL PAGE VIEW LOGGING 4079 <Text> 4080 <script> 4081 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_stalliob_advice", "stallion-advice").UrlEncode()).ToLower()"); 4082 </script> 4083 </Text> 4084 4085 @RenderPageContent(pageIdGetStallionAdvice) 4086 } 4087 }*@ 4088 4089 // EVENT SIGN UP 4090 if (action.Equals(Translate("ActionLink_SignUp_InspectionEvent", "EventSignUp"), StringComparison.InvariantCultureIgnoreCase) && 4091 actionSignUpInspectionEvent) 4092 { 4093 var pageIdFormEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.EventSignUp); 4094 if (!string.IsNullOrWhiteSpace(pageIdFormEventSignUp) && !string.IsNullOrWhiteSpace(actionId)) 4095 { 4096 showGeneral = false; 4097 4098 // SEO VIRTUAL PAGE VIEW LOGGING 4099 <Text> 4100 <script> 4101 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 4102 </script> 4103 </Text> 4104 4105 @RenderPageContent(Convert.ToInt32(pageIdFormEventSignUp)) 4106 } 4107 } 4108 4109 // CUP EVENT SIGN UP 4110 if (actionSignUpCupEvent) 4111 { 4112 var pageIdFormCupEventSignUp = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.CupEventSignUp); 4113 if (!string.IsNullOrWhiteSpace(pageIdFormCupEventSignUp)) 4114 { 4115 showGeneral = false; 4116 4117 // SEO VIRTUAL PAGE VIEW LOGGING 4118 <Text> 4119 <script> 4120 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_event_signup", "event-signup").UrlEncode()).ToLower()"); 4121 </script> 4122 </Text> 4123 4124 @RenderPageContent(Convert.ToInt32(pageIdFormCupEventSignUp)) 4125 } 4126 } 4127 4128 // REPORT DECEASED HORSE 4129 if (action.Equals(Translate("ActionLink_Report_HorseDied", "HorseDied"), StringComparison.InvariantCultureIgnoreCase) && 4130 actionReportDeceasedHorse) 4131 { 4132 var pageIdReportDeceased = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.ReportDeceased); 4133 if (!string.IsNullOrWhiteSpace(pageIdReportDeceased)) 4134 { 4135 showGeneral = false; 4136 4137 // SEO VIRTUAL PAGE VIEW LOGGING 4138 <Text> 4139 <script> 4140 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_report_deceased_horse", "report-deceased-horse").UrlEncode()).ToLower()"); 4141 </script> 4142 </Text> 4143 4144 @RenderPageContent(Convert.ToInt32(pageIdReportDeceased)) 4145 } 4146 } 4147 4148 // CONINUED PASSPORT 4149 if (action.Equals(Translate("ActionLink_Request_ContinuedPassport", "PassportRenewal"), StringComparison.InvariantCultureIgnoreCase) && 4150 actionRequestContinuedPassport) 4151 { 4152 var pageIdPassportRenewal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportRenewal); 4153 if (!string.IsNullOrWhiteSpace(pageIdPassportRenewal)) 4154 { 4155 showGeneral = false; 4156 4157 // SEO VIRTUAL PAGE VIEW LOGGING 4158 <Text> 4159 <script> 4160 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_continued_passport", "continued-passport").UrlEncode()).ToLower()"); 4161 </script> 4162 </Text> 4163 4164 @RenderPageContent(Convert.ToInt32(pageIdPassportRenewal)) 4165 } 4166 } 4167 4168 // REQUEST DUPLICATE 4169 if (action.Equals(Translate("ActionLink_Request_Duplicate", "Duplicate"), StringComparison.InvariantCultureIgnoreCase) && 4170 actionRequestDuplicate) 4171 { 4172 var pageIdPassportDuplicate = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.PassportDuplicate); 4173 if (!string.IsNullOrWhiteSpace(pageIdPassportDuplicate)) 4174 { 4175 showGeneral = false; 4176 4177 // SEO VIRTUAL PAGE VIEW LOGGING 4178 <Text> 4179 <script> 4180 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_duplicate", "request-duplicate").UrlEncode()).ToLower()"); 4181 </script> 4182 </Text> 4183 4184 @RenderPageContent(Convert.ToInt32(pageIdPassportDuplicate)) 4185 } 4186 } 4187 4188 // REGISTER HORSE TO NAME 4189 if (action.Equals(Translate("ActionLink_Register_HorseToName", "RegisterHorse"), StringComparison.InvariantCultureIgnoreCase) && 4190 actionRegisterHorseToName) 4191 { 4192 var pageIdFormRegisterHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterHorse); 4193 if (!string.IsNullOrWhiteSpace(pageIdFormRegisterHorse)) 4194 { 4195 showGeneral = false; 4196 4197 // SEO VIRTUAL PAGE VIEW LOGGING 4198 <Text> 4199 <script> 4200 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_horse", "register-horse").UrlEncode()).ToLower()"); 4201 </script> 4202 </Text> 4203 4204 @RenderPageContent(Convert.ToInt32(pageIdFormRegisterHorse)) 4205 } 4206 } 4207 4208 // REGISTER EMBRYO 4209 if (action.Equals(Translate("ActionLink_Register_Embryo", "RegisterEmbryo"), StringComparison.InvariantCultureIgnoreCase) && 4210 actionRegisterEmbryo) 4211 { 4212 4213 var pageRegisterEmbryo = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterEmbryo); 4214 var pageIdRegisterEmbryo = pageRegisterEmbryo?.ID ?? 0; 4215 if (pageIdRegisterEmbryo > 0) 4216 { 4217 showGeneral = false; 4218 4219 // SEO VIRTUAL PAGE VIEW LOGGING 4220 <Text> 4221 <script> 4222 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_embryo", "register-embryo").UrlEncode()).ToLower()"); 4223 </script> 4224 </Text> 4225 4226 @RenderPageContent(pageIdRegisterEmbryo) 4227 } 4228 } 4229 4230 // REGISTER FOAL 4231 if (action.Equals(Translate("ActionLink_Register_Foal", "RegisterFoal"), StringComparison.InvariantCultureIgnoreCase) && 4232 actionRegisterFoal) 4233 { 4234 var pageIdRegisterFoal = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RegisterFoal); 4235 if (!string.IsNullOrWhiteSpace(pageIdRegisterFoal)) 4236 { 4237 showGeneral = false; 4238 4239 // SEO VIRTUAL PAGE VIEW LOGGING 4240 <Text> 4241 <script> 4242 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_register_foal", "register-foal").UrlEncode()).ToLower()"); 4243 </script> 4244 </Text> 4245 4246 @RenderPageContent(Convert.ToInt32(pageIdRegisterFoal)) 4247 } 4248 } 4249 4250 // REQUEST GENOME BREEDING VALUE OC (DNA-TEST) 4251 if (action.Equals(Translate("ActionLink_Request_GenomeBreedingValueTest", "GenomeBreedingValue"), StringComparison.InvariantCultureIgnoreCase) && 4252 actionRequestGenomicBreedingValueTest) 4253 { 4254 var pageIdGenomicBreedingValueTest = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.RequestGenomeBreedingValueTest); 4255 if (!string.IsNullOrWhiteSpace(pageIdGenomicBreedingValueTest)) 4256 { 4257 showGeneral = false; 4258 4259 // SEO VIRTUAL PAGE VIEW LOGGING 4260 <Text> 4261 <script> 4262 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_dna_test", "request-dna-test").UrlEncode()).ToLower()"); 4263 </script> 4264 </Text> 4265 4266 @RenderPageContent(Convert.ToInt32(pageIdGenomicBreedingValueTest)) 4267 } 4268 } 4269 4270 // SELL HORSE VIA MARKETPLACE 4271 if (action.Equals(Translate("ActionLink_SellViaMarketplace", "sell"), StringComparison.InvariantCultureIgnoreCase) && actionSellViaMarketplace) 4272 { 4273 var pageIdSellHorse = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.SellHorse); 4274 if (!string.IsNullOrWhiteSpace(pageIdSellHorse)) 4275 { 4276 showGeneral = false; 4277 4278 // SEO VIRTUAL PAGE VIEW LOGGING 4279 <Text> 4280 <script> 4281 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_sell_horse", "sell-horse").UrlEncode()).ToLower()"); 4282 </script> 4283 </Text> 4284 4285 @RenderPageContent(Convert.ToInt32(pageIdSellHorse)) 4286 } 4287 } 4288 4289 // INBREED CALCULATION 4290 if (action.Equals(Translate("ActionLink_InbreedingCalculation", "InbreedingCalculation"), StringComparison.InvariantCultureIgnoreCase) && actionInbreedingCalculation) 4291 { 4292 var pageIdInbreedCalculation = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.InbreedCalculationPageId); 4293 if (!string.IsNullOrWhiteSpace(pageIdInbreedCalculation)) 4294 { 4295 showGeneral = false; 4296 4297 // SEO VIRTUAL PAGE VIEW LOGGING 4298 <Text> 4299 <script> 4300 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_inbreed_calculation", "inbreed-calculation").UrlEncode()).ToLower()"); 4301 </script> 4302 </Text> 4303 4304 @RenderPageContent(Convert.ToInt32(pageIdInbreedCalculation)) 4305 } 4306 } 4307 4308 // REQUEST PREDICATES 4309 if (action.Equals(Translate("ActionLink_Request_Predicates", "RequestPredicates"), StringComparison.InvariantCultureIgnoreCase) && actionRequestPredicates) 4310 { 4311 var pageIdRequestPredicates = Kwpn.Repository.Helpers.AreaHelper.GetAreaItemStringValueBySystemName(Kwpn.Models.Constants.StringConstants.PageIdSystemNames.PredicatesRequestPageId); 4312 if (!string.IsNullOrWhiteSpace(pageIdRequestPredicates)) 4313 { 4314 showGeneral = false; 4315 4316 // SEO VIRTUAL PAGE VIEW LOGGING 4317 <Text> 4318 <script> 4319 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_request_predicates", "request-predicates").UrlEncode()).ToLower()"); 4320 </script> 4321 </Text> 4322 4323 @RenderPageContent(Convert.ToInt32(pageIdRequestPredicates)) 4324 } 4325 } 4326 4327 4328 // DNA PAGE 4329 @*if (action.Equals(Translate("ActionLink_DnaPage", "DNA-Page"), StringComparison.InvariantCultureIgnoreCase) && actionDnaPage) 4330 { 4331 var dnaPageId = pageService.GetPageByNavigationTag(Dynamicweb.Frontend.PageView.Current().AreaID, Kwpn.Models.Constants.StringConstants.FormPageIdSystemNames.DnaPage)?.ID ?? 0; 4332 if (dnaPageId > 0) 4333 { 4334 showGeneral = false; 4335 4336 // SEO VIRTUAL PAGE VIEW LOGGING 4337 <Text> 4338 <script> 4339 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_action_dnapage", "dna-page").UrlEncode()).ToLower()"); 4340 </script> 4341 </Text> 4342 4343 @RenderPageContent(dnaPageId) 4344 } 4345 }*@ 4346 } 4347 <script> 4348 var pageTitle = $('.paragraphTitel h1, .paragraphText h1').text(); 4349 $('.paragraphTitel h1, .paragraphText h1').remove(); 4350 $('.pageTitle').text(pageTitle); 4351 </script></div> 4352 } 4353 @if (showGeneral) 4354 { 4355 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4356 <div class="horse-detail-item" id="horse-detail-item-stud-photo" data-content="tab_general"> 4357 @if (horse.HasImage) 4358 { 4359 var studPhoto = string.Format("images/horseimage.ashx?pc={0}", horse.AnimalCode); 4360 <div class="row"> 4361 <div class="col-xs-12"> 4362 <img src="@studPhoto" alt="@horseName" /> 4363 </div> 4364 </div> 4365 } 4366 </div> 4367 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4368 <div class="horse-detail-item" id="horse-detail-item-general-info" data-content="tab_general"> 4369 @{ 4370 var publicSportsLevels = Kwpn.Repository.Helpers.FormatHelpers.CreateSportniveauList(horse.SportResults); 4371 var kinship = Kwpn.Repository.Helpers.HorseHelper.GetKinshipPercentage(horse, Dynamicweb.Frontend.PageView.Current().Area.Culture); 4372 } 4373 @CreateHorseInfoTableRow(Translate("LifeNumber", "Life number"), lifeNumber) 4374 @CreateHorseInfoTableRow(Translate("DateOfBirth", "Date of birth"), dateOfBirth) 4375 @CreateHorseInfoTableRow(Translate("BreedingDirection", "Breeding direction"), breedingDirection) 4376 @CreateHorseInfoTableRow(Translate("Register", "Register"), register) 4377 @if (!string.IsNullOrEmpty(kinship)) 4378 { 4379 var kinshipLabel = Translate("Kinship", "Kinship"); 4380 var kinshipValue = kinship; 4381 if (kinship.Contains(":")) { 4382 kinshipLabel = kinship.Split(':')[0].Trim(); 4383 kinshipValue = kinship.Split(':')[1].Trim(); 4384 } 4385 @CreateHorseInfoTableRow(kinshipLabel, kinshipValue) 4386 } 4387 @if (!string.IsNullOrWhiteSpace(publicSportsLevels)) 4388 { 4389 @CreateHorseInfoTableRow(Translate("SportStandings", "Sport standings"), publicSportsLevels) 4390 } 4391 @CreateHorseInfoTableRow(Translate("Withers", "Withers"), withers) 4392 @CreateHorseInfoTableRow(Translate("Color", "Color"), color) 4393 @if (!string.IsNullOrWhiteSpace(wffs)) 4394 { 4395 @CreateHorseInfoTableRow(Translate("WFFS", "WFFS"), wffs) 4396 } 4397 @if (isMyHorse || isBredByMe) 4398 { 4399 @CreateHorseInfoTableRow(Translate("ChipNumber", "Chip number"), chipNumber) 4400 } 4401 </div> 4402 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4403 <div class="horse-detail-item" id="horse-detail-item-breeders" data-content="tab_general"> 4404 <div class="breedersinfo infotable"> 4405 4406 @if (hasBreeders) 4407 { 4408 var showBreederLinks = breeders.Any(breeder => breeder.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(breeder.PersonCode)); 4409 4410 <h2>@(breeders.Count() > 1 ? Translate("Breeders", "Breeders") : Translate("Breeder", "Breeder"))</h2> 4411 4412 if (showBreederLinks) 4413 { 4414 <p>@Translate("Breeders_ClickOnNameText", "Click the breeder name to get more info about this breeder.")</p> 4415 } 4416 4417 var breederCounter = 0; 4418 @CreateInfoTableRow(breederCounter, Translate("Name", "Name"), "", true) 4419 foreach (var breeder in breeders) 4420 { 4421 if (breeder.AllowedOwnerBreeder) 4422 { 4423 var linkData = Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(breeder.PersonCode) ? $" class=\"breeder-link\" data-personcode=\"{breeder.PersonCode}\"" : ""; // only link to breeders which are member 4424 @CreateInfoTableRow(breederCounter, $"<span{linkData}>{breeder.PersonName}</span>", "", false, false, false, false, true) 4425 } 4426 else 4427 { 4428 @CreateInfoTableRow(breederCounter, Translate("Breeders_Anonymous", "Anonymous"), "", false, false, false, false, true) 4429 } 4430 breederCounter++; 4431 } 4432 } 4433 4434 4435 @{ 4436 // if horse is approved stud or horse is mine or minimal 1 owner has given approval to be shown, then show owners 4437 List<Kwpn.Models.ApiModels.PersonModel> owners = horse.Owners; 4438 var hasOwners = owners != null && owners.Any(); 4439 4440 if (hasOwners) 4441 { 4442 var showOwnerLinks = owners.Any(owner => owner.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode)); 4443 4444 <h2>@(owners.Count > 1 ? Translate("Registered2", "Registered") : Translate("Registered", "Registered"))</h2> 4445 4446 if (showOwnerLinks) 4447 { 4448 <p>@Translate("Registered_ClickOnNameText", "Click the name to get more info about this registered owner.")</p> 4449 } 4450 4451 var registeredCounter = 0; 4452 @CreateInfoTableRow(registeredCounter, Translate("Name", "Name"), "", true) 4453 foreach (var owner in owners) 4454 { 4455 if (owner.AllowedOwnerBreeder && Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode)) 4456 { 4457 var linkData = Kwpn.Repository.Helpers.UserHelper.CheckIfIsMember(owner.PersonCode) ? $" class=\"registered-link\" data-personcode=\"{owner.PersonCode}\"" : ""; // only link to owners which are member 4458 @CreateInfoTableRow(registeredCounter, $"<span{linkData}>{owner.PersonName}</span>", "", false, false, false, false, true) 4459 } 4460 else 4461 { 4462 @CreateInfoTableRow(registeredCounter, Translate("Owner_Anonymous", "Anonymous"), "", false, false, false, false, true) 4463 } 4464 registeredCounter++; 4465 } 4466 } 4467 } 4468 </div> 4469 </div> 4470 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4471 @*note: variables like "horse/culture" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 4472 <div class="horse-detail-item" id="horse-detail-item-pedigree" data-content="tab_general"> 4473 @{ 4474 var pedigree_Me = Kwpn.Repository.Helpers.HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, DateTime.MinValue); 4475 var pedigree_Father = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Father); 4476 var pedigree_Mother = horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.Mother); 4477 } 4478 @if (pedigree_Father != null && pedigree_Mother != null) 4479 { 4480 <script type="text/javascript"> 4481 4482 $(document).ready(function () { 4483 4484 var jsGender = ''; 4485 if ('@genderClass' == 'fa-mars') { 4486 jsGender = 'male' 4487 } else { 4488 jsGender = 'female' 4489 } 4490 4491 var datasource = { 4492 'name': '@horse.Lifenumber.JsEncode()', 4493 'title': '@horse.AnimalName.JsEncode()', 4494 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.Register)) 4495 { 4496 <text>'subtext': '@horse.Register.JsEncode()',</text> 4497 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.AnimalCode)',</text> 4498 } 4499 else 4500 { 4501 <text>'subtext': '-',</text> 4502 <text>'link': '',</text> 4503 } 4504 'sex': jsGender, 4505 'children': [ 4506 { 4507 'name': '@pedigree_Father.Lifenumber.JsEncode()', 4508 'title': '@pedigree_Father.AnimalName.JsEncode()', 4509 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Father.Register)) 4510 { 4511 <text>'subtext': '@pedigree_Father.Register.JsEncode()',</text> 4512 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Father.AnimalCode)',</text> 4513 } 4514 else 4515 { 4516 <text>'subtext': '-',</text> 4517 <text>'link': '',</text> 4518 } 4519 'sex': 'male', 4520 'children': [ 4521 { 4522 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Lifenumber.JsEncode()', 4523 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalName.JsEncode()', 4524 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register)) 4525 { 4526 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).Register.JsEncode()',</text> 4527 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFather).AnimalCode)',</text> 4528 } 4529 else 4530 { 4531 <text>'subtext': '-',</text> 4532 <text>'link': '',</text> 4533 } 4534 'sex': 'male', 4535 'children': [ 4536 { 4537 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Lifenumber.JsEncode()', 4538 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalName.JsEncode()', 4539 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register)) 4540 { 4541 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).Register.JsEncode()',</text> 4542 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersFather).AnimalCode)',</text> 4543 } 4544 else 4545 { 4546 <text>'subtext': '-',</text> 4547 <text>'link': '',</text> 4548 } 4549 'sex': 'male' 4550 }, { 4551 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Lifenumber.JsEncode()', 4552 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalName.JsEncode()', 4553 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register)) 4554 { 4555 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).Register.JsEncode()',</text> 4556 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersFathersMother).AnimalCode)',</text> 4557 } 4558 else 4559 { 4560 <text>'subtext': '-',</text> 4561 <text>'link': '',</text> 4562 } 4563 'sex': 'female' 4564 } 4565 ] 4566 }, { 4567 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Lifenumber.JsEncode()', 4568 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalName.JsEncode()', 4569 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register)) 4570 { 4571 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).Register.JsEncode()',</text> 4572 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMother).AnimalCode)',</text> 4573 } 4574 else 4575 { 4576 <text>'subtext': '-',</text> 4577 <text>'link': '',</text> 4578 } 4579 'sex': 'female', 4580 'children': [ 4581 { 4582 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Lifenumber.JsEncode()', 4583 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalName.JsEncode()', 4584 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register)) 4585 { 4586 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).Register.JsEncode()',</text> 4587 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersFather).AnimalCode)',</text> 4588 } 4589 else 4590 { 4591 <text>'subtext': '-',</text> 4592 <text>'link': '',</text> 4593 } 4594 'sex': 'male' 4595 }, { 4596 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Lifenumber.JsEncode()', 4597 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalName.JsEncode()', 4598 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register)) 4599 { 4600 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).Register.JsEncode()',</text> 4601 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.FathersMothersMother).AnimalCode)',</text> 4602 } 4603 else 4604 { 4605 <text>'subtext': '-',</text> 4606 <text>'link': '',</text> 4607 } 4608 'sex': 'female' 4609 }] 4610 }] 4611 }, 4612 { 4613 'name': '@pedigree_Mother.Lifenumber.JsEncode()', 4614 'title': '@pedigree_Mother.AnimalName.JsEncode()', 4615 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(pedigree_Mother.Register)) 4616 { 4617 <text>'subtext': '@pedigree_Mother.Register.JsEncode()',</text> 4618 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, pedigree_Mother.AnimalCode)',</text> 4619 } 4620 else 4621 { 4622 <text>'subtext': '-',</text> 4623 <text>'link': '',</text> 4624 } 4625 'sex': 'female', 4626 'children': [ 4627 { 4628 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Lifenumber.JsEncode()', 4629 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalName.JsEncode()', 4630 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register)) 4631 { 4632 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).Register.JsEncode()',</text> 4633 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFather).AnimalCode)',</text> 4634 } 4635 else 4636 { 4637 <text>'subtext': '-',</text> 4638 <text>'link': '',</text> 4639 } 4640 'sex': 'male', 4641 'children': [ 4642 { 4643 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Lifenumber.JsEncode().JsEncode()', 4644 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalName.JsEncode().JsEncode()', 4645 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register)) 4646 { 4647 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).Register.JsEncode().JsEncode()',</text> 4648 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersFather).AnimalCode)',</text> 4649 } 4650 else 4651 { 4652 <text>'subtext': '-',</text> 4653 <text>'link': '',</text> 4654 } 4655 'sex': 'male' 4656 }, { 4657 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Lifenumber.JsEncode()', 4658 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalName.JsEncode()', 4659 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register)) 4660 { 4661 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).Register.JsEncode()',</text> 4662 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersFathersMother).AnimalCode)',</text> 4663 } 4664 else 4665 { 4666 <text>'subtext': '-',</text> 4667 <text>'link': '',</text> 4668 } 4669 'sex': 'female' 4670 } 4671 ] 4672 }, { 4673 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Lifenumber.JsEncode()', 4674 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalName.JsEncode()', 4675 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register)) 4676 { 4677 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).Register.JsEncode()',</text> 4678 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMother).AnimalCode)',</text> 4679 } 4680 else 4681 { 4682 <text>'subtext': '-',</text> 4683 <text>'link': '',</text> 4684 } 4685 'sex': 'female', 4686 'children': [ 4687 { 4688 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Lifenumber.JsEncode()', 4689 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalName.JsEncode()', 4690 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register)) 4691 { 4692 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).Register.JsEncode()',</text> 4693 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersFather).AnimalCode)',</text> 4694 } 4695 else 4696 { 4697 <text>'subtext': '-',</text> 4698 <text>'link': '',</text> 4699 } 4700 'sex': 'male' 4701 }, { 4702 'name': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Lifenumber.JsEncode()', 4703 'title': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalName.JsEncode()', 4704 @if (Kwpn.Repository.Helpers.HorseHelper.IsAllowedRegister(horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register)) 4705 { 4706 <text>'subtext': '@horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).Register.JsEncode()',</text> 4707 <text>'link': '@Kwpn.Repository.Helpers.HorseHelper.GetHorseInfoPageUrl(culture, horse.GetPredigreeByPrefix(Kwpn.Models.Constants.StringConstants.PedigreePrefixes.MothersMothersMother).AnimalCode)',</text> 4708 } 4709 else 4710 { 4711 <text>'subtext': '-',</text> 4712 <text>'link': '',</text> 4713 } 4714 'sex': 'female' 4715 } 4716 ] 4717 } 4718 ] 4719 }] 4720 }; 4721 4722 4723 $('#chart-container').orgchart({ 4724 data: datasource, 4725 direction: 'l2r', 4726 nodeContent: 'title', 4727 parentNodeSymbol: '', 4728 createNode: function ($node, data) { 4729 var icon = '<div class="imagecontainer"><i class="fa fa-' + (data.sex === 'male' ? 'mars' : 'venus') + '"></i></div>'; 4730 var subtext = '<div class="subtext">' + data.subtext + '</div></div>'; 4731 $node.find('i[class^="edge"], i[class^="fa"]').remove(); 4732 $node.prepend(icon); 4733 $node.append(subtext); 4734 $node.find('.imagecontainer').nextAll().wrapAll('<div class="contextcontainer"/>'); 4735 4736 if (data.link.length > 0) { 4737 $node.css('cursor', 'pointer'); 4738 $node.on('click', function (event) { 4739 location.href = data.link; 4740 }); 4741 } 4742 4743 $node.on('mouseenter', function () { 4744 $('#custom_tooltip').css('display', 'block'); 4745 $('#custom_tooltip').find('.title').text(data.title); 4746 $('#custom_tooltip').find('.subtext').text(data.subtext); 4747 }); 4748 4749 $node.on('mouseleave', function () { 4750 $('#custom_tooltip').css('display', 'none'); 4751 }); 4752 } 4753 }); 4754 4755 $('.tooltip').on('shown.bs.tooltip', function () { 4756 console.log('tooltip show'); 4757 }); 4758 4759 4760 }); 4761 4762 $(window).on('mousemove', function (e) { 4763 var mouseX = e.clientX + 10; 4764 var mouseY = e.clientY + 20; 4765 $('#custom_tooltip').css('left', mouseX); 4766 $('#custom_tooltip').css('top', mouseY); 4767 }); 4768 </script> 4769 <div class="pedigreetree"> 4770 <div id="custom_tooltip"> 4771 <div class="title"></div> 4772 <div class="subtext"></div> 4773 </div> 4774 <h2>@Translate("Pedigree", "Pedigree")</h2> 4775 <div id="chart-container"></div> 4776 </div> 4777 } 4778 </div> 4779 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4780 <div class="horse-detail-item" id="horse-detail-item-markings" data-content="tab_general"> 4781 @if (isMyHorse || isBredByMe) 4782 { 4783 // MARKINGS DATA 4784 var showMarkings = false; 4785 var head = ""; 4786 var headInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.Head); 4787 if (headInfo != null) 4788 { 4789 head = headInfo.Description; 4790 showMarkings = true; 4791 } 4792 var frontLeft = ""; 4793 var frontLeftInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.FrontLeft); 4794 if (frontLeftInfo != null) 4795 { 4796 frontLeft = frontLeftInfo.Description; 4797 showMarkings = true; 4798 } 4799 var frontRight = ""; 4800 var frontRightInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.FrontRight); 4801 if (frontRightInfo != null) 4802 { 4803 frontRight = frontRightInfo.Description; 4804 showMarkings = true; 4805 } 4806 var rearLeft = ""; 4807 var rearLeftInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.RearLeft); 4808 if (rearLeftInfo != null) 4809 { 4810 rearLeft = rearLeftInfo.Description; 4811 showMarkings = true; 4812 } 4813 var rearRight = ""; 4814 var rearRightInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.RearRight); 4815 if (rearRightInfo != null) 4816 { 4817 rearRight = rearRightInfo.Description; 4818 showMarkings = true; 4819 } 4820 var misc = ""; 4821 var miscInfo = horse.GetMarkingByBodyPart(StringConstants.MarkingTypes.Misc); 4822 if (miscInfo != null) 4823 { 4824 misc = miscInfo.Description; 4825 showMarkings = true; 4826 } 4827 4828 if (showMarkings) 4829 { 4830 var markingsCounter = 0; 4831 <div class="breedersinfo infotable"> 4832 <h2>@Translate("Markings", "Markings")</h2> 4833 @CreateInfoTableRow(markingsCounter, Translate("MarkingLocation", "Location"), Translate("MarkingDescription", "Description"), true) 4834 @if (!string.IsNullOrWhiteSpace(head)) 4835 { 4836 @CreateInfoTableRow(markingsCounter, Translate("MarkingHead", "Head"), head, false, false, false) 4837 markingsCounter++; 4838 } 4839 @if (!string.IsNullOrWhiteSpace(frontLeft)) 4840 { 4841 @CreateInfoTableRow(markingsCounter, Translate("MarkingFrontLeft", "Front left"), frontLeft, false, false, false) 4842 markingsCounter++; 4843 } 4844 @if (!string.IsNullOrWhiteSpace(frontRight)) 4845 { 4846 @CreateInfoTableRow(markingsCounter, Translate("MarkingFrontRight", "Front right"), frontRight, false, false, false) 4847 markingsCounter++; 4848 } 4849 @if (!string.IsNullOrWhiteSpace(rearLeft)) 4850 { 4851 @CreateInfoTableRow(markingsCounter, Translate("MarkingRearLeft", "Rear left"), rearLeft, false, false, false) 4852 markingsCounter++; 4853 } 4854 @if (!string.IsNullOrWhiteSpace(rearRight)) 4855 { 4856 @CreateInfoTableRow(markingsCounter, Translate("MarkingRearRight", "Rear right"), rearRight, false, false, false) 4857 markingsCounter++; 4858 } 4859 @if (!string.IsNullOrWhiteSpace(misc)) 4860 { 4861 @CreateInfoTableRow(markingsCounter, Translate("MarkingMiscellaneous", "Miscellaneous"), misc, false, false, false) 4862 markingsCounter++; 4863 } 4864 </div> 4865 } 4866 } 4867 </div> 4868 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4869 <div class="horse-detail-item" id="horse-detail-item-register" data-content="tab_general"> 4870 @if (isMyHorse || isBredByMe) 4871 { 4872 var predicates = horse.Predicates; 4873 if (predicates != null && predicates.Any()) 4874 { 4875 predicates = predicates.OrderByDescending(p => p.Date).ToList(); 4876 4877 var predicateCounter = 0; 4878 <div class="breedersinfo infotable"> 4879 <h2>@Translate("RegisterHistory", "Register history")</h2> 4880 @CreateInfoTableRow(predicateCounter, Translate("Register", "Register"), Translate("FromDate", "From date"), true) 4881 @foreach (var predicate in predicates) 4882 { 4883 var date = ""; 4884 if (predicate.Date != null && !predicate.Date.Equals(DateTime.MinValue)) 4885 { 4886 date = predicate.Date.ToShortDateString(); 4887 } 4888 4889 @CreateInfoTableRow(predicateCounter, predicate.PredicateName, date, false, false, false) 4890 predicateCounter++; 4891 } 4892 </div> 4893 } 4894 } 4895 </div> 4896 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4897 <div class="horse-detail-item" id="horse-detail-item-breeding-direction" data-content="tab_general"> 4898 @*NIET BESCHIKBAAR*@ 4899 </div> 4900 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 4901 <div class="horse-detail-item hidden" id="horse-detail-item-achievements" data-content="tab_achievements"> 4902 @{ 4903 var getInspectionLineairScores = false; 4904 var myPerformanceInfo = horse.SportPerformanceMotherline; 4905 var mySportsLevels = Kwpn.Repository.Helpers.FormatHelpers.CreateSportniveauList(horse.SportResults); 4906 List<Kwpn.Models.ApiModels.InspectionInformationModel> inspections = horse.Inspections; 4907 List<Kwpn.Models.ApiModels.InspectionInformationModel> abilityTests = horse.AbilityTests; 4908 } 4909 <h2>@Translate("Achievements", "Achievements")</h2> 4910 4911 @*SportsInfo*@ 4912 <div class="achievements infotable"> 4913 @CreateInfoTableRow(0, Translate("SportsName", "Sportsname"), horse.SportsName, false, false, false, false) 4914 @CreateInfoTableRow(1, Translate("SportsLevel", "Sports level"), mySportsLevels, false, false, false, false) 4915 </div> 4916 4917 @*Inspections*@ 4918 @if (!isApprovedStud && inspections != null && inspections.Any()) 4919 { 4920 getInspectionLineairScores = true; 4921 var inspectionCounter = 0; 4922 <h2>@Translate("Inspections", "Inspections")</h2> 4923 <div class="table-responsive"> 4924 <table id="inspectionstable"> 4925 <tr class="tableheader"> 4926 <th>@Translate("DateAndInspectionType", "Date and inspection type")</th> 4927 <th>@Translate("Location", "Location")</th> 4928 <th>@Translate("Scores", "Scores")</th> 4929 <th>@Translate("Result", "Result")</th> 4930 <td>&nbsp;</td> 4931 </tr> 4932 @foreach (Kwpn.Models.ApiModels.InspectionInformationModel inspection in inspections.OrderByDescending(i => i.DateFrom)) 4933 { 4934 var inspectionDateLocation = ""; 4935 if (inspection.DateFrom != null) 4936 { 4937 inspectionDateLocation = inspection.DateFrom.ToShortDateString(); 4938 } 4939 if (!string.IsNullOrWhiteSpace(inspection.InspectionDescription)) 4940 { 4941 if (!string.IsNullOrWhiteSpace(inspectionDateLocation)) 4942 { 4943 inspectionDateLocation = string.Format("{0},<br />", inspectionDateLocation); 4944 } 4945 inspectionDateLocation = string.Format("{0}{1}", inspectionDateLocation, inspection.InspectionDescription); 4946 } 4947 string premiumPlacing = ""; 4948 if (inspection.Participations != null && inspection.Participations.Count > 0) 4949 { 4950 premiumPlacing = string.Format("{0} {1}", inspection.Participations[0].Premium, inspection.Participations[0].Placing).Trim(); 4951 } 4952 4953 // modulo for row color display 4954 var mod = "0"; 4955 if (inspectionCounter % 2 == 0) 4956 { 4957 mod = "1"; 4958 } 4959 <tr class="mod-@mod"> 4960 <td>@inspectionDateLocation</td> 4961 <td>@inspection.Place</td> 4962 <td class="scores" data-inspectioncode="@inspection.InspectionCode"></td> 4963 <td>@premiumPlacing</td> 4964 <td class="center"> 4965 @if (inspection.Participations != null && inspection.Participations.Count > 0 && 4966 inspection.Participations[0].ResultAppreciatives != null && inspection.Participations[0].ResultAppreciatives.Count > 0) 4967 { 4968 <span class="toggler" data-identifyer='insp-@inspection.InspectionCode-@inspectionCounter' data-typeclass="inspection-details"><i class="fa fa-plus"></i></span> 4969 } 4970 </td> 4971 </tr> 4972 <tr id="insp-@inspection.InspectionCode-@inspectionCounter" class="inspection-details mod-@mod"> 4973 <td>&nbsp;</td> 4974 <td>&nbsp;</td> 4975 <td colspan="3"> 4976 @if (inspection.Rubrics != null && inspection.Rubrics.Count > 0) 4977 { 4978 @*<b>@inspection.Rubrics[0].Description</b><br />*@ 4979 } 4980 @if (inspection.Participations != null && inspection.Participations.Count > 0) 4981 { 4982 var participation = inspection.Participations[0]; 4983 if (participation.ResultAppreciatives != null && participation.ResultAppreciatives.Count > 0) 4984 { 4985 <div class="inspection-summary"> 4986 <table> 4987 <thead> 4988 <tr> 4989 <th>@Translate("Description", "Description")</th> 4990 <th>@Translate("Value", "Value")</th> 4991 </tr> 4992 </thead> 4993 <tbody> 4994 @foreach (var ResultAppreciative in participation.ResultAppreciatives) 4995 { 4996 <tr> 4997 <td>@ResultAppreciative.Description</td> 4998 <td>@ResultAppreciative.Value</td> 4999 </tr> 5000 } 5001 </tbody> 5002 </table> 5003 </div> 5004 } 5005 } 5006 </td> 5007 </tr> 5008 inspectionCounter++; 5009 } 5010 </table> 5011 </div> 5012 } 5013 5014 @*SportResults*@ 5015 @if (abilityTests != null && abilityTests.Count > 0) 5016 { 5017 var abilityCounter = 0; 5018 <h2>@Translate("AbilityTests", "Ability tests")</h2> 5019 <div class="table-responsive"> 5020 <table id="abilitytesttable"> 5021 <tr class="tableheader"> 5022 <th>@Translate("DateAndInspectionType", "Date and inspection type")</th> 5023 <th>@Translate("Location", "Location")</th> 5024 <th>&nbsp;</th> 5025 <td>&nbsp;</td> 5026 </tr> 5027 @foreach (Kwpn.Models.ApiModels.InspectionInformationModel inspection in abilityTests.OrderByDescending(i => i.DateFrom)) 5028 { 5029 var inspectionDateLocation = ""; 5030 if (inspection.DateFrom != null) 5031 { 5032 inspectionDateLocation = inspection.DateFrom.ToShortDateString(); 5033 } 5034 if (!string.IsNullOrWhiteSpace(inspection.InspectionDescription)) 5035 { 5036 if (!string.IsNullOrWhiteSpace(inspectionDateLocation)) 5037 { 5038 inspectionDateLocation = string.Format("{0},<br />", inspectionDateLocation); 5039 } 5040 inspectionDateLocation = string.Format("{0}{1}", inspectionDateLocation, inspection.InspectionDescription); 5041 } 5042 5043 // modulo for row color display 5044 var mod = "0"; 5045 if (abilityCounter % 2 == 0) 5046 { 5047 mod = "1"; 5048 } 5049 <tr class="mod-@mod"> 5050 <td>@inspectionDateLocation</td> 5051 <td>@inspection.Place</td> 5052 <td>&nbsp;</td> 5053 <td class="center"> 5054 @if (inspection.Participations != null && inspection.Participations.Count > 0 && 5055 inspection.Participations[0].ResultAppreciatives != null && inspection.Participations[0].ResultAppreciatives.Count > 0) 5056 { 5057 <span class="toggler" data-identifyer='at-@inspection.InspectionCode-@abilityCounter' data-typeclass="ability-details"><i class="fa fa-plus"></i></span> 5058 } 5059 </td> 5060 </tr> 5061 <tr id="at-@inspection.InspectionCode-@abilityCounter" class="ability-details mod-@mod"> 5062 <td>&nbsp;</td> 5063 <td colspan="3"> 5064 @if (inspection.Rubrics != null && inspection.Rubrics.Count > 0) 5065 { 5066 @*<b>@inspection.Rubrics[0].Description</b><br />*@ 5067 } 5068 @if (inspection.Participations != null && inspection.Participations.Count > 0) 5069 { 5070 var participation = inspection.Participations[0]; 5071 if (participation.ResultAppreciatives != null && participation.ResultAppreciatives.Count > 0) 5072 { 5073 <div class="ability-summary"> 5074 <table> 5075 <thead> 5076 <tr> 5077 <th>@Translate("Description", "Description")</th> 5078 <th>@Translate("Value", "Value")</th> 5079 </tr> 5080 </thead> 5081 <tbody> 5082 @foreach (var ResultAppreciative in participation.ResultAppreciatives) 5083 { 5084 <tr> 5085 <td>@ResultAppreciative.Description</td> 5086 <td>@ResultAppreciative.Value</td> 5087 </tr> 5088 } 5089 </tbody> 5090 </table> 5091 </div> 5092 } 5093 } 5094 </td> 5095 </tr> 5096 abilityCounter++; 5097 } 5098 </table> 5099 </div> 5100 } 5101 </div> 5102 @SnippetStart("JavascriptsBottom") 5103 5104 <script type="text/javascript"> 5105 $(document).ready(function () { 5106 5107 // toggler initializer 5108 $(".toggler", "#horse-detail-item-achievements").click(function () { 5109 var contentId = $(this).attr("data-identifyer"); 5110 var typeClass = $(this).attr("data-typeclass"); 5111 $("." + typeClass).not("#" + contentId).hide(); 5112 $("." + typeClass).not("#" + contentId).prev().find("span.toggler i").removeClass("fa-minus").addClass("fa-plus"); 5113 var currentToggler = $("#" + contentId).prev().find("span.toggler i"); 5114 if (currentToggler.hasClass("fa-minus")) { 5115 currentToggler.removeClass("fa-minus").addClass("fa-plus"); 5116 } else { 5117 currentToggler.removeClass("fa-plus").addClass("fa-minus"); 5118 } 5119 }); 5120 5121 // Get inspection lineair score documents and attach to inspection 5122 @if (getInspectionLineairScores) 5123 { 5124 <text> 5125 $(".inspectionlineairscore").remove(); 5126 var inspectionlineairscoreApiUrl = "/kwpnwebapi/horses/getinspectionlineairscore/@culture/@animalCode"; 5127 $.getJSON(inspectionlineairscoreApiUrl).done(function (result) { 5128 if (result != null && result.length > 0) { 5129 $.each(result, function (i, inspectionLineairScore) { 5130 var inspectionCode = inspectionLineairScore.Reference; 5131 var inspectionLineairScoreUrl = inspectionLineairScore.URL; 5132 if (inspectionCode != null && inspectionLineairScoreUrl != null) { 5133 var $achievement = $("td.scores[data-inspectioncode=" + inspectionCode + "]", "#inspectionstable"); 5134 if ($achievement.length) { 5135 inspectionLineairScoreUrl = inspectionLineairScoreUrl.replace(/\\/g, "/"); // fix slashes 5136 var inspectionLineairScoreListItem = "<a href=\"" + inspectionLineairScoreUrl + "\" download target=\"_blank\">@Translate("ScoreForm", "Score form")</a><br/>"; 5137 $achievement.append(inspectionLineairScoreListItem); 5138 } 5139 } 5140 }); 5141 } 5142 }).fail(function (jqxhr, textStatus, error) { 5143 var err = textStatus + ", " + error; 5144 console.error("Request GetInspectionLineairScore Failed: " + err); 5145 }); 5146 </text> 5147 } 5148 5149 }); 5150 </script> 5151 @SnippetEnd("JavascriptsBottom") 5152 5153 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5154 <div class="horse-detail-item hidden" id="horse-detail-item-achievements-motherline" data-content="tab_achievements_motherline"> 5155 @{ 5156 var performanceInfo = horse.SportPerformanceMotherline; 5157 var performanceItems = performanceInfo.lstItems; 5158 var achievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(performanceItems, culture); 5159 5160 var motherName = performanceInfo.MAnimalname; 5161 var motherItems = performanceInfo.lstItemsM; 5162 var motherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(motherItems, culture); 5163 5164 var grandMotherName = performanceInfo.MMAnimalname; 5165 var grandMotherItems = performanceInfo.lstItemsMM; 5166 var grandMotherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(grandMotherItems, culture); 5167 5168 var greatGrandMotherName = performanceInfo.MMMAnimalname; 5169 var greatGrandMotherItems = performanceInfo.lstItemsMMM; 5170 var greatGrandMotherAchievements = Kwpn.Repository.Helpers.FormatHelpers.CreateAchievementsList(greatGrandMotherItems, culture); 5171 } 5172 5173 <h2>@Translate("AchievementsMotherLine", "Achievements mother line")</h2> 5174 5175 @if (performanceItems != null && performanceItems.Any()) 5176 { 5177 var name = Kwpn.Repository.Helpers.HorseHelper.GetHorseName(horse.SportsName, horse.AnimalName, null); 5178 5179 <div class="motherline infotable"> 5180 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), name, false, false, false) 5181 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), achievements, false, false, false) 5182 </div> 5183 } 5184 <br /> 5185 <div class="motherline-mother infotable"> 5186 <h3>@Translate("Mother", "Mother")</h3> 5187 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), motherName, false, false, false) 5188 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), motherAchievements, false, false, false) 5189 </div> 5190 <br /> 5191 <div class="motherline-mother infotable"> 5192 <h3>@Translate("MothersMother", "Mothers mother")</h3> 5193 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), grandMotherName, false, false, false) 5194 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), grandMotherAchievements, false, false, false) 5195 </div> 5196 <br /> 5197 <div class="motherline-mother infotable"> 5198 <h3>@Translate("MothersMothersMother", "Mothers mothers mother")</h3> 5199 @CreateInfoTableRow(0, Translate("HorseName", "Horse name"), greatGrandMotherName, false, false, false) 5200 @CreateInfoTableRow(1, Translate("Achievements", "Achievements"), greatGrandMotherAchievements, false, false, false) 5201 </div> 5202 </div> 5203 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5204 <div class="horse-detail-item hidden" id="horse-detail-item-genetic-profile" data-content="tab_genetic_profile"> 5205 @if (Kwpn.Repository.Helpers.HorseHelper.CheckIfMyHorse(animalCode) && FormatHelpers.CalculateAgeAsInt(horse.DateOfBirth.Value) < 3) 5206 { 5207 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5208 <div class="modal fade" id="extra-settings" tabindex="-1" role="dialog" aria-labelledby="extra-settings-modal" aria-hidden="true"> 5209 <div class="modal-dialog"> 5210 <div class="modal-content"> 5211 <div class="modal-header">@Translate("ExtraSettingsModalHeader", "Extra settings")</div> 5212 <div class="modal-body"> 5213 <div> 5214 <h2 class="name"></h2> 5215 </div> 5216 <div id="modal-genetic-profile-loading"> 5217 <i class='fa fa-spinner fa-spin'></i> 5218 </div> 5219 <div id="modal-genetic-profile" class="hidden"> 5220 @Translate("ExtraSettingsModal_GeneticProfileText", "") 5221 <input type="checkbox" name="genetic-profile-hidden" id="genetic-profile-hidden" /> 5222 <label for="genetic-profile-hidden">@Translate("ExtraSettingsModal_GeneticProfileLabel", "The genetic profile is hidden")</label> 5223 <br /> 5224 <div id="genetic-profile-moderator" class="hidden small">@Translate("ExtraSettingsModal_GeneticProfileLastEditedBy", "Last change by ")<span class="small"></span></div> 5225 </div> 5226 </div> 5227 <div class="modal-footer"> 5228 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("Close", "Close")</a> 5229 </div> 5230 </div> 5231 </div> 5232 </div> 5233 <p> 5234 <button type="button" 5235 class="btn btn-settings-gp" 5236 data-horsecode="@animalCode" 5237 data-horseinfo="@horseName (@lifeNumber)" 5238 data-toggle="tooltip" 5239 data-genetic-profile="true" 5240 title="@Translate("HorseSettings", "Extra settings").JsEncode().ToUpper()"> 5241 <i class="fa fa-gear"></i> 5242 </button> 5243 </p> 5244 @SnippetStart("JavascriptsBottom") 5245 <script> 5246 5247 var geneticProfileSettingChanged = false; 5248 5249 function MailGeneticProfileSetting(animalcode, value) { 5250 var geneticProfileSettingsApi = "/kwpnwebapi/horses/mailgeneticprofilesetting/@Dynamicweb.Frontend.PageView.Current().AreaID/" + animalcode + "/" + value; 5251 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5252 if (!result) { 5253 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrongSendingEmail", "Something went wrong while sending email")", customClass: layout.notifyCopyrightMessageClass }); 5254 } 5255 }).fail(function (jqxhr, textStatus, error) { 5256 var err = textStatus + ", " + error; 5257 console.error("MailGeneticProfileSetting Failed: " + err); 5258 }); 5259 } 5260 5261 function SetGeneticProfileSetting(animalcode, value) { 5262 5263 var geneticProfileSettingsApi = "/kwpnwebapi/horses/setgeneticprofilesetting/" + animalcode + "/" + value; 5264 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5265 if (result != null) { 5266 $("#genetic-profile-moderator span").text(result.HideGeneticProfileLastChangedBy); 5267 $("#genetic-profile-moderator").removeClass("hidden"); 5268 geneticProfileSettingChanged = true; 5269 MailGeneticProfileSetting(animalcode, value); 5270 } else { 5271 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 5272 } 5273 }).fail(function (jqxhr, textStatus, error) { 5274 var err = textStatus + ", " + error; 5275 console.error("SetGeneticProfileSetting Failed: " + err); 5276 }); 5277 } 5278 5279 function ActivateExtraSettingsButtons() { 5280 5281 $(".btn-settings-gp").click(function (e) { 5282 5283 // defaults 5284 $("#modal-genetic-profile-loading").removeClass("hidden"); 5285 $("#genetic-profile-hidden").prop("checked", false); 5286 $("#modal-genetic-profile").addClass("hidden"); 5287 $("#genetic-profile-moderator").addClass("hidden"); 5288 $("#genetic-profile-moderator span").empty(); 5289 5290 // set modal text 5291 var horseInfo = $(this).attr("data-horseinfo"); 5292 $("#extra-settings h2").text(horseInfo); 5293 5294 var showGeneticProfile = $(this).attr("data-genetic-profile"); 5295 if (showGeneticProfile === "true") { 5296 5297 // get current value 5298 var horseCode = $(this).attr("data-horsecode"); 5299 var geneticProfileSettingsApi = "/kwpnwebapi/horses/getgeneticprofilesetting/" + horseCode; 5300 $.getJSON(geneticProfileSettingsApi).done(function (result, status, metaData) { 5301 if (result) { 5302 5303 if (result.HideGeneticProfile) { 5304 $("#genetic-profile-hidden").prop("checked", true); 5305 } 5306 5307 if (result.HideGeneticProfileLastChangedBy.length > 0) { 5308 $("#genetic-profile-moderator span").text(result.HideGeneticProfileLastChangedBy); 5309 $("#genetic-profile-moderator").removeClass("hidden") 5310 } 5311 5312 $("#genetic-profile-hidden").off("click").on("click", function () { 5313 SetGeneticProfileSetting(horseCode, $('#genetic-profile-hidden').is(':checked')); 5314 }); 5315 5316 $("#modal-genetic-profile").removeClass("hidden"); 5317 } else { 5318 Swal.fire({ title: "@Translate("SomethingWentWrongTitle", "Something went wrong")" ,text: "@Translate("SomethingWentWrong", "Something went wrong")", customClass: layout.notifyCopyrightMessageClass }); 5319 } 5320 5321 $("#modal-genetic-profile-loading").addClass("hidden"); 5322 }).fail(function (jqxhr, textStatus, error) { 5323 var err = textStatus + ", " + error; 5324 console.error("GetGeneticProfileSettings Failed: " + err); 5325 }); 5326 } 5327 5328 // show modal 5329 $("#extra-settings").modal("show"); 5330 5331 // prevent row click 5332 e.stopPropagation(); 5333 5334 }); 5335 5336 $(document).on('hide.bs.modal', '#extra-settings', function () { 5337 if (geneticProfileSettingChanged) { 5338 if (!alert("@Translate("ReloadForChanges", "The page must be refreshed for the change to take effect.")")) location.reload(); 5339 } 5340 5341 }); 5342 } 5343 5344 $(document).ready(function () { 5345 ActivateExtraSettingsButtons(); 5346 }); 5347 5348 </script> 5349 @SnippetEnd("JavascriptsBottom") 5350 } 5351 @if (showGeneticProfileBasedOnRegister) 5352 { 5353 List<BreedingValuesModel> geneticProfile = horse.BreedingValues; 5354 if (geneticProfile != null && geneticProfile.Any()) 5355 { 5356 var geneticProfileIntro = Translate("GeneticProfileIntro", ""); 5357 var geneticProfileRowCounter = 0; 5358 5359 var legend = Kwpn.Repository.Helpers.HorseHelper.GetGeneticProfileLegend(culture); 5360 var sportIndex = geneticProfile.Where(profile => 5361 { 5362 var val = profile.BreedingValues.Where(breedingVal => breedingVal.Description.Contains("Sport index")).ToList(); 5363 return val.Count > 0; 5364 }).ToList(); 5365 5366 var dressageJumping = geneticProfile.Where(profile => 5367 { 5368 var val = profile.BreedingValues.Where(breedingVal => breedingVal.Description == "Dressuur (GFW)" || breedingVal.Description == "Springen (GFW)").ToList(); 5369 return val.Count > 0; 5370 }).ToList(); 5371 5372 var userIsLoggedIn = Dynamicweb.Frontend.LogOnHandler.IsUserLoggedIn; 5373 5374 if (sportIndex.Count > 0) 5375 { 5376 <h2>@Translate("Sportindex", "Sportindex")</h2> 5377 <p>@Translate("Sportindex_intro", "")</p> 5378 5379 foreach (var breedingValuesTable in sportIndex) 5380 { 5381 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description.Contains("Sport index"))) 5382 { 5383 var breedingValueValue = 0; 5384 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5385 5386 var description = breedingValue.Description + ": " + breedingValueValue; 5387 if(breedingValue.Reliability != null) 5388 { 5389 description += "(" + breedingValue.Reliability + ")"; 5390 } 5391 5392 <p>@description</p> 5393 } 5394 } 5395 } 5396 5397 <h2>@Translate("GeneticProfile", "Genetic profile")</h2> 5398 5399 if (horse.PublicationTypes != null && horse.PublicationTypes.Any()) 5400 { 5401 foreach (var publicationTypes in horse.PublicationTypes) 5402 { 5403 @Translate($"GeneticProfile_Intro_{publicationTypes}", "") 5404 } 5405 } 5406 5407 if (!string.IsNullOrWhiteSpace(geneticProfileIntro) && !geneticProfileIntro.Equals("GeneticProfileIntro")) 5408 { 5409 if (!geneticProfileIntro.StartsWith("<p>", StringComparison.InvariantCultureIgnoreCase)) 5410 { 5411 geneticProfileIntro = string.Format("<p>{0}</p>", geneticProfileIntro); 5412 } 5413 if (!string.IsNullOrWhiteSpace(geneticProfileIntro) && geneticProfileIntro.Contains("{legend}") && !string.IsNullOrEmpty(legend)) 5414 { 5415 geneticProfileIntro = geneticProfileIntro.Replace("{legend}", $"<a href='javascript:void(0);' class='legend-opener'>{Translate("GeneticProfileIntro_LegendLinkText", "legend")}</a>"); 5416 } 5417 @geneticProfileIntro 5418 } 5419 5420 <div class="table-responsive"> 5421 <table width="600" class="genetic-profile-table"> 5422 <colgroup> 5423 <col class="description" /> 5424 <col class="percentage" /> 5425 <col class="minimum" /> 5426 <col class="value" /> 5427 <col class="value" /> 5428 <col class="value" /> 5429 <col class="value" /> 5430 <col class="value" /> 5431 <col class="value" /> 5432 <col class="value" /> 5433 <col class="value" /> 5434 <col class="value" /> 5435 <col class="value" /> 5436 <col class="maximum" /> 5437 </colgroup> 5438 <tr class="index"> 5439 <td>&nbsp;</td> 5440 <th>@Translate("Btbh.", "Btbh.")</th> 5441 <td>&nbsp;</td> 5442 <th class="value stars">***</th> 5443 <th class="value stars">**</th> 5444 <th class="value stars">*</th> 5445 <th colspan="4" class="average">@Translate("Avarage", "Avarage")</th> 5446 <th class="value stars">*</th> 5447 <th class="value stars">**</th> 5448 <th class="value stars">***</th> 5449 <td>&nbsp;</td> 5450 </tr> 5451 <tr class="spacer"> 5452 <td>&nbsp;</td> 5453 <td>&nbsp;</td> 5454 <td>&nbsp;</td> 5455 <td>&nbsp;</td> 5456 <td>&nbsp;</td> 5457 <td>&nbsp;</td> 5458 <td>&nbsp;</td> 5459 <td>&nbsp;</td> 5460 <td>&nbsp;</td> 5461 <td>&nbsp;</td> 5462 <td>&nbsp;</td> 5463 <td>&nbsp;</td> 5464 <td>&nbsp;</td> 5465 <td>&nbsp;</td> 5466 </tr> 5467 5468 @if (userIsLoggedIn && isMyHorse && dressageJumping.Count > 0) 5469 { 5470 foreach (var breedingValuesTable in dressageJumping) 5471 { 5472 5473 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description == "Dressuur (GFW)" || breedingVal.Description == "Springen (GFW)")) 5474 { 5475 // modulo for row color display 5476 var mod = "0"; 5477 if (geneticProfileRowCounter % 2 == 0) { mod = "1"; } 5478 5479 var breedingValueValue = 0; 5480 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5481 5482 var description = breedingValue.Description; 5483 if (!string.IsNullOrWhiteSpace(breedingValue.TypeCalculation)) 5484 { 5485 description = $"{description} ({breedingValue.TypeCalculation})"; 5486 } 5487 5488 <tr class="table-row mod-@mod"> 5489 <td class="description nowrap">@description</td> 5490 <td class="percentage"> 5491 @if (breedingValuesTable == geneticProfile.First()) 5492 { 5493 @breedingValue.Reliability 5494 } 5495 </td> 5496 <td class="minimum">@breedingValue.Minimum</td> 5497 @HorseHelper.GetGeneticProfileValues(breedingValueValue, breedingValue.Differentiation, showGeneticProfileBasedOnOwnerSettings) 5498 <td class="maximum">@breedingValue.Maximum</td> 5499 </tr> 5500 5501 geneticProfileRowCounter++; 5502 } 5503 5504 } 5505 <tr class="spacer"> 5506 <td>&nbsp;</td> 5507 <td>&nbsp;</td> 5508 <td>&nbsp;</td> 5509 <td>&nbsp;</td> 5510 <td>&nbsp;</td> 5511 <td>&nbsp;</td> 5512 <td>&nbsp;</td> 5513 <td>&nbsp;</td> 5514 <td>&nbsp;</td> 5515 <td>&nbsp;</td> 5516 <td>&nbsp;</td> 5517 <td>&nbsp;</td> 5518 <td>&nbsp;</td> 5519 <td>&nbsp;</td> 5520 </tr> 5521 } 5522 @foreach (var breedingValuesTable in geneticProfile) 5523 { 5524 if (breedingValuesTable.BreedingValues != null && breedingValuesTable.BreedingValues.Count > 0) 5525 { 5526 geneticProfileRowCounter = 0; 5527 <tr class="table-caption"> 5528 <th colspan="14"> 5529 @breedingValuesTable.Type 5530 @if (breedingValuesTable != geneticProfile.First()) 5531 { 5532 var relia = breedingValuesTable.BreedingValues.FirstOrDefault(); 5533 if (relia != null) 5534 { 5535 @relia.Reliability 5536 } 5537 } 5538 </th> 5539 </tr> 5540 } 5541 foreach (BreedingValueModel breedingValue in breedingValuesTable.BreedingValues.Where(breedingVal => breedingVal.Description != "Dressuur (GFW)" && breedingVal.Description != "Springen (GFW)" && !breedingVal.Description.Contains("Sport index"))) 5542 { 5543 5544 // modulo for row color display 5545 var mod = "0"; 5546 if (geneticProfileRowCounter % 2 == 0) { mod = "1"; } 5547 5548 var breedingValueValue = 0; 5549 Int32.TryParse(breedingValue.Value, out breedingValueValue); 5550 5551 var description = breedingValue.Description; 5552 if (!string.IsNullOrWhiteSpace(breedingValue.TypeCalculation)) 5553 { 5554 description = $"{description} ({breedingValue.TypeCalculation})"; 5555 } 5556 5557 <tr class="table-row mod-@mod"> 5558 <td class="description nowrap">@description</td> 5559 <td class="percentage"> 5560 @if (breedingValuesTable == geneticProfile.First()) 5561 { 5562 @breedingValue.Reliability 5563 } 5564 </td> 5565 <td class="minimum">@breedingValue.Minimum</td> 5566 @HorseHelper.GetGeneticProfileValues(breedingValueValue, breedingValue.Differentiation, showGeneticProfileBasedOnOwnerSettings) 5567 <td class="maximum">@breedingValue.Maximum</td> 5568 </tr> 5569 5570 geneticProfileRowCounter++; 5571 } 5572 <tr class="spacer"> 5573 <td>&nbsp;</td> 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 </tr> 5588 } 5589 </table> 5590 </div> 5591 5592 if (!string.IsNullOrWhiteSpace(legend)) 5593 { 5594 <div class="modal fade" id="legend" tabindex="-1" role="dialog" aria-labelledby="legend-modal" aria-hidden="true"> 5595 <div class="modal-dialog"> 5596 <div class="modal-content"> 5597 <div class="modal-header"> 5598 @Translate("GeneticProfileIntro_LegendHeader", "Legend") 5599 <a class="orange_arrow_link close-model" data-dismiss="modal" href="javascript:void(0);">@Translate("GeneticProfileIntro_LegendClose", "Close")</a> 5600 </div> 5601 <div class="modal-body legend-body"> 5602 @legend 5603 </div> 5604 <div class="modal-footer"> 5605 <a class="orange_arrow_link" data-dismiss="modal" href="javascript:void(0);">@Translate("GeneticProfileIntro_LegendClose", "Close")</a> 5606 </div> 5607 </div> 5608 </div> 5609 </div> 5610 @SnippetStart("JavascriptsBottom") 5611 <script> 5612 $(document).ready(function () { 5613 // legend modal opener 5614 $(".legend-opener").off("click").on("click", function () { 5615 $("#legend").modal("show"); 5616 }); 5617 }); 5618 </script> 5619 @SnippetEnd("JavascriptsBottom") 5620 } 5621 } 5622 } 5623 </div> 5624 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5625 @* 5626 Note: 5627 5628 Variables like "action/isAlive/isMyHorse/isMare/horse/culture/animalCode/showMemberContent/etc..." are set in the parent: Paragraph/HorseDatabase.cshtml 5629 5630 This content is ALWAYS available for mares. 5631 This content is available if the horse is mine 5632 5633 Always show: 5634 - gender 5635 - horse name 5636 - date of birth 5637 - register 5638 - sports level <-- NOT AVAILABLE IN SearchAnimalResultItemModel 5639 When the parent is a mare then show: 5640 - father name 5641 When the parent is NOT a mare then show: 5642 - mother name <-- NOT AVAILABLE IN SearchAnimalResultItemModel 5643 - mothers father name 5644 *@ 5645 <div class="horse-detail-item hidden" id="horse-detail-item-offspring" data-content="tab_offspring"> 5646 @if (isMare || isMyHorse) 5647 { 5648 var offspring = horse.Offspring; 5649 <h2>@Translate("Offspring", "Offspring")</h2> 5650 <div class="table-responsive"> 5651 @if (offspring != null && offspring.Any()) 5652 { 5653 <table id="offspringTable" class="horsesTable"> 5654 <thead> 5655 <tr> 5656 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5657 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5658 @if (isMare) 5659 { 5660 <th data-sortOn="Father" data-sortBy="Asc">@Translate("Father", "Father")<i class="fa"></i></th> 5661 } 5662 else 5663 { 5664 @*<th data-sortOn="Mother" data-sortBy="Asc">@Translate("Mother", "Mother")<i class="fa"></i></th>*@ 5665 <th data-sortOn="MothersFather" data-sortBy="Asc">@Translate("MothersFather", "Mothers father")<i class="fa"></i></th> 5666 } 5667 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5668 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 5669 <th data-sortOn="SportsLevel" data-sortBy="Asc">@Translate("SportsLevel", "Sports level")<i class="fa"></i></th> 5670 5671 </tr> 5672 </thead> 5673 5674 @foreach (var child in offspring.OrderByDescending(c => c.DateOfBirth)) 5675 { 5676 var childGenderClass = "fa-question"; 5677 var childGenderImage = ""; 5678 var childGenderAbbr = ""; 5679 var childGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5680 var childIsAlive = child.DateOfDeath == null; 5681 Enum.TryParse(child.Gender.ToUpper(), out childGender); 5682 switch (childGender) 5683 { 5684 case Kwpn.Models.Enumerations.Gender.HENGST: 5685 childGenderClass = "fa-mars"; 5686 childGenderAbbr = Translate("Stallion", "Stallion"); 5687 break; 5688 case Kwpn.Models.Enumerations.Gender.MERRIE: 5689 childGenderClass = "fa-venus"; 5690 childGenderAbbr = Translate("Mare", "Mare"); 5691 break; 5692 case Kwpn.Models.Enumerations.Gender.RUIN: 5693 childGenderClass = "fa-mars"; 5694 childGenderAbbr = Translate("Gelding", "Gelding"); 5695 break; 5696 case Kwpn.Models.Enumerations.Gender.EMBRYO: 5697 childGenderClass = ""; 5698 childGenderAbbr = Translate("Embryo", "Embryo"); 5699 childGenderImage = "<img src=\"/Files/Templates/Designs/Kwpn/Images/StyleElements/Icon_Embryo_20x20.png\" />"; 5700 break; 5701 } 5702 5703 var childIsApprovedStud = child.ApprovedStallion; 5704 var childName = child.AnimalName; // KWPN-1825: DOn't use child.SportsName for offspring 5705 var childDoBirth = ""; 5706 var childYoBirth = ""; 5707 if (child.DateOfBirth.HasValue && !child.DateOfBirth.Value.Equals(DateTime.MinValue)) 5708 { 5709 childDoBirth = child.DateOfBirth.Value.ToShortDateString(); 5710 childYoBirth = child.DateOfBirth.Value.Year.ToString(); 5711 } 5712 5713 var childsFather = child.Father; 5714 var childsMothersFather = child.MothersFather; 5715 var childSportsLevel = child.SportResult; 5716 5717 <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"> 5718 <td class="nowrap"> 5719 <i class="fa @childGenderClass">@childGenderImage</i> 5720 @if (!childIsAlive) 5721 { 5722 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5723 } 5724 @if (childIsApprovedStud) 5725 { 5726 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5727 } 5728 </td> 5729 <td class="nowrap">@childName</td> 5730 @if (isMare) 5731 { 5732 <td>@childsFather</td> 5733 } 5734 else 5735 { 5736 @*<td>-</td> mother*@ 5737 <td>@childsMothersFather</td> 5738 } 5739 <td><div data-toggle="tooltip" @(!childGender.Equals(Kwpn.Models.Enumerations.Gender.EMBRYO) ? $" title='{childDoBirth}'" : "")>@childYoBirth</div></td> 5740 <td style="width:150px" class="ellipsis"><div data-toggle="tooltip" title="@child.Register.JsEncode()">@child.Register</div></td> 5741 <td>@childSportsLevel</td> 5742 5743 </tr> 5744 } 5745 </table> 5746 } 5747 else 5748 { 5749 <p>@Translate("NoRegisteredOffspring", "No registered offspring")</p> 5750 } 5751 </div> 5752 } 5753 </div> 5754 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5755 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 5756 <div class="horse-detail-item hidden" id="horse-detail-item-approved-offspring" data-content="tab_approved_offspring"> 5757 @if (isApprovedStud) 5758 { 5759 var approvedOffspring = horse.ApprovedOffspring; 5760 var approvedOffspring2ndGen = horse.ApprovedOffspringGrandchild; 5761 5762 if ((approvedOffspring != null && approvedOffspring.Any()) || (approvedOffspring2ndGen != null && approvedOffspring2ndGen.Any())) 5763 { 5764 if (approvedOffspring != null && approvedOffspring.Any()) 5765 { 5766 <h2>@Translate("ApprovedOffspring1stGen", "Approved offspring 1st generation")</h2> 5767 <div class="table-responsive"> 5768 <table id="offspring1GenTable" class="horsesTable"> 5769 <thead> 5770 <tr> 5771 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5772 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5773 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5774 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 5775 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 5776 @*<th data-sortOn="Mother" data-sortBy="Asc">@Translate("MothersMotherFatherName", "Mothers mothers father")<i class="fa"></i></th>*@ 5777 </tr> 5778 </thead> 5779 @foreach (var offspring1Gen in approvedOffspring) 5780 { 5781 // SearchAnimalResultModel 5782 5783 var offspring1GenGenderClass = "fa-question"; 5784 var offspring1GenGenderAbbr = ""; 5785 var offspring1GenGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5786 var offspring1GenIsAlive = offspring1Gen.DateOfDeath == null; 5787 Enum.TryParse(offspring1Gen.Gender.ToUpper(), out offspring1GenGender); 5788 switch (offspring1GenGender) 5789 { 5790 case Kwpn.Models.Enumerations.Gender.HENGST: 5791 offspring1GenGenderClass = "fa-mars"; 5792 offspring1GenGenderAbbr = Translate("Stallion", "Stallion"); 5793 break; 5794 case Kwpn.Models.Enumerations.Gender.MERRIE: 5795 offspring1GenGenderClass = "fa-venus"; 5796 offspring1GenGenderAbbr = Translate("Mare", "Mare"); 5797 break; 5798 case Kwpn.Models.Enumerations.Gender.RUIN: 5799 offspring1GenGenderClass = "fa-mars"; //fa-mars-stroke-h 5800 offspring1GenGenderAbbr = Translate("Gelding", "Gelding"); 5801 break; 5802 } 5803 5804 var offspring1GenName = offspring1Gen.AnimalName; 5805 if (!string.IsNullOrWhiteSpace(offspring1Gen.SportsName)) 5806 { 5807 offspring1GenName = offspring1Gen.SportsName; 5808 } 5809 5810 var offspring1GenDoBirth = ""; 5811 var offspring1GenYoBirth = ""; 5812 if (offspring1Gen.DateOfBirth.HasValue && !offspring1Gen.DateOfBirth.Value.Equals(DateTime.MinValue)) 5813 { 5814 offspring1GenDoBirth = offspring1Gen.DateOfBirth.Value.ToShortDateString(); 5815 offspring1GenYoBirth = offspring1Gen.DateOfBirth.Value.Year.ToString(); 5816 } 5817 5818 var offspring1GenFather = offspring1Gen.Father; 5819 var offspring1GenMothersFather = offspring1Gen.MothersFather; 5820 var offspring1GenIsApprovedStud = offspring1Gen.ApprovedStallion; 5821 5822 <tr class="clickable" onclick="document.location.href='@HorseHelper.GetHorseInfoPageUrl(culture, offspring1Gen.AnimalCode)';" data-horsecode="@offspring1Gen.AnimalCode"> 5823 <td class="nowrap"> 5824 <i class="fa @offspring1GenGenderClass"></i> 5825 @if (!offspring1GenIsAlive) 5826 { 5827 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5828 } 5829 @if (offspring1GenIsApprovedStud) 5830 { 5831 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5832 } 5833 </td> 5834 <td>@offspring1GenName</td> 5835 <td><div data-toggle="tooltip" title="@offspring1GenDoBirth">@offspring1GenYoBirth</div></td> 5836 <td>@offspring1Gen.Color</td> 5837 <td><span class="nowrap">@offspring1GenFather</span> x <span class="nowrap">@offspring1GenMothersFather</span></td> 5838 </tr> 5839 } 5840 </table> 5841 </div> 5842 } 5843 5844 if (approvedOffspring2ndGen != null && approvedOffspring2ndGen.Any()) 5845 { 5846 <h2>@Translate("ApprovedOffspring2ndGen", "Approved offspring 2nd generation")</h2> 5847 <div class="table-responsive"> 5848 <table id="offspring2GenTable" class="horsesTable"> 5849 <thead> 5850 <tr> 5851 <th data-sortOn="Gender" data-sortBy="Asc"></th> 5852 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 5853 <th data-sortOn="DateOfBirth" data-sortBy="Asc">@Translate("YearOfBirth", "Year of birth")<i class="fa"></i></th> 5854 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 5855 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 5856 </tr> 5857 </thead> 5858 @foreach (var offspring2Gen in approvedOffspring2ndGen) 5859 { 5860 // SearchAnimalResultModel 5861 var offspring2GenGenderClass = "fa-question"; 5862 var offspring2GenGenderAbbr = ""; 5863 var offspring2GenGender = Kwpn.Models.Enumerations.Gender.UNKNOWN; 5864 var offspring2GenIsAlive = offspring2Gen.DateOfDeath == null; 5865 Enum.TryParse(offspring2Gen.Gender.ToUpper(), out offspring2GenGender); 5866 switch (offspring2GenGender) 5867 { 5868 case Kwpn.Models.Enumerations.Gender.HENGST: 5869 offspring2GenGenderClass = "fa-mars"; 5870 offspring2GenGenderAbbr = Translate("Stallion", "Stallion"); 5871 break; 5872 case Kwpn.Models.Enumerations.Gender.MERRIE: 5873 offspring2GenGenderClass = "fa-venus"; 5874 offspring2GenGenderAbbr = Translate("Mare", "Mare"); 5875 break; 5876 case Kwpn.Models.Enumerations.Gender.RUIN: 5877 offspring2GenGenderClass = "fa-mars"; 5878 offspring2GenGenderAbbr = Translate("Gelding", "Gelding"); 5879 break; 5880 } 5881 5882 var offspring2GenName = offspring2Gen.AnimalName; 5883 if (!string.IsNullOrWhiteSpace(offspring2Gen.SportsName)) 5884 { 5885 offspring2GenName = offspring2Gen.SportsName; 5886 } 5887 5888 var offspring2GenDoBirth = ""; 5889 var offspring2GenYoBirth = ""; 5890 if (offspring2Gen.DateOfBirth.HasValue && !offspring2Gen.DateOfBirth.Value.Equals(DateTime.MinValue)) 5891 { 5892 offspring2GenDoBirth = offspring2Gen.DateOfBirth.Value.ToShortDateString(); 5893 offspring2GenYoBirth = offspring2Gen.DateOfBirth.Value.Year.ToString(); 5894 } 5895 5896 var offspring2GenFather = offspring2Gen.Father; 5897 var offspring2GenMothersFather = offspring2Gen.MothersFather; 5898 var offspring2GenIsApprovedStud = offspring2Gen.ApprovedStallion; 5899 5900 <tr class="clickable" onclick="document.location.href='@HorseHelper.GetHorseInfoPageUrl(culture, offspring2Gen.AnimalCode)';" data-horsecode="@offspring2Gen.AnimalCode"> 5901 <td class="nowrap"> 5902 <i class="fa @offspring2GenGenderClass"></i> 5903 @if (!offspring2GenIsAlive) 5904 { 5905 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 5906 } 5907 @if (offspring2GenIsApprovedStud) 5908 { 5909 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 5910 } 5911 </td> 5912 <td class="nowrap">@offspring2GenName</td> 5913 <td><div data-toggle="tooltip" title="@offspring2GenDoBirth">@offspring2GenYoBirth</div></td> 5914 <td>@offspring2Gen.Color</td> 5915 <td><span class="nowrap">@offspring2GenFather</span> x <span class="nowrap">@offspring2GenMothersFather</span></td> 5916 </tr> 5917 } 5918 </table> 5919 </div> 5920 } 5921 } 5922 else 5923 { 5924 <h2>@Translate("ApprovedOffspring", "Approved offspring")</h2> 5925 <p>@Translate("NoApprovedOffspring", "No approved offspring")</p> 5926 } 5927 } 5928 </div> 5929 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5930 @*note: variables like "showMemberContent/horseHasMemberContentOverride/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 5931 <div class="horse-detail-item hidden" id="horse-detail-item-performance-report" data-content="tab_performance_report"> 5932 @if (isApprovedStud) 5933 { 5934 <h2>@Translate("PerformanceReport", "Performance report")</h2> 5935 var performanceReportText = ""; 5936 if (reports != null) 5937 { 5938 var performanceReport = reports.Where( 5939 r => r.Language.Equals(language, StringComparison.OrdinalIgnoreCase) && 5940 r.Type.Equals(Kwpn.Models.Enumerations.ReportType.Verrichtingsverslag.ToString(), StringComparison.OrdinalIgnoreCase) 5941 ).FirstOrDefault(); 5942 5943 if (performanceReport != null) 5944 { 5945 performanceReportText = Kwpn.Repository.Helpers.FormatHelpers.CleanEquisText(performanceReport.Report); 5946 } 5947 } 5948 if (!string.IsNullOrWhiteSpace(performanceReportText)) 5949 { 5950 @performanceReportText 5951 } 5952 else 5953 { 5954 <p>@Translate("NoPerformanceReport", "No registered performance report")</p> 5955 } 5956 } 5957 </div> 5958 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5959 @*note: variables like "showMemberContent/isApprovedStud" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 5960 <div class="horse-detail-item hidden" id="horse-detail-item-performance-figures" data-content="tab_performance_figures"> 5961 @if (isApprovedStud) 5962 { 5963 var performanceFigures = horse.PerformancetestScores; 5964 if (performanceFigures != null && performanceFigures.Any()) 5965 { 5966 var performanceFigureCounter = 0; 5967 <h2>@Translate("PerformanceFigures", "Performance test scores")</h2> 5968 <div class="performance-figures infotable"> 5969 @CreateInfoTableRow(performanceFigureCounter, Translate("Description", "Description"), Translate("Value", "Value"), true) 5970 @foreach (var figure in performanceFigures) 5971 { 5972 //PerformancetestScoreModel 5973 @CreateInfoTableRow(performanceFigureCounter, figure.Description, figure.Value, false, false, false) 5974 performanceFigureCounter++; 5975 } 5976 </div> 5977 } 5978 else 5979 { 5980 <p>@Translate("NoPerformanceFigures", "No registered test scores")</p> 5981 } 5982 } 5983 </div> 5984 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 5985 <div class="horse-detail-item hidden" id="horse-detail-item-breeding-registration" data-content="tab_breeding_registration"> 5986 @if (isApprovedStud) 5987 { 5988 var breedingRegistrations = horse.BreedingRegistrations; 5989 if (breedingRegistrations != null && breedingRegistrations.Any()) 5990 { 5991 var breedingRegistrationCounter = 0; 5992 <div class="breedingRegistrations infotable"> 5993 <h2>@Translate("BreedingRegistration", "Breeding registration")</h2> 5994 @foreach (var breedingRegistration in breedingRegistrations) 5995 { 5996 @CreateInfoTableRow(breedingRegistrationCounter, breedingRegistration.Description, breedingRegistration.Value, false, false, false) 5997 breedingRegistrationCounter++; 5998 } 5999 </div> 6000 } 6001 } 6002 </div> 6003 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6004 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 6005 <div class="horse-detail-item hidden" id="horse-detail-item-descendant-report" data-content="tab_descendant_report"> 6006 @if (isApprovedStud) 6007 { 6008 <h2>@Translate("DescendantsReport", "Descendants report")</h2> 6009 var descendantsReportText = ""; 6010 if (reports != null) 6011 { 6012 var descendantsReport = reports.Where( 6013 r => r.Language.Equals(language, StringComparison.OrdinalIgnoreCase) && 6014 r.Type.Equals(Kwpn.Models.Enumerations.ReportType.Afstammelingenrapport.ToString(), StringComparison.OrdinalIgnoreCase) 6015 ).FirstOrDefault(); 6016 6017 if (descendantsReport != null) 6018 { 6019 descendantsReportText = Kwpn.Repository.Helpers.FormatHelpers.CleanEquisText(descendantsReport.Report); 6020 } 6021 } 6022 6023 if (!string.IsNullOrWhiteSpace(descendantsReportText)) 6024 { 6025 @descendantsReportText 6026 } 6027 else 6028 { 6029 <p>@Translate("NoDescendantsReport", "No registered descendants report")</p> 6030 } 6031 } 6032 </div> 6033 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6034 @*note: variables like "showMemberContent/reports/language" are set in the parent: Paragraph/HorseDatabase.cshtml*@ 6035 <div class="horse-detail-item hidden" id="horse-detail-item-availability" data-content="tab_availability"> 6036 @if (isApprovedStud) 6037 { 6038 <h2>@Translate("Availability", "Availability")</h2> 6039 var spermAvailables = horse.SpermAvailables; 6040 if (spermAvailables != null && spermAvailables.Any()) 6041 { 6042 <div class="table-responsive"> 6043 <table id="availability-sperm"> 6044 <thead> 6045 <tr> 6046 <th>@Translate("Type", "Type")</th> 6047 <th>@Translate("StudStation", "Stud station")</th> 6048 <th>@Translate("TelephoneNumber", "Telephone number")</th> 6049 <th>@Translate("Website", "Website")</th> 6050 </tr> 6051 </thead> 6052 6053 @foreach (var spermAvailability in spermAvailables) 6054 { 6055 //SpermAvailableModel 6056 var telephone = spermAvailability.Telephone; 6057 if (!string.IsNullOrWhiteSpace(spermAvailability.Mobile)) 6058 { 6059 if (!string.IsNullOrWhiteSpace(telephone) && !telephone.Equals(spermAvailability.Mobile)) 6060 { 6061 telephone = string.Format("{0}, ", telephone); 6062 telephone = string.Format("{0}{1}", telephone, spermAvailability.Mobile); 6063 } 6064 else 6065 { 6066 telephone = spermAvailability.Mobile; 6067 } 6068 } 6069 if (string.IsNullOrWhiteSpace(telephone)) 6070 { 6071 telephone = "-"; 6072 } 6073 6074 var website = spermAvailability.Website; 6075 if (!string.IsNullOrWhiteSpace(website)) 6076 { 6077 var websiteText = ""; 6078 var websiteUrl = ""; 6079 website = website.ToLower(); 6080 if (website.Contains("://")) 6081 { 6082 websiteText = new Uri(website).PathAndQuery; 6083 websiteUrl = website; 6084 } 6085 else 6086 { 6087 websiteText = website; 6088 websiteUrl = string.Format("http://{0}", website); 6089 } 6090 website = string.Format("<a href=\"{0}\" target=\"blank\" title=\"{2}: {1}\">{2}</a>", websiteUrl, websiteText, Translate("GoToWebsite", "Go to website").JsEncode()); 6091 } 6092 else 6093 { 6094 website = "-"; 6095 } 6096 <tr> 6097 <td>@spermAvailability.Type</td> 6098 <td>@spermAvailability.StallionOwner</td> 6099 <td>@telephone</td> 6100 <td>@website</td> 6101 </tr> 6102 } 6103 </table> 6104 </div> 6105 } 6106 else 6107 { 6108 <p>@Translate("AvailabilityUnknown", "Availability unknown")</p> 6109 } 6110 } 6111 </div> 6112 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6113 <div class="horse-detail-item hidden" id="horse-detail-item-breederinfo" data-content="tab_breeders_info" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6114 <div class="breederinfo-panel hidden" id="breeder-data"> 6115 <div class="row"> 6116 <div class="col-xs-12"> 6117 <h2>@Translate("BreederInfo_Title", "About") <span class="breeder-name"></span></h2> 6118 <table> 6119 <tr id="breeder-website-row" class="hidden"> 6120 <td>@Translate("BreederInfo_Website", "Website"):</td> 6121 <td class="js-content" id="breeder-website"></td> 6122 </tr> 6123 </table> 6124 </div> 6125 </div> 6126 <div class="row"> 6127 @{ 6128 var currentUrl = System.Web.HttpContext.Current.Request.Url.PathAndQuery; 6129 } 6130 <div class="col-xs-12" id="quick-links"> 6131 <i class="fa fa-spinner fa-spin" id="quick-links-loader"></i> 6132 <a class="hidden" href="#breeder-products">@Translate("BreederInfo_QuickLink_BreedingProducts", "Breeding products")</a> 6133 <a class="hidden" href="#breeder-horses">@Translate("BreederInfo_QuickLink_Horses", "Owned horses")</a> 6134 <a class="hidden" href="#breeder-horsesforsale">@Translate("BreederInfo_QuickLink_HorsesForSale", "Horses for sale")</a> 6135 <a class="hidden" href="#breeder-horsenews">@Translate("BreederInfo_QuickLink_HorsesNews", "Horses to name and breeding products in the news")</a> 6136 <a class="hidden" href="#breeder-performance">@Translate("BreederInfo_QuickLink_Performance", "")</a> 6137 <a class="hidden" href="#breeder-contact">@Translate("BreederInfo_QuickLink_Contact", "Contact this breeder")</a> 6138 </div> 6139 </div> 6140 </div> 6141 <div class="breederinfo-panel hidden" id="breeder-products" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6142 <div class="background"> 6143 <div class="row"> 6144 <div class="col-xs-12"> 6145 <h2> 6146 <a href="javascript:void(0);" class="breeder-products-toggler"> 6147 @Translate("BreederInfo_BreedingProducts", "Breeding products") <span id="breeder-products-counter" class="js-content"></span> 6148 <i class="fa fa-chevron-down rotated"></i> 6149 </a> 6150 </h2> 6151 </div> 6152 </div> 6153 @{ 6154 var productsIntro = Translate("BreederInfo_BreedingProductsIntro", ""); 6155 if (!string.IsNullOrWhiteSpace(productsIntro)) 6156 { 6157 <div class="row breeder-products-data"> 6158 <div class="col-xs-12"> 6159 @productsIntro 6160 </div> 6161 </div> 6162 } 6163 } 6164 <div class="row filter-row breeder-products-data"> 6165 <div id="breeder-products-too-many-results" class="col-xs-12 hidden"> 6166 <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> 6167 </div> 6168 <div class="col-xs-12 col-md-4"> 6169 <div class="input-group"> 6170 <input type="text" class="form-control" id="breeder-products-filter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 6171 <span class="input-group-addon" id="btn-breeder-products-filter"><i class="fa fa-search"></i></span> 6172 </div> 6173 </div> 6174 <div class="col-xs-12 col-md-4"> 6175 <div class="input-group"> 6176 <input type="checkbox" class="form-control" id="breeder-products-showdeadhorses" /> 6177 <label for="breeder-products-showdeadhorses">@Translate("ShowDeadHorses", "Show dead horses")</label> 6178 </div> 6179 </div> 6180 </div> 6181 <div class="row breeder-products-data"> 6182 <div class="col-xs-12"> 6183 <div class="table-responsive" style="zoom: 0.9;"> 6184 <table id="breeder-products-table"> 6185 <thead> 6186 <tr> 6187 <th data-sortOn="Gender" data-sortBy="Asc"><span class="hidden-xs hidden-sm">@Translate("Gender", "Gender")<i class="fa"></i></span></th> 6188 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6189 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6190 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6191 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6192 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6193 </tr> 6194 </thead> 6195 <tbody class="js-content"></tbody> 6196 </table> 6197 </div> 6198 </div> 6199 </div> 6200 </div> 6201 </div> 6202 <div class="breederinfo-panel hidden" id="breeder-horses" data-culture="@Dynamicweb.Frontend.PageView.Current().Area.Culture"> 6203 <div class="background"> 6204 <div class="row"> 6205 <div class="col-xs-12"> 6206 <h2> 6207 <a href="javascript:void(0);" class="breeder-horses-toggler"> 6208 @Translate("BreederInfo_Horses", "Owned horses") <span id="breeder-horses-counter" class="js-content"></span> 6209 <i class="fa fa-chevron-down rotated"></i> 6210 </a> 6211 </h2> 6212 </div> 6213 </div> 6214 @{ 6215 var horsesIntro = Translate("BreederInfo_HorsesIntro", ""); 6216 if (!string.IsNullOrWhiteSpace(horsesIntro)) 6217 { 6218 <div class="row breeder-horses-data"> 6219 <div class="col-xs-12"> 6220 @horsesIntro 6221 </div> 6222 </div> 6223 } 6224 } 6225 <div class="row filter-row breeder-horses-data"> 6226 <div id="breeder-horses-too-many-results" class="col-xs-12 hidden"> 6227 <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> 6228 </div> 6229 <div class="col-xs-12 col-md-4"> 6230 <div class="input-group"> 6231 <input type="text" class="form-control" id="breeder-horses-filter" placeholder='@Translate("FilterByAttributes", "Filter by attributes")' /> 6232 <span class="input-group-addon" id="btn-breeder-horses-filter"><i class="fa fa-search"></i></span> 6233 </div> 6234 </div> 6235 <div class="col-xs-12 col-md-4"> 6236 <div class="input-group"> 6237 <input type="checkbox" class="form-control" id="breeder-horses-showdeadhorses" /> 6238 <label for="breeder-horses-showdeadhorses">@Translate("ShowDeadHorses", "Show dead horses")</label> 6239 </div> 6240 </div> 6241 </div> 6242 <div class="row breeder-horses-data"> 6243 <div class="col-xs-12"> 6244 <div class="table-responsive" style="zoom: 0.9;"> 6245 <table id="breeder-horses-table"> 6246 <thead> 6247 <tr> 6248 <th data-sortOn="Gender" data-sortBy="Asc"><span class="hidden-xs hidden-sm">@Translate("Gender", "Gender")<i class="fa"></i></span></th> 6249 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6250 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6251 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6252 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6253 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6254 </tr> 6255 </thead> 6256 <tbody class="js-content"></tbody> 6257 </table> 6258 </div> 6259 </div> 6260 </div> 6261 </div> 6262 </div> 6263 <div class="breederinfo-panel marketplace-topx hidden" id="breeder-horsesforsale"> 6264 <div class="row"> 6265 <div class="col-xs-12"> 6266 <h2> 6267 <a href="javascript:void(0);" class="breeder-horsesforsale-toggler"> 6268 @Translate("BreederInfo_HorsesForSale", "Horses for sale") <span id="breeder-horsesforsale-counter" class="js-content"></span> 6269 <i class="fa fa-chevron-down rotated"></i> 6270 </a> 6271 </h2> 6272 </div> 6273 </div> 6274 @{ 6275 var forSaleIntro = Translate("BreederInfo_HorsesForSaleIntro", ""); 6276 if (!string.IsNullOrWhiteSpace(forSaleIntro)) 6277 { 6278 <div class="row breeder-horsesforsale-data"> 6279 <div class="col-xs-12"> 6280 @forSaleIntro 6281 </div> 6282 </div> 6283 } 6284 } 6285 <div class="row breeder-horsesforsale-data"> 6286 <div class="col-xs-12 result-container js-content" id="breeder-horsesforsale-adverts"> 6287 </div> 6288 </div> 6289 </div> 6290 <div class="breederinfo-panel hidden" id="breeder-horsenews"> 6291 <div class="row"> 6292 <div class="col-xs-12"> 6293 <h2> 6294 <a href="javascript:void(0);" class="breeder-horsenews-toggler"> 6295 @Translate("BreederInfo_HorsesNews", "Horses to name and breeding products in the news") <span id="breeder-horsenews-counter" class="js-content"></span> 6296 <i class="fa fa-chevron-down rotated"></i> 6297 </a> 6298 </h2> 6299 </div> 6300 </div> 6301 @{ 6302 var newsIntro = Translate("BreederInfo_NewsIntro", ""); 6303 if (!string.IsNullOrWhiteSpace(newsIntro)) 6304 { 6305 <div class="row breeder-horsenews-data"> 6306 <div class="col-xs-12"> 6307 @newsIntro 6308 </div> 6309 </div> 6310 } 6311 } 6312 <div class="row breeder-horsenews-data"> 6313 <div class="col-xs-12 js-content" id="breeder-horsenews-items"> 6314 6315 </div> 6316 </div> 6317 </div> 6318 <div class="breederinfo-panel hidden" id="breeder-performance"> 6319 <div class="row"> 6320 <div class="col-xs-12"> 6321 <h2> 6322 <a href="javascript:void(0);" class="breeder-performance-toggler"> 6323 @Translate("BreederInfo_Performance", "Performance") <i class="fa fa-chevron-down rotated"></i> 6324 </a> 6325 </h2> 6326 </div> 6327 </div> 6328 @{ 6329 var performanceIntro = Translate("BreederInfoPerformanceIntro", ""); 6330 if (!string.IsNullOrWhiteSpace(performanceIntro)) 6331 { 6332 <div class="row breeder-performance-data"> 6333 <div class="col-xs-12"> 6334 @performanceIntro 6335 </div> 6336 </div> 6337 } 6338 } 6339 <div class="row breeder-performance-data"> 6340 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g").ToLower()"> 6341 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g"))</h3> 6342 <div class="table-responsive" style="zoom: 0.9;"> 6343 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PerformanceMares.ToString("g").ToLower()-table"> 6344 <thead> 6345 <tr> 6346 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6347 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6348 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6349 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6350 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6351 </tr> 6352 </thead> 6353 <tbody class="js-content"></tbody> 6354 </table> 6355 </div> 6356 </div> 6357 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g").ToLower()"> 6358 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g"))</h3> 6359 <div class="table-responsive" style="zoom: 0.9;"> 6360 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.PreferredMares.ToString("g").ToLower()-table"> 6361 <thead> 6362 <tr> 6363 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6364 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6365 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6366 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6367 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6368 </tr> 6369 </thead> 6370 <tbody class="js-content"></tbody> 6371 </table> 6372 </div> 6373 </div> 6374 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g").ToLower()"> 6375 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g"))</h3> 6376 <div class="table-responsive" style="zoom: 0.9;"> 6377 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.EliteMares.ToString("g").ToLower()-table"> 6378 <thead> 6379 <tr> 6380 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6381 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6382 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6383 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6384 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6385 </tr> 6386 </thead> 6387 <tbody class="js-content"></tbody> 6388 </table> 6389 </div> 6390 </div> 6391 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g").ToLower()"> 6392 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g"))</h3> 6393 <div class="table-responsive" style="zoom: 0.9;"> 6394 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.SportMares.ToString("g").ToLower()-table"> 6395 <thead> 6396 <tr> 6397 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6398 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6399 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6400 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6401 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6402 </tr> 6403 </thead> 6404 <tbody class="js-content"></tbody> 6405 </table> 6406 </div> 6407 </div> 6408 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()"> 6409 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g"))</h3> 6410 <div class="table-responsive" style="zoom: 0.9;"> 6411 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()-table"> 6412 <thead> 6413 <tr> 6414 <td></td> 6415 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6416 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6417 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6418 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6419 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6420 </tr> 6421 </thead> 6422 <tbody class="js-content"></tbody> 6423 </table> 6424 </div> 6425 </div> 6426 <div class="col-xs-12 performance-item hidden" id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g").ToLower()"> 6427 <h3>@Translate($"BreederInfo_Performance_{Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g")}", Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g"))</h3> 6428 <div class="table-responsive" style="zoom: 0.9;"> 6429 <table id="breeder-performance-items-@Kwpn.Models.Enumerations.BreederPerformanceType.GoodPerformanceMares.ToString("g").ToLower()-table"> 6430 <thead> 6431 <tr> 6432 <th data-sortOn="Name" data-sortBy="Asc">@Translate("Name", "Name")<i class="fa"></i></th> 6433 <th data-sortOn="Lifenumber" data-sortBy="Asc">@Translate("LifeNumber_Short", "Life nr")<i class="fa"></i></th> 6434 <th data-sortOn="Register" data-sortBy="Asc">@Translate("Register", "Register")<i class="fa"></i></th> 6435 <th data-sortOn="Color" data-sortBy="Asc">@Translate("Color", "Color")<i class="fa"></i></th> 6436 <th data-sortOn="Father" data-sortBy="Asc">@Translate("FathersName", "Father") x @Translate("MothersFathersName", "Mothers father")<i class="fa"></i></th> 6437 </tr> 6438 </thead> 6439 <tbody class="js-content"></tbody> 6440 </table> 6441 </div> 6442 </div> 6443 </div> 6444 </div> 6445 <div class="breederinfo-panel hidden" id="breeder-contact"> 6446 <div class="row"> 6447 <div class="col-xs-12"> 6448 <h2> 6449 <a href="javascript:void(0);" class="breeder-contact-toggler"> 6450 @Translate("BreederInfo_Contact", "Contact") <span class="breeder-name"></span> 6451 <i class="fa fa-chevron-down rotated"></i> 6452 </a> 6453 </h2> 6454 </div> 6455 </div> 6456 @{ 6457 var contactIntro = Translate("BreederInfo_ContactIntro", ""); 6458 if (!string.IsNullOrWhiteSpace(contactIntro)) 6459 { 6460 <div class="row breeder-contact-data"> 6461 <div class="col-xs-12"> 6462 @contactIntro 6463 </div> 6464 </div> 6465 } 6466 } 6467 <div class="row breeder-contact-data form-body"> 6468 <div class="col-xs-12"> 6469 <div class="form-group"> 6470 6471 @*NAME*@ 6472 <div class="form-inline"> 6473 <label class="control-label col-sm-3" for="Breeder_Contact_Name">@Translate("BreederInfo_Contact_Name", "Name") *</label> 6474 <input type="text" class="form-control hide-hints" id="Breeder_Contact_Name" name="Breeder_Contact_Name" value="" required /> 6475 </div> 6476 6477 @*EMAIL*@ 6478 <div class="form-inline"> 6479 <label class="control-label col-sm-3" for="Breeder_Contact_EmailAddress">@Translate("BreederInfo_Contact_EmailAddress", "Email address") *</label> 6480 <input type="email" class="form-control hide-hints" id="Breeder_Contact_EmailAddress" name="Breeder_Contact_EmailAddress" value="" required /> 6481 </div> 6482 6483 @*PHONE*@ 6484 <div class="form-inline"> 6485 <label class="control-label col-sm-3" for="Breeder_Contact_Phone">@Translate("BreederInfo_Contact_Phone", "Phone number")</label> 6486 <input type="text" class="form-control hide-hints" id="Breeder_Contact_Phone" name="Breeder_Contact_Phone" value="" /> 6487 </div> 6488 6489 @*City*@ 6490 <div class="form-inline"> 6491 <label class="control-label col-sm-3" for="Breeder_Contact_City">@Translate("City", "City")</label> 6492 <input type="text" class="form-control hide-hints" id="Breeder_Contact_City" name="Breeder_Contact_City" value="" /> 6493 </div> 6494 6495 @*QUESTION*@ 6496 <div class="form-inline"> 6497 <label class="control-label col-sm-3" for="Breeder_Contact_Question">@Translate("BreederInfo_Contact_Question", "Question") *</label> 6498 <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> 6499 </div> 6500 6501 <div class="form-inline"> 6502 <div class="col-sm-offset-3 form-end"> 6503 6504 @{ 6505 var reCaptchaSiteKey = Kwpn.Models.Constants.StringConstants.ApplicationVariables.RecaptchaSiteKey; 6506 var useReCaptcha = !string.IsNullOrEmpty(reCaptchaSiteKey); 6507 6508 if (useReCaptcha) 6509 { 6510 <button class="submitBtn g-recaptcha" 6511 id="Breeder_Contact_Submit" 6512 name="Breeder_Contact_Submit" 6513 data-sitekey="@reCaptchaSiteKey" 6514 data-callback="breederContactCheckReCaptcha" 6515 data-action="submit" 6516 data-badge="inline" 6517 defaultText="@Translate("BreederInfo_Contact_Submit", "Submit").JsEncode()"> 6518 @Translate("BreederInfo_Contact_Submit", "Submit") 6519 </button> 6520 6521 @SnippetStart("JavascriptsBottom") 6522 <script> 6523 function breederContactCheckReCaptcha(token) { 6524 BreederInfoHelper.SubmitContactForm(token); 6525 } 6526 6527 $(document).ready(function () { 6528 6529 // handle recaptcha terms 6530 $("input[type=text], input[type=email]", ".breeder-contact-data").focusin(function () { 6531 $("body > div > .grecaptcha-badge").css("visibility", "visible"); 6532 }); 6533 $("input[type=text], input[type=email]", ".breeder-contact-data").focusout(function () { 6534 $("body > div > .grecaptcha-badge").css("visibility", "hidden"); 6535 }); 6536 }); 6537 </script> 6538 @SnippetEnd("JavascriptsBottom") 6539 } 6540 else 6541 { 6542 <button id="Breeder_Contact_Submit" 6543 class="g-recaptcha submitBtn" 6544 type="button" 6545 defaultText="@Translate("BreederInfo_Contact_Submit", "Submit").JsEncode()" 6546 onclick="BreederInfoHelper.SubmitContactForm();"> 6547 @Translate("BreederInfo_Contact_Submit", "Submit") 6548 </button> 6549 } 6550 6551 6552 } 6553 6554 6555 6556 </div> 6557 </div> 6558 6559 <div class="error"> 6560 <div class="col-sm-offset-3"> 6561 <span class="all-required hidden">@Translate("BreederInfo_Contact_AllFieldsRequired", "All fields are required")</span> 6562 <span class="email-invalid hidden">@Translate("BreederInfo_Contact_EmailInvalid", "The emailaddress is invalid")</span> 6563 <span class="send-error hidden">@Translate("BreederInfo_Contact_SendError", "Something went wrong")</span> 6564 </div> 6565 </div> 6566 </div> 6567 <div class="confirm-text hidden"> 6568 @Translate("BreederInfo_Contact_ConfirmationText", "Thanks. KWPN will send your question to this breeder.") 6569 </div> 6570 </div> 6571 </div> 6572 </div> 6573 <div class="breederinfo-panel hidden static" id="breeder-loadfailed"> 6574 <p>@Translate("BreederInfo_LoadFailed", "Something went wrong while loading the breeder data.")</p> 6575 </div> 6576 @SnippetStart("JavascriptsBottom") 6577 <script id="breeder-horses-item-template" type="text/html"> 6578 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6579 <td class="nowrap"> 6580 <i class="fa ${GenderClass}"></i><span class="hidden-xs hidden-sm"> ${GenderAbbr}</span> 6581 {{if !IsAlive}} 6582 <div class="fa-death" data-toggle="tooltip" title="@Translate("Deceased", "Deceased").JsEncode().ToUpper()"></div> 6583 {{/if}} 6584 {{if IsApprovedStud}} 6585 <div class="fa-approved-stud" data-toggle="tooltip" title="@Translate("IsApprovedStud", "Is an approved stud").JsEncode().ToUpper()"></div> 6586 {{/if}} 6587 </td> 6588 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6589 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6590 <td>${Register}</td> 6591 <td>${Color}</td> 6592 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6593 </tr> 6594 </script> 6595 <script id="breeder-advert-template" type="text/html"> 6596 <div class="col-xs-12 col-sm-6 col-md-3"> 6597 <a href="${advertLink}" data-horsecode="${animalCode}"> 6598 <div class="advert {{if isTopAdvert}} topadvert {{/if}}"> 6599 <div class="photo" style="background-image: url('{{if photo1 > ""}}${photo1}{{else}}/Files/Templates/Designs/Kwpn/Images/Marketplace_NoImg.jpg{{/if}}');"> 6600 {{if isTopAdvert}}<div class="topadd">@Translate("Marketplace_TopAdvertIndicator", "Top add")</div>{{/if}} 6601 <div class="datesince">@Translate("Marketplace_Since", "Since") ${MarketplaceHelper.GetSinceDate(dateFrom, "@Dynamicweb.Frontend.PageView.Current().Area.Culture.ToLower()")} </div> 6602 </div> 6603 <div class="specs"> 6604 <div class="row"> 6605 <div class="col-xs-3 text-center"> 6606 <div class="gender"> 6607 {{if gender == '@Kwpn.Models.Enumerations.Gender.HENGST.ToString()'}} 6608 <i class="fa fa-mars" title="@Translate(Kwpn.Models.Enumerations.Gender.HENGST.ToString())"></i> 6609 {{/if}} 6610 {{if gender == '@Kwpn.Models.Enumerations.Gender.RUIN.ToString()'}} 6611 <i class="fa fa-mars" title="@Translate(Kwpn.Models.Enumerations.Gender.RUIN.ToString())"></i> 6612 {{/if}} 6613 {{if gender == '@Kwpn.Models.Enumerations.Gender.MERRIE.ToString()'}} 6614 <i class="fa fa-venus" title="@Translate(Kwpn.Models.Enumerations.Gender.MERRIE.ToString())"></i> 6615 {{/if}} 6616 </div> 6617 </div> 6618 <div class="col-xs-9 text-left" style="margin-left: -15px;"> 6619 <div class="name"> 6620 ${animalName}{{if age >= 0}}, ${age} @Translate("Marketplace_Years", "Years"){{/if}} 6621 </div> 6622 <div class="pedigree"> 6623 ${fatherName} x ${mothersFatherName} 6624 </div> 6625 <div class="price">${priceLabel}</div> 6626 </div> 6627 </div> 6628 </div> 6629 </div> 6630 </a> 6631 </div> 6632 </script> 6633 <script id="breeder-horsenews-template" type="text/html"> 6634 <div class="col-xs-12"> 6635 <span class="date">${MarketplaceHelper.GetSinceDate(NewsDate, "@Dynamicweb.Frontend.PageView.Current().Area.Culture.ToLower()")}</span> 6636 <span class="horses"> 6637 {{each(key, value) Horses}} 6638 <span class="horse"><a href="${key}">${value}</a></span> 6639 {{/each}} 6640 </span> 6641 <a href="${NewsLink}"> 6642 <span class="title">${NewsTitle}</span> 6643 </a> 6644 </div> 6645 </script> 6646 <script id="breeder-performance-item-template" type="text/html"> 6647 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6648 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6649 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6650 <td>${Register}</td> 6651 <td>${Color}</td> 6652 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6653 </tr> 6654 </script> 6655 <script id="breeder-performance-item-@Kwpn.Models.Enumerations.BreederPerformanceType.ApprovedStallions.ToString("g").ToLower()-template" type="text/html"> 6656 <tr class="${ClassName} clickable" onclick="document.location.href = '${DetailLink}';" data-horsecode="${HorseCode}"> 6657 <td><img src="images/horseimage.ashx?pc=${HorseCode}" alt="${AnimalName}" /></td> 6658 <td>${AnimalName}{{if DateOfBirth != ""}}<br /><span class='small'>${GetDate(DateOfBirth)}</span>{{/if}}</td> 6659 <td>${Lifenumber}{{if LifenumberComplete != Lifenumber}}<br /><span class='small'>${LifenumberComplete}</span>{{/if}}</td> 6660 <td>${Register}</td> 6661 <td>${Color}</td> 6662 <td><span class="nowrap">${Father}</span> x <span class="nowrap">${MothersFather}</span></td> 6663 </tr> 6664 </script> 6665 @SnippetEnd("JavascriptsBottom") 6666 </div> 6667 @inherits Dynamicweb.Rendering.RazorTemplateBase<Dynamicweb.Rendering.RazorTemplateModel<Dynamicweb.Rendering.Template>> 6668 6669 6670 <div class="horse-detail-item hidden" id="horse-detail-item-videos" data-content="tab_videos"> 6671 <div id="video-container"> 6672 6673 @foreach (Kwpn.Models.Jump.VideoResponse video in collection) 6674 { 6675 <div class="row"> 6676 <div class="col-xs-12 col-md-7"> 6677 6678 @if (!string.IsNullOrEmpty(video.Title)) 6679 { 6680 <h3>@video.Title</h3> 6681 } 6682 6683 <div class="embed-responsive embed-responsive-16by9"> 6684 <iframe data-src="@video.EmbedUrl" class="embed-responsive-item" allowfullscreen></iframe> 6685 <div onclick="(function (elem) {const iframe = $(elem).prev('iframe');iframe.attr('src', iframe.attr('data-src'));$(elem).remove();})(this);"> 6686 <img src="@Kwpn.Core.Helpers.VideoHelper.ValidateThumbnail(video.Thumbnail)" class="embed-responsive-item" /> 6687 <i class="play-button"></i> 6688 </div> 6689 </div> 6690 <div class="videoProperties"> 6691 <small> 6692 6693 @if (video.Duration != null && (int)video.Duration > 0) 6694 { 6695 <i>@Kwpn.Core.Helpers.TimeHelper.ConvertDuration((int)video.Duration)</i><br /> 6696 } 6697 6698 </small> 6699 </div> 6700 <br /> 6701 </div> 6702 </div> 6703 } 6704 6705 6706 6707 </div> 6708 </div> 6709 6710 // SEO VIRTUAL PAGE VIEW LOGGING: GENERALINFO 6711 <Text> 6712 <script> 6713 SEO.trackPageView("@string.Format("{0}/{1}", seoPage, Translate("SEO_TrackPageviewPage_Database_tab_general", "general-info").UrlEncode()).ToLower()"); 6714 </script> 6715 </Text> 6716 6717 } 6718 </article> 6719 </div> 6720 <div class="row"> 6721 <div class="col-xs-12 col-md-10 page-content print-disclaimer"> 6722 @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>") 6723 </div> 6724 </div> 6725 </div> 6726 </div> 6727 </div> 6728 6729 if (isMyHorse) 6730 { 6731 <div class="break-grid content-container hidden" id="refreshcontainer"> 6732 <div class="break-grid-background"> 6733 <div class="in-grid"> 6734 <div class="row"> 6735 <div class="col-xs-12 col-md-7"> 6736 <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> 6737 </div> 6738 </div> 6739 </div> 6740 </div> 6741 </div> 6742 } 6743 6744 <script> 6745 6746 // We only want the menu interaction on Desktop, so we disable it on mobile screens 6747 // the breakpoint is 991 px. 6748 var pageId = '@Dynamicweb.Frontend.PageView.Current().Page.ID'; 6749 var _mx = 991; 6750 var screenWidth = window.innerWidth; 6751 checkWidth(); 6752 6753 $(window).on('resize', function () { 6754 screenWidth = window.innerWidth 6755 checkWidth(); 6756 openAsideOnFirstPagevisit(); 6757 }); 6758 6759 function enable_menu_slide() { 6760 $(".aside-page").on('click', function () { 6761 $(this).find('.bg_aside').toggleClass("closed") 6762 $(this).find('.bg_aside').toggleClass("open") 6763 }); 6764 } 6765 6766 function checkWidth() { 6767 if (screenWidth > _mx) { 6768 enable_menu_slide(); 6769 } else { 6770 $(".aside-page").unbind(); 6771 } 6772 } 6773 6774 function openAsideOnFirstPagevisit() { 6775 if (sessionStorage.getItem('popState' + pageId) != 'shown' && screenWidth > _mx && screenWidth <= '1346') { 6776 $(".bg_aside").delay(2000).toggleClass("closed open"); 6777 sessionStorage.setItem('popState' + pageId, 'shown'); 6778 } 6779 } 6780 6781 $(document).ready(function () { 6782 6783 // Open aside menu on first page visit 6784 openAsideOnFirstPagevisit(); 6785 6786 // Open and close tabs 6787 $('i.fa-chevron-down').on('click', function () { 6788 $(this).toggleClass('fa-rotate-180'); 6789 $(this).parent().next().toggleClass('open_tab'); 6790 }); 6791 6792 // Handle go back 6793 $(".go-back").click(function (event) { 6794 event.preventDefault(); 6795 history.back(1); 6796 }); 6797 6798 // Handle breeder click 6799 @if (hasBreeders) { 6800 <text> 6801 $(".breeder-link").off("click").on("click", function () { 6802 var breederPersonCode = $(this).data("personcode"); 6803 BreederInfoHelper.InitializeBreeder(breederPersonCode, false); 6804 // SEO VIRTUAL PAGE VIEW LOGGING 6805 SEO.trackPageView("@seoPage.ToLower()/@Translate("SEO_TrackPageviewPage_Database_tab_breeders_info", "breeders-info").UrlEncode()"); 6806 }); 6807 $(".registered-link").off("click").on("click", function () { 6808 var registeredPersonCode = $(this).data("personcode"); 6809 BreederInfoHelper.InitializeBreeder(registeredPersonCode, true); 6810 // SEO VIRTUAL PAGE VIEW LOGGING 6811 SEO.trackPageView("@seoPage.ToLower()/@Translate("SEO_TrackPageviewPage_Database_tab_registered_info", "registered-info").UrlEncode()"); 6812 }); 6813 </text> 6814 } 6815 }); 6816 </script> 6817 } 6818 } 6819 }

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