aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Matt DeMoss <demoss.matt@gmail.com> 2018-02-19 09:36:18 -0500
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-02-19 15:36:18 +0100
commit0936a6cdb2005e325d3be98e42897eb7a42541c7 (patch)
tree328bac3a24a60c75e82428ea06f46a1df4799b5a
parentc79b8fb46e25cd513799224b83cb93282c3a8e26 (diff)
Option to hide nav_entries (#1764)
* put nav_entries in a div so they can be hidden, add config option, no labels yet * add English text for hide_nav_entries, choose better name * Update conf.php add comma to last item * hide nav_entries by optionally not rendering in normal.phtml * fix logic, remove containing div * apply phpcbf to ConfigurationSetter.php * Make navigation buttons options positive And add TODOs for i18n, and add default config.
-rwxr-xr-xapp/Controllers/configureController.php1
-rw-r--r--app/Models/ConfigurationSetter.php4
-rw-r--r--app/i18n/cz/conf.php1
-rw-r--r--app/i18n/de/conf.php1
-rw-r--r--app/i18n/en/conf.php1
-rwxr-xr-xapp/i18n/es/conf.php1
-rw-r--r--app/i18n/fr/conf.php1
-rw-r--r--app/i18n/he/conf.php1
-rw-r--r--app/i18n/it/conf.php1
-rw-r--r--app/i18n/kr/conf.php1
-rw-r--r--app/i18n/nl/conf.php1
-rw-r--r--app/i18n/pt-br/conf.php1
-rw-r--r--app/i18n/ru/conf.php1
-rw-r--r--app/i18n/tr/conf.php1
-rw-r--r--app/i18n/zh-cn/conf.php1
-rw-r--r--app/views/configure/display.phtml11
-rw-r--r--app/views/index/normal.phtml2
-rw-r--r--config-user.default.php1
18 files changed, 30 insertions, 2 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 2c7739c55..d34b5d59d 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -55,6 +55,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
FreshRSS_Context::$user_conf->bottomline_date = Minz_Request::param('bottomline_date', false);
FreshRSS_Context::$user_conf->bottomline_link = Minz_Request::param('bottomline_link', false);
FreshRSS_Context::$user_conf->html5_notif_timeout = Minz_Request::param('html5_notif_timeout', 0);
+ FreshRSS_Context::$user_conf->show_nav_buttons = Minz_Request::param('show_nav_buttons', false);
FreshRSS_Context::$user_conf->save();
Minz_Session::_param('language', FreshRSS_Context::$user_conf->language);
diff --git a/app/Models/ConfigurationSetter.php b/app/Models/ConfigurationSetter.php
index 645ef644e..ad703dfc5 100644
--- a/app/Models/ConfigurationSetter.php
+++ b/app/Models/ConfigurationSetter.php
@@ -184,6 +184,10 @@ class FreshRSS_ConfigurationSetter {
$data['mark_updated_article_unread'] = $this->handleBool($value);
}
+ private function _show_nav_buttons(&$data, $value) {
+ $data['show_nav_buttons'] = $this->handleBool($value);
+ }
+
private function _display_categories(&$data, $value) {
$data['display_categories'] = $this->handleBool($value);
}
diff --git a/app/i18n/cz/conf.php b/app/i18n/cz/conf.php
index 8193b9575..649724e80 100644
--- a/app/i18n/cz/conf.php
+++ b/app/i18n/cz/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Bez limitu',
'thin' => 'Tenká',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Uživatelské dotazy',
diff --git a/app/i18n/de/conf.php b/app/i18n/de/conf.php
index 86c738dd1..9f1edffb9 100644
--- a/app/i18n/de/conf.php
+++ b/app/i18n/de/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Keine Begrenzung',
'thin' => 'Klein',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Benutzerabfragen',
diff --git a/app/i18n/en/conf.php b/app/i18n/en/conf.php
index 5e3b723fe..60231b825 100644
--- a/app/i18n/en/conf.php
+++ b/app/i18n/en/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'No limit',
'thin' => 'Thin',
),
+ 'show_nav_buttons' => 'Show the navigation buttons',
),
'query' => array(
'_' => 'User queries',
diff --git a/app/i18n/es/conf.php b/app/i18n/es/conf.php
index 2d9a476cb..65858fefe 100755
--- a/app/i18n/es/conf.php
+++ b/app/i18n/es/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Sin límite',
'thin' => 'Estrecho',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Consultas de usuario',
diff --git a/app/i18n/fr/conf.php b/app/i18n/fr/conf.php
index b126a77c9..b4c39e1ca 100644
--- a/app/i18n/fr/conf.php
+++ b/app/i18n/fr/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Pas de limite',
'thin' => 'Fine',
),
+ 'show_nav_buttons' => 'Afficher les boutons de navigation',
),
'query' => array(
'_' => 'Filtres utilisateurs',
diff --git a/app/i18n/he/conf.php b/app/i18n/he/conf.php
index 0dd277d78..50d1936a8 100644
--- a/app/i18n/he/conf.php
+++ b/app/i18n/he/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'ללא הגבלה',
'thin' => 'צר',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'שאילתות',
diff --git a/app/i18n/it/conf.php b/app/i18n/it/conf.php
index 25cfbb7bf..9e20236f1 100644
--- a/app/i18n/it/conf.php
+++ b/app/i18n/it/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Nessun limite',
'thin' => 'Stretto',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Ricerche personali',
diff --git a/app/i18n/kr/conf.php b/app/i18n/kr/conf.php
index dbd902062..31b042f57 100644
--- a/app/i18n/kr/conf.php
+++ b/app/i18n/kr/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => '제한 없음',
'thin' => '얇음',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => '사용자 쿼리',
diff --git a/app/i18n/nl/conf.php b/app/i18n/nl/conf.php
index 0d1d9b70d..360e1c5e7 100644
--- a/app/i18n/nl/conf.php
+++ b/app/i18n/nl/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Geen limiet',
'thin' => 'Smal',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Gebruikers queries (informatie aanvragen)',
diff --git a/app/i18n/pt-br/conf.php b/app/i18n/pt-br/conf.php
index a5a0a9197..71b6afb20 100644
--- a/app/i18n/pt-br/conf.php
+++ b/app/i18n/pt-br/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Sem lmite',
'thin' => 'Fino',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Queries do usuário',
diff --git a/app/i18n/ru/conf.php b/app/i18n/ru/conf.php
index 0265ede9c..15109dd15 100644
--- a/app/i18n/ru/conf.php
+++ b/app/i18n/ru/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'No limit',
'thin' => 'Thin',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'User queries',
diff --git a/app/i18n/tr/conf.php b/app/i18n/tr/conf.php
index 424c030c5..596adaf9a 100644
--- a/app/i18n/tr/conf.php
+++ b/app/i18n/tr/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => 'Sınırsız',
'thin' => 'Zayıf',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => 'Kullanıcı sorguları',
diff --git a/app/i18n/zh-cn/conf.php b/app/i18n/zh-cn/conf.php
index 599f42234..2e068be42 100644
--- a/app/i18n/zh-cn/conf.php
+++ b/app/i18n/zh-cn/conf.php
@@ -37,6 +37,7 @@ return array(
'no_limit' => '无限制',
'thin' => '小',
),
+ 'show_nav_buttons' => 'Show the navigation buttons', //TODO
),
'query' => array(
'_' => '自定义查询',
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml
index 62ecc1080..414fd2cd6 100644
--- a/app/views/configure/display.phtml
+++ b/app/views/configure/display.phtml
@@ -106,7 +106,7 @@
</tbody>
</table><br />
</div>
-
+
<div class="form-group">
<label class="group-name" for="html5_notif_timeout"><?php echo _t('conf.display.notif_html5.timeout'); ?></label>
<div class="group-controls">
@@ -114,6 +114,15 @@
</div>
</div>
+ <div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="show_nav_buttons">
+ <input type="checkbox" name="show_nav_buttons" id="show_nav_buttons" value="1"<?php echo FreshRSS_Context::$user_conf->show_nav_buttons ? ' checked="checked"' : ''; ?> data-leave-validation="<?php echo FreshRSS_Context::$user_conf->show_nav_buttons; ?>"/>
+ <?php echo _t('conf.display.show_nav_buttons'); ?>
+ </label>
+ </div>
+ </div>
+
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml
index ba48b2501..c7cab2d3f 100644
--- a/app/views/index/normal.phtml
+++ b/app/views/index/normal.phtml
@@ -83,7 +83,7 @@ if (!empty($this->entries)) {
$this->renderHelper('pagination');
?></div>
-<?php $this->partial('nav_entries'); ?>
+<?php if (FreshRSS_Context::$user_conf->show_nav_buttons) $this->partial('nav_entries'); ?>
<?php } else { ?>
<div id="stream" class="prompt alert alert-warn normal">
diff --git a/config-user.default.php b/config-user.default.php
index 2e4a96239..5e67d8d9b 100644
--- a/config-user.default.php
+++ b/config-user.default.php
@@ -76,5 +76,6 @@ return array (
'queries' => array (
),
'html5_notif_timeout' => 0,
+ 'show_nav_buttons' => true,
'extensions_enabled' => array(),
);