setting.right.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. global $myUser;
  3. User::check_access('rank','configure');
  4. $rank = Rank::getById($_['rank']);
  5. ?>
  6. <div class="row">
  7. <div class="col-md-12">
  8. <br>
  9. <h3 id="rank" data-rank="<?php echo $rank->id ?>">Droits pour le rang <span class="text-success"><?php echo $rank->label ?></span> :</h3>
  10. <hr>
  11. <div class="row">
  12. <div class="col-md-12">
  13. <label>Etablissement concerné :</label>
  14. <select onchange="search_right();" class="form-control" id="firm">
  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>
  22. <br>
  23. <div class="panel panel-default">
  24. <table id="ranks" class="table table-striped">
  25. <thead>
  26. <tr>
  27. <th>Libellé</th>
  28. <th>Description</th>
  29. <th class="text-center"></th>
  30. <th class="text-center">Consultation</th>
  31. <th class="text-center">Édition</th>
  32. <th class="text-center">Suppression</th>
  33. <th class="text-center">Configuration</th>
  34. </tr>
  35. </thead>
  36. <tbody>
  37. <tr class="hidden" data-section="{{section}}">
  38. <td>{{section}}</td>
  39. <td>{{description}}</td>
  40. <td class="text-center"><div class="btn btn-warning" onclick="right_switch(this);"><i class="fas fa-redo"></i> Tout switcher</div></td>
  41. <td class="text-center">
  42. <input data-right="read" data-result="{{read}}" onchange="toggle_right(this)" type="checkbox" autocomplete="off" name="read-{{section}}" id="read-{{section}}" data-type="checkbox">
  43. </td>
  44. <td class="text-center">
  45. <input data-right="edit" data-result="{{edit}}" onchange="toggle_right(this)" type="checkbox" autocomplete="off" name="edit-{{section}}" id="edit-{{section}}" data-type="checkbox">
  46. </td>
  47. <td class="text-center">
  48. <input data-right="delete" data-result="{{delete}}" onchange="toggle_right(this)" type="checkbox" autocomplete="off" name="delete-{{section}}" id="delete-{{section}}" data-type="checkbox">
  49. </td>
  50. <td class="text-center">
  51. <input data-right="configure" data-result="{{configure}}" onchange="toggle_right(this)" type="checkbox" autocomplete="off" name="configure-{{section}}" id="configure-{{section}}" data-type="checkbox">
  52. </td>
  53. </tr>
  54. </tbody>
  55. </table>
  56. </div>
  57. </div>
  58. </div>