Details.cshtml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. @using CD67.FicheCollege.MVC.Models
  2. @model ActionEduViewModel
  3. @{
  4. ViewBag.Title = "Les Actions Educatives " + Model.Annee_Lib;
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. ActionEdu actionEdu = Model.Obj;
  7. }
  8. <header>
  9. <h2>@actionEdu.Nom</h2>
  10. <div>
  11. <a href=@Url.Action("Index", new { annee_id = actionEdu.AnneeId })>
  12. <i class="fa fa-list-ul"></i> Retour à l'index
  13. </a>
  14. </div>
  15. </header>
  16. @if(Model.Acces==ModeAcces.Suppression) {
  17. <h2 class="text-danger">Voulez-vous vraiment supprimer cet élément?</h2>
  18. <p class="text-danger">
  19. Le collège ainsi que toutes les informations liées seront supprimées.
  20. </p>
  21. }
  22. <fieldset style="margin-bottom: 3em;">
  23. <legend>
  24. Descriptif
  25. @if (Model.Acces == ModeAcces.Lecture)
  26. {
  27. <span class="mask-ss pull-right">
  28. @Html.ActionLink("Modifier", "Edit", "ActionsEdu", new { Id = actionEdu.Id }, new { @class = "btn btn-primary" })
  29. @Html.ActionLink("Supprimer", "Delete", "ActionsEdu", new { Id = actionEdu.Id }, new { @class = "btn btn-default" })
  30. </span>
  31. }
  32. </legend>
  33. <dl class="dl-horizontal">
  34. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduStatut.Nom)</dt>
  35. <dd>@Html.DisplayFor(model => actionEdu.ActionEduStatut.Nom)</dd>
  36. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduThematique.ActionEduAxe.Nom)</dt>
  37. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.ActionEduAxe.Nom)</dd>
  38. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduThematique.Nom)</dt>
  39. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.Nom)</dd>
  40. <dt>@Html.DisplayNameFor(model => actionEdu.Numero)</dt>
  41. <dd>@Html.DisplayFor(model => actionEdu.Numero)</dd>
  42. <dt>@Html.DisplayNameFor(model => actionEdu.Nom)</dt>
  43. <dd>@Html.DisplayFor(model => actionEdu.Nom)</dd>
  44. <dt>@Html.DisplayNameFor(model => actionEdu.Montant)</dt>
  45. <dd>@Html.DisplayFor(model => actionEdu.Montant)</dd>
  46. <dt>Elèves concernés </dt>
  47. <dd>@actionEdu.totalEleves</dd>
  48. <dt>@Html.DisplayNameFor(model => actionEdu.Description)</dt>
  49. <dd>@Html.DisplayFor(model => actionEdu.Description)</dd>
  50. <dt>@Html.DisplayNameFor(model => actionEdu.CommentairePublic)</dt>
  51. <dd>@Html.DisplayFor(model => actionEdu.CommentairePublic)</dd>
  52. <dt>@Html.DisplayNameFor(model => actionEdu.CommentaireInterne)</dt>
  53. <dd>@Html.DisplayFor(model => actionEdu.CommentaireInterne)</dd>
  54. <dt>@Html.DisplayNameFor(model => actionEdu.Neutralise)</dt>
  55. <dd>@Html.DisplayFor(model => actionEdu.Neutralise)</dd>
  56. </dl>
  57. </fieldset>
  58. <legend>
  59. Acteurs
  60. <span class="mask-ss pull-right">
  61. <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduActeurs", new { actionEdu_id = actionEdu.Id })">
  62. <i class="fa fa-plus"></i> Ajouter un Acteur
  63. </a>
  64. </span>
  65. </legend>
  66. <table class="table simple-datatable">
  67. <thead>
  68. <tr>
  69. <th data-priority="1">Acteur</th>
  70. <th data-priority="2">Rôle</th>
  71. <th>Commentaire</th>
  72. <th width="1px"></th> @*'width=1px' >> force the minimum width*@
  73. <th width="1px"></th>
  74. </tr>
  75. </thead>
  76. <tbody>
  77. @foreach (ActionEduActeur item in Model.Obj.ActionEduActeurs)
  78. {
  79. <tr>
  80. <td>@Html.DisplayFor(model => item.Nom)</td>
  81. <td>@Html.DisplayFor(model => item.ActionEduActeurRole.Libelle)</td>
  82. <td>@Html.DisplayFor(model => item.Commentaire)</td>
  83. <td>
  84. <a class="btn btn-primary btn-xs" href="@Url.Action("Edit", "ActionsEduActeurs", new { Id = item.Id })" title="Modifier l'acteur">
  85. <i class="glyphicon glyphicon-pencil"></i>
  86. </a>
  87. </td>
  88. <td>
  89. <a class="btn btn-danger btn-xs" href="@Url.Action("Delete", "ActionsEduActeurs", new { Id = item.Id })" title="Retirer l'acteur">
  90. <i class="glyphicon glyphicon-remove"></i>
  91. </a>
  92. </td>
  93. </tr>
  94. }
  95. </tbody>
  96. </table>
  97. <br/> <br/>
  98. <legend>
  99. Collège(s) concerné(s)
  100. <span class="mask-ss pull-right">
  101. <a class="btn btn-primary" href="@Url.Action("Create", "ActionsEduCollege", new { actionEdu_id = actionEdu.Id })">
  102. <i class="fa fa-plus"></i> Ajouter un Collège
  103. </a>
  104. </span>
  105. </legend>
  106. <table class="table datatable">
  107. <thead>
  108. <tr>
  109. <th data-priority="1">Collège</th>
  110. <th>Commune</th>
  111. <th data-priority="2">Elèves concernés</th>
  112. <th>Commentaire</th>
  113. <th width="1px"></th> @*'width=1px' >> force the minimum width*@
  114. <th width="1px"></th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. @foreach (ActionEduCollege item in Model.Obj.ActionsEduColleges.OrderBy(a=>a.College.Libelle))
  119. {
  120. <tr>
  121. <td>@item.College.Libelle <a href=@Url.Action("Details", "Colleges", new { Id = item.College.Id }) target="_blank" title="Voir le collège"><i class="glyphicon glyphicon-new-window"></i></a></td>
  122. <td>@Html.DisplayFor(model => item.College.Commune)</td>
  123. <td>@Html.DisplayFor(model => item.NbEleves)</td>
  124. <td>@Html.DisplayFor(model => item.Commentaire)</td>
  125. <td>
  126. <a class="btn btn-primary btn-xs" href="@Url.Action("Edit", "ActionsEduCollege", new { Id = item.Id })" title="Modifier l'affectation">
  127. <i class="glyphicon glyphicon-pencil"></i>
  128. </a>
  129. </td>
  130. <td>
  131. <a class="btn btn-danger btn-xs" href="@Url.Action("Delete", "ActionsEduCollege", new { Id = item.Id })" title="Retirer le collège">
  132. <i class="glyphicon glyphicon-remove"></i>
  133. </a>
  134. </td>
  135. </tr>
  136. }
  137. </tbody>
  138. </table>
  139. @if (Model.Acces == ModeAcces.Suppression)
  140. {
  141. using (Html.BeginForm())
  142. {
  143. @Html.AntiForgeryToken()
  144. <div class="form-actions no-color">
  145. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" />
  146. </div>
  147. <br/>
  148. <div>@Html.ActionLink("Annuler", "Details", new { Id = actionEdu.Id })</div>
  149. }
  150. }