setting.userfirmrank.php 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. global $myUser;
  3. User::check_access('user','configure');
  4. ?>
  5. <div class="row">
  6. <div class="col-md-12">
  7. <br>
  8. <h3>Établissement / Utilisateur / Rang</h3>
  9. <hr/>
  10. <div id="userfirmrankForm" data-action="save_userfirmrank">
  11. <div class="form-row">
  12. <div class="form-group col-md-3">
  13. <label for="firm">Établissement :</label>
  14. <select class="form-control" id="firm" placeholder="Etablissement" onchange="search_userfirmrank();">
  15. <option value="0">Tous</option>
  16. <?php foreach (Firm::loadAll() as $firm) : ?>
  17. <option value="<?php echo $firm->id; ?>"><?php echo $firm->label; ?></option>
  18. <?php endforeach; ?>
  19. </select>
  20. </div>
  21. <div class="form-group col-md-3">
  22. <label for="firm">Utilisateur :</label>
  23. <input type="text" data-type="user" placeholder="Nom, prénom..." class="form-control" id="user" name="user"/>
  24. </div>
  25. <div class="form-group col-md-3">
  26. <label for="rank">Rang :</label>
  27. <select class="form-control" id="rank" placeholder="Rang">
  28. <?php foreach(Rank::loadAll() as $rank): ?>
  29. <option value="<?php echo $rank->id; ?>"><?php echo $rank->label; ?></option>
  30. <?php endforeach; ?>
  31. </select>
  32. </div>
  33. <div class="form-group col-md-3 text-right">
  34. <div class="btn btn-success noLabel " onclick="save_userfirmrank()"><i class="fas fa-check"></i> Enregistrer</div>
  35. </div>
  36. </div>
  37. </div>
  38. <br/>
  39. <div class="panel panel-default">
  40. <legend class="panel-heading">Utilisateurs de l'établissement :</legend>
  41. <table id="userfirmranks" class="table table-striped">
  42. <thead>
  43. <tr>
  44. <th></th>
  45. <th>Nom</th>
  46. <th>Prénom</th>
  47. <th>Établissement</th>
  48. <th>Fonction</th>
  49. <th>Rang</th>
  50. <th class="text-right"></th>
  51. </tr>
  52. </thead>
  53. <tbody>
  54. <tr data-id="{{id}}" class="hidden">
  55. <td class="text-center">{{#avatar}}<img class="avatar-mini avatar-rounded" data-src="{{avatar}}"/>{{/avatar}}</td>
  56. <td>{{user.name}}</td>
  57. <td>{{user.firstname}}</td>
  58. <td>{{firm}}</td>
  59. <td>{{user.function}}</td>
  60. <td>{{rank}} {{#superadmin}}<span class="label label-info">Super Admin</span>{{/superadmin}}</td>
  61. <td class="text-right">
  62. <div onclick="edit_userfirmrank(this)" class="btn btn-info btn-squarred btn-mini"><i class="fas fa-pencil-alt"></i></div>
  63. <div onclick="delete_userfirmrank(this)" class="btn btn-danger btn-squarred btn-mini"><i class="fas fa-times"></i></div>
  64. </td>
  65. </tr>
  66. </tbody>
  67. </table>
  68. </div>
  69. </div>
  70. </div>