<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<FotbalPortal.Models.Player>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Administrace hráčů
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>Administrace hráčů</h2>

<p>
    <%: Html.ActionLink("Nový hráč", "Create") %>
</p>
<table>
    <tr>
        <th>
            <%: Html.DisplayNameFor(model => model.firstName) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.lastName) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.country.name) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.club.name) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.borned) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.dressNumber) %>
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.firstName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.lastName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.country.name) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.club.name) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.borned) %>
        </td>
        <td>
            <%: Html.ActionLink("Upravit", "Edit", new { id=item.id }) %> |
            <%: Html.ActionLink("Detail", "Details", new { id=item.id }) %> |
            <%: Html.ActionLink("Smazat", "Delete", new { id=item.id }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="ScriptsSection" runat="server">
</asp:Content>
