index.phtml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. <?php $this->partial('aside_stats'); ?>
  2. <div class="post">
  3. <div class="link-back-wrapper">
  4. <a class="link-back" href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>
  5. </div>
  6. <h1><?= _t('admin.stats.main') ?></h1>
  7. <div class="stat half">
  8. <h2><?= _t('admin.stats.entry_repartition') ?></h2>
  9. <table>
  10. <thead>
  11. <tr>
  12. <th> </th>
  13. <th><?= _t('admin.stats.main_stream') ?></th>
  14. <th><?= _t('admin.stats.all_feeds') ?></th>
  15. </tr>
  16. </thead>
  17. <tbody>
  18. <tr>
  19. <th><?= _t('admin.stats.status_total') ?></th>
  20. <td class="numeric"><?= format_number($this->repartition['main_stream']['total']) ?></td>
  21. <td class="numeric"><?= format_number($this->repartition['all_feeds']['total']) ?></td>
  22. </tr>
  23. <tr>
  24. <th><?= _t('admin.stats.status_read') ?></th>
  25. <td class="numeric"><?= format_number($this->repartition['main_stream']['count_reads']) ?></td>
  26. <td class="numeric"><?= format_number($this->repartition['all_feeds']['count_reads']) ?></td>
  27. </tr>
  28. <tr>
  29. <th><?= _t('admin.stats.status_unread') ?></th>
  30. <td class="numeric"><?= format_number($this->repartition['main_stream']['count_unreads']) ?></td>
  31. <td class="numeric"><?= format_number($this->repartition['all_feeds']['count_unreads']) ?></td>
  32. </tr>
  33. <tr>
  34. <th><?= _t('admin.stats.status_favorites') ?></th>
  35. <td class="numeric"><?= format_number($this->repartition['main_stream']['count_favorites']) ?></td>
  36. <td class="numeric"><?= format_number($this->repartition['all_feeds']['count_favorites']) ?></td>
  37. </tr>
  38. </tbody>
  39. </table>
  40. </div><!--
  41. --><div class="stat half">
  42. <h2><?= _t('admin.stats.top_feed') ?></h2>
  43. <table>
  44. <thead>
  45. <tr>
  46. <th><?= _t('admin.stats.feed') ?></th>
  47. <th><?= _t('admin.stats.category') ?></th>
  48. <th><?= _t('admin.stats.entry_count') ?></th>
  49. <th><?= _t('admin.stats.percent_of_total') ?></th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <?php foreach ($this->topFeed as $feed) { ?>
  54. <tr>
  55. <td><a href="<?= _url('stats', 'repartition', 'id', $feed['id']) ?>"><?= $feed['name'] ?></a></td>
  56. <td><?= $feed['category'] ?></td>
  57. <td class="numeric"><?= format_number($feed['count']) ?></td>
  58. <td class="numeric"><?= format_number($feed['count'] / $this->repartition['all_feeds']['total'] * 100, 1) ?></td>
  59. </tr>
  60. <?php } ?>
  61. </tbody>
  62. </table>
  63. </div>
  64. <div class="stat">
  65. <h2><?= _t('admin.stats.entry_per_day') ?></h2>
  66. <div id="statsEntryPerDay" class="statGraph"></div>
  67. </div>
  68. <div class="stat half">
  69. <h2><?= _t('admin.stats.feed_per_category') ?></h2>
  70. <div id="statsFeedPerCategory" class="statGraph"></div>
  71. <div id="statsFeedPerCategoryLegend"></div>
  72. </div>
  73. <div class="stat half">
  74. <h2><?= _t('admin.stats.entry_per_category') ?></h2>
  75. <div id="statsEntryPerCategory" class="statGraph"></div>
  76. <div id="statsEntryPerCategoryLegend"></div>
  77. </div>
  78. </div>
  79. <script id="jsonStats" type="application/json"><?php
  80. echo json_encode(array(
  81. 'average' => $this->average,
  82. 'dataCount' => $this->count,
  83. 'feedByCategory' => $this->feedByCategory,
  84. 'entryByCategory' => $this->entryByCategory,
  85. ), JSON_UNESCAPED_UNICODE);
  86. ?></script>
  87. <script src="../scripts/stats.js?<?= @filemtime(PUBLIC_PATH . '/scripts/stats.js') ?>"></script>