A free, self-hostable news aggregator…
Add an information message when a feed is empty
Marien Fressinaud6f693afe99fd
diff --git a/app/i18n/en.php b/app/i18n/en.phpindex 66386f0ed..af051673d 100644--- a/app/i18n/en.php+++ b/app/i18n/en.php@@ -142,7 +142,9 @@ return array ('or' => 'or','informations' => 'Information',+ 'damn' => 'Damn!','feed_in_error' => 'This feed has encountered a problem. Please verify that it is always reachable then actualize it.',+ 'feed_empty' => 'This feed is empty. Please verify that it is still maintained.','feed_description' => 'Description','website_url' => 'Website URL','feed_url' => 'Feed URL',diff --git a/app/i18n/fr.php b/app/i18n/fr.phpindex edf2fb19f..5dc184aa3 100644--- a/app/i18n/fr.php+++ b/app/i18n/fr.php@@ -142,7 +142,9 @@ return array ('or' => 'ou','informations' => 'Informations',+ 'damn' => 'Arf !','feed_in_error' => 'Ce flux a rencontré un problème. Veuillez vérifier qu’il est toujours accessible puis actualisez-le.',+ 'feed_empty' => 'Ce flux est vide. Veuillez vérifier qu’il est toujours maintenu.','feed_description' => 'Description','website_url' => 'URL du site','feed_url' => 'URL du flux',diff --git a/app/views/configure/feed.phtml b/app/views/configure/feed.phtmlindex 138808a9f..2da04ac2d 100644--- a/app/views/configure/feed.phtml+++ b/app/views/configure/feed.phtml@@ -7,8 +7,12 @@<h1><?php echo $this->flux->name (); ?></h1><?php echo $this->flux->description (); ?>+ <?php $nbEntries = $this->flux->nbEntries (); ?>+<?php if ($this->flux->inError ()) { ?><p class="alert alert-error"><span class="alert-head"><?php echo Minz_Translate::t ('damn'); ?></span> <?php echo Minz_Translate::t ('feed_in_error'); ?></p>+ <?php } elseif ($nbEntries === 0) { ?>+ <p class="alert alert-warn"><?php echo Minz_Translate::t ('feed_empty'); ?></p><?php } ?><form method="post" action="<?php echo _url ('configure', 'feed', 'id', $this->flux->id ()); ?>" autocomplete="off">@@ -81,7 +85,7 @@<div class="form-group"><label class="group-name"><?php echo Minz_Translate::t ('number_articles'); ?></label><div class="group-controls">- <span class="control"><?php echo $this->flux->nbEntries (); ?></span>+ <span class="control"><?php echo $nbEntries; ?></span></div></div><div class="form-group">