Details.cshtml 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. @using CD67.FicheCollege.MVC.Models
  2. @model CollegeViewModel
  3. @{
  4. ViewBag.Title = "Details";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. College contenu = Model.Contenu as College;
  7. }
  8. <!-- Menu de niveau 2 -->
  9. <div>
  10. <ul id="menu-l2">
  11. <li id="li-menu-l2"><a id="a-li-menu-l2-active" class="btn-sm" href="@Url.Action("Details", "Colleges", new { Id = Model.College_Id })">Général</a></li>
  12. <li id="li-menu-l2"><a id="a-li-menu-l2" class="btn-sm" href="@Url.Action("Details", "Identites", new { Id = Model.College_Id })/">Identité</a></li>
  13. </ul>
  14. </div>
  15. <h1>@Model.College_Libelle</h1>
  16. @if(Model.Acces==ModeAcces.Suppression) {
  17. <h2 class="text-danger">Voulez-vous vraiment supprimer cet élément?</h2>
  18. <p class="text-danger">
  19. Le collège ainsi que toutes les informations liées seront supprimées.
  20. </p>
  21. }
  22. <fieldset>
  23. <legend>
  24. Informations générales
  25. @if (Model.Acces == ModeAcces.Lecture)
  26. {
  27. <div class="pull-right">
  28. @Html.ActionLink("Supprimer", "Delete", "Colleges", new { Id = Model.College_Id }, new { @class = "btn btn-danger" })
  29. @Html.ActionLink("Modifier", "Edit", "Colleges", new { Id = Model.College_Id }, new { @class = "btn btn-default" })
  30. </div>
  31. }
  32. </legend>
  33. <dl class="dl-horizontal">
  34. <dt>
  35. @Html.DisplayNameFor(model => contenu.TypeCollege.Libelle)
  36. </dt>
  37. <dd>
  38. @Html.DisplayFor(model => contenu.TypeCollege.Libelle)
  39. </dd>
  40. <dt>
  41. @Html.DisplayNameFor(model => contenu.Adresse)
  42. </dt>
  43. <dd>
  44. @Html.DisplayFor(model => contenu.AdresseComplete)
  45. </dd>
  46. <dt>
  47. @Html.DisplayNameFor(model => contenu.Tel)
  48. </dt>
  49. <dd>
  50. @Html.DisplayFor(model => contenu.Tel)
  51. </dd>
  52. <dt>
  53. @Html.DisplayNameFor(model => contenu.Fax)
  54. </dt>
  55. <dd>
  56. @Html.DisplayFor(model => contenu.Fax)
  57. </dd>
  58. <dt>
  59. @Html.DisplayNameFor(model => contenu.Email)
  60. </dt>
  61. <dd>
  62. @Html.DisplayFor(model => contenu.Email)
  63. </dd>
  64. <dt>
  65. @Html.DisplayNameFor(model => contenu.Commune)
  66. </dt>
  67. <dd>
  68. @if (contenu.Commune != null)
  69. {
  70. <div class="col-sm-8 col-md-4">
  71. <div class="panel panel-default">
  72. <div class="panel-heading clearfix">
  73. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  74. <i class="fa fa-map-marker color1" aria-hidden="true"></i>
  75. Localisation (commune)
  76. </h4>
  77. </div>
  78. <div class="panel-body" style="text-align: center;">
  79. <span style="white-space: pre-line;"><b>@contenu.Commune</b>
  80. Canton : @contenu.Canton
  81. TAD : @contenu.TAD
  82. CDC : @contenu.CDC
  83. </span>
  84. </div>
  85. </div>
  86. </div>
  87. }
  88. </dd>
  89. <dt>
  90. @Html.DisplayNameFor(model => contenu.Code_Postal)
  91. </dt>
  92. <dd>
  93. @Html.DisplayFor(model => contenu.Code_Postal)
  94. </dd>
  95. </dl>
  96. </fieldset>
  97. @if (Model.Acces == ModeAcces.Suppression)
  98. {
  99. using (Html.BeginForm())
  100. {
  101. @Html.AntiForgeryToken()
  102. <div class="form-actions no-color">
  103. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" /> |
  104. @Html.ActionLink("Annuler", "Details", new { Id = Model.College_Id })
  105. </div>
  106. }
  107. }