@model IEnumerable<FotbalPortal.Models.Opinion>

@{
    ViewBag.Title = "Názory";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Názory</h2>

<p>
    @Html.ActionLink("Vložit nový názor", "Create")
</p>

@foreach (var item in Model) {
    <div>
        <div class="author-date"><span>@Html.DisplayFor(modelItem => item.created)</span> - <span>@Html.Action("userName", "Account", new { userId = item.author })</span></div>
        <p>@Html.DisplayFor(modelItem => item.text)</p>
    </div>
}
