Details.cshtml 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.ActionEduThematique.ActionEduAxe.Nom)</dt>
  24. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.ActionEduAxe.Nom)</dd>
  25. <dt>@Html.DisplayNameFor(model => actionEdu.ActionEduThematique.Nom)</dt>
  26. <dd>@Html.DisplayFor(model => actionEdu.ActionEduThematique.Nom)</dd>
  27. <dt>@Html.DisplayNameFor(model => actionEdu.Numero)</dt>
  28. <dd>@Html.DisplayFor(model => actionEdu.Numero)</dd>
  29. <dt>@Html.DisplayNameFor(model => actionEdu.Nom)</dt>
  30. <dd>@Html.DisplayFor(model => actionEdu.Nom)</dd>
  31. <dt>@Html.DisplayNameFor(model => actionEdu.Montant)</dt>
  32. <dd>@Html.DisplayFor(model => actionEdu.Montant)</dd>
  33. <dt>Elèves concernés </dt>
  34. <dd>@actionEdu.totalEleves</dd>
  35. <dt>@Html.DisplayNameFor(model => actionEdu.Description)</dt>
  36. <dd>@Html.DisplayFor(model => actionEdu.Description)</dd>
  37. <dt>@Html.DisplayNameFor(model => actionEdu.Neutralise)</dt>
  38. <dd>@Html.DisplayFor(model => actionEdu.Neutralise)</dd>
  39. </dl>
  40. </fieldset>
  41. @if (Model.Acces == ModeAcces.Lecture)
  42. {
  43. <legend>
  44. Collège(s) concerné(s)
  45. <span class="pull-right">
  46. @Html.ActionLink("Ajouter", "Create", "ActionsEduCollege", new { actionEdu_id = actionEdu.Id }, new { @class = "btn btn-default" })
  47. </span>
  48. </legend>
  49. <table class="table datatable">
  50. <thead>
  51. <tr>
  52. <th>Collège</th>
  53. <th>Nombre d'élèves</th>
  54. <th>Tiers</th>
  55. <th>Commentaire interne</th>
  56. <th>Commentaire public</th>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. @foreach (ActionEduCollege item in Model.Obj.ActionsEduColleges)
  61. {
  62. <tr data-url="@Url.Action("Details", "ActionsEduCollege", new { Id = item.Id })">
  63. <td>@Html.DisplayFor(model => item.College.Libelle)</td>
  64. <td>@Html.DisplayFor(model => item.NbEleves)</td>
  65. <td>@Html.DisplayFor(model => item.TiersAstre_Nom)</td>
  66. <td>@Html.DisplayFor(model => item.CommentaireInterne)</td>
  67. <td>@Html.DisplayFor(model => item.CommentairePublic)</td>
  68. </tr>
  69. }
  70. </tbody>
  71. </table>
  72. }
  73. <br/>
  74. @Html.ActionLink("Retour à la liste des actions", "Index", new { annee_id = actionEdu.AnneeId })