Procházet zdrojové kódy

Stats idle: hide empty periods

https://github.com/marienfressinaud/FreshRSS/commit/e507256d0bdebd02cf1fcd6fe1477cbac0b6934e#commitcomment-7119169
Alexandre Alapetite před 11 roky
rodič
revize
584665eed4
1 změnil soubory, kde provedl 8 přidání a 2 odebrání
  1. 8 2
      app/views/stats/idle.phtml

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

@@ -5,7 +5,10 @@
 
 	<h1><?php echo _t('stats_idle'); ?></h1>
 
-	<?php foreach ($this->idleFeeds as $period => $feeds) { ?>
+	<?php
+		foreach ($this->idleFeeds as $period => $feeds) {
+			if (!empty($feeds)) {
+	?>
 		<div class="stat">
 			<h2><?php echo _t($period); ?></h2>
 
@@ -15,5 +18,8 @@
 				<?php } ?>
 			</ul>
 		</div>
-	<?php } ?>
+	<?php
+			}
+		}
+	?>
 </div>