aboutsummaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorGravatar Alexis Degrugillier <aledeg@users.noreply.github.com> 2018-01-01 18:53:53 +0100
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-01-01 18:53:53 +0100
commite73fae159168b1ed9c0469e1d5bce55a3ef1f911 (patch)
tree29a7218bdb8643dc75496929407cc17d1e98f61e /app/views
parent568eccd3a87ea424c7a54fa616acb5750a2bb8ef (diff)
Add shortcuts to switch views (#1755)
Diffstat (limited to 'app/views')
-rw-r--r--app/views/configure/shortcut.phtml30
-rw-r--r--app/views/helpers/javascript_vars.phtml4
2 files changed, 34 insertions, 0 deletions
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index dceeb17de..66db6a5d4 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -17,6 +17,36 @@
<noscript><p class="alert alert-error"><?php echo _t('conf.shortcut.javascript'); ?></p></noscript>
+ <legend><?php echo _t('conf.shortcut.views'); ?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="normal_view_shortcut"><?php echo _t('conf.shortcut.normal_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="normal_view_shortcut" name="shortcuts[normal_view]" list="keys" value="<?php echo $s['normal_view']; ?>" data-leave-validation="<?php echo $s['normal_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="global_view_shortcut"><?php echo _t('conf.shortcut.global_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="global_view_shortcut" name="shortcuts[global_view]" list="keys" value="<?php echo $s['global_view']; ?>" data-leave-validation="<?php echo $s['global_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="reading_view_shortcut"><?php echo _t('conf.shortcut.reading_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="reading_view_shortcut" name="shortcuts[reading_view]" list="keys" value="<?php echo $s['reading_view']; ?>" data-leave-validation="<?php echo $s['reading_view']; ?>"/>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="rss_view_shortcut"><?php echo _t('conf.shortcut.rss_view'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="rss_view_shortcut" name="shortcuts[rss_view]" list="keys" value="<?php echo $s['rss_view']; ?>" data-leave-validation="<?php echo $s['rss_view']; ?>"/>
+ </div>
+ </div>
+
<legend><?php echo _t('conf.shortcut.navigation'); ?></legend>
<p class="alert alert-warn"><?php echo _t('conf.shortcut.navigation_help');?></p>
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 2da53b679..1b9b614d2 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -35,6 +35,10 @@ echo htmlspecialchars(json_encode(array(
'user_filter' => @$s['user_filter'],
'help' => @$s['help'],
'close_dropdown' => @$s['close_dropdown'],
+ 'normal_view' => @$s['normal_view'],
+ 'global_view' => @$s['global_view'],
+ 'reading_view' => @$s['reading_view'],
+ 'rss_view' => @$s['rss_view'],
),
'url' => array(
'index' => _url('index', 'index'),