1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?php
- global $myUser;
- if(!$myUser->connected()) throw new Exception("Vous devez être connecté pour accéder à cette fonctionnalité",401);
- if(!$myUser->can('export','configure')) throw new Exception("Vous n'avez pas la permission pour exécuter cette fonctionnalité",403);
- 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>
- <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>
- <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()">
- <a class="page-link" href="#">{{label}}</a>
- </li>
- </ul>
- </div>
- </div>
|