| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- @using CD67.FicheCollege.MVC.Models
- @model AnneeViewModel
- @{
- ViewBag.Title = "Liste";
- Layout = "~/Views/Shared/_Layout.cshtml";
- ActionEdu action_model = new ActionEdu();
- int maxOrdre = Model.Obj.ActionsEdu.Count() == 0 ? 0 : Model.Obj.ActionsEdu.Max(i => i.Ordre);
- int row = 1;
- }
- <h2>Liste</h2>
- <p>
- <a href="@Url.Action("Create", new { annee_id = Model.Obj.Id })">
- <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 => action_model.Nom)
- </th>
- <th>
- @Html.DisplayNameFor(model => action_model.Description)
- </th>
- <th>
- @Html.DisplayNameFor(model => action_model.Neutralise)
- </th>
- <th>
- @Html.DisplayNameFor(model => action_model.ActionEduThematique.ActionEduAxeId)
- </th>
- <th>
- @Html.DisplayNameFor(model => action_model.ActionEduThematiqueId)
- </th>
- <th></th>
- </tr>
- @foreach (ActionEdu item in Model.Obj.ActionsEdu.OrderBy(i=>i.Ordre))
- {
- <tr>
- <td>
- @Html.DisplayFor(modelItem => item.Nom)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Description)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.Neutralise)
- </td>
- <th>
- @Html.DisplayFor(model => item.ActionEduThematique.ActionEduAxeId)
- </th>
- <th>
- @Html.DisplayFor(model => item.ActionEduThematiqueId)
- </th>
- <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>
|