setting.planning.php 4.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. global $myUser;
  3. User::check_access('planning','configure');
  4. require_once(__DIR__.SLASH.'PlanningEventType.class.php');
  5. ?>
  6. <div class="row">
  7. <div class="col-md-12">
  8. <br>
  9. <?php if($myUser->can('planning', 'edit')) : ?>
  10. <div onclick="planning_setting_save();" class="btn btn-success float-right"><i class="fas fa-check"></i> Enregistrer</div>
  11. <?php endif; ?>
  12. <h3>Réglages planning</h3>
  13. <div class="clear"></div>
  14. <hr>
  15. </div>
  16. </div>
  17. <div class="row">
  18. <!-- search results -->
  19. <div class="col-md-12">
  20. <div class="tab-container noPrint">
  21. <ul class="nav nav-tabs" role="tablist">
  22. <li class="nav-item"><a data-toggle="tab" class="nav-link active" href="#tab-types" aria-controls="tab-types" aria-selected="false">Types d'événements</a></li>
  23. <li class="nav-item"><a data-toggle="tab" class="nav-link" href="#tab-settings" aria-controls="tab-settings" aria-selected="false">Paramètres</a></li>
  24. </ul>
  25. </div>
  26. <div class="tab-content">
  27. <!-- Onglet Types d'événement -->
  28. <div class="tab-pane show active in" id="tab-types" role="tabpanel" aria-labelledby="tab-types"><br>
  29. <legend>Types d'évenements :</legend>
  30. <table id="planning_event_types" class="table table-striped " data-entity-search="planning_event_type_search">
  31. <thead>
  32. <tr>
  33. <th data-sortable="label">Libellé</th>
  34. <?php if($myUser->superadmin): ?>
  35. <th class="text-center">Éditable<small class="text-muted"> - Modifiable par les non-superadmin</small></th>
  36. <?php endif; ?>
  37. <th></th>
  38. </tr>
  39. </thead>
  40. <thead>
  41. <tr id="event-type-form" data-action="planning_event_type_save" data-id="">
  42. <th>
  43. <div class="input-group">
  44. <input id="icon" data-type="icon" value="fas fa-info-circle input-group-prepend" class="form-control" type="text">
  45. <input id="label" name="label" placeholder="Ajoutez un type d'évenement, ex : Congès" class="form-control"type="text">
  46. <input id="color" name="color" class="form-control col-sm-1 input-group-append" type="text" data-type="color">
  47. </div>
  48. </th>
  49. <?php if($myUser->superadmin): ?>
  50. <th class="text-center"><input id="editable" data-type="checkbox" class="form-control" type="checkbox"></th>
  51. <?php endif; ?>
  52. <th><div onclick="planning_event_type_save();" class="btn btn-success right"><i class="fas fa-check"></i> Enregistrer</div></th>
  53. </tr>
  54. </thead>
  55. <tbody>
  56. <tr data-id="{{id}}" class="hidden">
  57. <td><div class="planning-type-chip" style="background:{{color}};color:{{textcolor}}"><i class="{{icon}}"></i></div> {{label}}</td>
  58. <?php if($myUser->superadmin): ?>
  59. <td class="text-center">
  60. {{#editable}}<i class="fas fa-check text-success"></i>{{/editable}}
  61. {{^editable}}<i class="fas fa-times text-danger"></i> {{/editable}}
  62. </td>
  63. <?php endif; ?>
  64. <td class="text-right">
  65. {{#superadmin}}
  66. <div class="btn btn-info btn-mini btn-squarred" onclick="planning_event_type_edit(this);"><i class="fas fa-pencil-alt"></i></div>
  67. <div class="btn btn-danger btn-mini btn-squarred" onclick="planning_event_type_delete(this);"><i class="far fa-trash-alt"></i></div>
  68. {{/superadmin}}
  69. </td>
  70. </tr>
  71. </tbody>
  72. </table>
  73. </div>
  74. <!-- Onglet Paramètres -->
  75. <div class="tab-pane" id="tab-settings" role="tabpanel" aria-labelledby="tab-settings"><br>
  76. <?php echo Configuration::html('planning'); ?>
  77. </div>
  78. </div>
  79. </div>
  80. <div class="row">
  81. <!-- search results -->
  82. <div class="col-xl-12">
  83. </div>
  84. </div>