Index.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. @using CD67.FicheCollege.MVC.Models
  2. @model AnneeViewModel
  3. @using CD67.FicheCollege.Entity;
  4. <title>Restauration @Model.Annee_Lib</title>
  5. @{
  6. ViewBag.Title = "Restauration " + @Model.Annee_Lib;
  7. Layout = "~/Views/Shared/_Layout.cshtml";
  8. College college_model = new College();
  9. bool ouverture = ViewBag.Ouverture;
  10. }
  11. <header>
  12. <h2>La Restauration</h2>
  13. <span>
  14. <a class="start-trace" href="@Url.Action("Edit", "RestaurationParametres", new { annee_id = Model.Annee_Id })"> <span class="glyphicon glyphicon-cog color1"></span> Paramètres</a>
  15. <a class="start-trace" href="@Url.Action("Index", "RestaurationTypesRepas")"> <span class="glyphicon glyphicon-cog color1"></span> Repas</a>
  16. <a class="start-trace" href="@Url.Action("Index", "RestaurationTypes")"> <span class="glyphicon glyphicon-cog color1"></span> Types</a>
  17. </span>
  18. </header>
  19. @if (ouverture == true)
  20. {
  21. <h4>Ouverture de la campagne de saisie <a href="@Url.Action("EditCampagne", "RestaurationParametres", new { annee_id = Model.Annee_Id, edit = false })"> <span class="fa fa-toggle-on color1"></span> </a></h4><br />
  22. }
  23. else
  24. {
  25. <h4>Ouverture de la campagne de saisie <a href="@Url.Action("EditCampagne", "RestaurationParametres", new { annee_id = Model.Annee_Id, edit = true })"> <span class="fa fa-toggle-off color1"></span> </a></h4><br />
  26. }
  27. <table id="table-actions" class="datatable table">
  28. <thead>
  29. <tr>
  30. <th>
  31. @Html.DisplayNameFor(model => college_model.CodeRne)
  32. </th>
  33. <th>
  34. @Html.DisplayNameFor(model => college_model.Libelle)
  35. </th>
  36. <th>
  37. Adresse complète
  38. </th>
  39. <th>
  40. @Html.DisplayNameFor(model => college_model.RestaurationType_Id)
  41. </th>
  42. <th>
  43. Statut du formulaire
  44. </th>
  45. <th>
  46. Actions
  47. </th>
  48. </tr>
  49. </thead>
  50. <tbody>
  51. @foreach (College college in Model.Obj.Colleges)
  52. {
  53. <tr>
  54. <td>
  55. @Html.DisplayFor(modelcollege => college.CodeRne)
  56. </td>
  57. <td>
  58. <a href="@Url.Action("Details", "Colleges", new { id = college.Id })">@Html.DisplayFor(modelcollege => college.Libelle)</a>
  59. </td>
  60. <td>
  61. @Html.DisplayFor(modelcollege => college.AdresseComplete)
  62. </td>
  63. <td>
  64. <div style="text-align:left">
  65. @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)
  66. </div>
  67. <div style="text-align:right">
  68. <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
  69. <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
  70. </a>
  71. </div>
  72. </td>
  73. @if (college.RestaurationFormulaires.Count() > 0)
  74. {
  75. foreach (RestaurationFormulaire form in college.RestaurationFormulaires)
  76. {
  77. <td>
  78. @Html.DisplayFor(modelcollege => form.Statut)
  79. </td>
  80. }
  81. }
  82. else
  83. {
  84. <td>A saisir</td>
  85. }
  86. <td>
  87. <a href="@Url.Action("Details", "RestaurationFormulaires", new { id = college.Id })">
  88. <span class="fa fa-file-text fa-2x color1" title="Détails" style="vertical-align: middle" aria-hidden="true"></span>
  89. </a>
  90. </td>
  91. </tr>
  92. }
  93. </tbody>
  94. </table>