aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers
diff options
context:
space:
mode:
authorGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-26 14:50:33 +0200
committerGravatar Marien Fressinaud <dev@marienfressinaud.fr> 2014-09-26 14:50:33 +0200
commitf0fb1fbb07347d3a2fd7b853bff1f91807cd2d89 (patch)
tree4566beb83704d5b2bbcb128749da042cdaa4e619 /app/views/helpers
parent94ad9cf073962d9ff8076ef8e0db35e513d565a7 (diff)
parentc14162221365077bcaeecde7127806190490dd58 (diff)
Merge branch 'dev' into beta
Diffstat (limited to 'app/views/helpers')
-rw-r--r--app/views/helpers/javascript_vars.phtml11
-rwxr-xr-xapp/views/helpers/pagination.phtml41
-rw-r--r--app/views/helpers/view/global_view.phtml8
-rw-r--r--app/views/helpers/view/normal_view.phtml6
-rw-r--r--app/views/helpers/view/reader_view.phtml6
5 files changed, 48 insertions, 24 deletions
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 7144c519a..1139eb446 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -4,7 +4,8 @@ echo '"use strict";', "\n";
$mark = $this->conf->mark_when;
echo 'var ',
- 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
+ 'help_url="', FRESHRSS_WIKI, '"',
+ ',hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true',
',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"',
',auto_mark_article=', $mark['article'] ? 'true' : 'false',
',auto_mark_site=', $mark['site'] ? 'true' : 'false',
@@ -25,7 +26,9 @@ echo ',shortcuts={',
'collapse_entry:"', $s['collapse_entry'], '",',
'load_more:"', $s['load_more'], '",',
'auto_share:"', $s['auto_share'], '",',
- 'focus_search:"', $s['focus_search'], '"',
+ 'focus_search:"', $s['focus_search'], '",',
+ 'user_filter:"', $s['user_filter'], '",',
+ 'help:"', $s['help'], '"',
"},\n";
if (Minz_Request::param ('output') === 'global') {
@@ -48,9 +51,11 @@ echo 'authType="', $authType, '",',
'url_login="', _url ('index', 'login'), '",',
'url_logout="', _url ('index', 'logout'), '",';
-echo 'str_confirmation="', Minz_Translate::t('confirm_action'), '"', ",\n";
+echo 'str_confirmation_default="', Minz_Translate::t('confirm_action'), '"', ",\n";
echo 'str_notif_title_articles="', Minz_Translate::t('notif_title_new_articles'), '"', ",\n";
echo 'str_notif_body_articles="', Minz_Translate::t('notif_body_new_articles'), '"', ",\n";
+echo 'html5_notif_timeout=', $this->conf->html5_notif_timeout,",\n";
+
$autoActualise = Minz_Session::param('actualize_feeds', false);
echo 'auto_actualize_feeds=', $autoActualise ? 'true' : 'false', ";\n";
diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml
index f237e1f3e..cea338364 100755
--- a/app/views/helpers/pagination.phtml
+++ b/app/views/helpers/pagination.phtml
@@ -1,26 +1,37 @@
<?php
- $c = Minz_Request::controllerName ();
- $a = Minz_Request::actionName ();
- $params = Minz_Request::params ();
- $markReadUrl = Minz_Session::param ('markReadUrl');
- Minz_Session::_param ('markReadUrl', false);
+ $c = Minz_Request::controllerName();
+ $a = Minz_Request::actionName();
+ $params = Minz_Request::params();
+ $markReadUrl = Minz_Session::param('markReadUrl');
+ Minz_Session::_param('markReadUrl', false);
?>
+<form id="mark-read-pagination" method="post" style="display: none"></form>
+
<ul class="pagination">
<li class="item pager-next">
<?php if (!empty($this->nextId)) { ?>
- <?php $params['next'] = $this->nextId; ?>
- <a id="load_more" href="<?php echo Minz_Url::display (array ('c' => $c, 'a' => $a, 'params' => $params)); ?>"><?php echo Minz_Translate::t ('load_more'); ?></a>
+ <?php
+ $params['next'] = $this->nextId;
+ $params['ajax'] = 1;
+ ?>
+ <a id="load_more" href="<?php echo Minz_Url::display(array('c' => $c, 'a' => $a, 'params' => $params)); ?>">
+ <?php echo _t('load_more'); ?>
+ </a>
<?php } elseif ($markReadUrl) { ?>
- <a id="bigMarkAsRead" href="<?php echo $markReadUrl; ?>"<?php if ($this->conf->reading_confirm) { echo ' class="confirm"';} ?>>
- <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
- <span class="bigTick">✓</span><br />
- <?php echo Minz_Translate::t ('mark_all_read'); ?>
- </a>
+ <button id="bigMarkAsRead"
+ class="as-link <?php echo $this->conf->reading_confirm ? 'confirm' : ''; ?>"
+ form="mark-read-pagination"
+ formaction="<?php echo $markReadUrl; ?>"
+ type="submit">
+ <?php echo _t('nothing_to_load'); ?><br />
+ <span class="bigTick">✓</span><br />
+ <?php echo _t('mark_all_read'); ?>
+ </button>
<?php } else { ?>
- <a id="bigMarkAsRead" href=".">
- <?php echo Minz_Translate::t ('nothing_to_load'); ?><br />
- </a>
+ <a id="bigMarkAsRead" href=".">
+ <?php echo _t('nothing_to_load'); ?><br />
+ </a>
<?php } ?>
</li>
</ul>
diff --git a/app/views/helpers/view/global_view.phtml b/app/views/helpers/view/global_view.phtml
index db937eeae..72bcf4c73 100644
--- a/app/views/helpers/view/global_view.phtml
+++ b/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 id="stream" class="prompt alert alert-warn global">
+ <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 } ?>
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index 87bf2e22a..1dbf14f4c 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/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 id="stream" class="prompt alert alert-warn normal">
+ <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 } ?>
diff --git a/app/views/helpers/view/reader_view.phtml b/app/views/helpers/view/reader_view.phtml
index 665f72849..c80dca519 100644
--- a/app/views/helpers/view/reader_view.phtml
+++ b/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 id="stream" class="prompt alert alert-warn reader">
+ <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 } ?>