| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- @using CD67.FicheCollege.MVC.Models
- @model ActionEduThematiqueIndexViewModel
- @{
- ViewBag.Title = "Liste";
- Layout = "~/Views/Shared/_Layout.cshtml";
- int maxOrdre = Model.Obj.Count() == 0 ? 0 : Model.Obj.Max(i => i.Ordre);
- int row = 1;
- }
- <h2>Liste</h2>
- <p>
- <a href="@Url.Action("Create")">
- <span class="glyphicon glyphicon-plus-sign fa-2x color1" style="vertical-align: middle" aria-hidden="true"></span>
- Créer un nouvel élément
- </a>
- </p>
- <table class="table">
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.Obj.First().Nom)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Obj.First().ActionEduAxeId)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.Obj.First().Neutralise)
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model.Obj.OrderBy(i => i.Ordre))
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.Nom)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.ActionEduAxe.Nom)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Neutralise)
- </td>
- <td>
- @if (row != 1)
- {
- <a href="@Url.Action("Up", new { id = item.Id })">
- <span class="glyphicon glyphicon-circle-arrow-up fa-2x color1" title="Remonter" style="vertical-align: middle" aria-hidden="true"></span>
- </a>
- }
- else
- {
- <span class="glyphicon glyphicon-circle-arrow-up fa-2x color2" title="Remonter" style="vertical-align: middle" aria-hidden="true"></span>
- }
- @if (item.Ordre != maxOrdre)
- {
- <a href="@Url.Action("Down", new { id = item.Id })">
- <span class="glyphicon glyphicon-circle-arrow-down fa-2x color1" title="Descendre" style="vertical-align: middle" aria-hidden="true"></span>
- </a>
- }
- else
- {
- <span class="glyphicon glyphicon-circle-arrow-down fa-2x color2" title="Descendre" style="vertical-align: middle" aria-hidden="true"></span>
- }
- <a href="@Url.Action("Edit", new { id = item.Id })">
- <span class="glyphicon glyphicon-edit fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
- </a>
- <a href="@Url.Action("Delete", new { id = item.Id })">
- <span class="glyphicon glyphicon-remove-sign fa-2x color1" title="Supprimer" style="vertical-align: middle" aria-hidden="true"></span>
- </a>
- </td>
- </tr>
- row += 1;
- }
- </table>
|