Index.cshtml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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 class="mask-ss">
  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. <div class="mask-ss">
  20. @if (ouverture == true)
  21. {
  22. <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 />
  23. }
  24. else
  25. {
  26. <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 />
  27. }
  28. </div>
  29. <table id="table-actions" class="datatable table">
  30. <thead>
  31. <tr>
  32. <th>
  33. @Html.DisplayNameFor(model => college_model.CodeRne)
  34. </th>
  35. <th data-priority="1">
  36. @Html.DisplayNameFor(model => college_model.Libelle)
  37. </th>
  38. <th>
  39. Adresse complète
  40. </th>
  41. <th data-priority="2">
  42. @Html.DisplayNameFor(model => college_model.RestaurationType_Id)
  43. </th>
  44. <th data-priority="3">
  45. Statut du formulaire
  46. </th>
  47. <th>
  48. Actions
  49. </th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. @foreach (College college in Model.Obj.Colleges)
  54. {
  55. <tr>
  56. <td>
  57. @Html.DisplayFor(modelcollege => college.CodeRne)
  58. </td>
  59. <td>
  60. <a href="@Url.Action("Details", "Colleges", new { id = college.Id })">@Html.DisplayFor(modelcollege => college.Libelle)</a>
  61. </td>
  62. <td>
  63. @Html.DisplayFor(modelcollege => college.AdresseComplete)
  64. </td>
  65. <td>
  66. <div style="text-align:left">
  67. @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)
  68. </div>
  69. <div class="mask-ss" style="text-align:right">
  70. <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
  71. <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
  72. </a>
  73. </div>
  74. </td>
  75. @if (college.RestaurationFormulaires.Count() > 0)
  76. {
  77. foreach (RestaurationFormulaire form in college.RestaurationFormulaires)
  78. {
  79. <td>
  80. @Html.DisplayFor(modelcollege => form.Statut)
  81. </td>
  82. }
  83. }
  84. else
  85. {
  86. <td>A saisir</td>
  87. }
  88. <td>
  89. <a href="@Url.Action("Details", "RestaurationFormulaires", new { id = college.Id })">
  90. <span class="fa fa-file-text fa-2x color1" title="Détails" style="vertical-align: middle" aria-hidden="true"></span>
  91. </a>
  92. </td>
  93. </tr>
  94. }
  95. </tbody>
  96. </table>