@model ReviewApp.Models.ViewModels.CommentsViewModel

<h1>@Model.Good.Name</h1>

<h2>@Model.Good.Description</h2>

<div class="centrally-aligned">
    <img class="good-image-big" src="/Files/GoodImage/@Model.Good.Id" alt="Товар" />
</div>

<div>
    @if (Model.Comments.Count == 0)
    {
        <h2>Здесь пока нет отзывов</h2>
    }
    @foreach (var comment in Model.Comments)
    {
        <div class="comment">
            <div>
                <div>@comment.Content</div>
            </div>
            <div class="margin-left-bottom-auto">
                <div>@comment.CreationTime</div>
            </div>
            <div class="flex-display">
                @for (int i = 0; i < @comment.Rating; i++)
                {
                    <div class="star-used">&#11088</div>
                }
                @for (int i = 0; i < 5 - @comment.Rating; i++)
                {
                    <div class="star-not-used">&#11088</div>
                }
            </div>
            @Html.AntiForgeryToken()
        </div>
    }
</div>