summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <github@ainw.org> 2014-11-02 10:05:26 -0500
committerGravatar Alexis Degrugillier <github@ainw.org> 2014-11-02 10:05:26 -0500
commit960f86ba20fdf7320c957141a9983d17c7e521fa (patch)
treeef89206983c84f4bd91d1482bcbab0457384a632 /app/views
parent0eae6ef6b41085e83f7ad9f946cd9cb116542759 (diff)
Add a feature to hide articles when they are read
This is a new reading option to hide articles when they are read. The hidding process occurs when the article is left for an other article. This way, even when the article is marked as read on opening, it is hidden only while navigating to an other article. I'm not really happy with the behavior when the "mark while scrolling" option is enabled. Please review. It is missing the i18n since we're not supposed to push them before it exists on i18n.freshrss.org. Or maybe I misunderstood the process. See #476
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/reading.phtml10
-rw-r--r--app/views/helpers/javascript_vars.phtml1
2 files changed, 11 insertions, 0 deletions
diff --git a/app/views/configure/reading.phtml b/app/views/configure/reading.phtml
index b8f673466..0f7a3347a 100644
--- a/app/views/configure/reading.phtml
+++ b/app/views/configure/reading.phtml
@@ -116,6 +116,16 @@
</div>
<div class="form-group">
+ <div class="group-controls">
+ <label class="checkbox" for="auto_remove_article">
+ <input type="checkbox" name="auto_remove_article" id="auto_remove_article" value="1"<?php echo FreshRSS_Context::$conf->auto_remove_article ? ' checked="checked"' : ''; ?> />
+ <?php echo _t('auto_remove_article'); ?>
+ <noscript> — <strong><?php echo _t('javascript_should_be_activated'); ?></strong></noscript>
+ </label>
+ </div>
+ </div>
+
+ <div class="form-group">
<label class="group-name"><?php echo _t('auto_read_when'); ?></label>
<div class="group-controls">
<label class="checkbox" for="check_open_article">
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 8e9141d4e..6424d8d04 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -18,6 +18,7 @@ $url_logout = Minz_Url::display(array(
), 'php');
echo 'var context={',
+ 'auto_remove_article:', FreshRSS_Context::isAutoRemoveAvailable() ? 'true' : 'false', ',',
'hide_posts:', $hide_posts ? 'false' : 'true', ',',
'display_order:"', Minz_Request::param('order', FreshRSS_Context::$conf->sort_order), '",',
'auto_mark_article:', $mark['article'] ? 'true' : 'false', ',',