12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- <?php
- global $myUser;
- User::check_access('export','configure');
- require_once(__DIR__.SLASH.'ExportModel.class.php');
- $plugins = Plugin::getAll(true);
- foreach ($plugins as $plugin)
- $allPlugs[$plugin->folder] = $plugin->name;
- ?>
- <div class="row">
- <div class="col-md-12">
- <br>
- <?php if($myUser->can('export', 'edit')) : ?>
- <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>
- <?php endif; ?>
- <h3>Réglages Export Modèle</h3>
- <hr>
- </div>
- <div class="col-md-12">
- <select id="filters" data-slug="exportmodel-search" data-join="and" data-type="filter" data-label="Recherche" data-function="export_exportmodel_search">
- <option value="description" data-filter-type="text">Description</option>
- <option value="filename" data-filter-type="text">Nom de fichier</option>
- <option value="plugin" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($allPlugs); ?>'>Plugin</option>
- <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>
- </select>
- </div>
- </div>
- <br>
- <div class="row">
- <!-- search results -->
- <div class="col-xl-12">
- <table id="exportmodels" class="table table-striped table-exportmodels " data-entity-search="export_exportmodel_search">
- <thead>
- <tr>
- <th data-sortable="id">#</th>
- <th data-sortable="label">Libellé</th>
- <?php if($myUser->superadmin): ?>
- <th data-sortable="slug">Slug</th>
- <?php endif; ?>
- <th data-sortable="description">Description</th>
- <th data-sortable="plugin">Plugin</th>
- <th style="width: 150px;">Jeu de données</th>
- <th data-sortable="filename">Nom de fichier</th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <tr data-id="{{id}}" class="hidden">
- <td>{{id}}</td>
- <td class="exportmodel-{{class}}" title="Export modèle {{privacy}}">{{label}}</td>
- <?php if($myUser->superadmin): ?>
- <td><code>{{slug}}</code></td>
- <?php endif; ?>
- <td>{{description}}</td>
- <td>{{pluginName}}</td>
- <td>{{datasetName}}</td>
- <td>{{filename}}</td>
- <td class="text-right">
- <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>
- <div class="btn btn-danger btn-squarred btn-mini" onclick="export_exportmodel_delete(this);"><i class="fas fa-times"></i></div>
- </td>
- </tr>
- </tbody>
- </table>
- <!-- Pagination -->
- <ul class="pagination justify-content-center">
- <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()">
- <span class="page-link">{{label}}</span>
- </li>
- </ul>
- </div>
- </div>
|