Details.cshtml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. </header>
  11. <fieldset>
  12. <legend>
  13. Informations générales
  14. </legend>
  15. <dl class="dl-horizontal">
  16. <dt>
  17. @Html.DisplayNameFor(model => groupe.Nom)
  18. </dt>
  19. <dd>
  20. @Html.DisplayFor(model => groupe.Nom)
  21. </dd>
  22. <dt>
  23. @Html.DisplayNameFor(model => groupe.Description)
  24. </dt>
  25. <dd>
  26. @Html.DisplayFor(model => groupe.Description)
  27. </dd>
  28. </dl>
  29. </fieldset>
  30. <legend>
  31. Membres
  32. <span class="mask-ss pull-right">
  33. <a data-groupeid="@groupe.Id" class="btn btn-primary" href="@Url.Action("Create", "Utilisateurs", new { groupe_id = groupe.Id })">
  34. <i class="fa fa-plus"></i> Ajouter un Utilisateur
  35. </a>
  36. </span>
  37. </legend>
  38. <table class="table simple-datatable">
  39. <thead>
  40. <tr>
  41. <th data-priority="1">Login</th>
  42. <th data-priority="1">Mail</th>
  43. <th data-priority="2">Service</th>
  44. <th width="1px"></th> @*'width=1px' >> force the minimum width*@
  45. <th width="1px"></th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. @foreach (Utilisateur item in groupe.Utilisateurs)
  50. {
  51. <tr>
  52. <td>@Html.DisplayFor(model => item.Login)</td>
  53. <td>@Html.DisplayFor(model => item.Mail)</td>
  54. <td>@Html.DisplayFor(model => item.Service)</td>
  55. <td>
  56. <a class="btn btn-danger btn-xs" href="@Url.Action("Delete", "Utilisateurs", new { Id = item.Id })" title="Retirer le membre">
  57. <i class="glyphicon glyphicon-remove"></i>
  58. </a>
  59. </td>
  60. </tr>
  61. }
  62. </tbody>
  63. </table>
  64. </table>