yavsc/Yavsc/Views/Activity/Index.cshtml

83 lines
2.2 KiB
Text
Raw Normal View History

2017-02-03 15:07:11 +01:00
@model IEnumerable<Activity>
2016-05-17 18:22:18 +02:00
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<tr>
<th>
2017-03-10 11:57:25 +01:00
@Html.DisplayNameFor(model => model.Name)
2016-05-17 18:22:18 +02:00
</th>
<th>
2017-03-10 11:57:25 +01:00
@Html.DisplayNameFor(model => model.Code)
</th>
2016-05-17 18:22:18 +02:00
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
<th>
@Html.DisplayNameFor(model => model.Photo)
</th>
<th>
2017-03-10 11:57:25 +01:00
@Html.DisplayNameFor(model => model.Parent)
</th>
<th>
@Html.DisplayNameFor(model => model.SettingsClassName)
</th>
<th>
@Html.DisplayNameFor(model => model.Children)
2016-05-17 18:22:18 +02:00
</th>
<th>
2017-03-10 11:57:25 +01:00
@Html.DisplayNameFor(model => model.Rate)
2016-05-17 18:22:18 +02:00
</th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
2017-03-10 11:57:25 +01:00
<a name="@item.Code" class="btn btn-link"></a> @Html.DisplayFor(modelItem => item.Name)
2016-05-17 18:22:18 +02:00
</td>
<td>
2017-03-10 11:57:25 +01:00
@Html.DisplayFor(modelItem => item.Code)
</td>
2016-05-17 18:22:18 +02:00
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>@if (item.Photo!=null) {
<img src="@item.Photo" style="max-height: 4em;" />
}
</td>
2016-05-17 18:22:18 +02:00
<td>
@if (item.Parent!=null) {
<text>
2017-03-10 11:57:25 +01:00
<a href="#@item.ParentCode">@Html.DisplayFor(modelItem => item.Parent)</a>
</text>
}
2016-05-17 18:22:18 +02:00
</td>
<td>
@if (item.SettingsClassName!=null) {
<text>
@SR[item.SettingsClassName]
</text>
}
2016-05-17 18:22:18 +02:00
</td>
2017-01-06 14:02:17 +01:00
<td>
@Html.DisplayFor(modelItem => item.Children)
</td>
2016-05-17 18:22:18 +02:00
<td>
2017-03-10 11:57:25 +01:00
@Html.DisplayFor(modelItem => item.Rate)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Code" class="btn btn-default">Edit</a>
<a asp-action="Details" asp-route-id="@item.Code" class="btn btn-success">Details</a>
<a asp-action="Delete" asp-route-id="@item.Code" class="btn btn-danger">Delete</a>
2016-05-17 18:22:18 +02:00
</td>
</tr>
}
</table>