private void ScorecardSelector_SelectionChanged(object sender, SelectionChangedEventArgs e) { ScorecardViewModel selectedScorecard = ScorecardLongListSelector.SelectedItem as ScorecardViewModel; NavigationService.Navigate(new Uri("/Views/ScorecardView.xaml?scorecardIndex=" + HomePageViewModel.get_instance().scorecards.IndexOf(selectedScorecard), UriKind.Relative)); CourseLongListSelector.SelectedItem = null; }
protected override void OnNavigatedTo(NavigationEventArgs e) { if (DataContext == null) { string selectedIndex = ""; if (NavigationContext.QueryString.TryGetValue("scorecardIndex", out selectedIndex)) { int index = int.Parse(selectedIndex); DataContext = HomePageViewModel.get_instance().scorecards[index]; scorecardViewModel = HomePageViewModel.get_instance().scorecards[index]; } } }
private void Add_Scorecard(object sender, EventArgs e) { if (HomePageViewModel.get_instance().courses.Count == 0) { Show_Error_Message("You must first create a course!"); return; } if (HomePageViewModel.get_instance().players.Count == 0) { Show_Error_Message("You must first create a player!"); return; } ScorecardViewModel newScorecard = HomePageViewModel.get_instance().create_scorecard(); int index = HomePageViewModel.get_instance().scorecards.IndexOf(newScorecard); NavigationService.Navigate(new Uri("/Views/NewScorecard.xaml?scorecardIndex=" + index, UriKind.Relative)); }
public IActionResult PostInformation([FromBody] ScorecardViewModel viewModel) { _repository.CreateMatchesForScorecard(viewModel); return(new JsonResult("Success")); }
public override void Execute() { #line 8 "..\..\Views\Match.cshtml" Html.RequiresCss("~/matches/match.min.css"); Html.RequiresCss("~/matches/scorecards.min.css"); Html.RequiresJs("~/matches/match.js"); Html.RequiresCss("~/css/comments.min.css"); var authorizedToEdit = Model.IsAuthorized[AuthorizedAction.EditMatch] || Model.IsAuthorized[AuthorizedAction.DeleteMatch]; #line default #line hidden WriteLiteral("\r\n"); WriteLiteral("<div"); WriteLiteral(" class=\"container-xl\""); WriteLiteral(">\r\n <h1>"); #line 43 "..\..\Views\Match.cshtml" Write(Html.MatchFullName(Model.Match, x => Model.DateTimeFormatter.FormatDate(x, false))); #line default #line hidden WriteLiteral("</h1>\r\n\r\n "); WriteLiteral("\r\n"); #line 46 "..\..\Views\Match.cshtml" #line default #line hidden #line 46 "..\..\Views\Match.cshtml" if (authorizedToEdit) { #line default #line hidden WriteLiteral(" <ul"); WriteAttribute("class", Tuple.Create(" class=\"", 1987), Tuple.Create("\"", 2064) , Tuple.Create(Tuple.Create("", 1995), Tuple.Create("nav", 1995), true) , Tuple.Create(Tuple.Create(" ", 1998), Tuple.Create("nav-tabs", 1999), true) #line 48 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 2007), Tuple.Create <System.Object, System.Int32>(authorizedToEdit ? " nav-tabs-has-edit" : string.Empty #line default #line hidden , 2007), false) ); WriteLiteral(">\r\n <li"); WriteLiteral(" class=\"nav-item\""); WriteLiteral(">\r\n <em"); WriteLiteral(" class=\"nav-link active\""); WriteLiteral(">Summary</em>\r\n </li>\r\n <li"); WriteLiteral(" class=\"nav-item nav-item-admin\""); WriteLiteral(">\r\n <a"); WriteLiteral(" class=\"nav-link nav-link-edit\""); WriteAttribute("href", Tuple.Create(" href=\"", 2279), Tuple.Create("\"", 2314) #line 53 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 2286), Tuple.Create <System.Object, System.Int32>(Model.Match.MatchRoute #line default #line hidden , 2286), false) , Tuple.Create(Tuple.Create("", 2309), Tuple.Create("/edit", 2309), true) ); WriteLiteral(">Edit match</a>\r\n </li>\r\n </ul>\r\n"); #line 56 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral("\r\n <p>\r\n"); WriteLiteral(" "); #line 59 "..\..\Views\Match.cshtml" Write(Model.Match.MatchType.Humanize(LetterCasing.Sentence)); #line default #line hidden WriteLiteral("\r\n"); #line 60 "..\..\Views\Match.cshtml" #line default #line hidden #line 60 "..\..\Views\Match.cshtml" if (Model.Match.Teams.Count > 0) { #line default #line hidden #line 62 "..\..\Views\Match.cshtml" Write(Model.Match.MatchType == MatchType.TrainingSession ? "for " : (Model.Match.Teams.Count > 1 ? "between " : "involving ")); #line default #line hidden #line 62 "..\..\Views\Match.cshtml" #line default #line hidden #line 63 "..\..\Views\Match.cshtml" Write(Html.Raw(Model.Match.Teams.Select(x => x.Team).ToList().Humanize(x => $"<a href=\"{Html.Encode(x.TeamRoute)}\">{Html.Encode(x.TeamName)}</a>"))); #line default #line hidden #line 63 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" "); #line 65 "..\..\Views\Match.cshtml" if (Model.Match.Tournament != null) { #line default #line hidden #line 67 "..\..\Views\Match.cshtml" Write((Model.Match.Tournament.TournamentName.StartsWith("THE ", StringComparison.OrdinalIgnoreCase)) ? " in " : " in the "); #line default #line hidden #line 67 "..\..\Views\Match.cshtml" #line default #line hidden WriteLiteral(" <a"); WriteAttribute("href", Tuple.Create(" href=\"", 3011), Tuple.Create("\"", 3057) #line 68 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 3018), Tuple.Create <System.Object, System.Int32>(Model.Match.Tournament.TournamentRoute #line default #line hidden , 3018), false) ); WriteLiteral(">"); #line 68 "..\..\Views\Match.cshtml" Write(Model.Match.Tournament.TournamentName); #line default #line hidden WriteLiteral("</a>"); WriteLiteral(".\r\n"); #line 69 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" </p>\r\n\r\n <p>\r\n When: "); #line 73 "..\..\Views\Match.cshtml" Write(Model.Match.StartTimeIsKnown ? Model.DateTimeFormatter.FormatDateTime(Model.Match.StartTime) : Model.DateTimeFormatter.FormatDate(Model.Match.StartTime)); #line default #line hidden WriteLiteral("\r\n"); #line 74 "..\..\Views\Match.cshtml" #line default #line hidden #line 74 "..\..\Views\Match.cshtml" if (Model.Match.MatchLocation?.Latitude != null && Model.Match.MatchLocation?.Longitude != null) { var solarTimes = new SolarTimes(Model.Match.StartTime, Model.Match.MatchLocation.Latitude, Model.Match.MatchLocation.Longitude); #line default #line hidden WriteLiteral(" "); WriteLiteral(" (sunset "); #line 77 "..\..\Views\Match.cshtml" Write(Model.DateTimeFormatter.FormatTime(solarTimes.Sunset)); #line default #line hidden WriteLiteral(")\r\n"); #line 78 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" "); #line 79 "..\..\Views\Match.cshtml" if (Model.Match.StartTime > DateTimeOffset.UtcNow && Model.Match.Tournament == null) { #line default #line hidden WriteLiteral(" <a"); WriteLiteral(" type=\"text/calendar\""); WriteAttribute("href", Tuple.Create(" href=\"", 3801), Tuple.Create("\"", 3929) , Tuple.Create(Tuple.Create("", 3808), Tuple.Create("webcal://", 3808), true) #line 81 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 3817), Tuple.Create <System.Object, System.Int32>(Request.Url.Host == "localhost" ? Request.Url.Authority : "www.stoolball.org.uk" #line default #line hidden , 3817), false) #line 81 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 3900), Tuple.Create <System.Object, System.Int32>(Model.Match.MatchRoute #line default #line hidden , 3900), false) , Tuple.Create(Tuple.Create("", 3925), Tuple.Create(".ics", 3925), true) ); WriteLiteral(" rel=\"nofollow\""); WriteLiteral(" class=\"calendar__inline\""); WriteLiteral(">Add to calendar</a>\r\n"); #line 82 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" </p>\r\n\r\n\r\n"); #line 86 "..\..\Views\Match.cshtml" #line default #line hidden #line 86 "..\..\Views\Match.cshtml" if (Model.Match.MatchLocation != null) { #line default #line hidden WriteLiteral(" <p>Where: <a"); WriteAttribute("href", Tuple.Create(" href=\"", 4089), Tuple.Create("\"", 4141) #line 88 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 4096), Tuple.Create <System.Object, System.Int32>(Model.Match.MatchLocation.MatchLocationRoute #line default #line hidden , 4096), false) ); WriteLiteral(">"); #line 88 "..\..\Views\Match.cshtml" Write(Model.Match.MatchLocation.NameAndLocalityOrTown()); #line default #line hidden WriteLiteral("</a></p>\r\n"); #line 89 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral("\r\n"); #line 91 "..\..\Views\Match.cshtml" #line default #line hidden #line 91 "..\..\Views\Match.cshtml" if (Model.Match.StartTime <= DateTimeOffset.UtcNow && Model.Match.MatchType != MatchType.TrainingSession) { #line default #line hidden WriteLiteral(" <p"); WriteLiteral(" class=\"match-result\""); WriteLiteral("><strong>Result: "); #line 93 "..\..\Views\Match.cshtml" Write(ResultDescription()); #line default #line hidden WriteLiteral("</strong></p>\r\n"); #line 94 "..\..\Views\Match.cshtml" var resultRequired = !Model.Match.MatchResultType.HasValue || !Model.Match.HasCompleteScorecard(); if (Model.Match.Tournament == null) { #line default #line hidden WriteLiteral(" <div"); WriteLiteral(" class=\"update-result\""); WriteLiteral(">\r\n <a"); WriteAttribute("class", Tuple.Create(" class=\"", 4622), Tuple.Create("\"", 4683) , Tuple.Create(Tuple.Create("", 4630), Tuple.Create("btn", 4630), true) , Tuple.Create(Tuple.Create(" ", 4633), Tuple.Create("btn-secondary", 4634), true) #line 98 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 4647), Tuple.Create <System.Object, System.Int32>(resultRequired ? " btn-lg" : null #line default #line hidden , 4647), false) ); WriteAttribute("href", Tuple.Create(" href=\"", 4684), Tuple.Create("\"", 4733) #line 98 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 4691), Tuple.Create <System.Object, System.Int32>(Model.Match.MatchRoute #line default #line hidden , 4691), false) , Tuple.Create(Tuple.Create("", 4714), Tuple.Create("/edit/start-of-play", 4714), true) ); WriteLiteral(">Edit result</a>\r\n </div>\r\n"); #line 100 "..\..\Views\Match.cshtml" } var tossWinners = Model.Match.Teams.FirstOrDefault(x => x.WonToss.HasValue && x.WonToss.Value); if (tossWinners != null) { var tossResult = tossWinners.Team.TeamName + " won the toss"; if (Model.Match.InningsOrderIsKnown) { var choseTo = (tossWinners.MatchTeamId == Model.Match.MatchInnings.First().BattingTeam.MatchTeamId) ? "bat" : "bowl"; tossResult += " and chose to " + choseTo; } #line default #line hidden WriteLiteral(" <p>"); #line 111 "..\..\Views\Match.cshtml" Write(tossResult); #line default #line hidden WriteLiteral(".</p>\r\n"); #line 112 "..\..\Views\Match.cshtml" } if (Model.Match.HasScorecard()) { foreach (var innings in Model.Match.MatchInnings) { var scorecardViewModel = new ScorecardViewModel { MatchInnings = innings, TotalInningsInMatch = Model.Match.MatchInnings.Count }; #line default #line hidden #line 119 "..\..\Views\Match.cshtml" Write(Html.Partial("_BattingScorecard", scorecardViewModel)); #line default #line hidden #line 119 "..\..\Views\Match.cshtml" #line default #line hidden #line 120 "..\..\Views\Match.cshtml" Write(Html.Partial("_BowlingScorecard", scorecardViewModel)); #line default #line hidden #line 120 "..\..\Views\Match.cshtml" } } else { if (Model.Match.InningsOrderIsKnown && tossWinners == null) { // Show the batting order, since it's not stated as part of the toss result and not implied by showing scorecards in order. var firstToBat = Model.Match.Teams.FirstOrDefault(x => x.MatchTeamId == Model.Match.MatchInnings.First().BattingTeam?.MatchTeamId); if (firstToBat != null) { #line default #line hidden WriteLiteral(" <p>"); #line 131 "..\..\Views\Match.cshtml" Write(firstToBat.Team.TeamName); #line default #line hidden WriteLiteral(" batted first.</p>\r\n"); #line 132 "..\..\Views\Match.cshtml" } } } if (Model.Match.Awards.Any()) { var currentAwardName = string.Empty; #line default #line hidden WriteLiteral(" <dl"); WriteLiteral(" class=\"list-results__detail award-list\""); WriteLiteral(">\r\n"); #line 140 "..\..\Views\Match.cshtml" #line default #line hidden #line 140 "..\..\Views\Match.cshtml" foreach (var award in Model.Match.Awards) { if (award.Award.AwardName != currentAwardName) { #line default #line hidden WriteLiteral(" <dt>"); #line 144 "..\..\Views\Match.cshtml" Write(award.Award.AwardName); #line default #line hidden WriteLiteral("</dt>\r\n"); #line 145 "..\..\Views\Match.cshtml" currentAwardName = award.Award.AwardName; } #line default #line hidden WriteLiteral(" <dd>\r\n <a"); WriteAttribute("href", Tuple.Create(" href=\"", 6878), Tuple.Create("\"", 6925) #line 148 "..\..\Views\Match.cshtml" , Tuple.Create(Tuple.Create("", 6885), Tuple.Create <System.Object, System.Int32>(award.PlayerIdentity.Player.PlayerRoute #line default #line hidden , 6885), false) ); WriteLiteral(">"); #line 148 "..\..\Views\Match.cshtml" Write(award.PlayerIdentity.PlayerIdentityName); #line default #line hidden WriteLiteral("</a> ("); #line 148 "..\..\Views\Match.cshtml" Write(Model.Match.Teams.First(x => x.Team.TeamId == award.PlayerIdentity.Team.TeamId).Team.TeamName); #line default #line hidden WriteLiteral(")\r\n"); #line 149 "..\..\Views\Match.cshtml" #line default #line hidden #line 149 "..\..\Views\Match.cshtml" if (!string.IsNullOrWhiteSpace(award.Reason)) { #line default #line hidden WriteLiteral(" "); WriteLiteral(" – "); #line 151 "..\..\Views\Match.cshtml" Write(award.Reason.Humanize(LetterCasing.Sentence)); #line default #line hidden WriteLiteral("\r\n"); #line 152 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" </dd>\r\n"); #line 154 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral(" </dl>\r\n"); #line 156 "..\..\Views\Match.cshtml" } } #line default #line hidden WriteLiteral("\r\n"); #line 159 "..\..\Views\Match.cshtml" #line default #line hidden #line 159 "..\..\Views\Match.cshtml" if (!string.IsNullOrWhiteSpace(Model.Match.MatchNotes)) { #line default #line hidden WriteLiteral(" <h2>Notes</h2>\r\n"); #line 162 "..\..\Views\Match.cshtml" #line default #line hidden #line 162 "..\..\Views\Match.cshtml" Write(Html.Raw(Model.Match.MatchNotes)); #line default #line hidden #line 162 "..\..\Views\Match.cshtml" } #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 165 "..\..\Views\Match.cshtml" Write(Html.Partial("_Comments", Model.Match.Comments)); #line default #line hidden WriteLiteral("\r\n</div>"); }
public override void Execute() { #line 11 "..\..\Views\StyleGuideStoolballData.cshtml" Html.RequiresJs("https://maps.google.co.uk/maps/api/js?key=" + Model.GoogleMapsApiKey, 50); Html.RequiresJs("/js/maps.js", 90); Html.RequiresJs("/matchlocations/match-location.js"); Html.RequiresJs("~/js/libs/jquery.autocomplete.min.js", 50); Html.RequiresCss("~/css/autocomplete.min.css"); Html.RequiresJs("/umbraco/lib/tinymce/tinymce.min.js", 90); Html.RequiresJs("/js/tinymce.js"); Html.RequiresCss("~/matches/scorecards.min.css"); Html.RequiresCss("~/css/steps.min.css"); Html.RequiresJs("~/matches/player-autocomplete.js", 70); Html.RequiresJs("~/matches/edit-batting-scorecard.js"); Html.RequiresJs("~/matches/edit-bowling-scorecard.js"); Html.RequiresCss("~/css/comments.min.css"); #line default #line hidden WriteLiteral("\r\n<div"); WriteLiteral(" class=\"container-xl\""); WriteLiteral(">\r\n <h1"); WriteLiteral(" data-show-consent=\"true\""); WriteLiteral(">"); #line 32 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Model.Name); #line default #line hidden WriteLiteral("</h1>\r\n <ul"); WriteLiteral(" class=\"nav nav-tabs nav-tabs-has-add nav-tabs-has-edit\""); WriteLiteral(">\r\n <li"); WriteLiteral(" class=\"nav-item\""); WriteLiteral(">\r\n <a"); WriteLiteral(" class=\"nav-link\""); WriteAttribute("href", Tuple.Create(" href=\"", 1338), Tuple.Create("\"", 1379) #line 35 "..\..\Views\StyleGuideStoolballData.cshtml" , Tuple.Create(Tuple.Create("", 1345), Tuple.Create <System.Object, System.Int32>(Umbraco.AssignedContentItem.Url() #line default #line hidden , 1345), false) ); WriteLiteral(">Umbraco content</a>\r\n </li>\r\n <li"); WriteLiteral(" class=\"nav-item\""); WriteLiteral(">\r\n <a"); WriteLiteral(" class=\"nav-link\""); WriteAttribute("href", Tuple.Create(" href=\"", 1479), Tuple.Create("\"", 1548) #line 38 "..\..\Views\StyleGuideStoolballData.cshtml" , Tuple.Create(Tuple.Create("", 1486), Tuple.Create <System.Object, System.Int32>(Umbraco.AssignedContentItem.Url() #line default #line hidden , 1486), false) , Tuple.Create(Tuple.Create("", 1520), Tuple.Create("?alttemplate=styleguideforms", 1520), true) ); WriteLiteral(">Forms</a>\r\n </li>\r\n <li"); WriteLiteral(" class=\"nav-item\""); WriteLiteral(">\r\n <em"); WriteLiteral(" class=\"nav-link active\""); WriteLiteral(">Stoolball data</em>\r\n </li>\r\n </ul>\r\n <table"); WriteLiteral(" class=\"table\""); WriteLiteral(">\r\n <caption>Table with edit options</caption>\r\n <thead><tr><th>Exa" + "mple</th><th>Date</th><th>Number</th></tr></thead>\r\n <tbody>\r\n " + " <tr>\r\n <th"); WriteLiteral(" scope=\"row\""); WriteLiteral(">Unvalidated</th>\r\n <td><input"); WriteLiteral(" class=\"related-item__data\""); WriteLiteral(" data-item=\"3040d68b-bc9e-4bad-a8fe-354b72f214c1\""); WriteLiteral(" id=\"Season_Teams_0__WithdrawnDate\""); WriteLiteral(" name=\"Season.Teams[0].WithdrawnDate\""); WriteLiteral(" type=\"date\""); WriteLiteral(" value=\"\""); WriteLiteral("></td>\r\n <td>\r\n <input"); WriteLiteral(" data-val=\"true\""); WriteLiteral(" data-val-number=\"The field Points for away team must be a number.\""); WriteLiteral(" data-val-required=\"The Points for away team field is required.\""); WriteLiteral(" id=\"Season_PointsRules_0__AwayPoints\""); WriteLiteral(" maxlength=\"2\""); WriteLiteral(" name=\"Season.PointsRules[0].AwayPoints\""); WriteLiteral(" type=\"number\""); WriteLiteral(" value=\"2\""); WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n <t" + "h"); WriteLiteral(" scope=\"row\""); WriteLiteral(">Valid</th>\r\n <td>\r\n <input"); WriteLiteral(" class=\"form-control valid\""); WriteLiteral(" data-val=\"true\""); WriteLiteral(" data-val-required=\"The Match date field is required.\""); WriteLiteral(" id=\"valid-date-field-in-table\""); WriteLiteral(" name=\"valid-date-field-in-table\""); WriteLiteral(" required=\"required\""); WriteLiteral(" type=\"date\""); WriteLiteral(" value=\"\""); WriteLiteral(" aria-invalid=\"false\""); WriteLiteral(">\r\n </td>\r\n <td>\r\n <input"); WriteLiteral(" data-val=\"true\""); WriteLiteral(" data-val-number=\"The field Points for home team must be a number.\""); WriteLiteral(" data-val-required=\"The Points for home team field is required.\""); WriteLiteral(" id=\"Season_PointsRules_0__HomePoints\""); WriteLiteral(" maxlength=\"2\""); WriteLiteral(" name=\"Season.PointsRules[0].HomePoints\""); WriteLiteral(" type=\"number\""); WriteLiteral(" value=\"0\""); WriteLiteral(" aria-describedby=\"Season_PointsRules_0__HomePoints-error\""); WriteLiteral(" class=\"valid\""); WriteLiteral(" aria-invalid=\"false\""); WriteLiteral(">\r\n </td>\r\n </tr>\r\n <tr>\r\n <t" + "h"); WriteLiteral(" scope=\"row\""); WriteLiteral(">Invalid</th>\r\n <td>Not applicable</td>\r\n <td>\r\n " + " <input"); WriteLiteral(" data-val=\"true\""); WriteLiteral(" data-val-number=\"The field Points for away team must be a number.\""); WriteLiteral(" data-val-required=\"The Points for away team field is required.\""); WriteLiteral(" id=\"Season_PointsRules_0__AwayPoints\""); WriteLiteral(" maxlength=\"2\""); WriteLiteral(" name=\"Season.PointsRules[0].AwayPoints\""); WriteLiteral(" type=\"number\""); WriteLiteral(" value=\"2\""); WriteLiteral(" class=\"input-validation-error\""); WriteLiteral(" aria-describedby=\"Season_PointsRules_0__AwayPoints-error\""); WriteLiteral(" aria-invalid=\"true\""); WriteLiteral(">\r\n <span"); WriteLiteral(" class=\"field-validation-error\""); WriteLiteral(" data-valmsg-for=\"Season.PointsRules[0].AwayPoints\""); WriteLiteral(" data-valmsg-replace=\"true\""); WriteLiteral("><span"); WriteLiteral(" id=\"Season_PointsRules_0__AwayPoints-error\""); WriteLiteral(" class=\"\""); WriteLiteral(">The Points for away team field is required.</span></span>\r\n </td>" + "\r\n </tr>\r\n </tbody>\r\n </table>\r\n <p>A paragraph followin" + "g a Bootstrap table.</p>\r\n <table"); WriteLiteral(" class=\"table table-as-cards table-as-cards-reset-md\""); WriteLiteral(">\r\n <caption>League table caption. Table displays as cards on mobile.</cap" + "tion>\r\n <thead>\r\n <tr>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">Team</th>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">Played</th>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">Won</th>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">Lost</th>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">Tied</th>\r\n <th"); WriteLiteral(" scope=\"col\""); WriteLiteral(">No result</th>\r\n <th>Runs scored</th>\r\n <th>Runs c" + "onceded</th>\r\n <th>Points</th>\r\n </tr>\r\n </thea" + "d>\r\n <tbody>\r\n <tr>\r\n <th"); WriteLiteral(" scope=\"row\""); WriteLiteral("><a"); WriteLiteral(" href=\"https://example.org\""); WriteLiteral(">Team A</a></th>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Played</span>12</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Won</span>9</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Lost</span>3</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Tied</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">No result</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Runs scored</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Runs conceded</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Points</span>18</td>\r\n </tr>\r\n <tr>\r\n <th"); WriteLiteral(" scope=\"row\""); WriteLiteral("><a"); WriteLiteral(" href=\"https://example.org\""); WriteLiteral(">Team B</a></th>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Played</span>12</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Won</span>8</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Lost</span>3</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Tied</span>1</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">No result</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Runs scored</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Runs conceded</span>0</td>\r\n <td"); WriteLiteral(" data-stackable=\"true\""); WriteLiteral("><span"); WriteLiteral(" class=\"table-as-cards__label\""); WriteLiteral(" aria-hidden=\"true\""); WriteLiteral(">Points</span>17</td>\r\n </tr>\r\n <tr"); WriteLiteral(" class=\"text-muted\""); WriteLiteral(">\r\n <th"); WriteLiteral(" scope=\"row\""); WriteLiteral("><a"); WriteLiteral(" href=\"https://example.org\""); WriteLiteral(">Team C</a></th>\r\n <td"); WriteLiteral(" colspan=\"8\""); WriteLiteral(">Withdrawn from league</td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n " + " <h2>Steps in a process</h2>\r\n <ol"); WriteLiteral(" class=\"steps\""); WriteLiteral(">\r\n <li"); WriteLiteral(" class=\"steps__completed\""); WriteLiteral("><span"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">First step</span></li>\r\n <li"); WriteLiteral(" aria-current=\"step\""); WriteLiteral("><em"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">Second step</em></li>\r\n <li><span"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">Third step</span></li>\r\n <li><span"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">Fourth step</span></li>\r\n <li><span"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">Fifth step</span></li>\r\n <li><span"); WriteLiteral(" class=\"sr-only\""); WriteLiteral(">Sixth step</span></li>\r\n </ol>\r\n <div"); WriteLiteral(" class=\"alert alert-info\""); WriteLiteral(">\r\n <p>A paragraph within an informational alert, including a <a"); WriteLiteral(" href=\"https://example.org\""); WriteLiteral(">link</a>.</p>\r\n </div>\r\n <div"); WriteLiteral(" class=\"alert alert-info\""); WriteLiteral(">\r\n <p>Two alerts together.</p>\r\n </div>\r\n <h2>Stoolball listings</h" + "2>\r\n <p>This is a list of teams.</p>\r\n"); WriteLiteral(" "); #line 136 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_TeamList", new List <Team> { new Team { TeamName = "Team A", TeamRoute = "/teams/team-a" }, new Team { TeamName = "Team B", TeamRoute = "/teams/team-b" } })); #line default #line hidden WriteLiteral("\r\n <p>This is a list of matches.</p>\r\n"); #line 141 "..\..\Views\StyleGuideStoolballData.cshtml" #line default #line hidden #line 141 "..\..\Views\StyleGuideStoolballData.cshtml" var matchListing = new MatchListingViewModel(Umbraco.AssignedContentItem, Services.UserService) { DateTimeFormatter = new Stoolball.Dates.DateTimeFormatter() }; matchListing.MatchTypesToLabel.Add(MatchType.FriendlyMatch); matchListing.Matches.AddRange(new[] { new MatchListing { MatchName = "Team A v Team B", MatchRoute = "/matches/team-a-v-team-b", MatchType = MatchType.LeagueMatch, StartTime = DateTime.UtcNow.AddMonths(-1) }, new MatchListing { MatchName = "Team A v Team B", MatchRoute = "/matches/team-a-v-team-b", MatchType = MatchType.FriendlyMatch, StartTime = DateTime.UtcNow }, new MatchListing { MatchName = "Team A tournament", MatchRoute = "/tournaments/team-a-tournament", PlayerType = PlayerType.Mixed, SpacesInTournament = 5, StartTime = DateTime.UtcNow.AddMonths(1) } }); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 169 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_MatchList", matchListing)); #line default #line hidden WriteLiteral("\r\n\r\n <p>This is a list of seasons.</p>\r\n"); #line 172 "..\..\Views\StyleGuideStoolballData.cshtml" #line default #line hidden #line 172 "..\..\Views\StyleGuideStoolballData.cshtml" var seasonList = new SeasonListViewModel { ShowCompetitionHeading = true }; var competition = new Competition { CompetitionName = "Example competition" }; competition.Seasons.Add(new Season { FromYear = 2020, UntilYear = 2020, SeasonRoute = "/competitions/example/2020" }); competition.Seasons.Add(new Season { FromYear = 2020, UntilYear = 2021, SeasonRoute = "/competitions/example/2020-21" }); seasonList.Competitions.Add(competition); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 183 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_SeasonList", seasonList)); #line default #line hidden WriteLiteral("\r\n <div"); WriteLiteral(" id=\"location-map\""); WriteLiteral(" data-latitude=\"50.995715487915\""); WriteLiteral(" data-longitude=\"0.088866949081421\""); WriteLiteral(" data-precision=\"exact\""); WriteLiteral(" data-title=\"Maresfield Recreation Ground, Maresfield\""); WriteLiteral(">\r\n <p><a"); WriteLiteral(" href=\"https://maps.google.co.uk/?z=16&q=Maresfield+Recreation+Ground%2c+Mare" + "[email protected],0.088866949081421&ll=50.995715487915,0.08886694908142" + "1\""); WriteLiteral(">Map of Maresfield Recreation Ground, Maresfield on Google Maps</a></p>\r\n </di" + "v>\r\n <h2>Scorecards</h2>\r\n"); #line 188 "..\..\Views\StyleGuideStoolballData.cshtml" #line default #line hidden #line 188 "..\..\Views\StyleGuideStoolballData.cshtml" var innings = new EditScorecardViewModel(Model, Services.UserService) { Match = new Match { PlayersPerTeam = 2 }, CurrentInnings = new MatchInningsViewModel { MatchInnings = new MatchInnings { BattingTeam = new TeamInMatch { Team = new Team { TeamName = "The batting team" } }, BowlingTeam = new TeamInMatch { Team = new Team { TeamName = "The bowling team" } }, Byes = 2, Wides = 4, NoBalls = 6, BonusOrPenaltyRuns = 8, Runs = 100, Wickets = 1 } } }; innings.CurrentInnings.MatchInnings.PlayerInnings.Add(new PlayerInnings { Batter = new PlayerIdentity { PlayerIdentityName = "Player One", Player = new Player { PlayerRoute = "/players/player-one" } }, DismissalType = DismissalType.Caught, DismissedBy = new PlayerIdentity { PlayerIdentityName = "Player Two", Player = new Player { PlayerRoute = "/players/player-two" } }, Bowler = new PlayerIdentity { PlayerIdentityName = "Player Three", Player = new Player { PlayerRoute = "/players/player-three" } }, RunsScored = 50, BallsFaced = 60 }); innings.CurrentInnings.MatchInnings.PlayerInnings.Add(new PlayerInnings { Batter = new PlayerIdentity { PlayerIdentityName = "Player Four", Player = new Player { PlayerRoute = "/players/player-four" } }, DismissalType = DismissalType.BodyBeforeWicket, Bowler = new PlayerIdentity { PlayerIdentityName = "Player Three", Player = new Player { PlayerRoute = "/players/player-three" } }, RunsScored = 10, BallsFaced = 10 }); innings.CurrentInnings.PlayerInningsSearch.Add(new PlayerInningsViewModel { Batter = "Player One", DismissalType = DismissalType.Caught, DismissedBy = "Player Two", Bowler = "Player Three", RunsScored = 50, BallsFaced = 60 }); innings.CurrentInnings.PlayerInningsSearch.Add(new PlayerInningsViewModel { Batter = "Player Four", DismissalType = DismissalType.BodyBeforeWicket, Bowler = "Player Three", RunsScored = 10, BallsFaced = 10 }); innings.CurrentInnings.MatchInnings.OversBowled.Add(new Over { Bowler = new PlayerIdentity { PlayerIdentityName = "Player Two", Player = new Player { PlayerRoute = "/players/player-two" } }, BallsBowled = 8, Wides = 2, NoBalls = 4, RunsConceded = 8 }); innings.CurrentInnings.OversBowledSearch.Add(new OverViewModel { BowledBy = "Player Two", BallsBowled = 8, Wides = 2, NoBalls = 4, RunsConceded = 8 }); var scorecardViewModel = new ScorecardViewModel { MatchInnings = innings.CurrentInnings.MatchInnings }; #line default #line hidden WriteLiteral("\r\n\r\n\r\n"); WriteLiteral(" "); #line 264 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_BattingScorecard", scorecardViewModel)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 265 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_BowlingScorecard", scorecardViewModel)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 266 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_EditBattingScorecard", innings)); #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 267 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_EditBowlingScorecard", innings)); #line default #line hidden WriteLiteral("\r\n"); #line 268 "..\..\Views\StyleGuideStoolballData.cshtml" #line default #line hidden #line 268 "..\..\Views\StyleGuideStoolballData.cshtml" var comments = new List <HtmlComment> { new HtmlComment { MemberName = "Member One", MemberEmail = "*****@*****.**", CommentDate = DateTimeOffset.UtcNow, Comment = "<p>This is a comment.</p>" }, new HtmlComment { MemberName = "Member Two", MemberEmail = "*****@*****.**", CommentDate = DateTimeOffset.UtcNow.AddDays(-5), Comment = "<p>This is a comment <i>with formatting</i>.</p>" } , new HtmlComment { MemberName = "Member Three", MemberEmail = "*****@*****.**", CommentDate = DateTimeOffset.UtcNow.AddDays(-10), Comment = "<p>This is a comment with paragraphs.</p><p>This is a comment with paragraphs.</p>" } }; #line default #line hidden WriteLiteral("\r\n"); WriteLiteral(" "); #line 294 "..\..\Views\StyleGuideStoolballData.cshtml" Write(Html.Partial("_Comments", comments)); #line default #line hidden WriteLiteral("\r\n</div>"); }