Bearbeitung von Fragen
This commit is contained in:
37
MultipleChoiceTrainer/Views/Questions/List.cshtml
Normal file
37
MultipleChoiceTrainer/Views/Questions/List.cshtml
Normal file
@@ -0,0 +1,37 @@
|
||||
@model IEnumerable<MultipleChoiceTrainer.Models.DataModels.Question>
|
||||
@{
|
||||
ViewData["Title"] = "Fragen";
|
||||
}
|
||||
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Text)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Choices)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Text)
|
||||
</td>
|
||||
<td>
|
||||
@foreach (var choice in item.Choices)
|
||||
{
|
||||
<i class="@if (choice.IsTrue) { <text>fas fa-check text-success</text> } else { <text>fas fa-times text-danger</text> }"></i> @choice.Text<br />
|
||||
}
|
||||
</td>
|
||||
<td>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id"><i class="fas fa-edit"></i> Bearbeiten</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
Reference in New Issue
Block a user