Details.cshtml 4.0 KB

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