mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-04-04 06:35:40 -04:00
Refactor idle feed stats
This commit is contained in:
@@ -51,23 +51,23 @@ class FreshRSS_stats_Controller extends Minz_ActionController {
|
||||
continue;
|
||||
}
|
||||
if ($feedDate < $lastWeek) {
|
||||
$idleFeeds['lastWeek'][] = $feed['name'];
|
||||
$idleFeeds['last_week'][] = $feed['name'];
|
||||
}
|
||||
if ($feedDate < $lastMonth) {
|
||||
$idleFeeds['lastMonth'][] = $feed['name'];
|
||||
$idleFeeds['last_month'][] = $feed['name'];
|
||||
}
|
||||
if ($feedDate < $last3Month) {
|
||||
$idleFeeds['last3Month'][] = $feed['name'];
|
||||
$idleFeeds['last_3_month'][] = $feed['name'];
|
||||
}
|
||||
if ($feedDate < $last6Month) {
|
||||
$idleFeeds['last6Month'][] = $feed['name'];
|
||||
$idleFeeds['last_6_month'][] = $feed['name'];
|
||||
}
|
||||
if ($feedDate < $lastYear) {
|
||||
$idleFeeds['lastYear'][] = $feed['name'];
|
||||
$idleFeeds['last_year'][] = $feed['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->idleFeeds = $idleFeeds;
|
||||
$this->view->idleFeeds = array_reverse($idleFeeds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,53 +5,15 @@
|
||||
|
||||
<h1><?php echo Minz_Translate::t ('stats_idle'); ?></h1>
|
||||
|
||||
<div class="stat">
|
||||
<h2><?php echo Minz_Translate::t ('last_week'); ?></h2>
|
||||
<?php foreach ($this->idleFeeds as $period => $feeds): ?>
|
||||
<div class="stat">
|
||||
<h2><?php echo Minz_Translate::t ($period); ?></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>
|
||||
<ul>
|
||||
<?php foreach ($feeds as $feed): ?>
|
||||
<li><?php echo $feed; ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user