Details.cshtml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. @using CD67.FicheCollege.MVC.Models
  2. @model GroupeViewModel
  3. @{
  4. ViewBag.Title = "Administration - Utilisateurs";
  5. Layout = "~/Views/Shared/_AdminLayout.cshtml";
  6. Groupe groupe = Model.Obj;
  7. }
  8. <header>
  9. <h2>@groupe.Nom</h2>
  10. <div>
  11. <a href=@Url.Action("Index")>
  12. <i class="fa fa-list-ul"></i> Retour à l'index
  13. </a>
  14. </div>
  15. </header>
  16. <fieldset>
  17. <legend>
  18. Informations générales
  19. </legend>
  20. <dl class="dl-horizontal">
  21. <dt>
  22. @Html.DisplayNameFor(model => groupe.Nom)
  23. </dt>
  24. <dd>
  25. @Html.DisplayFor(model => groupe.Nom)
  26. </dd>
  27. <dt>
  28. @Html.DisplayNameFor(model => groupe.Description)
  29. </dt>
  30. <dd>
  31. @Html.DisplayFor(model => groupe.Description)
  32. </dd>
  33. </dl>
  34. </fieldset>
  35. <legend>
  36. Membres
  37. <span class="mask-ss pull-right">
  38. <a data-groupeid="@groupe.Id" class="btn btn-primary" href="@Url.Action("Create", "Utilisateurs", new { groupe_id = groupe.Id })">
  39. <i class="fa fa-plus"></i> Ajouter un Utilisateur
  40. </a>
  41. </span>
  42. </legend>
  43. <table class="table simple-datatable">
  44. <thead>
  45. <tr>
  46. <th data-priority="1">Login</th>
  47. <th data-priority="1">Mail</th>
  48. <th data-priority="2">Service</th>
  49. <th width="1px"></th> @*'width=1px' >> force the minimum width*@
  50. <th width="1px"></th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. @foreach (Utilisateur item in groupe.Utilisateurs)
  55. {
  56. <tr>
  57. <td>@Html.DisplayFor(model => item.Login)</td>
  58. <td>@Html.DisplayFor(model => item.Mail)</td>
  59. <td>@Html.DisplayFor(model => item.Service)</td>
  60. <td>
  61. <a class="btn btn-danger btn-xs" href="@Url.Action("Delete", "Utilisateurs", new { Id = item.Id })" title="Retirer le membre">
  62. <i class="glyphicon glyphicon-remove"></i>
  63. </a>
  64. </td>
  65. </tr>
  66. }
  67. </tbody>
  68. </table>
  69. </table>