aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-25 14:06:34 +0100
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-01-25 14:06:34 +0100
commit2a6443a0f0f52272e1e3269d0c32f56322a9a3ec (patch)
treeeefeb8a1a3c6ab32426945b7edbb5e220979a02f /app
parenta7aa82b461ec2b35883ce4fb34e29e2b77717145 (diff)
Demande rafraîchissement page quand nvx articles
Ajout d'une indication pour rafraîchir la page si de nouveaux articles ont été détectés via le serveur Voir #379
Diffstat (limited to 'app')
-rw-r--r--app/i18n/en.php1
-rw-r--r--app/i18n/fr.php1
-rw-r--r--app/views/helpers/view/normal_view.phtml7
3 files changed, 9 insertions, 0 deletions
diff --git a/app/i18n/en.php b/app/i18n/en.php
index 683d7ca22..5d9b01f0b 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -241,6 +241,7 @@ return array (
'today' => 'Today',
'yesterday' => 'Yesterday',
'before_yesterday' => 'Before yesterday',
+ 'new_article' => 'There are new available articles, click to refresh the page.',
'by_author' => 'By <em>%s</em>',
'related_tags' => 'Related tags',
'no_feed_to_display' => 'There is no article to show.',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index c20bf98e7..fd2257c70 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -241,6 +241,7 @@ return array (
'today' => 'Aujourd’hui',
'yesterday' => 'Hier',
'before_yesterday' => 'À partir d’avant-hier',
+ 'new_article' => 'Il y a de nouveaux articles disponibles, cliquez pour rafraîchir la page.',
'by_author' => 'Par <em>%s</em>',
'related_tags' => 'Tags associés',
'no_feed_to_display' => 'Il n’y a aucun article à afficher.',
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index a1df87579..af5ff03fe 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -63,6 +63,13 @@ if (!empty($this->entries)) {
$display_others = false;
}
+ if ($this->entries[0]->id () === $item->id ()) {
+ ?><div id="new-article">
+ <a href="<?php echo _url(); ?>"><?php
+ echo Minz_Translate::t ('new_article');
+ ?></a></div><?php
+ }
+
?><div class="flux<?php echo !$item->isRead () ? ' not_read' : ''; ?><?php echo $item->isFavorite () ? ' favorite' : ''; ?>" id="flux_<?php echo $item->id (); ?>">
<ul class="horizontal-list flux_header"><?php
if ($this->loginOk) {