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

98
Views/news/Details.cshtml Normal file
View File

@ -0,0 +1,98 @@
@model WebApplication1.Models.news
@{
ViewBag.Title = "Details";
}
<h2>Details</h2>
<div>
<h4>news</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.title)
</dt>
<dd>
@Html.DisplayFor(model => model.title)
</dd>
<dt>
@Html.DisplayNameFor(model => model.image)
</dt>
<dd>
@Html.DisplayFor(model => model.image)
</dd>
<dt>
@Html.DisplayNameFor(model => model.link)
</dt>
<dd>
@Html.DisplayFor(model => model.link)
</dd>
<dt>
@Html.DisplayNameFor(model => model.summary)
</dt>
<dd>
@Html.DisplayFor(model => model.summary)
</dd>
<dt>
@Html.DisplayNameFor(model => model.cat)
</dt>
<dd>
@Html.DisplayFor(model => model.cat)
</dd>
<dt>
@Html.DisplayNameFor(model => model.tag)
</dt>
<dd>
@Html.DisplayFor(model => model.tag)
</dd>
<dt>
@Html.DisplayNameFor(model => model.publishDate)
</dt>
<dd>
@Html.DisplayFor(model => model.publishDate)
</dd>
<dt>
@Html.DisplayNameFor(model => model.userID)
</dt>
<dd>
@Html.DisplayFor(model => model.userID)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Content)
</dt>
<dd>
@Html.DisplayFor(model => model.Content)
</dd>
<dt>
@Html.DisplayNameFor(model => model.views)
</dt>
<dd>
@Html.DisplayFor(model => model.views)
</dd>
</dl>
</div>
<p>
@Html.ActionLink("Edit", "Edit", new { id = Model.ID }) |
@Html.ActionLink("Back to List", "Index")
</p>