Details.cshtml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduViewModel
  3. @{
  4. ViewBag.Title = "Details";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEdu actionEdu = Model.Obj;
  7. }
  8. <header>
  9. <h2>@actionEdu.Nom</h2>
  10. </header>
  11. <fieldset>
  12. <legend>
  13. Descriptif
  14. @if (Model.Acces == ModeAcces.Lecture)
  15. {
  16. <span class="pull-right">
  17. @Html.ActionLink("Supprimer", "Delete", "ActionsEdu", new { Id = actionEdu.Id }, new { @class = "btn btn-danger" })
  18. @Html.ActionLink("Modifier", "Edit", "ActionsEdu", new { Id = actionEdu.Id }, new { @class = "btn btn-default" })
  19. </span>
  20. }
  21. </legend>
  22. <dl class="dl-horizontal">
  23. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduStatut.Nom)</dt>
  24. <dd>@Html.DisplayFor(model => actionEdu.ActionEduStatut.Nom)</dd>
  25. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduThematique.ActionEduAxe.Nom)</dt>
  26. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.ActionEduAxe.Nom)</dd>
  27. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduThematique.Nom)</dt>
  28. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.Nom)</dd>
  29. <dt>@Html.DisplayNameFor(model => actionEdu.Numero)</dt>
  30. <dd>@Html.DisplayFor(model => actionEdu.Numero)</dd>
  31. <dt>@Html.DisplayNameFor(model => actionEdu.Nom)</dt>
  32. <dd>@Html.DisplayFor(model => actionEdu.Nom)</dd>
  33. <dt>@Html.DisplayNameFor(model => actionEdu.Montant)</dt>
  34. <dd>@Html.DisplayFor(model => actionEdu.Montant)</dd>
  35. <dt>Elèves concernés </dt>
  36. <dd>@actionEdu.totalEleves</dd>
  37. <dt>@Html.DisplayNameFor(model => actionEdu.Description)</dt>
  38. <dd>@Html.DisplayFor(model => actionEdu.Description)</dd>
  39. <dt>@Html.DisplayNameFor(model => actionEdu.CommentairePublic)</dt>
  40. <dd>@Html.DisplayFor(model => actionEdu.CommentairePublic)</dd>
  41. <dt>@Html.DisplayNameFor(model => actionEdu.CommentaireInterne)</dt>
  42. <dd>@Html.DisplayFor(model => actionEdu.CommentaireInterne)</dd>
  43. <dt>@Html.DisplayNameFor(model => actionEdu.Neutralise)</dt>
  44. <dd>@Html.DisplayFor(model => actionEdu.Neutralise)</dd>
  45. </dl>
  46. </fieldset>
  47. @if (Model.Acces == ModeAcces.Lecture)
  48. {
  49. <legend>
  50. Acteurs
  51. <span class="pull-right">
  52. <a class="btn btn-default" href="@Url.Action("Create", "ActionsEduActeurs", new { actionEdu_id = actionEdu.Id })">
  53. <i class="fa fa-plus"></i> Ajouter
  54. </a>
  55. </span>
  56. </legend>
  57. <table class="table datatable">
  58. <thead>
  59. <tr>
  60. <th>Acteur</th>
  61. <th>Rôle</th>
  62. <th>Commentaire</th>
  63. </tr>
  64. </thead>
  65. <tbody>
  66. @foreach (ActionEduActeur item in Model.Obj.ActionEduActeurs)
  67. {
  68. <tr data-url="@Url.Action("Details", "ActionsEduActeurs", new { Id = item.Id })">
  69. <td>@Html.DisplayFor(model => item.Nom)</td>
  70. <td>@Html.DisplayFor(model => item.ActionEduActeurRole.Libelle)</td>
  71. <td>@Html.DisplayFor(model => item.Commentaire)</td>
  72. </tr>
  73. }
  74. </tbody>
  75. </table>
  76. <legend>
  77. Collège(s) concerné(s)
  78. <span class="pull-right">
  79. <a class="btn btn-default" href="@Url.Action("Create", "ActionsEduCollege", new { actionEdu_id = actionEdu.Id })">
  80. <i class="fa fa-plus"></i> Ajouter
  81. </a>
  82. </span>
  83. </legend>
  84. <table class="table datatable">
  85. <thead>
  86. <tr>
  87. <th>Collège</th>
  88. <th>Nombre d'élèves</th>
  89. <th>Commentaire</th>
  90. </tr>
  91. </thead>
  92. <tbody>
  93. @foreach (ActionEduCollege item in Model.Obj.ActionsEduColleges)
  94. {
  95. <tr data-url="@Url.Action("Details", "ActionsEduCollege", new { Id = item.Id })">
  96. <td>@Html.DisplayFor(model => item.College.Libelle)</td>
  97. <td>@Html.DisplayFor(model => item.NbEleves)</td>
  98. <td>@Html.DisplayFor(model => item.Commentaire)</td>
  99. </tr>
  100. }
  101. </tbody>
  102. </table>
  103. }
  104. <br/>
  105. @Html.ActionLink("Retour à la liste des actions", "Index", new { annee_id = actionEdu.AnneeId })