<commit_before>﻿@model BolfTracker.Web.GamePanelViewModel
@{
  ViewBag.Title = "Game Panel - Bolf Tracker";
  ViewBag.Section = "Game";
}
<div class="page-header">
  <div class="row">
    <div class="col-md-6">
      <h1>Game Panel - @String.Format("{0:d}", Model.Game.Date)</h1>
    </div>
    <div class="col-md-6">
      @if (HttpContext.Current.User.Identity.IsAuthenticated)
      {
        if (Model.GameFinalized)
        {
          using (Html.BeginForm("UnFinalize", "Game", FormMethod.Post))
          {
            @Html.Hidden("gameId", Model.Game.Id)
            <input type="submit" class="btn pull-right" value="Un-Finalize Game" />
          }
        }
        else
        {
          if (Model.Shots.Any())
          {
              using (Html.BeginForm("Finalize", "Game", FormMethod.Post))
              {
                @Html.Hidden("gameId", Model.Game.Id)
                <input type="submit" class="btn pull-right" value="Finalize Game" />
              }
          }
          else
          {
              using (Html.BeginForm("Delete", "Game", FormMethod.Post))
              {
                @Html.Hidden("gameId", Model.Game.Id)
                <input type="submit" class="btn btn-danger pull-right" value="Delete Game" />
              }
          }
        }
      }
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-6">
    @if (HttpContext.Current.User.Identity.IsAuthenticated)
    {
      if (!Model.GameFinalized)
      {
        using (Html.BeginForm("Create", "Shot", FormMethod.Post))
        {
          @Html.HiddenFor(m => m.Game.Id)
          <div class="form-group">
            <label for="player">Player</label> <a class="btn btn-sm btn-default" href="javascript:selectFirstPlayer();">First Player</a>
            @Html.DropDownListFor(m => m.Player, Model.AllPlayers, new { @class = "form-control player-list" })
          </div>
          <div class="form-group">
            <label for="hole">Hole</label>
            @Html.DropDownListFor(m => m.Hole, Model.AllHoles, new { @id = "currentHole", @class = "form-control" })
          </div>
          <div class="form-group">
            <label for="attempts">Attempts</label>
            <input type="text" pattern="[0-9]*" name="attempts" id="attempts" class="form-control" autocomplete="off" />
          </div>
          <div class="form-group">
            <label for="shotMade" class="checkbox">
              <input type="checkbox" name="shotMade" id="shotMade" />
              Shot Made
            </label>
          </div>
          <input type="submit" class="btn btn-primary" value="Save Shot" />
        }
      }
    }
  </div>
  <div class="col-md-6">
    <h2>Leaderboard</h2>
    @if (Model.Shots.Any())<commit_msg>Taking out the 'first player' button for now<commit_after>﻿@model BolfTracker.Web.GamePanelViewModel
@{
  ViewBag.Title = "Game Panel - Bolf Tracker";
  ViewBag.Section = "Game";
}
<div class="page-header">
  <div class="row">
    <div class="col-md-6">
      <h1>Game Panel - @String.Format("{0:d}", Model.Game.Date)</h1>
    </div>
    <div class="col-md-6">
      @if (HttpContext.Current.User.Identity.IsAuthenticated)
      {
        if (Model.GameFinalized)
        {
          using (Html.BeginForm("UnFinalize", "Game", FormMethod.Post))
          {
            @Html.Hidden("gameId", Model.Game.Id)
            <input type="submit" class="btn pull-right" value="Un-Finalize Game" />
          }
        }
        else
        {
          if (Model.Shots.Any())
          {
              using (Html.BeginForm("Finalize", "Game", FormMethod.Post))
              {
                @Html.Hidden("gameId", Model.Game.Id)
                <input type="submit" class="btn pull-right" value="Finalize Game" />
              }
          }
          else
          {
              using (Html.BeginForm("Delete", "Game", FormMethod.Post))
              {
                @Html.Hidden("gameId", Model.Game.Id)
                <input type="submit" class="btn btn-danger pull-right" value="Delete Game" />
              }
          }
        }
      }
    </div>
  </div>
</div>
<div class="row">
  <div class="col-md-6">
    @if (HttpContext.Current.User.Identity.IsAuthenticated)
    {
      if (!Model.GameFinalized)
      {
        using (Html.BeginForm("Create", "Shot", FormMethod.Post))
        {
          @Html.HiddenFor(m => m.Game.Id)
          <div class="form-group">
            <label for="player">Player</label> @*<a class="btn btn-sm btn-default" href="javascript:selectFirstPlayer();">First Player</a>*@
            @Html.DropDownListFor(m => m.Player, Model.AllPlayers, new { @class = "form-control player-list" })
          </div>
          <div class="form-group">
            <label for="hole">Hole</label>
            @Html.DropDownListFor(m => m.Hole, Model.AllHoles, new { @id = "currentHole", @class = "form-control" })
          </div>
          <div class="form-group">
            <label for="attempts">Attempts</label>
            <input type="text" pattern="[0-9]*" name="attempts" id="attempts" class="form-control" autocomplete="off" />
          </div>
          <div class="form-group">
            <label for="shotMade" class="checkbox">
              <input type="checkbox" name="shotMade" id="shotMade" />
              Shot Made
            </label>
          </div>
          <input type="submit" class="btn btn-primary" value="Save Shot" />
        }
      }
    }
  </div>
  <div class="col-md-6">
    <h2>Leaderboard</h2>
    @if (Model.Shots.Any())
{'fraction_non_alphanumeric': 0.16783974011911207, 'fraction_numerical': 0.003970402454430608, 'mean_word_length': 1.9291754756871036, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4814615', 'n_tokens_mistral': 1761, 'n_tokens_neox': 1727, 'n_words': 310}