Details.cshtml 3.0 KB

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