make views for testing data
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
@model Francesco.Recipes.World.Models.BackendModels.Category.Category
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Category Details";
|
||||
}
|
||||
|
||||
<h2>Category Details</h2>
|
||||
|
||||
<div>
|
||||
<h4>Category</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
Name
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Model.Name
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
</div>
|
||||
@@ -0,0 +1,28 @@
|
||||
@model IEnumerable<Francesco.Recipes.World.Models.BackendModels.Category.Category>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Categories";
|
||||
}
|
||||
|
||||
<h2>Categories</h2>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var category in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>@category.Name</td>
|
||||
<td>
|
||||
<a asp-action="Details" asp-route-id="@category.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Recipes" asp-route-id="@category.Id" class="btn btn-secondary">Recipes</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user