diff options
| author | 2014-02-11 23:17:44 +0100 | |
|---|---|---|
| committer | 2014-02-11 23:17:44 +0100 | |
| commit | 6f693afe99fdd236484e157ee491c0a6c92a8219 (patch) | |
| tree | 4f8fe5b99d1266211b7a67be6808443e381a5dce | |
| parent | 4419df1da4f5b7199ece4f51f2e4da66f976616e (diff) | |
Add an information message when a feed is empty
| -rw-r--r-- | app/i18n/en.php | 2 | ||||
| -rw-r--r-- | app/i18n/fr.php | 2 | ||||
| -rw-r--r-- | app/views/configure/feed.phtml | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/app/i18n/en.php b/app/i18n/en.php index 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.php index 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.phtml index 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"> |
