<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<FotbalPortal.Models.Article>>" %>

<table>
    <tr>
        <th>
            <%: Html.DisplayNameFor(model => model.author) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.status) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.title) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.text) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.created) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.edited) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.published) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.commentsAllowed) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.categoryID) %>
        </th>
        <th>
            <%: Html.DisplayNameFor(model => model.image) %>
        </th>
        <th></th>
    </tr>
<% if (Model != null) 

       {  %>
<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.author) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.status) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.title) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.text) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.created) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.edited) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.published) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.commentsAllowed) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.categoryID) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.image) %>
        </td>
    </tr>
<% } } %>

</table>
