add categories(add, list, list news)

minor form changes
add news controller and views
This commit is contained in:
2024-07-28 18:35:11 +03:30
parent 30ac6724ca
commit a74072b491
22 changed files with 1092 additions and 148 deletions

View File

@ -0,0 +1,39 @@
@model IEnumerable<WebApplication1.Models.category>
@{
ViewBag.Title = "Index";
}
<h2>Index</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.link)
</th>
<th>
@Html.DisplayNameFor(model => model.title)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.link)
</td>
<td>
@Html.DisplayFor(modelItem => item.title)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.ID }) |
@Html.ActionLink("Details", "Details", new { id=item.ID }) |
@Html.ActionLink("Delete", "Delete", new { id=item.ID })
</td>
</tr>
}
</table>