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

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Wierszówki do wyceny
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Wierszówki do wyceny</h2>
    <table>
        <tr>
            <th></th>
            <th>Miesiąc</th>
            <th>Autor</th>
            <th>Wydanie</th>
            <th>Typ</th>
            <th>Tytuł</th>
            <th>Opis</th>
            <th>Wycena</th>
            <th>Bonus</th>
            <th>Kto utworzył</th>
            <th>Ostatnia aktualizacja</th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edycja", "Edit", "MagazineItem", new { id=item.Id }, null) %>
            </td>
            <td>
                <%= Html.Encode(item.Date.ToString("yyyy-MM")) %>
            </td>
            <td>
                <%= Html.Encode(item.Author.FullName) %>
            </td>
            <td>
                <%= Html.Encode(item.Issue.Identifier)%>
            </td>
            <td>
                <%= Html.Encode(item.ItemType.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.Caption) %>
            </td>
            <td>
                <%= Html.Encode(item.Description) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.Price)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:F}", item.Bonus)) %>
            </td>
            <td>
                <%= Html.Encode(item.CreatedByUser.Login) %>
            </td>
            <td>
                <%= Html.Encode(item.UpdatedOn) %>
            </td>
        </tr>
    
    <% } %>

    </table>
    <p>
        <%= Html.ActionLink("Powrót", "Index", "Report") %>
    </p>

</asp:Content>

