Archive clients, ticket replies, accounts and SLAs and restore anything without an Are you sure prompt, with Undo added for ticket replies and accounts, real plurals and bold counts in bulk messages, and flashAlert for asset and contact note messages

This commit is contained in:
johnnyq
2026-11-20 23:46:36 -05:00
parent 74d571c029
commit df64d82f3a
173 changed files with 405 additions and 369 deletions

View File

@@ -72,7 +72,7 @@ if (!$row) { ?>
<tr>
<td class="font-monospace small text-break"><?= escapeHtml($endpoint['endpoint'] !== '' ? $endpoint['endpoint'] : '-') ?></td>
<td class="text-end small text-nowrap"><?= number_format(intval($endpoint['calls'])) ?></td>
<td class="text-end small text-body-secondary text-nowrap" title="<?= escapeHtml($endpoint['last_at']) ?>"><?= escapeHtml(timeAgo($endpoint['last_at'])) ?></td>
<td class="text-end small text-body-secondary text-nowrap" title="<?= formatDateTime($endpoint['last_at']) ?>"><?= escapeHtml(timeAgo($endpoint['last_at'])) ?></td>
</tr>
<?php } ?>
</tbody>
@@ -88,7 +88,7 @@ if (!$row) { ?>
<?php foreach ($ips as $ip) { ?>
<li class="d-flex justify-content-between gap-2 py-1 border-bottom">
<a class="font-monospace" href="/admin/audit_logs.php?q=<?= urlencode($ip['ip']) ?>" title="Everything from it in the audit log"><?= escapeHtml($ip['ip']) ?></a>
<span class="text-body-secondary text-nowrap" title="<?= escapeHtml($ip['last_at']) ?>"><?= escapeHtml(timeAgo($ip['last_at'])) ?></span>
<span class="text-body-secondary text-nowrap" title="<?= formatDateTime($ip['last_at']) ?>"><?= escapeHtml(timeAgo($ip['last_at'])) ?></span>
</li>
<?php } ?>
</ul>

View File

@@ -55,7 +55,7 @@ ob_start();
<span class="itflow-asset-icon itflow-asset-icon-lg bg-<?= $style['tone'] ?>-subtle text-<?= $style['tone'] ?>-emphasis" aria-hidden="true"><i class="<?= appLogCategoryIcon($category) ?>"></i></span>
<div class="min-w-0 flex-grow-1">
<h5 class="modal-title fw-semibold text-break"><?= escapeHtml($category !== '' ? $category : 'No category') ?> &middot; <?= $style['one'] ?></h5>
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y \a\t g:i:s A', $created)) ?> &middot; <?= escapeHtml(timeAgo($row['app_log_created_at'])) ?></div>
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y g:i:s A', $created)) ?> &middot; <?= escapeHtml(timeAgo($row['app_log_created_at'])) ?></div>
</div>
</div>
<button type="button" class="btn-close btn-close-white ms-3" data-bs-dismiss="modal" aria-label="Close"></button>
@@ -90,7 +90,7 @@ ob_start();
</div>
<div class="itflow-glance-item" title="When">
<i class="fas fa-fw fa-clock"></i>
<span class="font-monospace small"><?= escapeHtml($row['app_log_created_at']) ?></span>
<span class="font-monospace small"><?= formatDateTime($row['app_log_created_at'], true) ?></span>
</div>
</div>
</div>
@@ -106,7 +106,7 @@ ob_start();
<div class="list-group">
<?php foreach ($around as $entry) { ?>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/app_log/app_log.php?id=<?= intval($entry['app_log_id']) ?>">
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= escapeHtml($entry['app_log_created_at']) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['app_log_created_at']))) ?></span>
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= formatDateTime($entry['app_log_created_at'], true) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['app_log_created_at']))) ?></span>
<span class="flex-shrink-0"><?= appLogLevelPill($entry['app_log_type']) ?></span>
<span class="text-break"><span class="fw-semibold"><?= escapeHtml((string) $entry['app_log_category']) ?></span> <?= escapeHtml(mb_strimwidth((string) $entry['app_log_details'], 0, 160, '…')) ?></span>
</a>
@@ -131,7 +131,7 @@ ob_start();
<div class="list-group">
<?php foreach ($audit as $entry) { ?>
<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/audit_log/audit_log.php?id=<?= intval($entry['log_id']) ?>">
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= escapeHtml($entry['log_created_at']) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['log_created_at']))) ?></span>
<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="<?= formatDateTime($entry['log_created_at'], true) ?>"><?= escapeHtml(date('g:i:s A', strtotime($entry['log_created_at']))) ?></span>
<span class="flex-shrink-0"><?= auditLogActionPill($entry['log_action']) ?></span>
<span class="text-break"><?= escapeHtml($entry['log_description']) ?></span>
</a>

