| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- @model IEnumerable<CD67.FicheCollege.Entity.TypeCollege>
- @{
- ViewBag.Title = "Liste";
- Layout = "~/Views/Shared/_Layout.cshtml";
- int maxOrdre = Model.Count() == 0 ? 0 : Model.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.Libelle)
- </th>
- <th></th>
- </tr>
- @foreach (var item in Model)
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.Libelle)
- </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>
|