<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<List<Wierszowki.Core.Linq.Author>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Lista autorów
</asp:Content>

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

    <h2>Lista autorów</h2>
    
    <table>
        <tr>
            <th></th>
            <th>
                Imię
            </th>
            <th>
                Nazwisko
            </th>
            <th>
                Zatrudnienie
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edycja", "Edit", new { id=item.Id }) %>
            </td>
            <td>
                <%= Html.Encode(item.FirstName) %>
            </td>
            <td>
                <%= Html.Encode(item.LastName) %>
            </td>
            <td>
                <%= Html.Encode(item.EmploymentType.Name) %>
            </td>
        </tr>
    
    <% } %>

    </table>
    
    <p>
        <%= Html.ActionLink("Dodaj autora", "Create") %>
    </p>
    <p>
        <%=Html.ActionLink("Powrót", "Index", "Home") %>
    </p>

</asp:Content>
