diff options
| author | 2014-02-24 19:51:57 -0500 | |
|---|---|---|
| committer | 2014-02-24 19:51:57 -0500 | |
| commit | 1e105a64ab12b37f55b605a89e869f7bbb520e95 (patch) | |
| tree | 24d3161f22e616b40da5e58a6f2cc20fc6533405 /app/views | |
| parent | 166009f3623213249086038f7af72a76507f60dc (diff) | |
Add a configuration option to get sticky articles
Now the user can choose if an opened article will be repositioned to the top or not
See #338
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/configure/display.phtml | 10 | ||||
| -rw-r--r-- | app/views/helpers/javascript_vars.phtml | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/app/views/configure/display.phtml b/app/views/configure/display.phtml index 9104e4ef1..846db4b4c 100644 --- a/app/views/configure/display.phtml +++ b/app/views/configure/display.phtml @@ -111,6 +111,16 @@ </div> <div class="form-group"> + <div class="group-controls"> + <label class="checkbox" for="sticky_post"> + <input type="checkbox" name="sticky_post" id="sticky_post" value="1"<?php echo $this->conf->sticky_post ? ' checked="checked"' : ''; ?> /> + <?php echo Minz_Translate::t ('sticky_post'); ?> + <noscript> — <strong><?php echo Minz_Translate::t ('javascript_should_be_activated'); ?></strong></noscript> + </label> + </div> + </div> + + <div class="form-group"> <label class="group-name"><?php echo Minz_Translate::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 afe0ab258..2ce11d7d7 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -11,7 +11,8 @@ echo 'var ', ',auto_mark_scroll=', $mark['scroll'] ? 'true' : 'false', ',auto_load_more=', $this->conf->auto_load_more ? 'true' : 'false', ',full_lazyload=', $this->conf->lazyload && ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'true' : 'false', - ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false'; + ',does_lazyload=', $this->conf->lazyload ? 'true' : 'false', + ',sticky_post=', $this->conf->sticky_post ? 'true' : 'false'; $s = $this->conf->shortcuts; echo ',shortcuts={', |