View File

@@ -65,7 +65,7 @@ $entry_line = function ($entry, $show_when_as = 'date') {
$time = strtotime($entry['log_created_at']);
$when = $show_when_as === 'time' ? date('g:i A', $time) : date('M j, Y g:i A', $time);
return '<a href="#" class="list-group-item list-group-item-action d-flex align-items-start gap-2 small ajax-modal" data-modal-size="lg" data-modal-url="/admin/modals/audit_log/audit_log.php?id=' . intval($entry['log_id']) . '">'
. '<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="' . escapeHtml($entry['log_created_at']) . '">' . escapeHtml($when) . '</span>'
. '<span class="text-body-secondary text-nowrap flex-shrink-0" style="min-width: 4.5rem;" title="' . formatDateTime($entry['log_created_at']) . '">' . escapeHtml($when) . '</span>'
. '<span class="flex-shrink-0">' . auditLogActionPill($entry['log_action']) . '</span>'
. '<span class="text-break">' . escapeHtml($entry['log_description']) . '</span>'
. '</a>';
@@ -80,7 +80,7 @@ ob_start();
<span class="itflow-asset-icon itflow-asset-icon-lg bg-<?= $style['tone'] ?>-subtle text-<?= $style['tone'] ?>-emphasis" aria-hidden="true"><i class="fas <?= auditLogTypeIcon($type) ?>"></i></span>
<div class="min-w-0 flex-grow-1">
<h5 class="modal-title fw-semibold text-break"><?= escapeHtml($type) ?> &middot; <?= escapeHtml($row['log_action']) ?></h5>
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y \a\t g:i:s A', $created)) ?> &middot; <?= escapeHtml(timeAgo($row['log_created_at'])) ?></div>
<div class="small text-body-secondary mt-1"><?= escapeHtml(date('D, M j, Y g:i:s A', $created)) ?> &middot; <?= escapeHtml(timeAgo($row['log_created_at'])) ?></div>
</div>
</div>
<button type="button" class="btn-close btn-close-white ms-3" data-bs-dismiss="modal" aria-label="Close"></button>

View File

@@ -91,7 +91,7 @@ ob_start();
<?php } ?>
<dt>Added</dt>
<dd><span title="<?= escapeHtml($user['user_created_at']) ?>"><?= escapeHtml(timeAgo($user['user_created_at'])) ?></span>
<dd><span title="<?= formatDateTime($user['user_created_at']) ?>"><?= escapeHtml(timeAgo($user['user_created_at'])) ?></span>
<?php if ($joined = userInviteJoined($user_id)) { ?>
<span class="text-body-secondary" data-user-joined>· joined from <?= $joined['by'] !== '' ? escapeHtml($joined['by']) . "'s" : 'an' ?> invite</span>
<?php } ?>
@@ -99,7 +99,7 @@ ob_start();
<?php if ($is_archived) { ?>
<dt>Archived</dt>
<dd><span title="<?= escapeHtml($user['user_archived_at']) ?>"><?= escapeHtml(timeAgo($user['user_archived_at'])) ?></span></dd>
<dd><span title="<?= formatDateTime($user['user_archived_at']) ?>"><?= escapeHtml(timeAgo($user['user_archived_at'])) ?></span></dd>
<?php } ?>
</dl>