Index.cshtml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 data-url="@Url.Action("Details", new { id = college.Id })">
  50. <td>
  51. @Html.DisplayFor(modelcollege => college.CodeRne)
  52. </td>
  53. <td>
  54. @Html.DisplayFor(modelcollege => college.Libelle)
  55. <noscript>
  56. @Html.ActionLink(" > Voir", "Details", new { id = college.Id })
  57. </noscript>
  58. </td>
  59. <td>
  60. @Html.DisplayFor(modelcollege => college.AdresseComplete)
  61. </td>
  62. <td>
  63. @Html.DisplayFor(modelcollege => college.RestaurationType.Libelle)<br />
  64. </td>
  65. <td>
  66. <a href="@Url.Action("Type", "Colleges", new { id = college.Id })">
  67. <span class="glyphicon glyphicon-pencil fa-2x color1" title="Modifier" style="vertical-align: middle" aria-hidden="true"></span>
  68. </a>
  69. </td>
  70. </tr>
  71. }
  72. </tbody>
  73. </table>