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

82 lines
1.9 KiB
Plaintext
Raw Normal View History

@using BuildFeed.Model
2016-08-19 20:45:52 +08:00
@model BuildFeed.Areas.admin.Models.ViewModel.MetaListing
2015-01-30 05:44:54 +08:00
@{
ViewBag.Title = "Metadata | BuildFeed";
2015-01-30 05:44:54 +08:00
}
2015-01-30 17:44:06 +08:00
<h2>Manage metadata</h2>
<ul>
<li>@Html.ActionLink("Manage users", "index")</li>
<li>@Html.ActionLink("Return to admin panel", "index", "base")</li>
</ul>
2015-01-30 05:44:54 +08:00
<h3>Current items</h3>
<table class="table table-striped table-bordered table-admin">
<thead>
2016-08-19 20:45:52 +08:00
<tr>
<th>Name</th>
<th style="width: 50px"></th>
</tr>
</thead>
<tbody>
2016-08-19 20:45:52 +08:00
@foreach (IGrouping<MetaType, MetaItemModel> group in Model.CurrentItems)
{
<tr>
<td colspan="3">
<h4>@group.Key</h4>
</td>
</tr>
foreach (MetaItemModel item in group)
{
<tr>
2016-08-19 20:45:52 +08:00
<td>@item.Id.Value</td>
<td>
@Html.ActionLink("Edit", "edit", new
{
type = item.Id.Type,
value = item.Id.Value
}, new
{
@class = "button",
style = "width:50px"
})</td>
</tr>
}
2016-08-19 20:45:52 +08:00
}
</tbody>
2015-01-30 05:44:54 +08:00
</table>
<h3>Add new metadata</h3>
<table class="table table-striped table-bordered table-admin">
<thead>
2016-08-19 20:45:52 +08:00
<tr>
<th>Name</th>
<th style="width: 50px"></th>
</tr>
</thead>
<tbody>
2016-08-19 20:45:52 +08:00
@foreach (IGrouping<MetaType, MetaItemModel> group in Model.NewItems)
{
<tr>
<td colspan="3">
<h4>@group.Key</h4>
</td>
</tr>
foreach (MetaItemModel item in group)
{
<tr>
2016-08-19 20:45:52 +08:00
<td>@item.Id.Value</td>
<td>
@Html.ActionLink("Create", "create", new
{
type = item.Id.Type,
value = item.Id.Value
}, new
{
@class = "button",
style = "width:50px"
})</td>
</tr>
}
2016-08-19 20:45:52 +08:00
}
</tbody>
2015-01-30 05:44:54 +08:00
</table>