aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-06-13 01:00:27 -0400
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-06-15 12:05:21 -0400
commit181fcd98893f65a2c5159158fbfc022b4661ea13 (patch)
tree62769146e342a71e3f3f5b49232061a613e23f4c /app/views
parent09602acc5f754c3e814b4b7de9d9d4d283ed45ff (diff)
Refactor statistics
I made a new controller to handle statistics. The old statistics have been moved in that controller and a new action has been added to display idle feeds. I also added a menu in the left panel to navigate between the statistics pages. See #90
Diffstat (limited to 'app/views')
-rw-r--r--app/views/stats/idle.phtml57
-rw-r--r--app/views/stats/main.phtml (renamed from app/views/index/stats.phtml)12
2 files changed, 64 insertions, 5 deletions
diff --git a/app/views/stats/idle.phtml b/app/views/stats/idle.phtml
new file mode 100644
index 000000000..5c11b3f86
--- /dev/null
+++ b/app/views/stats/idle.phtml
@@ -0,0 +1,57 @@
+<?php $this->partial('aside_stats'); ?>
+
+<div class="post content">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo Minz_Translate::t ('stats_idle'); ?></h1>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('last_week'); ?></h2>
+
+ <ul>
+ <?php foreach ($this->idleFeeds['lastWeek'] as $feed): ?>
+ <li><?php echo $feed; ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('last_month'); ?></h2>
+
+ <ul>
+ <?php foreach ($this->idleFeeds['lastMonth'] as $feed): ?>
+ <li><?php echo $feed; ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('last_3_month'); ?></h2>
+
+ <ul>
+ <?php foreach ($this->idleFeeds['last3Month'] as $feed): ?>
+ <li><?php echo $feed; ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('last_6_month'); ?></h2>
+
+ <ul>
+ <?php foreach ($this->idleFeeds['last6Month'] as $feed): ?>
+ <li><?php echo $feed; ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+
+ <div class="stat">
+ <h2><?php echo Minz_Translate::t ('last_year'); ?></h2>
+
+ <ul>
+ <?php foreach ($this->idleFeeds['lastYear'] as $feed): ?>
+ <li><?php echo $feed; ?></li>
+ <?php endforeach; ?>
+ </ul>
+ </div>
+</div> \ No newline at end of file
diff --git a/app/views/index/stats.phtml b/app/views/stats/main.phtml
index b5c18813d..fe372e221 100644
--- a/app/views/index/stats.phtml
+++ b/app/views/stats/main.phtml
@@ -1,9 +1,11 @@
+<?php $this->partial('aside_stats'); ?>
+
<div class="post content">
- <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
-
- <h1><?php echo Minz_Translate::t ('stats'); ?></h1>
-
- <div class="stat">
+ <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
+
+ <h1><?php echo Minz_Translate::t ('stats_main'); ?></h1>
+
+ <div class="stat">
<h2><?php echo Minz_Translate::t ('stats_entry_repartition'); ?></h2>
<table>
<thead>