hn-dotnet/Apps/Website/Views/Shared/_LinkItem.cshtml
Julien Leicher 66cc78d30e comment-a-link (#24)
Closes #23 refactor to use OwnsMany
2020-12-11 09:46:42 +01:00

9 lines
525 B
Plaintext

@model HN.Application.LinkDto
<a asp-action="Show" asp-controller="Links" asp-route-id="@Model.Id">@Model.Url - created at @Model.CreatedAt.ToLocalTime() (👍: @Model.UpVotes / 👎: @Model.DownVotes)</a>
<form asp-controller="Links" asp-action="Vote" asp-route-id="@Model.Id" asp-route-url="@Model.Url" method="post">
<input type="hidden" name="redirectTo" value="@Context.Request.Path" />
<input type="submit" name="type" value="up">👍</button>
<input type="submit" name="type" value="down">👎</button>
</form>