﻿@model HeadRaceTimingSite.Models.Competition
@{
    ViewData["Title"] = Model.Name;
}

<results-list competition-id="@Model.CompetitionId" first-intermediate-name="Barnes" second-intermediate-name="Hammersmith" search-value="{{searchValue}}" show-first-intermediate show-second-intermediate></results-list>

@section titleBar{
        <div main-title>@ViewData["Title"]</div>
        <paper-icon-button icon="search" id="searchButton"></paper-icon-button>
        <paper-icon-button icon="cloud-download" id="downloadButton"></paper-icon-button>
        <paper-icon-button class="searchTools" icon="arrow-back" id="backButton"></paper-icon-button>
        <paper-input class="searchTools" id="searchBox" value="{{searchValue}}" no-label-float="true"></paper-input>
}

@section scripts{ 
    <script>
        window.addEventListener('WebComponentsReady', function (e) {
            document.querySelector("#searchButton").addEventListener("click", function (e) {
                $("#searchButton").css("display", "none");
                $("#downloadButton").css("display", "none");
                $("#backButton").css("display", "block");
                $("#searchBox").css("display", "block");
                $("#searchBox").focus();
                $("[main-title]").css("display", "none");
            });
            document.querySelector("#backButton").addEventListener("click", function (e) {
                $("#searchButton").css("display", "inline-block");
                $("#downloadButton").css("display", "inline-block");
                $("#backButton").css("display", "none");
                $("#searchBox").css("display", "none");
                $("[main-title]").css("display", "block");
            });
            document.querySelector("#downloadButton").addEventListener("click", function (e) {
                location.href = '/Competition/DetailsAsCsv/@Model.CompetitionId'
            });
        });
    </script>
}
﻿@model HeadRaceTimingSite.Models.Competition
@{
    ViewData["Title"] = Model.Name;
}

<results-list competition-id="@Model.CompetitionId" first-intermediate-name="Barnes" second-intermediate-name="Hammersmith" search-value="{{searchValue}}" show-first-intermediate show-second-intermediate></results-list>

@section titleBar{
        <div main-title>@ViewData["Title"]</div>
}
Remove future features from UI
Remove future features from UI
