|
26 | 26 | include_once App::filepath('include|custom|', 'top.php'); |
27 | 27 |
|
28 | 28 | echo ' |
29 | | - <div class="card"> |
30 | | - <div class="card-header"> |
31 | | - <h3 class="card-title"><i class="fa fa-book"></i> '.tr('Ultimi 100 accessi').'</h3> |
| 29 | + <div class="card card-outline card-info shadow-sm"> |
| 30 | + <div class="card-header with-border bg-info text-white"> |
| 31 | + <h3 class="card-title mb-0"><i class="fa fa-book mr-2"></i> '.tr('Ultimi 100 accessi').'</h3> |
32 | 32 | </div> |
33 | 33 |
|
34 | 34 | <!-- /.card-header --> |
35 | | - <div class="card-body table-responsive no-padding"> |
36 | | - <table class="datatables table table-hover"> |
37 | | - <thead> |
38 | | - <tr> |
39 | | - <th width="200">'.tr('Username').'</th> |
40 | | - <th width="150">'.tr('Data').'</th> |
41 | | - <th width="100">'.tr('Indirizzo IP').'</th> |
42 | | - <th>'.tr('Dispositivo').'</th> |
43 | | - <th width="180">'.tr('Stato').'</th> |
44 | | - </tr> |
45 | | - </thead> |
46 | | - <tbody>'; |
| 35 | + <div class="card-body p-3"> |
| 36 | + <div class="table-responsive"> |
| 37 | + <table class="datatables table table-hover table-sm"> |
| 38 | + <thead class="bg-light"> |
| 39 | + <tr> |
| 40 | + <th width="200">'.tr('Username').'</th> |
| 41 | + <th width="150">'.tr('Data').'</th> |
| 42 | + <th width="100">'.tr('Indirizzo IP').'</th> |
| 43 | + <th>'.tr('Dispositivo').'</th> |
| 44 | + <th width="180">'.tr('Stato').'</th> |
| 45 | + </tr> |
| 46 | + </thead> |
| 47 | + <tbody>'; |
47 | 48 |
|
48 | 49 | /* |
49 | 50 | LEGGO DALLA TABELLA ZZ_LOG |
|
77 | 78 |
|
78 | 79 | echo ' |
79 | 80 | <tr class="'.$type.'"> |
80 | | - <td>'.$log['username'].'</td> |
81 | | - <td class="tip" title="'.$created_at->format('d/m/Y H:i:s').'">'.$created_at->diffForHumans().'</td> |
82 | | - <td>'.$log['ip'].'</td> |
| 81 | + <td><strong>'.$log['username'].'</strong></td> |
| 82 | + <td class="tip" title="'.$created_at->format('d/m/Y H:i:s').'"><i class="fa fa-clock-o mr-1 text-muted"></i>'.$created_at->diffForHumans().'</td> |
| 83 | + <td><code>'.$log['ip'].'</code></td> |
83 | 84 | <td class="user-agent tip" title="'.strip_tags($log['user_agent'] ?: '').'">'.$log['user_agent'].'</td> |
84 | 85 | <td><span class="badge badge-'.$type.'">'.$stato.'</span></td> |
85 | 86 | </tr>'; |
|
89 | 90 |
|
90 | 91 | </tbody> |
91 | 92 | </table> |
| 93 | + </div> |
92 | 94 | </div> |
93 | 95 | <!-- /.card-body --> |
94 | 96 | </div> |
95 | 97 | <!-- /.card -->'; |
96 | 98 | ?> |
97 | 99 |
|
| 100 | +<style> |
| 101 | + /* Margine per il campo di ricerca di DataTables */ |
| 102 | + .dataTables_wrapper .dataTables_filter { |
| 103 | + margin-bottom: 15px !important; |
| 104 | + } |
| 105 | + |
| 106 | + /* Margine per il totale elementi a piè di pagina */ |
| 107 | + .dataTables_wrapper .dataTables_info { |
| 108 | + margin-top: 15px !important; |
| 109 | + } |
| 110 | + |
| 111 | + /* Margine per la paginazione */ |
| 112 | + .dataTables_wrapper .dataTables_paginate { |
| 113 | + margin-top: 15px !important; |
| 114 | + } |
| 115 | +</style> |
| 116 | + |
| 117 | + |
98 | 118 | <script> |
99 | 119 | $(document).ready(function() { |
100 | 120 | var parser = new UAParser(); |
|
0 commit comments