index.phtml 3.4 KB

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