12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <?php
- global $myUser;
- User::check_access('log','read');
- $categories = array();
- foreach(Log::staticQuery('SELECT DISTINCT category FROM {{table}} ORDER BY category',array(),true) as $category)
- $categories[$category->category] = $category->category;
- ?>
- <div class="row">
- <div class="col-md-12">
- <br>
- <h3>Logs</h3>
- <hr/>
- <div class="row">
- <div class="col-md-12">
- <select id="filters" data-slug="log-search" data-type="filter" data-label="Recherche" data-function="search_log">
- <option value="label" data-filter-type="text">Libellé</option>
- <option value="category" data-filter-type="dictionnary" data-filter-source='<?php echo json_encode($categories); ?>'>Catégorie</option>
- <option value="created" data-filter-type="date">Date</option>
- <option value="ip" data-filter-type="text">IP</option>
- <option value="creator" data-filter-type="user">Auteur</option>
- </select>
- </div>
- </div>
- <br/>
- <div class="row">
- <div class="col-md-12">
- <table id="logs" class="table table-striped">
- <thead>
- <tr>
- <th data-sortable="created">Date</th>
- <th data-sortable="category">Catégorie</th>
- <th data-sortable="label" class="log-col">Libellé</th>
- <th data-sortable="creator">Utilisateur</th>
- <th data-sortable="ip">Ip</th>
- </tr>
- </thead>
- <tbody>
- <tr data-id="{{id}}" class="hidden">
- <td>{{created}}</td>
- <td>{{category}}</td>
- <td class="log-col">{{{label}}}</td>
- <td>{{creator}}</td>
- <td>{{ip}}</td>
- </tr>
- </tbody>
- </table>
- <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');search_log()">
- <span class="page-link">{{label}}</span>
- </li>
- </ul>
- </div>
- </div>
- </div>
- </div>
|