4
0

idle.phtml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. /** @var FreshRSS_View $this */
  3. $this->partial('aside_subscription');
  4. ?>
  5. <main class="post">
  6. <div class="link-back-wrapper">
  7. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  8. </div>
  9. <h1><?= _t('admin.stats.idle') ?></h1>
  10. <?php
  11. $current_url = Minz_Url::display(
  12. array('c' => 'stats', 'a' => 'idle'),
  13. 'php', true
  14. );
  15. $nothing = true;
  16. foreach ($this->idleFeeds as $period => $feedsInPeriod) {
  17. if (!empty($feedsInPeriod)) {
  18. $nothing = false;
  19. ?>
  20. <div class="box">
  21. <div class="box-title"><?= _t('gen.date.' . $period) ?></div>
  22. <ul class="box-content">
  23. <?php
  24. foreach ($feedsInPeriod as $feedInPeriod) {
  25. $feed = $this->feeds[$feedInPeriod['id']] ?? null;
  26. $error = $feed == null || $feed->inError() ? ' error' : '';
  27. $empty = $feed != null && $feed->nbEntries() == 0 ? ' empty' : '';
  28. ?>
  29. <li class="item feed<?= $error, $empty, $feed->mute() ? ' mute' : '' ?>">
  30. <a class="configure open-slider" href="<?= _url('stats', 'feed', 'id', $feedInPeriod['id'], 'sub', 'idle') ?>" title="<?= _t('gen.action.manage') ?>"><?= _i('configure') ?></a>
  31. <?php if (FreshRSS_Context::$user_conf->show_favicons): ?><img class="favicon" src="<?= $feedInPeriod['favicon'] ?>" alt="✇" loading="lazy" /><?php endif; ?>
  32. <span title="<?= timestamptodate($feedInPeriod['last_date'], false) ?>"><?= $feedInPeriod['name'] ?>
  33. (<?= _t('admin.stats.number_entries', $feedInPeriod['nb_articles']) ?>)</span>
  34. </li>
  35. <?php } ?>
  36. </ul>
  37. </div>
  38. <?php
  39. }
  40. }
  41. if ($nothing) {
  42. ?>
  43. <p class="alert alert-warn">
  44. <span class="alert-head"><?= _t('admin.stats.no_idle') ?></span>
  45. </p>
  46. <?php } ?>
  47. </main>
  48. <?php $class = $this->displaySlider ? ' active' : ''; ?>
  49. <aside id="slider" class="scrollbar-thin<?= $class ?>">
  50. <?php
  51. if (isset($this->feed)) {
  52. $this->renderHelper('feed/update');
  53. }
  54. ?>
  55. </aside>
  56. <a href="#" id="close-slider" class="<?= $class ?>">
  57. <?= _i('close') ?>
  58. </a>