From e7dba0ce7cfaf5e84687593a8b0d58d89fbff302 Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Sat, 9 Aug 2014 23:29:13 +0200 Subject: Add basic system of update - Check on update.freshrss.org for new updates - Download script - Apply script - Need translations and verifications NOTE: current script on server indicates version 0.7.3 is an update of 0.8-dev ==> IT'S ONLY FOR MY TESTS! Script just does a backup of ./data actually... See https://github.com/marienfressinaud/FreshRSS/issues/411 --- app/layout/aside_configure.phtml | 38 +++++++++++++++++++++++--------------- app/layout/header.phtml | 6 ++++++ 2 files changed, 29 insertions(+), 15 deletions(-) (limited to 'app/layout') diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index e66f2f64c..03bea4836 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,25 +1,33 @@ diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 2e42bfdea..028e63d8a 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -75,6 +75,12 @@ if (Minz_Configuration::canLogIn()) {
  • + +
  • +
  • -- cgit v1.2.3 From 7b17c60bb18b122f3d14795780f4642717cfd81b Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 24 Aug 2014 11:34:58 -0400 Subject: Add shortcuts Add a shortcut to open the wiki. Shortcut is F1 and is not modifiable. Add a shortcut to access user filters the same way to access share actions. --- app/Controllers/configureController.php | 2 +- app/Models/Configuration.php | 2 ++ app/i18n/en.php | 2 ++ app/i18n/fr.php | 2 ++ app/layout/nav_menu.phtml | 2 +- app/views/configure/shortcut.phtml | 8 ++++++ app/views/helpers/javascript_vars.phtml | 7 +++-- constants.php | 1 + p/scripts/main.js | 49 ++++++++++++++++++++++++++++++++- 9 files changed, 70 insertions(+), 5 deletions(-) (limited to 'app/layout') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index bb96bfae3..461cbceda 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -240,7 +240,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController { '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', - '9', 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', + '9', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'f11', 'f12'); $this->view->list_keys = $list_keys; diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 4c804a9fb..989603b20 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -45,6 +45,8 @@ class FreshRSS_Configuration { 'load_more' => 'm', 'auto_share' => 's', 'focus_search' => 'a', + 'user_filter' => 'u', + 'help' => 'f1', ), 'topline_read' => true, 'topline_favorite' => true, diff --git a/app/i18n/en.php b/app/i18n/en.php index be0cdc642..76da5d182 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -180,6 +180,8 @@ return array ( 'auto_share' => 'Share', 'auto_share_help' => 'If there is only one sharing mode, it is used. Else modes are accessible by their number.', 'focus_search' => 'Access search box', + 'user_filter' => 'Access user filters', + 'user_filter_help' => 'If there is only one user filter, it is used. Else filters are accessible by their number.', 'file_to_import' => 'File to import
    (OPML, Json or Zip)', 'file_to_import_no_zip' => 'File to import
    (OPML or Json)', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index 08f12234e..a8f7a3a98 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -180,6 +180,8 @@ return array ( 'auto_share' => 'Partager', 'auto_share_help' => 'S’il n’y a qu’un mode de partage, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', 'focus_search' => 'Accéder à la recherche', + 'user_filter' => 'Accéder aux filtres utilisateur', + 'user_filter_help' => 'S’il n’y a qu’un filtre utilisateur, celui ci est utilisé automatiquement. Sinon ils sont accessibles par leur numéro.', 'file_to_import' => 'Fichier à importer
    (OPML, Json ou Zip)', 'file_to_import_no_zip' => 'Fichier à importer
    (OPML ou Json)', diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 25833c16d..7cd15c1a3 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -96,7 +96,7 @@ conf->queries as $query) { ?> -
  • +
  • diff --git a/app/views/configure/shortcut.phtml b/app/views/configure/shortcut.phtml index bfb13f003..73ad0ebb8 100644 --- a/app/views/configure/shortcut.phtml +++ b/app/views/configure/shortcut.phtml @@ -103,6 +103,14 @@ +
    + +
    + + +
    +
    +
    diff --git a/app/views/helpers/javascript_vars.phtml b/app/views/helpers/javascript_vars.phtml index 7144c519a..2144f1576 100644 --- a/app/views/helpers/javascript_vars.phtml +++ b/app/views/helpers/javascript_vars.phtml @@ -4,7 +4,8 @@ echo '"use strict";', "\n"; $mark = $this->conf->mark_when; echo 'var ', - 'hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', + 'help_url="', FRESHRSS_WIKI, '"', + ',hide_posts=', ($this->conf->display_posts || Minz_Request::param('output') === 'reader') ? 'false' : 'true', ',display_order="', Minz_Request::param('order', $this->conf->sort_order), '"', ',auto_mark_article=', $mark['article'] ? 'true' : 'false', ',auto_mark_site=', $mark['site'] ? 'true' : 'false', @@ -25,7 +26,9 @@ echo ',shortcuts={', 'collapse_entry:"', $s['collapse_entry'], '",', 'load_more:"', $s['load_more'], '",', 'auto_share:"', $s['auto_share'], '",', - 'focus_search:"', $s['focus_search'], '"', + 'focus_search:"', $s['focus_search'], '",', + 'user_filter:"', $s['user_filter'], '",', + 'help:"', $s['help'], '"', "},\n"; if (Minz_Request::param ('output') === 'global') { diff --git a/constants.php b/constants.php index e32b8cbc3..483989371 100644 --- a/constants.php +++ b/constants.php @@ -1,6 +1,7 @@ Date: Sun, 24 Aug 2014 11:51:23 -0400 Subject: Fix category CSS Before, when the category is closed by default, the active CSS class wasn't applied. Thus breaking the shortcuts for navigation. Now it works the way it is supposed. --- app/layout/aside_flux.phtml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'app/layout') diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 432d6fdb7..357aa1cd3 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -42,21 +42,19 @@ $feeds = $cat->feeds (); if (!empty ($feeds)) { $c_active = false; - if ($this->conf->display_categories) { - if ($this->get_c == $cat->id () && $this->get_f) { - $c_active = true; - } - } else { - if ($this->get_c == $cat->id ()) { - $c_active = true; + $c_show = false; + if ($this->get_c == $cat->id ()) { + $c_active = true; + if (!$this->conf->display_categories || $this->get_f) { + $c_show = true; } } ?>
  • >
        id (); $nbEntries = $feed->nbEntries (); -- cgit v1.2.3 From 40d176cc247f03a3b95fcf0389de8858e577b7cb Mon Sep 17 00:00:00 2001 From: plopoyop Date: Wed, 10 Sep 2014 09:14:36 +0200 Subject: add css class or id to elements without --- app/layout/aside_flux.phtml | 2 +- app/layout/nav_menu.phtml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'app/layout') diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 357aa1cd3..9688a3273 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -4,7 +4,7 @@
          loginOk) { ?>
        • -
          +
          diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 25833c16d..b177cf7c8 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -7,7 +7,7 @@ loginOk) { ?> -
          +
        • today; - $one_week = $today - 604800; + $mark_before_today = $arUrl; + $mark_before_today['params']['idMax'] = $this->today . '000000'; + $mark_before_one_week = $arUrl; + $mark_before_one_week['params']['idMax'] = ($this->today - 604800) . '000000'; ?>
        -- cgit v1.2.3 From 7d5e57b35b4eca07417c296c156edb3b88eef90b Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Wed, 17 Sep 2014 09:15:19 +0200 Subject: Load $nb/2 articles when articles are unfolded See https://github.com/marienfressinaud/FreshRSS/issues/559 --- app/Controllers/indexController.php | 5 +++++ app/layout/layout.phtml | 1 + app/views/helpers/pagination.phtml | 5 ++++- 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'app/layout') diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index b0b051119..1d74a570b 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -83,6 +83,11 @@ class FreshRSS_index_Controller extends Minz_ActionController { $nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page); $first = Minz_Request::param ('next', ''); + $ajax_request = Minz_Request::param('ajax', false); + if ($ajax_request == 1 && $this->view->conf->display_posts) { + $nb = max(1, round($nb / 2)); + } + if ($this->view->state === FreshRSS_Entry::STATE_NOT_READ) { //Any unread article in this category at all? switch ($getType) { case 'a': diff --git a/app/layout/layout.phtml b/app/layout/layout.phtml index 96a88d245..f95f45b5e 100644 --- a/app/layout/layout.phtml +++ b/app/layout/layout.phtml @@ -13,6 +13,7 @@ if (!empty($this->nextId)) { $params = Minz_Request::params(); $params['next'] = $this->nextId; + $params['ajax'] = 1; ?> diff --git a/app/views/helpers/pagination.phtml b/app/views/helpers/pagination.phtml index f6fcbc701..1b15cc632 100755 --- a/app/views/helpers/pagination.phtml +++ b/app/views/helpers/pagination.phtml @@ -9,7 +9,10 @@
        • nextId)) { ?> - nextId; ?> + nextId; + $params['ajax'] = 1; + ?> -- cgit v1.2.3 From de5c0bc00962175198aeefabefa514415a448d61 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Wed, 17 Sep 2014 21:19:48 +0200 Subject: Misc minor details + a few i18n corrections https://github.com/marienfressinaud/FreshRSS/issues/618 --- app/FreshRSS.php | 7 ++++--- app/i18n/en.php | 6 +++--- app/i18n/fr.php | 2 +- app/i18n/install.en.php | 2 +- app/layout/aside_configure.phtml | 16 ++++++++-------- 5 files changed, 17 insertions(+), 16 deletions(-) (limited to 'app/layout') diff --git a/app/FreshRSS.php b/app/FreshRSS.php index 347b8392f..cdf8962cb 100644 --- a/app/FreshRSS.php +++ b/app/FreshRSS.php @@ -143,11 +143,12 @@ class FreshRSS extends Minz_FrontController { $theme = FreshRSS_Themes::load($this->conf->theme); if ($theme) { foreach($theme['files'] as $file) { - $theme_id = $theme['id']; - $filename = $file; - if ($file[0] == '_') { + if ($file[0] === '_') { $theme_id = 'base-theme'; $filename = substr($file, 1); + } else { + $theme_id = $theme['id']; + $filename = $file; } $filetime = @filemtime(PUBLIC_PATH . '/themes/' . $theme_id . '/' . $filename); Minz_View::appendStyle(Minz_Url::display( diff --git a/app/i18n/en.php b/app/i18n/en.php index f84593cb5..b14b36b32 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -428,10 +428,10 @@ return array ( 'update_system' => 'Update system', 'update_check' => 'Check for new updates', 'update_last' => 'Last verification: %s', - 'update_can_apply' => 'There is an available update.', + 'update_can_apply' => 'An update is available.', 'update_apply' => 'Apply', 'update_server_not_found' => 'Update server cannot be found. [%s]', 'no_update' => 'No update to apply', - 'update_problem' => 'Update has encountered an error: %s', - 'update_finished' => 'Update is now finished!', + 'update_problem' => 'The update process has encountered an error: %s', + 'update_finished' => 'Update completed!', ); diff --git a/app/i18n/fr.php b/app/i18n/fr.php index da5819529..3dc429bbb 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -428,7 +428,7 @@ return array ( 'update_system' => 'Système de mise à jour', 'update_check' => 'Vérifier les mises à jour', 'update_last' => 'Dernière vérification : %s', - 'update_can_apply' => 'Il y’a une mise à jour à appliquer.', + 'update_can_apply' => 'Une mise à jour est disponible.', 'update_apply' => 'Appliquer la mise à jour', 'update_server_not_found' => 'Le serveur de mise à jour n’a pas été trouvé. [%s]', 'no_update' => 'Aucune mise à jour à appliquer', diff --git a/app/i18n/install.en.php b/app/i18n/install.en.php index 487b5073a..c422de90f 100644 --- a/app/i18n/install.en.php +++ b/app/i18n/install.en.php @@ -43,7 +43,7 @@ return array ( 'persona_is_ok' => 'Permissions on Mozilla Persona directory are good', 'file_is_nok' => 'Check permissions on %s directory. HTTP server must have rights to write into', 'http_referer_is_ok' => 'Your HTTP REFERER is known and corresponds to your server.', - 'http_referer_is_nok' => 'Please check you are not altering your HTTP REFERER.', + 'http_referer_is_nok' => 'Please check that you are not altering your HTTP REFERER.', 'fix_errors_before' => 'Fix errors before skip to the next step.', 'general_conf_is_ok' => 'General configuration has been saved.', diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 03bea4836..d5c9bf4c9 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -1,32 +1,32 @@