From 1af723ca68e2558232ef4c4eb5a7c8f41a07bd0c Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 15 Mar 2014 07:08:58 -0400 Subject: Add a button to reveal/hide password I add a button on the configure user interface to reveal the password for 2 seconds and hide it after that period. See #442 I am not sure if the fallback unicode text for the icon is correct. I can not make it work. --- app/Models/Themes.php | 1 + 1 file changed, 1 insertion(+) (limited to 'app/Models/Themes.php') diff --git a/app/Models/Themes.php b/app/Models/Themes.php index c7099a1df..ed746b7e9 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -77,6 +77,7 @@ class FreshRSS_Themes extends Minz_Model { 'down' => '▽', 'favorite' => '★', 'help' => 'ⓘ', + 'key' => '⚿', 'link' => '↗', 'login' => '🔒', 'logout' => '🔓', -- cgit v1.2.3 From d25afa9def1b02b7989b12c861e33da5c90ccba1 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sat, 12 Apr 2014 22:46:35 -0400 Subject: Extract RSS feed from menu The RSS action has now its own button. I also reorganized the button display order to be more natural. I did not find an appropriate Unicode replacement for the Rss icon. --- app/Models/Themes.php | 1 + app/layout/nav_menu.phtml | 22 +++++++++------------- p/themes/Flat/icons/rss.svg | 6 ++++++ p/themes/icons/rss.svg | 2 +- 4 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 p/themes/Flat/icons/rss.svg (limited to 'app/Models/Themes.php') diff --git a/app/Models/Themes.php b/app/Models/Themes.php index ed746b7e9..898595016 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -85,6 +85,7 @@ class FreshRSS_Themes extends Minz_Model { 'non-starred' => '☆', 'prev' => '⏪', 'read' => '☑', + 'rss' => '0', 'unread' => '☐', 'refresh' => '🔃', //↻ 'search' => '🔍', diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 600d6dfa8..67539c747 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -6,10 +6,6 @@ - loginOk || Minz_Configuration::allowAnonymousRefresh()) { ?> - - - loginOk) { ?> url; if ($this->state & FreshRSS_Configuration::STATE_READ) { @@ -214,15 +210,6 @@ - -
  • - -
  • - - - - -
  • @@ -247,4 +234,13 @@ + + + + + + + loginOk || Minz_Configuration::allowAnonymousRefresh()) { ?> + + diff --git a/p/themes/Flat/icons/rss.svg b/p/themes/Flat/icons/rss.svg new file mode 100644 index 000000000..4d4faf7ae --- /dev/null +++ b/p/themes/Flat/icons/rss.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/p/themes/icons/rss.svg b/p/themes/icons/rss.svg index 6db5b3eae..2a8713be3 100644 --- a/p/themes/icons/rss.svg +++ b/p/themes/icons/rss.svg @@ -1,5 +1,5 @@ - + -- cgit v1.2.3 From 1e032608a61c29a29d418451018b3eb86843f8cf Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 13 Apr 2014 07:39:33 -0400 Subject: Change rss icon fallback value --- app/Models/Themes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/Models/Themes.php') diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 898595016..17b95bb9e 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -85,7 +85,7 @@ class FreshRSS_Themes extends Minz_Model { 'non-starred' => '☆', 'prev' => '⏪', 'read' => '☑', - 'rss' => '0', + 'rss' => '☄', 'unread' => '☐', 'refresh' => '🔃', //↻ 'search' => '🔍', -- cgit v1.2.3 From 8521c876d4b2ce69ff5d4313493017f26aa2cd6b Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Sun, 4 May 2014 08:57:19 -0400 Subject: Add user queries It's an intermediary step to remove the favorite button. I add a button to store the current query as a favorite query. It redirects automatically to the configuration page where it is possible to name and remove user queries. To make the queries more straigtforward, I removed the default behavior when searching for a string. This way, when we search for a string, the filter is not defaulted to all articles. --- app/Controllers/configureController.php | 54 +++++++++++++++++++++++++++++++++ app/Controllers/indexController.php | 3 -- app/Models/Configuration.php | 7 +++++ app/Models/Themes.php | 1 + app/i18n/en.php | 22 ++++++++++++++ app/i18n/fr.php | 22 ++++++++++++++ app/layout/aside_configure.phtml | 3 ++ app/layout/aside_flux.phtml | 17 +++++++++++ app/layout/header.phtml | 1 + app/layout/nav_menu.phtml | 8 +++++ app/views/configure/queries.phtml | 45 +++++++++++++++++++++++++++ p/scripts/main.js | 8 +++++ p/themes/icons/bookmark-add.svg | 6 ++++ 13 files changed, 194 insertions(+), 3 deletions(-) create mode 100644 app/views/configure/queries.phtml create mode 100644 p/themes/icons/bookmark-add.svg (limited to 'app/Models/Themes.php') diff --git a/app/Controllers/configureController.php b/app/Controllers/configureController.php index df5212041..573c42d64 100755 --- a/app/Controllers/configureController.php +++ b/app/Controllers/configureController.php @@ -298,4 +298,58 @@ class FreshRSS_configure_Controller extends Minz_ActionController { $this->view->size_total = $entryDAO->size(true); } } + + public function queriesAction () { + if (Minz_Request::isPost ()) { + $params = Minz_Request::params(); + $this->view->conf->_queries ($params['queries']); + $this->view->conf->save(); + + $notif = array ( + 'type' => 'good', + 'content' => Minz_Translate::t ('configuration_updated') + ); + Minz_Session::_param ('notification', $notif); + + Minz_Request::forward (array ('c' => 'configure', 'a' => 'queries'), true); + } else { + $this->view->query_get = array(); + foreach ($this->view->conf->queries as $key => $query) { + if (isset($query['get'])) { + switch ($query['get'][0]) { + case 'c': + $dao = new FreshRSS_CategoryDAO(); + $category = $dao->searchById(substr($query['get'], 2)); + $this->view->query_get[$key] = array( + 'type' => 'category', + 'name' => $category->name(), + ); + break; + case 'f': + $dao = new FreshRSS_FeedDAO(); + $feed = $dao->searchById(substr($query['get'], 2)); + $this->view->query_get[$key] = array( + 'type' => 'feed', + 'name' => $feed->name(), + ); + break; + } + } + } + } + + Minz_View::prependTitle (Minz_Translate::t ('queries') . ' · '); + } + + public function addQueryAction () { + $queries = $this->view->conf->queries; + $query = Minz_Request::params(); + unset($query['output']); + unset($query['token']); + $queries[] = $query; + $this->view->conf->_queries($queries); + $this->view->conf->save(); + + Minz_Request::forward(array('c' => 'configure', 'a' => 'queries'), true); + } } diff --git a/app/Controllers/indexController.php b/app/Controllers/indexController.php index 3445c0bd4..d45ce5510 100755 --- a/app/Controllers/indexController.php +++ b/app/Controllers/indexController.php @@ -84,9 +84,6 @@ class FreshRSS_index_Controller extends Minz_ActionController { $this->view->state = $state = Minz_Request::param ('state', $this->view->conf->default_view); $state_param = Minz_Request::param ('state', null); $filter = Minz_Request::param ('search', ''); - if (!empty($filter)) { - $state = FreshRSS_Entry::STATE_ALL; //Search always in read and unread articles - } $this->view->order = $order = Minz_Request::param ('order', $this->view->conf->sort_order); $nb = Minz_Request::param ('nb', $this->view->conf->posts_per_page); $first = Minz_Request::param ('next', ''); diff --git a/app/Models/Configuration.php b/app/Models/Configuration.php index 8d3e69a1c..deeae0826 100644 --- a/app/Models/Configuration.php +++ b/app/Models/Configuration.php @@ -52,6 +52,7 @@ class FreshRSS_Configuration { 'bottomline_date' => true, 'bottomline_link' => true, 'sharing' => array(), + 'queries' => array(), ); private $available_languages = array( @@ -218,6 +219,12 @@ class FreshRSS_Configuration { $this->data['sharing'][] = $value; } } + public function _queries ($values) { + $this->data['queries'] = array(); + foreach ($values as $value) { + $this->data['queries'][] = array_filter($value); + } + } public function _theme($value) { $this->data['theme'] = $value; } diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 17b95bb9e..5fcbe78e0 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -70,6 +70,7 @@ class FreshRSS_Themes extends Minz_Model { 'add' => '✚', 'all' => '☰', 'bookmark' => '★', + 'bookmark-add' => '✚', 'category' => '☷', 'category-white' => '☷', 'close' => '❌', diff --git a/app/i18n/en.php b/app/i18n/en.php index 21d37f475..57ca0985d 100644 --- a/app/i18n/en.php +++ b/app/i18n/en.php @@ -15,6 +15,28 @@ return array ( 'feed' => 'Feed', 'feeds' => 'Feeds', 'shortcuts' => 'Shortcuts', + 'queries' => 'User queries', + 'query-search' => 'Search for "%s"', + 'query-order-asc' => 'Display oldest articles first', + 'query-order-desc' => 'Display newest articles first', + 'query-get-category'=> 'Display "%s" category', + 'query-get-feed' => 'Display "%s" feed', + 'query-state-0' => 'Display all articles', + 'query-state-1' => 'Display read articles', + 'query-state-2' => 'Display unread articles', + 'query-state-3' => 'Display all articles', + 'query-state-4' => 'Display favorite articles', + 'query-state-5' => 'Display read favorite articles', + 'query-state-6' => 'Display unread favorite articles', + 'query-state-7' => 'Display favorite articles', + 'query-state-8' => 'Display not favorite articles', + 'query-state-9' => 'Display read not favorite articles', + 'query-state-10' => 'Display unread not favorite articles', + 'query-state-11' => 'Display not favorite articles', + 'query-state-12' => 'Display all articles', + 'query-state-13' => 'Display read articles', + 'query-state-14' => 'Display unread articles', + 'query-state-15' => 'Display all articles', 'about' => 'About', 'stats' => 'Statistics', diff --git a/app/i18n/fr.php b/app/i18n/fr.php index f42115fcd..d99b8eb1d 100644 --- a/app/i18n/fr.php +++ b/app/i18n/fr.php @@ -15,6 +15,28 @@ return array ( 'feed' => 'Flux', 'feeds' => 'Flux', 'shortcuts' => 'Raccourcis', + 'queries' => 'Filtres utilisateurs', + 'query-search' => 'Chercher "%s"', + 'query-order-asc' => 'Afficher les articles les plus anciens en premier', + 'query-order-desc' => 'Afficher les articles les plus récents en premier', + 'query-get-category'=> 'Afficher la catégorie "%s"', + 'query-get-feed' => 'Afficher le flux "%s"', + 'query-state-0' => 'Afficher tous les articles', + 'query-state-1' => 'Afficher les articles lus', + 'query-state-2' => 'Afficher les articles non lus', + 'query-state-3' => 'Afficher tous les articles', + 'query-state-4' => 'Afficher les articles favoris', + 'query-state-5' => 'Afficher les articles lus et favoris', + 'query-state-6' => 'Afficher les articles non lus et favoris', + 'query-state-7' => 'Afficher les articles favoris', + 'query-state-8' => 'Afficher les articles non favoris', + 'query-state-9' => 'Afficher les articles lus et non favoris', + 'query-state-10' => 'Afficher les articles non lus et non favoris', + 'query-state-11' => 'Afficher les articles non favoris', + 'query-state-12' => 'Afficher tous les articles', + 'query-state-13' => 'Afficher les articles lus', + 'query-state-14' => 'Afficher les articles non lus', + 'query-state-15' => 'Afficher tous les articles', 'about' => 'À propos', 'stats' => 'Statistiques', diff --git a/app/layout/aside_configure.phtml b/app/layout/aside_configure.phtml index 43adeb3c6..e66f2f64c 100644 --- a/app/layout/aside_configure.phtml +++ b/app/layout/aside_configure.phtml @@ -15,6 +15,9 @@
  • +
  • + +
  • diff --git a/app/layout/aside_flux.phtml b/app/layout/aside_flux.phtml index 817dae676..8f8d436e1 100644 --- a/app/layout/aside_flux.phtml +++ b/app/layout/aside_flux.phtml @@ -36,6 +36,23 @@
  • + + conf->queries as $query_conf): + $count++; + $name = $count; + if (isset($query_conf['name'])) { + $name = $query_conf['name']; + unset($query_conf['name']); + } + $url_user_query = array('c' => 'index', 'a' => 'index', 'params' => $query_conf); ?> +
  • +
    + +
    +
  • + cat_aside as $cat) { diff --git a/app/layout/header.phtml b/app/layout/header.phtml index 08aa7715d..3eedc8ea7 100644 --- a/app/layout/header.phtml +++ b/app/layout/header.phtml @@ -72,6 +72,7 @@ if (Minz_Configuration::canLogIn()) {
  • +
  • diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 9990448ba..6db172904 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -241,6 +241,14 @@ + loginOk): + $url_query = $this->url; + $url_query['c'] = 'configure'; + $url_query['a'] = 'addQuery'; + ?> + + + diff --git a/app/views/configure/queries.phtml b/app/views/configure/queries.phtml new file mode 100644 index 000000000..38755edc5 --- /dev/null +++ b/app/views/configure/queries.phtml @@ -0,0 +1,45 @@ +partial ('aside_configure'); ?> + +
    + + +
    + + + conf->queries as $key => $query):?> +
    + +
    + + + + + + +
      + +
    • + + +
    • + + +
    • + + +
    • query_get[$key]['type'], $this->query_get[$key]['name']); ?>
    • + +
    +
    +
    + + +
    +
    + + +
    +
    +
    + +
    \ No newline at end of file diff --git a/p/scripts/main.js b/p/scripts/main.js index aeb044e88..0b3ebf735 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -992,6 +992,13 @@ function init_share_observers() { }); } +function init_queries_observers() { + $('.post').on('click', '.query.remove', function(e) { + e.preventDefault(); + $(this).parents('.form-group').remove(); + }); +} + function init_feed_observers() { $('select[id="category"]').on('change', function() { var detail = $('#new_category_name').parent(); @@ -1046,6 +1053,7 @@ function init_all() { window.setInterval(refreshUnreads, 120000); } else { init_share_observers(); + init_queries_observers(); init_feed_observers(); init_password_observers(); } diff --git a/p/themes/icons/bookmark-add.svg b/p/themes/icons/bookmark-add.svg new file mode 100644 index 000000000..51db9c498 --- /dev/null +++ b/p/themes/icons/bookmark-add.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file -- cgit v1.2.3 From e70933dfeb0ae0941d1599ef1f4bea9160654e0d Mon Sep 17 00:00:00 2001 From: Marien Fressinaud Date: Thu, 5 Jun 2014 21:25:21 +0200 Subject: Update links to change view - Dropdown menu is transformed into stick buttons - 3 new icons (view-normal, view-global, view-reader) - Link to access RSS is now next to these buttons (should we kept it here?) --- app/Models/Themes.php | 3 +++ app/layout/nav_menu.phtml | 55 +++++++++++++++++------------------------------ 2 files changed, 23 insertions(+), 35 deletions(-) (limited to 'app/Models/Themes.php') diff --git a/app/Models/Themes.php b/app/Models/Themes.php index 17b95bb9e..620149934 100644 --- a/app/Models/Themes.php +++ b/app/Models/Themes.php @@ -93,6 +93,9 @@ class FreshRSS_Themes extends Minz_Model { 'starred' => '★', 'tag' => '⚐', 'up' => '△', + 'view-normal' => '☰', + 'view-global' => '☷', + 'view-reader' => '☕', ); if (!isset($alts[$name])) { return ''; diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml index 9990448ba..1114d0060 100644 --- a/app/layout/nav_menu.phtml +++ b/app/layout/nav_menu.phtml @@ -169,37 +169,27 @@ -