Details.cshtml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. @using CD67.FicheCollege.MVC.Models
  2. @model CollegeViewModel
  3. @{
  4. ViewBag.Title = "Les Collèges " + Model.Annee_Lib;
  5. Layout = "~/Views/Shared/_Layout.cshtml";
  6. College college = Model.Obj;
  7. }
  8. <header>
  9. <h2>@college.Libelle</h2>
  10. <div>
  11. <a href=@Url.Action("Index", new { annee_id = college.Annee_Id })>
  12. <i class="fa fa-list-ul"></i> Retour à l'index
  13. </a>
  14. </div>
  15. </header>
  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="mask-ss pull-right">
  28. @Html.ActionLink("Modifier", "Edit", "Colleges", new { Id = college.Id }, new { @class = "btn btn-primary" })
  29. @Html.ActionLink("Supprimer", "Delete", "Colleges", new { Id = college.Id }, new { @class = "btn btn-default" })
  30. </div>
  31. }
  32. </legend>
  33. <dl class="dl-horizontal">
  34. <dt>
  35. @Html.DisplayNameFor(model => college.CodeRne)
  36. </dt>
  37. <dd>
  38. @Html.DisplayFor(model => college.CodeRne)
  39. </dd>
  40. <dt>
  41. @Html.DisplayNameFor(model => college.TypeCollege.Libelle)
  42. </dt>
  43. <dd>
  44. @Html.DisplayFor(model => college.TypeCollege.Libelle)
  45. </dd>
  46. <dt>
  47. @Html.DisplayNameFor(model => college.Adresse)
  48. </dt>
  49. <dd>
  50. @Html.DisplayFor(model => college.AdresseComplete)
  51. </dd>
  52. <dt>
  53. @Html.DisplayNameFor(model => college.Tel)
  54. </dt>
  55. <dd>
  56. @Html.DisplayFor(model => college.Tel)
  57. </dd>
  58. <dt>
  59. @Html.DisplayNameFor(model => college.Fax)
  60. </dt>
  61. <dd>
  62. @Html.DisplayFor(model => college.Fax)
  63. </dd>
  64. <dt>
  65. @Html.DisplayNameFor(model => college.Email)
  66. </dt>
  67. <dd>
  68. @Html.DisplayFor(model => college.Email)
  69. </dd>
  70. <dt>
  71. @Html.DisplayNameFor(model => college.Commune)
  72. </dt>
  73. <dd>
  74. @if (college.Commune != null)
  75. {
  76. <div class="col-sm-8 col-md-4">
  77. <div class="panel panel-default">
  78. <div class="panel-heading clearfix">
  79. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  80. <i class="fa fa-map-marker color1" aria-hidden="true"></i>
  81. Localisation (commune)
  82. </h4>
  83. </div>
  84. <div class="panel-body" style="text-align: center;">
  85. <span style="white-space: pre-line;"><b>@college.Commune</b>
  86. Canton : @college.Canton
  87. TAD : @college.TAD
  88. CDC : @college.CDC
  89. </span>
  90. </div>
  91. </div>
  92. </div>
  93. }
  94. </dd>
  95. <dt>
  96. @Html.DisplayNameFor(model => college.Code_Postal)
  97. </dt>
  98. <dd>
  99. @Html.DisplayFor(model => college.Code_Postal)
  100. </dd>
  101. </dl>
  102. </fieldset>
  103. <legend>
  104. Personnel
  105. </legend>
  106. <div class="flex-list">
  107. @if (!String.IsNullOrEmpty(college.PrincipalSid))
  108. {
  109. <div style="width:400px !important">
  110. <div class="panel panel-default" style="overflow: hidden;">
  111. <div class="panel-heading clearfix">
  112. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  113. <i class="fa fa-user color1" aria-hidden="true"></i>
  114. @Html.LabelFor(model => college.PrincipalSid)
  115. </h4>
  116. </div>
  117. <div class="panel-body" style="text-align: center;">
  118. <b>@Html.DisplayFor(model => college.principal.Prenom) @Html.DisplayFor(model => college.principal.Nom)</b><br />
  119. @Html.DisplayFor(model => college.principal.Organisation)<br />
  120. @Html.DisplayFor(model => college.principal.Mail)<br />
  121. Tel : @Html.DisplayFor(model => college.principal.Telephone)<br />
  122. </div>
  123. </div>
  124. </div>
  125. }
  126. @if (!String.IsNullOrEmpty(college.AdjointSid))
  127. {
  128. <div style="width:400px !important">
  129. <div class="panel panel-default" style="overflow: hidden;">
  130. <div class="panel-heading clearfix">
  131. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  132. <i class="fa fa-user color1" aria-hidden="true"></i>
  133. @Html.LabelFor(model => college.AdjointSid)
  134. </h4>
  135. </div>
  136. <div class="panel-body" style="text-align: center;">
  137. <b>@Html.DisplayFor(model => college.adjoint.Prenom) @Html.DisplayFor(model => college.adjoint.Nom)</b><br />
  138. @Html.DisplayFor(model => college.adjoint.Organisation)<br />
  139. @Html.DisplayFor(model => college.adjoint.Mail)<br />
  140. Tel : @Html.DisplayFor(model => college.adjoint.Telephone)<br />
  141. </div>
  142. </div>
  143. </div>
  144. }
  145. @if (!String.IsNullOrEmpty(college.Gestionnaire1Sid))
  146. {
  147. <div style="width:400px !important">
  148. <div class="panel panel-default" style="overflow: hidden;">
  149. <div class="panel-heading clearfix">
  150. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  151. <i class="fa fa-user color1" aria-hidden="true"></i>
  152. @Html.LabelFor(model => college.Gestionnaire1Sid)
  153. </h4>
  154. </div>
  155. <div class="panel-body" style="text-align: center;">
  156. <b>@Html.DisplayFor(model => college.gestionnaire1.Prenom) @Html.DisplayFor(model => college.gestionnaire1.Nom)</b><br />
  157. @Html.DisplayFor(model => college.gestionnaire1.Organisation)<br />
  158. @Html.DisplayFor(model => college.gestionnaire1.Mail)<br />
  159. Tel : @Html.DisplayFor(model => college.gestionnaire1.Telephone)<br />
  160. </div>
  161. </div>
  162. </div>
  163. }
  164. @if (!String.IsNullOrEmpty(college.Gestionnaire2Sid))
  165. {
  166. <div style="width:400px !important">
  167. <div class="panel panel-default" style="overflow: hidden;">
  168. <div class="panel-heading clearfix">
  169. <h4 class="panel-title pull-left" style="padding-top: 7.5px;">
  170. <i class="fa fa-user color1" aria-hidden="true"></i>
  171. @Html.LabelFor(model => college.Gestionnaire2Sid)
  172. </h4>
  173. </div>
  174. <div class="panel-body" style="text-align: center;">
  175. <b>@Html.DisplayFor(model => college.gestionnaire2.Prenom) @Html.DisplayFor(model => college.gestionnaire2.Nom)</b><br />
  176. @Html.DisplayFor(model => college.gestionnaire2.Organisation)<br />
  177. @Html.DisplayFor(model => college.gestionnaire2.Mail)<br />
  178. Tel : @Html.DisplayFor(model => college.gestionnaire2.Telephone)<br />
  179. </div>
  180. </div>
  181. </div>
  182. }
  183. </div>
  184. <legend>
  185. Educ'Facile
  186. </legend>
  187. <div>
  188. <table class="table">
  189. @foreach(KeyValuePair<string, string> entry in college.educfData){
  190. <tr>
  191. <th>@entry.Key</th>
  192. <td>@entry.Value</td>
  193. </tr>
  194. }
  195. </table>
  196. </div>
  197. <br/>
  198. <legend>
  199. Actions Educatives
  200. </legend>
  201. <table class="simple-datatable table" data-order="[[ 2, &quot;asc&quot; ]]">
  202. <thead>
  203. <tr>
  204. <th data-priority="1">Action</th>
  205. <th data-priority="2">Nb.Elèves</th>
  206. <th>Axe</th>
  207. <th>Commentaire</th>
  208. </tr>
  209. </thead>
  210. <tbody>
  211. @foreach (ActionEduCollege item in college.ActionsEduColleges)
  212. {
  213. <tr>
  214. <td>@Html.DisplayFor(model => item.ActionEdu.Nom)</td>
  215. <td>@Html.DisplayFor(model => item.NbEleves)</td>
  216. <td>@Html.DisplayFor(model => item.ActionEdu.ActionEduThematique.ActionEduAxe.Nom)</td>
  217. <td>@Html.DisplayFor(model => item.Commentaire)</td>
  218. </tr>
  219. }
  220. </tbody>
  221. </table>
  222. @if (Model.Acces == ModeAcces.Suppression)
  223. {
  224. using (Html.BeginForm())
  225. {
  226. @Html.AntiForgeryToken()
  227. <div class="form-actions no-color">
  228. <input type="submit" value="@Model.Acces.EnumDisplayNameFor(MvcHtmlHelpers.DisplayValue.Prompt)" class="btn btn-danger" />
  229. </div>
  230. <br/>
  231. <div>@Html.ActionLink("Annuler", "Details", new { Id = college.Id })</div>
  232. }
  233. }