setting.export.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. global $myUser;
  3. User::check_access('export','configure');
  4. require_once(__DIR__.SLASH.'ExportModel.class.php');
  5. $plugins = Plugin::getAll(true);
  6. foreach ($plugins as $plugin)
  7. $allPlugs[$plugin->folder] = $plugin->name;
  8. ?>
  9. <div class="row mb-2">
  10. <div class="col-md-12">
  11. <br>
  12. <?php if($myUser->can('export', 'edit')) : ?>
  13. <a href="index.php?module=export&page=sheet" class="btn btn-success float-right"><i class="fas fa-plus"></i> Créer un modèle d'export</a>
  14. <?php endif; ?>
  15. <h3>Réglages Export Modèle</h3>
  16. <hr>
  17. </div>
  18. <div class="col-md-12">
  19. <select id="filters" data-slug="exportmodel-search" data-type="filter" data-label="Recherche" data-function="export_model_search">
  20. <option value="description" data-filter-type="text">Description</option>
  21. <option value="filename" data-filter-type="text">Nom de fichier</option>
  22. <option value="plugin" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($allPlugs); ?>'>Plugin</option>
  23. <option value="privacy" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode(array(ExportModel::PRIVACY_PUBLIC=>'Public', ExportModel::PRIVACY_PRIVATE=>'Privé')); ?>'>Visibilité</option>
  24. </select>
  25. </div>
  26. </div>
  27. <div class="row">
  28. <!-- search results -->
  29. <div class="col-xl-12">
  30. <table id="exportmodels" class="table table-striped table-exportmodels " data-entity-search="export_model_search">
  31. <thead>
  32. <tr>
  33. <th></th>
  34. <th data-sortable="label">Libellé</th>
  35. <th data-sortable="description">Description</th>
  36. <th data-sortable="plugin">Plugin</th>
  37. <th style="width: 150px;">Jeu de données</th>
  38. <th></th>
  39. </tr>
  40. </thead>
  41. <tbody>
  42. <tr data-id="{{id}}" class="hidden">
  43. <td class="align-middle p-2"><h2 class="text-center m-0"><i class="{{icon}}"></i></h2></td>
  44. <td class="exportmodel-{{class}} align-middle p-2" title="Export modèle {{privacy}} ({{slug}})">
  45. <a class="text-primary" href="index.php?module=export&page=sheet&id={{id}}">{{label}}</a>
  46. <div class="text-muted"><small>Modèle : {{filename}}</small></div>
  47. </td>
  48. <td class="align-middle p-2">{{description}}</td>
  49. <td class="align-middle p-2">{{pluginName}}</td>
  50. <td class="align-middle p-2">{{datasetName}}</td>
  51. <td class="text-right align-middle p-2">
  52. <a class="btn btn-info btn-squarred btn-mini" href="index.php?module=export&page=sheet&id={{id}}"><i class="fas fa-pencil-alt"></i></a>
  53. <div class="btn btn-danger btn-squarred btn-mini" onclick="export_model_delete(this);"><i class="fas fa-times"></i></div>
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. <!-- Pagination -->
  59. <ul class="pagination justify-content-center">
  60. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');export_model_search()">
  61. <span class="page-link">{{label}}</span>
  62. </li>
  63. </ul>
  64. </div>
  65. </div>