Uses datetime helper to display times
parent
32c11a9c04
commit
e9dc4463c1
|
|
@ -3,7 +3,10 @@
|
|||
<!-- Sidebar -->
|
||||
<div class="col-md-3 sidebar-wrapper" id="sidebar">
|
||||
<div class="text-center" id="time_now">
|
||||
<span><?= htmlspecialchars($timeNow->format('H:i')) ?> <?= htmlspecialchars($userTimezone) ?></span>
|
||||
<?php
|
||||
$timeNowLabel = app_format_local_datetime(gmdate('Y-m-d H:i:s'), 'H:i', $userTimezone) ?: '--:--';
|
||||
?>
|
||||
<span><?= htmlspecialchars($timeNowLabel) ?> <?= htmlspecialchars($userTimezone) ?></span>
|
||||
</div>
|
||||
|
||||
<div class="col-4"><button class="btn btn-sm btn-info toggle-sidebar-button" type="button" id="toggleSidebarButton" value=">>"></button></div>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ foreach ($themes as $themeData) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
$userTimezone = \App\App::get('user_timezone') ?: 'UTC';
|
||||
$totalThemes = count($themes);
|
||||
?>
|
||||
|
||||
|
|
@ -106,7 +107,10 @@ $totalThemes = count($themes);
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($theme['last_modified'])):
|
||||
$lastEdited = is_numeric($theme['last_modified']) ? date('M j, Y', (int)$theme['last_modified']) : $theme['last_modified'];
|
||||
$lastEditedRaw = is_numeric($theme['last_modified'])
|
||||
? gmdate('Y-m-d H:i:s', (int)$theme['last_modified'])
|
||||
: $theme['last_modified'];
|
||||
$lastEdited = app_format_local_datetime($lastEditedRaw, 'M j, Y', $userTimezone) ?: $lastEditedRaw;
|
||||
?>
|
||||
<div class="tm-theme-stat">
|
||||
<dt>Last edit</dt>
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ function logs_plugin_render_list($logObject, $db, int $userId, bool $validSessio
|
|||
$username = $userObject->getUserDetails($userId)[0]['username'];
|
||||
$page = 'logs'; // For pagination template
|
||||
|
||||
// Get any new feedback messages
|
||||
// Get any new feedback messages
|
||||
include_once APP_PATH . 'helpers/feedback.php';
|
||||
|
||||
require_once PLUGIN_LOGS_PATH . 'helpers/logs_view_helper.php';
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
|
||||
<?php
|
||||
$userTimezone = \App\App::get('user_timezone') ?: 'UTC';
|
||||
?>
|
||||
<!-- log events -->
|
||||
<div class="container-fluid mt-4">
|
||||
<div class="row mb-4">
|
||||
|
|
@ -92,7 +95,7 @@
|
|||
<?php if ($scope === 'system') { ?>
|
||||
<td style="white-space: nowrap;"><?= $row['userID'] ? '<strong>' . htmlspecialchars($row['username'] . " ({$row['userID']})") . '</strong>' : '<span class="text-muted font-weight-normal small">SYSTEM</span>' ?></td>
|
||||
<?php } ?>
|
||||
<td style="white-space: nowrap;"><span class="text-muted"><?= date('d M Y H:i', strtotime($row['time'])) ?></span></td>
|
||||
<td style="white-space: nowrap;"><span class="text-muted"><?= app_format_local_datetime($row['time'] ?? null, 'd M Y H:i', $userTimezone) ?: '—' ?></span></td>
|
||||
<td style="white-space: nowrap;"><span class="<?= getLogLevelClass($row['log level']) ?>"><?= htmlspecialchars($row['log level']) ?></span></td>
|
||||
<td style="width: 100%; word-break: break-word;"><?= htmlspecialchars($row['log message']) ?></td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Reference in New Issue