Details.cshtml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. @using CD67.FicheCollege.MVC.Models
  2. @model CollegeViewModel
  3. @{
  4. ViewBag.Title = "Details";
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. College college = Model.Obj;
  7. }
  8. <header>
  9. <h2>@college.Libelle</h2>
  10. </header>
  11. @if(Model.Acces==ModeAcces.Suppression) {
  12. <h2 class="text-danger">Voulez-vous vraiment supprimer cet élément?</h2>
  13. <p class="text-danger">
  14. Le collège ainsi que toutes les informations liées seront supprimées.
  15. </p>
  16. }
  17. <fieldset>
  18. <legend>
  19. Informations générales
  20. @if (Model.Acces == ModeAcces.Lecture)
  21. {
  22. <div class="pull-right">
  23. @Html.ActionLink("Supprimer", "Delete", "Colleges", new { Id = college.Id }, new { @class = "btn btn-danger" })
  24. @Html.ActionLink("Modifier", "Edit", "Colleges", new { Id = college.Id }, new { @class = "btn btn-default" })
  25. @Html.ActionLink("(test) Dupliquer vers 2018", "Clone", "Colleges", new { Id = college.Id, annee_id = 18 }, new { @class = "btn btn-default" })
  26. </div>
  27. }
  28. </legend>
  29. <dl class="dl-horizontal">
  30. <dt>
  31. @Html.DisplayNameFor(model => college.CodeRne)
  32. </dt>
  33. <dd>
  34. @Html.DisplayFor(model => college.CodeRne)
  35. </dd>
  36. <dt>
  37. @Html.DisplayNameFor(model => college.TypeCollege.Libelle)
  38. </dt>
  39. <dd>
  40. @Html.DisplayFor(model => college.TypeCollege.Libelle)
  41. </dd>
  42. <dt>
  43. @Html.DisplayNameFor(model => college.Adresse)
  44. </dt>
  45. <dd>
  46. @Html.DisplayFor(model => college.AdresseComplete)
  47. </dd>
  48. <dt>
  49. @Html.DisplayNameFor(model => college.Tel)
  50. </dt>
  51. <dd>
  52. @Html.DisplayFor(model => college.Tel)
  53. </dd>
  54. <dt>
  55. @Html.DisplayNameFor(model => college.Fax)
  56. </dt>
  57. <dd>
  58. @Html.DisplayFor(model => college.Fax)
  59. </dd>
  60. <dt>
  61. @Html.DisplayNameFor(model => college.Email)
  62. </dt>
  63. <dd>
  64. @Html.DisplayFor(model => college.Email)
  65. </dd>
  66. <dt>
  67. @Html.DisplayNameFor(model => college.Commune)
  68. </dt>
  69. <dd>
  70. @if (college.Commune != null)
  71. {
  72. <div class="col-sm-8 col-md-4">
  73. <div class="panel panel-default">
  74. <div class="panel-heading clearfix">
  75. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  76. <i class="fa fa-map-marker color1" aria-hidden="true"></i>
  77. Localisation (commune)
  78. </h4>
  79. </div>
  80. <div class="panel-body" style="text-align: center;">
  81. <span style="white-space: pre-line;"><b>@college.Commune</b>
  82. Canton : @college.Canton
  83. TAD : @college.TAD
  84. CDC : @college.CDC
  85. </span>
  86. </div>
  87. </div>
  88. </div>
  89. }
  90. </dd>
  91. <dt>
  92. @Html.DisplayNameFor(model => college.Code_Postal)
  93. </dt>
  94. <dd>
  95. @Html.DisplayFor(model => college.Code_Postal)
  96. </dd>
  97. </dl>
  98. </fieldset>
  99. <legend>
  100. Personnel
  101. </legend>
  102. <div class="flex-list">
  103. @if (!String.IsNullOrEmpty(college.PrincipalSid))
  104. {
  105. <div style="width:400px !important">
  106. <div class="panel panel-default" style="overflow: hidden;">
  107. <div class="panel-heading clearfix">
  108. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  109. <i class="fa fa-user color1" aria-hidden="true"></i>
  110. @Html.LabelFor(model => college.PrincipalSid)
  111. </h4>
  112. </div>
  113. <div class="panel-body" style="text-align: center;">
  114. <b>@Html.DisplayFor(model => college.principal.Prenom) @Html.DisplayFor(model => college.principal.Nom)</b><br />
  115. @Html.DisplayFor(model => college.principal.Organisation)<br />
  116. @Html.DisplayFor(model => college.principal.Mail)<br />
  117. Tel : @Html.DisplayFor(model => college.principal.Telephone)<br />
  118. </div>
  119. </div>
  120. </div>
  121. }
  122. @if (!String.IsNullOrEmpty(college.AdjointSid))
  123. {
  124. <div style="width:400px !important">
  125. <div class="panel panel-default" style="overflow: hidden;">
  126. <div class="panel-heading clearfix">
  127. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  128. <i class="fa fa-user color1" aria-hidden="true"></i>
  129. @Html.LabelFor(model => college.AdjointSid)
  130. </h4>
  131. </div>
  132. <div class="panel-body" style="text-align: center;">
  133. <b>@Html.DisplayFor(model => college.adjoint.Prenom) @Html.DisplayFor(model => college.adjoint.Nom)</b><br />
  134. @Html.DisplayFor(model => college.adjoint.Organisation)<br />
  135. @Html.DisplayFor(model => college.adjoint.Mail)<br />
  136. Tel : @Html.DisplayFor(model => college.adjoint.Telephone)<br />
  137. </div>
  138. </div>
  139. </div>
  140. }
  141. @if (!String.IsNullOrEmpty(college.Gestionnaire1Sid))
  142. {
  143. <div style="width:400px !important">
  144. <div class="panel panel-default" style="overflow: hidden;">
  145. <div class="panel-heading clearfix">
  146. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  147. <i class="fa fa-user color1" aria-hidden="true"></i>
  148. @Html.LabelFor(model => college.Gestionnaire1Sid)
  149. </h4>
  150. </div>
  151. <div class="panel-body" style="text-align: center;">
  152. <b>@Html.DisplayFor(model => college.gestionnaire1.Prenom) @Html.DisplayFor(model => college.gestionnaire1.Nom)</b><br />
  153. @Html.DisplayFor(model => college.gestionnaire1.Organisation)<br />
  154. @Html.DisplayFor(model => college.gestionnaire1.Mail)<br />
  155. Tel : @Html.DisplayFor(model => college.gestionnaire1.Telephone)<br />
  156. </div>
  157. </div>
  158. </div>
  159. }
  160. @if (!String.IsNullOrEmpty(college.Gestionnaire2Sid))
  161. {
  162. <div style="width:400px !important">
  163. <div class="panel panel-default" style="overflow: hidden;">
  164. <div class="panel-heading clearfix">
  165. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  166. <i class="fa fa-user color1" aria-hidden="true"></i>
  167. @Html.LabelFor(model => college.Gestionnaire2Sid)
  168. </h4>
  169. </div>
  170. <div class="panel-body" style="text-align: center;">
  171. <b>@Html.DisplayFor(model => college.gestionnaire2.Prenom) @Html.DisplayFor(model => college.gestionnaire2.Nom)</b><br />
  172. @Html.DisplayFor(model => college.gestionnaire2.Organisation)<br />
  173. @Html.DisplayFor(model => college.gestionnaire2.Mail)<br />
  174. Tel : @Html.DisplayFor(model => college.gestionnaire2.Telephone)<br />
  175. </div>
  176. </div>
  177. </div>
  178. }
  179. </div>
  180. <legend>
  181. Educ'Facile
  182. </legend>
  183. <div>
  184. <table class="datatable table">
  185. @foreach(KeyValuePair<string, string> entry in college.educfData){
  186. <tr>
  187. <th>@entry.Key</th>
  188. <td>@entry.Value</td>
  189. </tr>
  190. }
  191. </table>
  192. </div>
  193. @if (Model.Acces == ModeAcces.Suppression)
  194. {
  195. using (Html.BeginForm())
  196. {
  197. @Html.AntiForgeryToken()
  198. <div class="form-actions no-color">
  199. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" />
  200. </div>
  201. <br/>
  202. <div>@Html.ActionLink("Annuler", "Details", new { Id = college.Id })</div>
  203. }
  204. }
  205. else
  206. {
  207. <div>
  208. @Html.ActionLink("Retour à la liste", "Index", new { annee_id = college.Annee_Id })
  209. </div>
  210. }