stats.phtml 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <div class="post content">
  2. <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
  3. <h1><?php echo Minz_Translate::t ('stats'); ?></h1>
  4. <div class="stat">
  5. <h2><?php echo Minz_Translate::t ('stats_entry_repartition')?></h2>
  6. <table>
  7. <thead>
  8. <tr>
  9. <th>&nbsp;</th>
  10. <th><?php echo Minz_Translate::t ('main_stream')?></th>
  11. <th><?php echo Minz_Translate::t ('all_feeds')?></th>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <tr>
  16. <th><?php echo Minz_Translate::t ('status_total')?></th>
  17. <td><?php echo $this->repartition['main_stream']['total']?></td>
  18. <td><?php echo $this->repartition['all_feeds']['total']?></td>
  19. </tr>
  20. <tr>
  21. <th><?php echo Minz_Translate::t ('status_read')?></th>
  22. <td><?php echo $this->repartition['main_stream']['read']?></td>
  23. <td><?php echo $this->repartition['all_feeds']['read']?></td>
  24. </tr>
  25. <tr>
  26. <th><?php echo Minz_Translate::t ('status_unread')?></th>
  27. <td><?php echo $this->repartition['main_stream']['unread']?></td>
  28. <td><?php echo $this->repartition['all_feeds']['unread']?></td>
  29. </tr>
  30. <tr>
  31. <th><?php echo Minz_Translate::t ('status_favorites')?></th>
  32. <td><?php echo $this->repartition['main_stream']['favorite']?></td>
  33. <td><?php echo $this->repartition['all_feeds']['favorite']?></td>
  34. </tr>
  35. </tbody>
  36. </table>
  37. </div>
  38. <div class="stat">
  39. <h2><?php echo Minz_Translate::t ('stats_entry_per_day')?></h2>
  40. <div id="statsEntryPerDay" style="height: 300px"></div>
  41. </div>
  42. <div class="stat">
  43. <h2><?php echo Minz_Translate::t ('stats_feed_per_category')?></h2>
  44. <div id="statsFeedPerCategory" style="height: 300px"></div>
  45. <div id="statsFeedPerCategoryLegend"></div>
  46. </div>
  47. <div class="stat">
  48. <h2><?php echo Minz_Translate::t ('stats_entry_per_category')?></h2>
  49. <div id="statsEntryPerCategory" style="height: 300px"></div>
  50. <div id="statsEntryPerCategoryLegend"></div>
  51. </div>
  52. </div>
  53. <script>
  54. // Entry per day
  55. Flotr.draw(document.getElementById('statsEntryPerDay'),
  56. [<?php echo $this->count ?>],
  57. {
  58. bars: {horizontal: false, show: true},
  59. xaxis: {noTicks: 6, showLabels: false, tickDecimals: 0},
  60. yaxis: {showLabels: false},
  61. mouse: {relative: true, track: true, trackDecimals: 0,trackFormatter: function(obj) {return obj.y;}}
  62. });
  63. // Feed per category
  64. Flotr.draw(document.getElementById('statsFeedPerCategory'),
  65. <?php echo $this->feedByCategory ?>,
  66. {
  67. grid: {verticalLines: false, horizontalLines: false},
  68. pie: {explode: 2, show: true},
  69. xaxis: {showLabels: false},
  70. yaxis: {showLabels: false},
  71. mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}},
  72. legend: {container: document.getElementById('statsFeedPerCategoryLegend')}
  73. });
  74. // Entry per category
  75. Flotr.draw(document.getElementById('statsEntryPerCategory'),
  76. <?php echo $this->entryByCategory ?>,
  77. {
  78. grid: {verticalLines: false, horizontalLines: false},
  79. pie: {explode: 2, show: true},
  80. xaxis: {showLabels: false},
  81. yaxis: {showLabels: false},
  82. mouse: {relative: true, track: true, trackDecimals: 0, trackFormatter: function(obj) {return obj.y;}},
  83. legend: {container: document.getElementById('statsEntryPerCategoryLegend')}
  84. });
  85. </script>