Details.cshtml 3.5 KB

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