Index.cshtml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @using CD67.FicheCollege.MVC.Models
  2. @model AnneeViewModel
  3. <title>Restauration @Model.Annee_Lib</title>
  4. @{
  5. ViewBag.Title = "Restauration " + @Model.Annee_Lib;
  6. Layout = "~/Views/Shared/_Layout.cshtml";
  7. College college_model = new College();
  8. bool ouverture = ViewBag.Ouverture;
  9. }
  10. <header>
  11. <h2>La restauration</h2>
  12. <span>
  13. <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>
  14. <a class="start-trace" href="@Url.Action("Index", "RestaurationTypeRepas")"> <span class="glyphicon glyphicon-cog color1"></span> Repas</a>
  15. <a class="start-trace" href="@Url.Action("Index", "RestaurationTypes")"> <span class="glyphicon glyphicon-cog color1"></span> Types</a>
  16. </span>
  17. </header>
  18. @if (ouverture == true)
  19. {
  20. <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 />
  21. }
  22. else
  23. {
  24. <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 />
  25. }
  26. <table id="table-actions" class="datatable table">
  27. <thead>
  28. <tr>
  29. <th>
  30. @Html.DisplayNameFor(model => college_model.CodeRne)
  31. </th>
  32. <th>
  33. @Html.DisplayNameFor(model => college_model.Libelle)
  34. </th>
  35. <th>
  36. Adresse complète
  37. </th>
  38. <th>
  39. @Html.DisplayNameFor(model => college_model.RestaurationType_Id)
  40. </th>
  41. <th>
  42. Actions
  43. </th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. @foreach (College college in Model.Obj.Colleges)
  48. {
  49. <tr>
  50. <td>
  51. @Html.DisplayFor(modelcollege => college.CodeRne)
  52. </td>
  53. <td>
  54. <a href="@Url.Action("Details", "Colleges", new { id = college.Id })">@Html.DisplayFor(modelcollege => college.Libelle)</a>
  55. </td>
  56. <td>
  57. @Html.DisplayFor(modelcollege => college.AdresseComplete)
  58. </td>
  59. <td>
  60. @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)<br />
  61. </td>
  62. <td>
  63. <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
  64. <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
  65. </a>
  66. </td>
  67. </tr>
  68. }
  69. </tbody>
  70. </table>