index.phtml 3.3 KB

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