logs.phtml 1023 B

1234567891011121314151617181920212223242526
  1. <div class="post content">
  2. <a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  3. <h1><?= _t('index.log') ?></h1>
  4. <form method="post" action="<?= _url('index', 'logs') ?>"><p>
  5. <input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
  6. <input type="hidden" name="clearLogs" />
  7. <button type="submit" class="btn"><?= _t('index.log.clear') ?></button>
  8. </p></form>
  9. <?php $items = $this->logsPaginator->items(); ?>
  10. <?php if (!empty($items)) { ?>
  11. <div class="loglist">
  12. <?php $this->logsPaginator->render('logs_pagination.phtml', 'page'); ?>
  13. <?php foreach ($items as $log) { ?>
  14. <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>
  15. <?php } ?>
  16. <?php $this->logsPaginator->render('logs_pagination.phtml','page'); ?>
  17. </div>
  18. <?php } else { ?>
  19. <p class="alert alert-warn"><?= _t('index.log.empty') ?></p>
  20. <?php } ?>
  21. </div>