setting.export.php 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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">
  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-join="and" data-type="filter" data-label="Recherche" data-function="export_exportmodel_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. <br>
  28. <div class="row">
  29. <!-- search results -->
  30. <div class="col-xl-12">
  31. <table id="exportmodels" class="table table-striped table-exportmodels " data-entity-search="export_exportmodel_search">
  32. <thead>
  33. <tr>
  34. <th data-sortable="id">#</th>
  35. <th data-sortable="label">Libellé</th>
  36. <?php if($myUser->superadmin): ?>
  37. <th data-sortable="slug">Slug</th>
  38. <?php endif; ?>
  39. <th data-sortable="description">Description</th>
  40. <th data-sortable="plugin">Plugin</th>
  41. <th style="width: 150px;">Jeu de données</th>
  42. <th data-sortable="filename">Nom de fichier</th>
  43. <th></th>
  44. </tr>
  45. </thead>
  46. <tbody>
  47. <tr data-id="{{id}}" class="hidden">
  48. <td>{{id}}</td>
  49. <td class="exportmodel-{{class}}" title="Export modèle {{privacy}}">{{label}}</td>
  50. <?php if($myUser->superadmin): ?>
  51. <td><code>{{slug}}</code></td>
  52. <?php endif; ?>
  53. <td>{{description}}</td>
  54. <td>{{pluginName}}</td>
  55. <td>{{datasetName}}</td>
  56. <td>{{filename}}</td>
  57. <td class="text-right">
  58. <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>
  59. <div class="btn btn-danger btn-squarred btn-mini" onclick="export_exportmodel_delete(this);"><i class="fas fa-times"></i></div>
  60. </td>
  61. </tr>
  62. </tbody>
  63. </table>
  64. <!-- Pagination -->
  65. <ul class="pagination justify-content-center">
  66. <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');export_exportmodel_search()">
  67. <span class="page-link">{{label}}</span>
  68. </li>
  69. </ul>
  70. </div>
  71. </div>