PluginProbe
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity / 1.15.0
Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity v1.15.0
3.3.9 3.3.8 trunk 1.0 1.1.0 1.10.0 1.11.0 1.11.1 1.12.0 1.13.0 1.14.0 1.15.0 1.16.0 1.17.0 1.17.1 1.18.0 1.19.0 1.2.0 1.20.0 1.20.1 1.3.0 1.3.1 1.4.0 1.5.0 1.6.0 All 67 releases
logtivity / views / _logs-loop.php

_logs-loop.php in Activity Logs, User Activity Tracking, Multisite Activity Log from Logtivity 1.15.0, at views/_logs-loop.php

68 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <table class="form-table logtivity-table">
2 <thead>
3 <tr>
4 <th>Action</th>
5 <th>Context</th>
6 <th>User</th>
7 <th colspan="2">Date</th>
8 </tr>
9 </thead>
10 <tbody>
11
12 <?php if (count($logs)): ?>
13 <?php foreach ($logs as $key => $log): ?>
14
15 <tr>
16 <td><?php echo sanitize_text_field($log->action) ?></td>
17 <td><?php echo sanitize_text_field($log->context) ?></td>
18 <td>
19 <div style="margin-bottom: 5px;"><?php echo sanitize_text_field($log->action_username ?? $log->action_user_id) ?></div>
20 <?php echo sanitize_text_field($log->ip_address) ?>
21 </td>
22 <td>
23 <?php echo sanitize_text_field(date('M d Y', strtotime($log->occurred_at))) ?> - <?php echo sanitize_text_field(date('H:i:s', strtotime($log->occurred_at))); ?>
24 </td>
25 <td>
26 <button class="button js-logtivity-view-log">View</button>
27 <div style="display: none;" class="js-modal-content">
28 <?php echo logtivity_view('_log-show', [
29 'log' => $log
30 ]) ?>
31 </div>
32 </td>
33 </tr>
34
35 <?php endforeach ?>
36 <?php else: ?>
37 <?php if (isset($message)): ?>
38 <tr>
39 <td colspan="6"><?php echo sanitize_text_field($message) ?></td>
40 </tr>
41 <?php else: ?>
42 <tr>
43 <td colspan="6">No results found.</td>
44 </tr>
45 <?php endif ?>
46 <?php endif ?>
47
48 </tbody>
49 </table>
50
51 <?php if ($meta->current_page): ?>
52
53 <div data-current-page="<?php echo $meta->current_page ?>" data-last-page="<?php echo $meta->last_page ?>" style="text-align: center; padding: 20px">
54
55 <button <?php echo ( $meta->current_page == 1 ? 'disabled' : ''); ?> class="js-logtivity-pagination button-primary" data-page="<?php echo sanitize_text_field($meta->current_page - 1) ?>">Previous</button>
56
57 <button <?php echo ( ! $hasNextPage ? 'disabled' : ''); ?> class="js-logtivity-pagination button-primary" data-page="<?php echo sanitize_text_field($meta->current_page + 1) ?>">Next</button>
58
59 </div>
60 <?php endif ?>
61
62 <div class="logtivity-modal">
63 <div class="logtivity-modal-dialog">
64 <div class="logtivity-modal-content">
65 <!-- Populated with JS -->
66 </div>
67 </div>
68 </div>