Procházet zdrojové kódy

Improve "no feed to display" box

Marien Fressinaud před 11 roky
rodič
revize
64b3d140f6

+ 1 - 1
app/i18n/de.php

@@ -169,7 +169,7 @@ return array (
 	'not_yet_implemented'		=> 'Noch nicht implementiert',
 	'access_protected_feeds'	=> 'Die Verbindung erlaubt Zugriff zu HTTP-geschützten RSS Feeds',
 	'no_selected_feed'		=> 'Kein Feed ausgewählt.',
-	'think_to_add'			=> '<a href="./?c=configure&amp;a=feed">Sie k&ouml;nnen Feeds hinzuf&uuml;gen</a>.',
+	'think_to_add'			=> 'Sie k&ouml;nnen Feeds hinzuf&uuml;gen.',
 
 	'current_user'			=> 'Aktuelle Nutzung',
 	'default_user'			=> 'Nutzername des Standardnutzers <small>(maximal 16 Zeichen - alphanumerisch)</small>',

+ 1 - 1
app/i18n/en.php

@@ -237,7 +237,7 @@ return array (
 	'not_yet_implemented'		=> 'Not yet implemented',
 	'access_protected_feeds'	=> 'Connection allows to access HTTP protected RSS feeds',
 	'no_selected_feed'		=> 'No feed selected.',
-	'think_to_add'			=> '<a href="./?c=configure&amp;a=feed">You may add some feeds</a>.',
+	'think_to_add'			=> 'You may add some feeds.',
 
 	'current_user'			=> 'Current user',
 	'default_user'			=> 'Username of the default user <small>(maximum 16 alphanumeric characters)</small>',

+ 1 - 1
app/i18n/fr.php

@@ -237,7 +237,7 @@ return array (
 	'not_yet_implemented'		=> 'Pas encore implémenté',
 	'access_protected_feeds'	=> 'La connexion permet d’accéder aux flux protégés par une authentification HTTP.',
 	'no_selected_feed'		=> 'Aucun flux sélectionné.',
-	'think_to_add'			=> '<a href="./?c=configure&amp;a=feed">Vous pouvez ajouter des flux</a>.',
+	'think_to_add'			=> 'Vous pouvez ajouter des flux.',
 
 	'current_user'			=> 'Utilisateur actuel',
 	'password_form'			=> 'Mot de passe<br /><small>(pour connexion par formulaire)</small>',

+ 8 - 0
app/views/helpers/view/global_view.phtml

@@ -1,5 +1,6 @@
 <?php $this->partial ('nav_menu'); ?>
 
+<?php if (!empty($this->entries)) { ?>
 <div id="stream" class="global categories">
 <?php
 	$arUrl = array('c' => 'index', 'a' => 'index', 'params' => array());
@@ -43,3 +44,10 @@
 <div id="panel"<?php echo $this->conf->display_posts ? '' : ' class="hide_posts"'; ?>>
 	<a class="close" href="#"><?php echo FreshRSS_Themes::icon('close'); ?></a>
 </div>
+
+<?php } else { ?>
+<div class="prompt alert alert-warn">
+	<h2><?php echo _t('no_feed_to_display'); ?></h2>
+	<a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
+</div>
+<?php } ?>

+ 3 - 3
app/views/helpers/view/normal_view.phtml

@@ -183,8 +183,8 @@ if (!empty($this->entries)) {
 <?php $this->partial ('nav_entries'); ?>
 
 <?php } else { ?>
-<div id="stream" class="alert alert-warn normal">
-	<span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
-	<?php echo Minz_Translate::t ('think_to_add'); ?>
+<div class="prompt alert alert-warn">
+	<h2><?php echo _t('no_feed_to_display'); ?></h2>
+	<a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
 </div>
 <?php } ?>

+ 3 - 3
app/views/helpers/view/reader_view.phtml

@@ -37,8 +37,8 @@ if (!empty($this->entries)) {
 </div>
 
 <?php } else { ?>
-<div id="stream" class="alert alert-warn reader">
-	<span class="alert-head"><?php echo Minz_Translate::t ('no_feed_to_display'); ?></span>
-	<?php echo Minz_Translate::t ('think_to_add'); ?>
+<div class="prompt alert alert-warn">
+	<h2><?php echo _t('no_feed_to_display'); ?></h2>
+	<a href="<?php echo _url('configure', 'feed'); ?>"><?php echo _t('think_to_add'); ?></a><br /><br />
 </div>
 <?php } ?>