Index.cshtml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. @using CD67.FicheCollege.MVC.Models
  2. @model AnneeViewModel
  3. <title>Actions @Model.Annee_Lib</title>
  4. @{
  5. ViewBag.Title = "Actions " + @Model.Annee_Lib;
  6. Layout = "~/Views/Shared/_Layout.cshtml";
  7. ActionEdu action_model = new ActionEdu();
  8. int cur_axe_id = -1;
  9. int cur_th_id = -1;
  10. }
  11. <header>
  12. <h2>Les Actions</h2>
  13. <span>
  14. <a href="@Url.Action("Index", "ActionEduAxes")"> <span class="glyphicon glyphicon-cog color1"></span> Axes</a>
  15. <a href="@Url.Action("Index", "ActionEduThematiques")"> <span class="glyphicon glyphicon-cog color1"></span> Thématiques</a>
  16. </span>
  17. </header>
  18. <div class="action-edu-tree">
  19. @foreach (ActionEdu item in Model.Obj.ActionsEdu.OrderBy(a => a.ActionEduThematique.ActionEduAxe.Ordre).ThenBy(a => a.ActionEduThematique.Ordre).ThenBy(a => a.Ordre))
  20. {
  21. if (item.ActionEduThematique.ActionEduAxe.Id != cur_axe_id){
  22. cur_axe_id = item.ActionEduThematique.ActionEduAxe.Id;
  23. <h3>@item.ActionEduThematique.ActionEduAxe.Nom</h3>
  24. }
  25. if (item.ActionEduThematique.Id != cur_th_id)
  26. {
  27. cur_th_id = item.ActionEduThematique.Id;
  28. <h4>@item.ActionEduThematique.Nom</h4>
  29. }
  30. <div class="action-edu-item">
  31. <span>
  32. <a href="@Url.Action("Details", new { id = item.Id })">@Html.DisplayFor(modelItem => item.Numero) - @Html.DisplayFor(modelItem => item.Nom)</a>
  33. </span>
  34. <i>Collèges concernés: @item.ActionsEduColleges.Count()</i>
  35. </div>
  36. }
  37. </div>