Details.cshtml 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282
  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("Modifier", "Edit", "Colleges", new { Id = college.Id }, new { @class = "btn btn-primary" })
  24. @Html.ActionLink("Supprimer", "Delete", "Colleges", new { Id = college.Id }, new { @class = "btn btn-default" })
  25. </div>
  26. }
  27. </legend>
  28. <dl class="dl-horizontal">
  29. <dt>
  30. @Html.DisplayNameFor(model => college.CodeRne)
  31. </dt>
  32. <dd>
  33. @Html.DisplayFor(model => college.CodeRne)
  34. </dd>
  35. <dt>
  36. @Html.DisplayNameFor(model => college.TypeCollege.Libelle)
  37. </dt>
  38. <dd>
  39. @Html.DisplayFor(model => college.TypeCollege.Libelle)
  40. </dd>
  41. <dt>
  42. @Html.DisplayNameFor(model => college.Adresse)
  43. </dt>
  44. <dd>
  45. @Html.DisplayFor(model => college.AdresseComplete)
  46. </dd>
  47. <dt>
  48. @Html.DisplayNameFor(model => college.Tel)
  49. </dt>
  50. <dd>
  51. @Html.DisplayFor(model => college.Tel)
  52. </dd>
  53. <dt>
  54. @Html.DisplayNameFor(model => college.Fax)
  55. </dt>
  56. <dd>
  57. @Html.DisplayFor(model => college.Fax)
  58. </dd>
  59. <dt>
  60. @Html.DisplayNameFor(model => college.Email)
  61. </dt>
  62. <dd>
  63. @Html.DisplayFor(model => college.Email)
  64. </dd>
  65. <dt>
  66. @Html.DisplayNameFor(model => college.Commune)
  67. </dt>
  68. <dd>
  69. @if (college.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>@college.Commune</b>
  81. Canton : @college.Canton
  82. TAD : @college.TAD
  83. CDC : @college.CDC
  84. </span>
  85. </div>
  86. </div>
  87. </div>
  88. }
  89. </dd>
  90. <dt>
  91. @Html.DisplayNameFor(model => college.Code_Postal)
  92. </dt>
  93. <dd>
  94. @Html.DisplayFor(model => college.Code_Postal)
  95. </dd>
  96. </dl>
  97. </fieldset>
  98. <legend>
  99. Personnel
  100. </legend>
  101. <div class="flex-list">
  102. @if (!String.IsNullOrEmpty(college.PrincipalSid))
  103. {
  104. <div style="width:400px !important">
  105. <div class="panel panel-default" style="overflow: hidden;">
  106. <div class="panel-heading clearfix">
  107. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  108. <i class="fa fa-user color1" aria-hidden="true"></i>
  109. @Html.LabelFor(model => college.PrincipalSid)
  110. </h4>
  111. </div>
  112. <div class="panel-body" style="text-align: center;">
  113. <b>@Html.DisplayFor(model => college.principal.Prenom) @Html.DisplayFor(model => college.principal.Nom)</b><br />
  114. @Html.DisplayFor(model => college.principal.Organisation)<br />
  115. @Html.DisplayFor(model => college.principal.Mail)<br />
  116. Tel : @Html.DisplayFor(model => college.principal.Telephone)<br />
  117. </div>
  118. </div>
  119. </div>
  120. }
  121. @if (!String.IsNullOrEmpty(college.AdjointSid))
  122. {
  123. <div style="width:400px !important">
  124. <div class="panel panel-default" style="overflow: hidden;">
  125. <div class="panel-heading clearfix">
  126. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  127. <i class="fa fa-user color1" aria-hidden="true"></i>
  128. @Html.LabelFor(model => college.AdjointSid)
  129. </h4>
  130. </div>
  131. <div class="panel-body" style="text-align: center;">
  132. <b>@Html.DisplayFor(model => college.adjoint.Prenom) @Html.DisplayFor(model => college.adjoint.Nom)</b><br />
  133. @Html.DisplayFor(model => college.adjoint.Organisation)<br />
  134. @Html.DisplayFor(model => college.adjoint.Mail)<br />
  135. Tel : @Html.DisplayFor(model => college.adjoint.Telephone)<br />
  136. </div>
  137. </div>
  138. </div>
  139. }
  140. @if (!String.IsNullOrEmpty(college.Gestionnaire1Sid))
  141. {
  142. <div style="width:400px !important">
  143. <div class="panel panel-default" style="overflow: hidden;">
  144. <div class="panel-heading clearfix">
  145. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  146. <i class="fa fa-user color1" aria-hidden="true"></i>
  147. @Html.LabelFor(model => college.Gestionnaire1Sid)
  148. </h4>
  149. </div>
  150. <div class="panel-body" style="text-align: center;">
  151. <b>@Html.DisplayFor(model => college.gestionnaire1.Prenom) @Html.DisplayFor(model => college.gestionnaire1.Nom)</b><br />
  152. @Html.DisplayFor(model => college.gestionnaire1.Organisation)<br />
  153. @Html.DisplayFor(model => college.gestionnaire1.Mail)<br />
  154. Tel : @Html.DisplayFor(model => college.gestionnaire1.Telephone)<br />
  155. </div>
  156. </div>
  157. </div>
  158. }
  159. @if (!String.IsNullOrEmpty(college.Gestionnaire2Sid))
  160. {
  161. <div style="width:400px !important">
  162. <div class="panel panel-default" style="overflow: hidden;">
  163. <div class="panel-heading clearfix">
  164. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  165. <i class="fa fa-user color1" aria-hidden="true"></i>
  166. @Html.LabelFor(model => college.Gestionnaire2Sid)
  167. </h4>
  168. </div>
  169. <div class="panel-body" style="text-align: center;">
  170. <b>@Html.DisplayFor(model => college.gestionnaire2.Prenom) @Html.DisplayFor(model => college.gestionnaire2.Nom)</b><br />
  171. @Html.DisplayFor(model => college.gestionnaire2.Organisation)<br />
  172. @Html.DisplayFor(model => college.gestionnaire2.Mail)<br />
  173. Tel : @Html.DisplayFor(model => college.gestionnaire2.Telephone)<br />
  174. </div>
  175. </div>
  176. </div>
  177. }
  178. </div>
  179. <legend>
  180. Educ'Facile
  181. </legend>
  182. <div>
  183. <table class="datatable table">
  184. @foreach(KeyValuePair<string, string> entry in college.educfData){
  185. <tr>
  186. <th>@entry.Key</th>
  187. <td>@entry.Value</td>
  188. </tr>
  189. }
  190. </table>
  191. </div>
  192. <legend>
  193. Actions Educatives
  194. </legend>
  195. <div>
  196. <table class="datatable table">
  197. <thead>
  198. <tr>
  199. <th>
  200. Numéro
  201. </th>
  202. <th>
  203. Nom
  204. </th>
  205. <th>
  206. Nb.Elèves
  207. </th>
  208. <th>
  209. Axe
  210. </th>
  211. <th>
  212. Thematique
  213. </th>
  214. </tr>
  215. </thead>
  216. <tbody>
  217. @foreach (ActionEduCollege item in college.ActionsEduColleges)
  218. {
  219. <tr>
  220. <td>
  221. @Html.DisplayFor(model => item.ActionEdu.Numero)
  222. </td>
  223. <td>
  224. @Html.DisplayFor(model => item.ActionEdu.Nom)
  225. </td>
  226. <td>
  227. @Html.DisplayFor(model => item.NbEleves)
  228. </td>
  229. <td>
  230. @Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.ActionEduAxe.Nom)
  231. </td>
  232. <td>
  233. @Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.Nom)
  234. </td>
  235. </tr>
  236. }
  237. </tbody>
  238. </table>
  239. </div>
  240. @if (Model.Acces == ModeAcces.Suppression)
  241. {
  242. using (Html.BeginForm())
  243. {
  244. @Html.AntiForgeryToken()
  245. <div class="form-actions no-color">
  246. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" />
  247. </div>
  248. <br/>
  249. <div>@Html.ActionLink("Annuler", "Details", new { Id = college.Id })</div>
  250. }
  251. }
  252. else
  253. {
  254. <div>
  255. @Html.ActionLink("Retour à la liste", "Index", new { annee_id = college.Annee_Id })
  256. </div>
  257. }