logs.phtml 1.1 KB

123456789101112131415161718192021222324252627282930
  1. <div class="post content">
  2. <div class="link-back-wrapper">
  3. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  4. </div>
  5. <h1><?= _t('index.log') ?></h1>
  6. <form method="post" action="<?= _url('index', 'logs') ?>"><p>
  7. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  8. <input type="hidden" name="clearLogs" />
  9. <button type="submit" class="btn"><?= _t('index.log.clear') ?></button>
  10. </p></form>
  11. <?php $items = $this->logsPaginator->items(); ?>
  12. <?php if (!empty($items)) { ?>
  13. <div class="loglist">
  14. <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
  15. <?php foreach ($items as $log) { ?>
  16. <div class="log <?= $log->level() ?>"><span class="date">
  17. <?= @date('Y-m-d H:i:s', @strtotime($log->date())) ?>
  18. </span><?= htmlspecialchars($log->info(), ENT_NOQUOTES, 'UTF-8') ?></div>
  19. <?php } ?>
  20. <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
  21. </div>
  22. <?php } else { ?>
  23. <p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
  24. <?php } ?>
  25. </div>