aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-02-04 23:28:02 -0800
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2014-02-04 23:28:02 -0800
commita2c64ad89659c1d1332b76649ae3db0a208fd449 (patch)
tree184cc532e1a95c58d4160009ec871701da35a805 /app
parent575d0002cc3839760f0a389eb4af8cd7d23b74c6 (diff)
parentbeceedd87819fd67f3cd81e65ba981c202ba2cd4 (diff)
Merge pull request #408 from aledeg/shortcuts
Modification des raccourcis
Diffstat (limited to 'app')
-rwxr-xr-xapp/Controllers/configureController.php2
-rw-r--r--app/Models/Configuration.php2
-rw-r--r--app/i18n/en.php15
-rw-r--r--app/i18n/fr.php15
-rw-r--r--app/views/configure/shortcut.phtml55
-rw-r--r--app/views/helpers/javascript_vars.phtml2
-rw-r--r--app/views/helpers/view/normal_view.phtml16
7 files changed, 71 insertions, 36 deletions
diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php
index 645f9eabf..a5d99c508 100755
--- a/app/Controllers/configureController.php
+++ b/app/Controllers/configureController.php
@@ -286,7 +286,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
public function shortcutAction () {
$list_keys = array ('a', 'b', 'backspace', 'c', 'd', 'delete', 'down', 'e', 'end', 'enter',
- 'escape', 'f', 'g', 'h', 'i', 'insert', 'j', 'k', 'l', 'left',
+ 'escape', 'f', 'g', 'h', 'home', 'i', 'insert', 'j', 'k', 'l', 'left',
'm', 'n', 'o', 'p', 'page_down', 'page_up', 'q', 'r', 'return', 'right',
's', 'space', 't', 'tab', 'u', 'up', 'v', 'w', 'x', 'y',
'z', '0', '1', '2', '3', '4', '5', '6', '7', '8',
diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php
index 2a7fe95aa..2b719c370 100644
--- a/app/Models/Configuration.php
+++ b/app/Models/Configuration.php
@@ -32,6 +32,8 @@ class FreshRSS_Configuration {
'go_website' => 'space',
'next_entry' => 'j',
'prev_entry' => 'k',
+ 'first_entry' => 'home',
+ 'last_entry' => 'end',
'collapse_entry' => 'c',
'load_more' => 'm',
'auto_share' => 's',
diff --git a/app/i18n/en.php b/app/i18n/en.php
index a2cc461c5..66386f0ed 100644
--- a/app/i18n/en.php
+++ b/app/i18n/en.php
@@ -78,6 +78,10 @@ return array (
'bad_opml_file' => 'Your OPML file is invalid',
'shortcuts_updated' => 'Shortcuts have been updated',
'shortcuts_management' => 'Shortcuts management',
+ 'shortcuts_navigation' => 'Navigation',
+ 'shortcuts_navigation_help' => 'With the "Shift" modifier, navigation shortcuts apply on feeds.<br/>With the "Ctrl" modifier, navigation shortcuts apply on categories.',
+ 'shortcuts_article_action' => 'Article actions',
+ 'shortcuts_other_action' => 'Other actions',
'feeds_marked_read' => 'Feeds have been marked as read',
'updated' => 'Modifications have been updated',
@@ -121,15 +125,16 @@ return array (
'javascript_for_shortcuts' => 'JavaScript must be enabled in order to use shortcuts',
'javascript_should_be_activated'=> 'JavaScript must be enabled',
'shift_for_all_read' => '+ <code>shift</code> to mark all articles as read',
- 'see_on_website' => 'See article on its original website',
+ 'see_on_website' => 'See on original website',
'next_article' => 'Skip to the next article',
- 'shift_for_last' => '+ <code>shift</code> to skip to the last article of page',
+ 'last_article' => 'Skip to the last article',
'previous_article' => 'Skip to the previous article',
- 'shift_for_first' => '+ <code>shift</code> to skip to the first article of page',
+ 'first_article' => 'Skip to the first article',
'next_page' => 'Skip to the next page',
'previous_page' => 'Skip to the previous page',
- 'collapse_article' => 'Collapse current article',
- 'auto_share' => 'Share current article',
+ 'collapse_article' => 'Collapse',
+ 'auto_share' => 'Share',
+ 'auto_share_help' => 'If there is only one sharing mode, it is used. Else modes are accessible by their number.',
'file_to_import' => 'File to import',
'import' => 'Import',
diff --git a/app/i18n/fr.php b/app/i18n/fr.php
index 9ab06ba26..edf2fb19f 100644
--- a/app/i18n/fr.php
+++ b/app/i18n/fr.php
@@ -78,6 +78,10 @@ return array (
'bad_opml_file' => 'Votre fichier OPML n’est pas valide',
'shortcuts_updated' => 'Les raccourcis ont été mis à jour',
'shortcuts_management' => 'Gestion des raccourcis',
+ 'shortcuts_navigation' => 'Navigation',
+ 'shortcuts_navigation_help' => 'Avec le modificateur "Shift", les raccourcis de navigation s’appliquent aux flux.<br/>Avec le modificateur "Ctrl", les raccourcis de navigation s’appliquent aux catégories.',
+ 'shortcuts_article_action' => 'Actions associées à l’article courant',
+ 'shortcuts_other_action' => 'Autres actions',
'feeds_marked_read' => 'Les flux ont été marqués comme lus',
'updated' => 'Modifications enregistrées',
@@ -121,15 +125,16 @@ return array (
'javascript_for_shortcuts' => 'Le JavaScript doit être activé pour pouvoir profiter des raccourcis',
'javascript_should_be_activated'=> 'Le JavaScript doit être activé',
'shift_for_all_read' => '+ <code>shift</code> pour marquer tous les articles comme lus',
- 'see_on_website' => 'Voir l’article sur le site d’origine',
+ 'see_on_website' => 'Voir sur le site d’origine',
'next_article' => 'Passer à l’article suivant',
- 'shift_for_last' => '+ <code>shift</code> pour passer au dernier article de la page',
+ 'last_article' => 'Passer au dernier article',
'previous_article' => 'Passer à l’article précédent',
- 'shift_for_first' => '+ <code>shift</code> pour passer au premier article de la page',
+ 'first_article' => 'Passer au premier article',
'next_page' => 'Passer à la page suivante',
'previous_page' => 'Passer à la page précédente',
- 'collapse_article' => 'Refermer l’article courant',
- 'auto_share' => 'Partager l’article courant',
+ 'collapse_article' => 'Refermer',
+ 'auto_share' => 'Partager',
+ 'auto_share_help' => 'Si il n’y a qu’un mode de partage, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.',
'file_to_import' => 'Fichier à importer',
'import' => 'Importer',
diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml
index b0867f711..748a65d17 100644
--- a/app/views/configure/shortcut.phtml
+++ b/app/views/configure/shortcut.phtml
@@ -16,55 +16,59 @@
<noscript><p class="alert alert-error"><?php echo Minz_Translate::t ('javascript_for_shortcuts'); ?></p></noscript>
+ <legend><?php echo Minz_Translate::t ('shortcuts_navigation'); ?></legend>
+
<div class="form-group">
- <label class="group-name" for="mark_read"><?php echo Minz_Translate::t ('mark_read'); ?></label>
+ <label class="group-name" for="next_entry"><?php echo Minz_Translate::t ('next_article'); ?></label>
<div class="group-controls">
- <input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?php echo $s['mark_read']; ?>" />
- <?php echo Minz_Translate::t ('shift_for_all_read'); ?>
+ <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="mark_favorite"><?php echo Minz_Translate::t ('mark_favorite'); ?></label>
+ <label class="group-name" for="prev_entry"><?php echo Minz_Translate::t ('previous_article'); ?></label>
<div class="group-controls">
- <input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?php echo $s['mark_favorite']; ?>" />
+ <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="go_website"><?php echo Minz_Translate::t ('see_on_website'); ?></label>
+ <label class="group-name" for="first_entry"><?php echo Minz_Translate::t ('first_article'); ?></label>
<div class="group-controls">
- <input type="text" id="go_website" name="shortcuts[go_website]" list="keys" value="<?php echo $s['go_website']; ?>" />
+ <input type="text" id="first_entry" name="shortcuts[first_entry]" list="keys" value="<?php echo $s['first_entry']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="next_entry"><?php echo Minz_Translate::t ('next_article'); ?></label>
+ <label class="group-name" for="last_entry"><?php echo Minz_Translate::t ('last_article'); ?></label>
<div class="group-controls">
- <input type="text" id="next_entry" name="shortcuts[next_entry]" list="keys" value="<?php echo $s['next_entry']; ?>" />
- <?php echo Minz_Translate::t ('shift_for_last'); ?>
+ <input type="text" id="last_entry" name="shortcuts[last_entry]" list="keys" value="<?php echo $s['last_entry']; ?>" />
</div>
</div>
+ <div><?php echo Minz_Translate::t ('shortcuts_navigation_help');?></div>
+
+ <legend><?php echo Minz_Translate::t ('shortcuts_article_action');?></legend>
+
<div class="form-group">
- <label class="group-name" for="prev_entry"><?php echo Minz_Translate::t ('previous_article'); ?></label>
+ <label class="group-name" for="mark_read"><?php echo Minz_Translate::t ('mark_read'); ?></label>
<div class="group-controls">
- <input type="text" id="prev_entry" name="shortcuts[prev_entry]" list="keys" value="<?php echo $s['prev_entry']; ?>" />
- <?php echo Minz_Translate::t ('shift_for_first'); ?>
+ <input type="text" id="mark_read" name="shortcuts[mark_read]" list="keys" value="<?php echo $s['mark_read']; ?>" />
+ <?php echo Minz_Translate::t ('shift_for_all_read'); ?>
</div>
</div>
<div class="form-group">
- <label class="group-name" for="collapse_entry"><?php echo Minz_Translate::t ('collapse_article'); ?></label>
+ <label class="group-name" for="mark_favorite"><?php echo Minz_Translate::t ('mark_favorite'); ?></label>
<div class="group-controls">
- <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?php echo $s['collapse_entry']; ?>" />
+ <input type="text" id="mark_favorite" name="shortcuts[mark_favorite]" list="keys" value="<?php echo $s['mark_favorite']; ?>" />
</div>
</div>
<div class="form-group">
- <label class="group-name" for="load_more_shortcut"><?php echo Minz_Translate::t ('load_more'); ?></label>
+ <label class="group-name" for="go_website"><?php echo Minz_Translate::t ('see_on_website'); ?></label>
<div class="group-controls">
- <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?php echo $s['load_more']; ?>" />
+ <input type="text" id="go_website" name="shortcuts[go_website]" list="keys" value="<?php echo $s['go_website']; ?>" />
</div>
</div>
@@ -72,6 +76,23 @@
<label class="group-name" for="auto_share_shortcut"><?php echo Minz_Translate::t ('auto_share'); ?></label>
<div class="group-controls">
<input type="text" id="auto_share_shortcut" name="shortcuts[auto_share]" list="keys" value="<?php echo $s['auto_share']; ?>" />
+ <?php echo Minz_Translate::t ('auto_share_help'); ?>
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="group-name" for="collapse_entry"><?php echo Minz_Translate::t ('collapse_article'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="collapse_entry" name="shortcuts[collapse_entry]" list="keys" value="<?php echo $s['collapse_entry']; ?>" />
+ </div>
+ </div>
+
+ <legend><?php echo Minz_Translate::t ('shortcuts_other_action');?></legend>
+
+ <div class="form-group">
+ <label class="group-name" for="load_more_shortcut"><?php echo Minz_Translate::t ('load_more'); ?></label>
+ <div class="group-controls">
+ <input type="text" id="load_more_shortcut" name="shortcuts[load_more]" list="keys" value="<?php echo $s['load_more']; ?>" />
</div>
</div>
diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml
index 0ecdc1bca..42312bc97 100644
--- a/app/views/helpers/javascript_vars.phtml
+++ b/app/views/helpers/javascript_vars.phtml
@@ -19,6 +19,8 @@ echo ',shortcuts={',
'go_website:"', $s['go_website'], '",',
'prev_entry:"', $s['prev_entry'], '",',
'next_entry:"', $s['next_entry'], '",',
+ 'first_entry:"', $s['first_entry'], '",',
+ 'last_entry:"', $s['last_entry'], '",',
'collapse_entry:"', $s['collapse_entry'], '",',
'load_more:"', $s['load_more'], '",',
'auto_share:"', $s['auto_share'], '"',
diff --git a/app/views/helpers/view/normal_view.phtml b/app/views/helpers/view/normal_view.phtml
index 7b7faccee..ae93b627c 100644
--- a/app/views/helpers/view/normal_view.phtml
+++ b/app/views/helpers/view/normal_view.phtml
@@ -147,49 +147,49 @@ if (!empty($this->entries)) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<?php if ($shaarli) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="<?php echo $shaarli . '?post=' . $link . '&amp;title=' . $title . '&amp;source=FreshRSS'; ?>">
<?php echo Minz_Translate::t ('shaarli'); ?>
</a>
</li>
<?php } if ($wallabag) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="<?php echo $wallabag . '?action=add&amp;url=' . base64_encode (urldecode($link)); ?>">
<?php echo Minz_Translate::t ('wallabag'); ?>
</a>
</li>
<?php } if ($diaspora) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="<?php echo $diaspora . '/bookmarklet?url=' . $link . '&amp;title=' . $title; ?>">
<?php echo Minz_Translate::t ('diaspora'); ?>
</a>
</li>
<?php } if ($twitter) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="https://twitter.com/share?url=<?php echo $link; ?>&amp;text=<?php echo $title; ?>">
<?php echo Minz_Translate::t ('twitter'); ?>
</a>
</li>
<?php } if ($google_plus) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="https://plus.google.com/share?url=<?php echo $link; ?>">
<?php echo Minz_Translate::t ('g+'); ?>
</a>
</li>
<?php } if ($facebook) { ?>
- <li class="item">
+ <li class="item share">
<a target="_blank" href="https://www.facebook.com/sharer.php?u=<?php echo $link; ?>&amp;t=<?php echo $title; ?>">
<?php echo Minz_Translate::t ('facebook'); ?>
</a>
</li>
<?php } if ($email) { ?>
- <li class="item">
+ <li class="item share">
<a href="mailto:?subject=<?php echo urldecode($title); ?>&amp;body=<?php echo $link; ?>">
<?php echo Minz_Translate::t ('by_email'); ?>
</a>
</li>
<?php } if ($print) { ?>
- <li class="item">
+ <li class="item share">
<a href="#" class="print-article">
<?php echo Minz_Translate::t ('print'); ?>
</a>