BuildFeed/BuildFeed/Areas/admin/Views/meta/index.cshtml

82 lines
2.0 KiB
Plaintext
Raw Normal View History

2018-02-07 06:16:37 +08:00
@using BuildFeed.Admin.Models.ViewModel
@using BuildFeed.Model
@model MetaListing
2015-01-30 05:44:54 +08:00
@{
2018-02-07 06:16:37 +08:00
ViewBag.Title = $"Manage metadata | {InvariantTerms.SiteName}";
2015-01-30 05:44:54 +08:00
}
<h1>Manage metadata</h1>
<ul>
2018-02-07 06:16:37 +08:00
<li>@Html.ActionLink("Return to admin panel", nameof(RootController.Index), "Root")</li>
</ul>
2015-01-30 05:44:54 +08:00
<h3>Current items</h3>
<table>
2018-02-07 06:16:37 +08:00
<thead>
<tr>
<th>Name</th>
<th style="width: 50px"></th>
</tr>
</thead>
<tbody>
@foreach (var group in Model.CurrentItems)
{
<tr>
<td colspan="3">
<h4>@group.Key</h4>
</td>
</tr>
foreach (MetaItemModel item in group)
{
<tr>
<td>@item.Id.Value</td>
<td>
@Html.ActionLink("Edit", nameof(MetaController.Edit), new
{
type = item.Id.Type,
value = item.Id.Value
}, new
{
@class = "button",
style = "width:50px"
})</td>
</tr>
}
}
</tbody>
2015-01-30 05:44:54 +08:00
</table>
<h3>Add new items</h3>
<table>
2018-02-07 06:16:37 +08:00
<thead>
<tr>
<th>Name</th>
<th style="width: 50px"></th>
</tr>
</thead>
<tbody>
@foreach (var group in Model.NewItems)
{
<tr>
<td colspan="3">
<h4>@group.Key</h4>
</td>
</tr>
foreach (MetaItemModel item in group)
{
<tr>
<td>@item.Id.Value</td>
<td>
@Html.ActionLink("Create", nameof(MetaController.Create), new
{
type = item.Id.Type,
value = item.Id.Value
}, new
{
@class = "button",
style = "width:50px"
})</td>
</tr>
}
}
</tbody>
2015-01-30 05:44:54 +08:00
</table>