123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- {"label":"Liste entité","syntax":"php"}
- <?php
- global $myUser;
- User::check_access('{{plugin}}','read');
- require_once(__DIR__.SLASH.'{{Entity}}.class.php');
- ?>
- <div class="row">
- {{~! Recherche non avancée}}
- <div class="col-md-8">
- <select id="filters" data-type="filter" data-label="Recherche" data-function="{{plugin}}_{{entity_readable}}_search">
- <option value="label" data-filter-type="text">Libellé</option>
- </select>
- </div>
- {{/~}}
- <div class="col-md-4">
- <?php if($myUser->can('{{plugin}}', 'edit')) : ?>
- <a href="index.php?module={{plugin}}&page=sheet.{{entity.readable}}" class="btn btn-success right"><i class="fas fa-plus"></i> Ajouter</a>
- <?php endif; ?>
- </div>
- </div>
- <br/>
- <h4 class="results-count"><span></span> Résultat(s) <div class="btn btn-dark btn-small" onclick="{{plugin}}_{{entity_readable}}_search(null,true)"><i class="far fa-file-excel"></i> Exporter</div></h4>
- <div class="row">
- <!-- search results -->
- <div class="col-xl-12">
- <table id="{{entity-readable}}s" class="table table-striped " data-entity-search="{{plugin}}_{{entity_readable}}_search">
- <thead>
- <tr>
- <th>#</th>{{:fields}}
- <th data-sortable="{{key}}">{{value.label}}</th>{{/:fields}}
- <th></th>
- </tr>
- </thead>
- {{~ Formulaire dans le tableau de liste }}
- <thead>
- <tr id="{{entity-readable}}-form" data-action="{{plugin}}_{{entity_readable}}_save" data-id="">
- <th>#</th>{{:fields}}
- <th><input id="{{key}}" name="{{key}}" class="form-control" placeholder="" value="" type="text"></th>{{/:fields}}
- <th><div onclick="{{plugin}}_{{entity_readable}}_save();" class="btn btn-success"><i class="fas fa-check"></i> Enregistrer</div></th>
- </tr>
- </thead>
- {{/~}}
- <tbody>
- <tr data-id="{{id}}" class="hidden">
- <td>{{id}}</td>{{:fields}}
- <td>{{{{value.key}}}}</td>{{/:fields}}
- <td>
- <div class="btn-group btn-group-sm" role="group">
- {{~! Formulaire dans le tableau de liste }}
- <a class="btn btn-info" href="index.php?module={{plugin}}&page=sheet.{{entity.readable}}&id={{id}}"><i class="fas fa-pencil-alt"></i></a>
- {{/~}}
- {{~ Formulaire dans le tableau de liste }}
- <div class="btn btn-info " onclick="{{plugin}}_{{entity_readable}}_edit(this);"><i class="fas fa-pencil-alt"></i></div>
- {{/~}}
- <div class="btn btn-danger " onclick="{{plugin}}_{{entity_readable}}_delete(this);"><i class="far fa-trash-alt"></i></div>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- {{~! Recherche non avancée}}<!-- Pagination (data-range définit le nombre de pages max affichées avant et après la page courante) -->
-
- <ul class="pagination justify-content-center" data-range="5">
- <li class="page-item hidden" data-value="{{value}}" title="Voir la page {{label}}" onclick="$(this).parent().find('li').removeClass('active');$(this).addClass('active');{{plugin}}_{{entity_readable}}_search();">
- <span class="page-link">{{label}}</span>
- </li>
- </ul>{{/~}}
- </div>
- </div>
|