Prechádzať zdrojové kódy

Add a message if there is no idle feed (stats)

Marien Fressinaud 11 rokov pred
rodič
commit
921dd88e64
3 zmenil súbory, kde vykonal 10 pridanie a 0 odobranie
  1. 1 0
      app/i18n/en.php
  2. 1 0
      app/i18n/fr.php
  3. 8 0
      app/views/stats/idle.phtml

+ 1 - 0
app/i18n/en.php

@@ -431,6 +431,7 @@ return array (
 	'stats_entry_per_category'	=> 'Entries per category',
 	'stats_top_feed'		=> 'Top ten feeds',
 	'stats_entry_count'		=> 'Entry count',
+	'stats_no_idle'			=> 'There is no idle feed!',
 
 	'update'			=> 'Update',
 	'update_system'			=> 'Update system',

+ 1 - 0
app/i18n/fr.php

@@ -431,6 +431,7 @@ return array (
 	'stats_entry_per_category'	=> 'Articles par catégorie',
 	'stats_top_feed'		=> 'Les dix plus gros flux',
 	'stats_entry_count'		=> 'Nombre d’articles',
+	'stats_no_idle'			=> 'Il n’a aucun flux inactif !',
 
 	'update'			=> 'Mise à jour',
 	'update_system'			=> 'Système de mise à jour',

+ 8 - 0
app/views/stats/idle.phtml

@@ -6,8 +6,10 @@
 	<h1><?php echo _t('stats_idle'); ?></h1>
 
 	<?php
+		$nothing = true;
 		foreach ($this->idleFeeds as $period => $feeds) {
 			if (!empty($feeds)) {
+				$nothing = false;
 	?>
 		<div class="stat">
 			<h2><?php echo _t($period); ?></h2>
@@ -32,5 +34,11 @@
 	<?php
 			}
 		}
+
+		if ($nothing) {
 	?>
+	<p class="alert alert-warn">
+		<span class="alert-head"><?php echo _t('stats_no_idle'); ?></span>
+	</p>
+	<?php } ?>
 </div>