aboutsummaryrefslogtreecommitdiff
path: root/app/views/index
diff options
context:
space:
mode:
authorGravatar maTh <math-home@web.de> 2022-03-14 23:04:17 +0100
committerGravatar GitHub <noreply@github.com> 2022-03-14 23:04:17 +0100
commit6650d1d29ea5e6f895124afce9ed4a6e920a1ed8 (patch)
treee81fc72e0a31d9ceaa1d3a9afeb2f4bc4ad46040 /app/views/index
parent7b962e246bb9f273dda534b340851db799577dfe (diff)
Improved: log page (#4204)
* first draft * wip * Theme Ansum * Update logs_pagination.phtml * Theme Mapco * Update adark.css * Update BlueLagoon.css * Update dark.css * Update screwdriver.css * Theme Swage * Update app/views/helpers/logs_pagination.phtml Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Update app/views/helpers/logs_pagination.phtml Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> * Update template.css * Update logs_pagination.phtml * Update logs_pagination.phtml * Update logs_pagination.phtml * RTL CSS * Update dark.rtl.css * Update swage.css * fix CLI findings * Indentation fixed * icons improved * CSS: centered icons * i18n * pipline test fixes * Update conf.php * Update gen.php * Update app/i18n/fr/conf.php Co-authored-by: Frans de Jonge <fransdejonge@gmail.com> Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/views/index')
-rw-r--r--app/views/index/logs.phtml54
1 files changed, 41 insertions, 13 deletions
diff --git a/app/views/index/logs.phtml b/app/views/index/logs.phtml
index bb11f9f69..8221d2d4b 100644
--- a/app/views/index/logs.phtml
+++ b/app/views/index/logs.phtml
@@ -1,15 +1,12 @@
<?php /** @var FreshRSS_View $this */ ?>
-<main class="post content">
+<?php $this->partial('aside_configure'); ?>
+<main class="post">
<div class="link-back-wrapper">
<a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
</div>
<h1><?= _t('index.log') ?></h1>
- <form method="post" action="<?= _url('index', 'logs') ?>"><p>
- <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
- <input type="hidden" name="clearLogs" />
- <button type="submit" class="btn"><?= _t('index.log.clear') ?></button>
- </p></form>
+
<?php
/** @var array<FreshRSS_Log> $items */
@@ -17,18 +14,49 @@
?>
<?php if (!empty($items)) { ?>
- <div class="loglist">
- <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
-
+ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
+ <div id="loglist-wrapper">
+ <table id="loglist">
+ <thead>
+ <th><?= _t('conf.logs.loglist.level') ?></th>
+ <th><?= _t('conf.logs.loglist.timestamp') ?></th>
+ <th><?= _t('conf.logs.loglist.message') ?></th>
+ </thead>
+ <tbody>
<?php foreach ($items as $log) { ?>
- <div class="log <?= $log->level() ?>"><span class="date">
- <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>
- </span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div>
+ <tr class="log-item">
+ <td class="log-<?= $log->level() ?>">
+ <?= _i($log->level()) ?>
+ </td>
+ <td class="log-date">
+ <time datetime="<?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>">
+ <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>
+ </time>
+ </td>
+ <td class="log-message">
+ <?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?>
+ </td>
+ </tr>
<?php } ?>
+ </tbody>
+ </table>
+ </div>
+ <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
+
- <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
+
+ <form method="post" action="<?= _url('index', 'logs') ?>">
+ <div class="form-group form-actions">
+ <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
+ <input type="hidden" name="clearLogs" />
+ <div class="group-controls">
+ <button type="submit" class="btn btn-attention"><?= _t('index.log.clear') ?></button>
+ </div>
</div>
+ </form>
+
<?php } else { ?>
<p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
<?php } ?>
+
</main>