setting.dashboard.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. global $myUser;
  3. if(!$myUser->connected()) throw new Exception("Vous devez être connecté pour accéder à cette fonctionnalité",401);
  4. if(!$myUser->can('dashboard','configure')) throw new Exception("Vous n'avez pas la permission pour executer cette fonctionnalité",403);
  5. require_once(__DIR__.SLASH.'Dashboard.class.php');
  6. ?>
  7. <div class="row">
  8. <div class="col-md-12">
  9. <h3><i class="fas fa-wrench"></i> Réglages Dashboard
  10. <?php if($myUser->can('dashboard', 'edit')) : ?>
  11. <div onclick="dashboard_setting_save();" class="btn btn-success right"><i class="fas fa-check"></i> Enregistrer</div>
  12. <?php endif; ?>
  13. </h3>
  14. <hr/>
  15. </div>
  16. </div>
  17. <p>Veuillez remplir les informations ci dessous.</p>
  18. <!-- <div class="row">
  19. <div class="col-xl-12"> -->
  20. <?php /*echo Configuration::html('dashboard');*/ ?>
  21. <!-- </div>
  22. </div> -->
  23. <div class="row">
  24. <!-- search results -->
  25. <div class="col-xl-12">
  26. <h3>Pages de dashboard</h3>
  27. <table id="dashboards" class="table table-striped " data-entity-search="dashboard_dashboard_search">
  28. <thead>
  29. <tr>
  30. <th data-sortable="label">Libellé</th>
  31. <th data-sortable="icon">Icône</th>
  32. <th data-sortable="default">Par défaut</th>
  33. <th></th>
  34. </tr>
  35. </thead>
  36. <thead>
  37. <tr id="dashboard-form" data-action="dashboard_dashboard_save" data-id="">
  38. <th><input id="label" name="label" class="form-control" placeholder="" value="" type="text"></th>
  39. <th><input id="icon" name="icon" data-type="icon" class="form-control" placeholder="" value="" type="text"></th>
  40. <th><input id="default" name="default" class="form-control" data-type="checkbox" type="checkbox"></th>
  41. <th><div onclick="dashboard_dashboard_save();" class="btn btn-success"><i class="fas fa-check"></i> Enregistrer</div></th>
  42. </tr>
  43. </thead>
  44. <tbody>
  45. <tr data-id="{{id}}" class="hidden">
  46. <td>{{label}}</td>
  47. <td><i class="{{icon}}"></i> {{icon}}</td>
  48. <td>{{#default}}<i class="fas fa-check text-success"></i>{{/default}}{{^default}}<i class="fas fa-times text-danger"></i>{{/default}}</td>
  49. <td>
  50. <div class="btn-group btn-group-sm" role="group">
  51. <div class="btn btn-info " onclick="dashboard_dashboard_edit(this);"><i class="fas fa-pencil-alt"></i></div>
  52. <div class="btn btn-danger " onclick="dashboard_dashboard_delete(this);"><i class="far fa-trash-alt"></i></div>
  53. </div>
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. <!-- Pagination -->
  59. <ul class="pagination">
  60. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');dashboard_dashboard_search();">
  61. <a class="page-link" href="#">{{label}}</a>
  62. </li>
  63. </ul>
  64. </div>
  65. </div>