Index.cshtml 1.3 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. <h2>Les Actions</h2>
  12. @foreach (ActionEdu item in Model.Obj.ActionsEdu.OrderBy(a => a.ActionEduThematique.ActionEduAxe.Ordre).ThenBy(a => a.ActionEduThematique.Ordre).ThenBy(a => a.Ordre))
  13. {
  14. if (item.ActionEduThematique.ActionEduAxe.Id != cur_axe_id){
  15. cur_axe_id = item.ActionEduThematique.ActionEduAxe.Id;
  16. <h3>@item.ActionEduThematique.ActionEduAxe.Nom</h3>
  17. }
  18. if (item.ActionEduThematique.Id != cur_th_id)
  19. {
  20. cur_th_id = item.ActionEduThematique.Id;
  21. <h4>@item.ActionEduThematique.Nom</h4>
  22. }
  23. <div>
  24. <span>
  25. <a href="@Url.Action("Details", new { id = item.Id })">@Html.DisplayFor(modelItem => item.Numero) - @Html.DisplayFor(modelItem => item.Nom)</a>
  26. </span>
  27. <i>Collèges concernés: @item.ActionsEduColleges.Count()</i>
  28. </div>
  29. }
  30. <h3>Administration</h3>
  31. <ul>
  32. <li>@Html.ActionLink("Les axes", "Index", "ActionEduAxes")</li>
  33. <li>@Html.ActionLink("Les thématiques", "Index", "ActionEduThematiques")</li>
  34. </ul>