소스 검색

Update user query feature (#3338)

* Change user query wording

There was some misunderstanding in the use of the user query feature,
probably because of the wording. I've change it to make it more obvious.

* Fix feedback when a query is bookmarked

Before, the displayed query name was not the one intended. Now, the name is the one of the current bookmark

* Document user queries

I've added a few words on how to use the user queries because it seems there was some misunderstanding. See #3219
Alexis Degrugillier 5 년 전
부모
커밋
85cbfcedb5

+ 2 - 2
app/Controllers/configureController.php

@@ -312,7 +312,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 	 * storage. Before it is saved, the unwanted parameters are unset to keep
 	 * lean data.
 	 */
-	public function addQueryAction() {
+	public function bookmarkQueryAction() {
 		$category_dao = FreshRSS_Factory::createCategoryDao();
 		$feed_dao = FreshRSS_Factory::createFeedDao();
 		$tag_dao = FreshRSS_Factory::createTagDao();
@@ -329,7 +329,7 @@ class FreshRSS_configure_Controller extends Minz_ActionController {
 		FreshRSS_Context::$user_conf->queries = $queries;
 		FreshRSS_Context::$user_conf->save();
 
-		Minz_Request::good(_t('feedback.conf.query_created', $query['name']),
+		Minz_Request::good(_t('feedback.conf.query_created', $params['name']),
 		                   array('c' => 'configure', 'a' => 'queries'));
 	}
 

+ 1 - 1
app/Models/UserQuery.php

@@ -42,7 +42,7 @@ class FreshRSS_UserQuery {
 		if (!isset($query['search'])) {
 			$query['search'] = '';
 		}
-		// linked to deeply with the search object, need to use dependency injection
+		// linked too deeply with the search object, need to use dependency injection
 		$this->search = new FreshRSS_BooleanSearch($query['search']);
 		if (isset($query['state'])) {
 			$this->state = $query['state'];

+ 1 - 1
app/i18n/cz/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'O FreshRSS',
-		'add_query' => 'Vytvořit dotaz',
 		'before_one_day' => 'Den nazpět',
 		'before_one_week' => 'Před týdnem',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Oblíbené (%s)',
 		'global_view' => 'Přehled',
 		'main_stream' => 'Všechny kanály',

+ 1 - 1
app/i18n/de/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'Über FreshRSS',
-		'add_query' => 'Eine Abfrage hinzufügen',
 		'before_one_day' => 'Vor einem Tag',
 		'before_one_week' => 'Vor einer Woche',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favoriten (%s)',
 		'global_view' => 'Globale Ansicht',
 		'main_stream' => 'Haupt-Feeds',

+ 1 - 1
app/i18n/en-us/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'About FreshRSS',
-		'add_query' => 'Add a query',
 		'before_one_day' => 'Older than one day',
 		'before_one_week' => 'Older than one week',
+		'bookmark_query' => 'Bookmark current query',
 		'favorites' => 'Favorites (%s)',
 		'global_view' => 'Global view',
 		'main_stream' => 'Main stream',

+ 1 - 1
app/i18n/en/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'About FreshRSS',
-		'add_query' => 'Add a query',
 		'before_one_day' => 'Older than one day',
 		'before_one_week' => 'Older than one week',
+		'bookmark_query' => 'Bookmark current query',
 		'favorites' => 'Favourites (%s)',
 		'global_view' => 'Global view',
 		'main_stream' => 'Main stream',

+ 1 - 1
app/i18n/es/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'Acerca de FreshRSS',
-		'add_query' => 'Añadir petición',
 		'before_one_day' => 'Con más de 1 día',
 		'before_one_week' => 'Con más de una semana',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favoritos (%s)',
 		'global_view' => 'Vista Global',
 		'main_stream' => 'Salida Principal',

+ 1 - 1
app/i18n/fr/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'À propos de FreshRSS',
-		'add_query' => 'Créer un filtre',
 		'before_one_day' => 'Antérieurs à 1 jour',
 		'before_one_week' => 'Antérieurs à 1 semaine',
+		'bookmark_query' => 'Enregistrer la recherche courante',
 		'favorites' => 'Favoris (%s)',
 		'global_view' => 'Vue globale',
 		'main_stream' => 'Flux principal',

+ 1 - 1
app/i18n/he/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'אודות FreshRSS',
-		'add_query' => 'הוספת שאילתה',
 		'before_one_day' => 'אתמול',
 		'before_one_week' => 'לפני שבוע',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'מועדפים (%s)',
 		'global_view' => 'תצוגה גלובלית',
 		'main_stream' => 'הזנה ראשית',

+ 1 - 1
app/i18n/it/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'Informazioni',
-		'add_query' => 'Aggiungi ricerca',
 		'before_one_day' => 'Giorno precedente',
 		'before_one_week' => 'Settimana precedente',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Preferiti (%s)',
 		'global_view' => 'Vista globale per categorie',
 		'main_stream' => 'Flusso principale',

+ 1 - 1
app/i18n/kr/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'FreshRSS 정보',
-		'add_query' => '쿼리 만들기',
 		'before_one_day' => '하루 이전',
 		'before_one_week' => '한 주 이전',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => '즐겨찾기 (%s)',
 		'global_view' => '전체 모드',
 		'main_stream' => '메인 스트림',

+ 1 - 1
app/i18n/nl/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'Over FreshRSS',
-		'add_query' => 'Voeg een query toe',
 		'before_one_day' => 'Ouder dan een dag',
 		'before_one_week' => 'Ouder dan een week',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favorieten (%s)',
 		'global_view' => 'Globale weergave',
 		'main_stream' => 'Overzicht',

+ 1 - 1
app/i18n/oc/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'A prepaus de FreshRSS',
-		'add_query' => 'Crear un filtre',
 		'before_one_day' => '1 jorn en arrièr',
 		'before_one_week' => '1 setmana en arrièr',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favorits (%s)',
 		'global_view' => 'Vista generala',
 		'main_stream' => 'Flux màger',

+ 1 - 1
app/i18n/pl/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'O serwisie FreshRSS',
-		'add_query' => 'Zapisz wyszukiwanie',
 		'before_one_day' => 'Starsze niż dzień',
 		'before_one_week' => 'Starsze niż tydzień',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Ulubione (%s)',
 		'global_view' => 'Widok globalny',
 		'main_stream' => 'Kanał główny',

+ 1 - 1
app/i18n/pt-br/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'Sobre o FreshRSS',
-		'add_query' => 'Adicionar uma query',
 		'before_one_day' => 'Antes de um dia',
 		'before_one_week' => 'Antes de uma semana',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favoritos (%s)',
 		'global_view' => 'Visualização global',
 		'main_stream' => 'Stream principal',

+ 1 - 1
app/i18n/ru/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'About FreshRSS',	// TODO - Translation
-		'add_query' => 'Add a query',	// TODO - Translation
 		'before_one_day' => 'Older than one day',	// TODO - Translation
 		'before_one_week' => 'Older than one week',	// TODO - Translation
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favourites (%s)',	// TODO - Translation
 		'global_view' => 'Global view',	// TODO - Translation
 		'main_stream' => 'Main stream',	// TODO - Translation

+ 1 - 1
app/i18n/sk/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'O FreshRSS',
-		'add_query' => 'Vytvoriť dopyt',
 		'before_one_day' => 'Pred 1 dňom',
 		'before_one_week' => 'Pred 1 týždňom',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Obľúbené (%s)',
 		'global_view' => 'Prehľad',
 		'main_stream' => 'Všetky kanály',

+ 1 - 1
app/i18n/tr/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => 'FreshRSS hakkında',
-		'add_query' => 'Sorgu ekle',
 		'before_one_day' => 'Bir gün önce',
 		'before_one_week' => 'Bir hafta önce',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => 'Favoriler (%s)',
 		'global_view' => 'Global görünüm',
 		'main_stream' => 'Ana akış',

+ 1 - 1
app/i18n/zh-cn/index.php

@@ -31,9 +31,9 @@ return array(
 	),
 	'menu' => array(
 		'about' => '关于 FreshRSS',
-		'add_query' => '添加查询',
 		'before_one_day' => '一天前',
 		'before_one_week' => '一周前',
+		'bookmark_query' => 'Bookmark current query',	// TODO - Translation
 		'favorites' => '收藏(%s)',
 		'global_view' => '全屏视图',
 		'main_stream' => '首页',

+ 2 - 2
app/layout/nav_menu.phtml

@@ -54,9 +54,9 @@
 				<?php
 					$url_query = Minz_Request::currentRequest();;
 					$url_query['c'] = 'configure';
-					$url_query['a'] = 'addQuery';
+					$url_query['a'] = 'bookmarkQuery';
 				?>
-				<li class="item no-mobile"><a href="<?= Minz_Url::display($url_query) ?>"><?= _i('bookmark-add') ?> <?= _t('index.menu.add_query') ?></a></li>
+				<li class="item no-mobile"><a href="<?= Minz_Url::display($url_query) ?>"><?= _i('bookmark-add') ?> <?= _t('index.menu.bookmark_query') ?></a></li>
 			</ul>
 		</div>
 	</div>

+ 1 - 1
cli/i18n/ignore/en-us.php

@@ -588,9 +588,9 @@ return array(
 	'index.log.empty',
 	'index.log.title',
 	'index.menu.about',
-	'index.menu.add_query',
 	'index.menu.before_one_day',
 	'index.menu.before_one_week',
+	'index.menu.bookmark_query',
 	'index.menu.global_view',
 	'index.menu.main_stream',
 	'index.menu.mark_all_read',

BIN
docs/en/img/users/user.queries.drop-down.empty.png


BIN
docs/en/img/users/user.queries.drop-down.not.empty.png


+ 39 - 5
docs/en/users/03_Main_view.md

@@ -116,16 +116,19 @@ This update occurs on the selected feed only. To trigger it, simply click on the
 
 # Filtering articles
 
+## Purpose
 When the number of articles stored by FreshRSS inevitably grows larger, it's important to use efficient filters to display only a subset of the articles. There are several methods that filter with different criteria. Usually those methods can be combined.
 
-## By category
+## How-to filter
+
+### By category
 
 This is the easiest method. You only need to click on the category title in the side panel. There are two special categories at the top of the panel:
 
   * *Main feed* displays only articles from feeds marked as available in that category
   * *Favourites* displays only articles marked as favourites
 
-## By feed
+### By feed
 
 There are several methods to filter articles by feed:
 
@@ -136,7 +139,7 @@ There are several methods to filter articles by feed:
 
 ![Feed filter](../img/users/feed.filter.1.png)
 
-## By status
+### By status
 
 Each article has two attributes that can be combined. The first attribute indicates whether or not the article has been read. The second attribute indicates if the article was marked as favorite or not.
 
@@ -150,11 +153,11 @@ Starting with version 0.8, all attribute filters are visible as toggle icons. Th
 
 By default, this filter displays only unread articles
 
-## By content
+### By content
 
 It is possible to filter articles by their content by inputting a string in the search field.
 
-## With the search field
+### With the search field
 
 You can use the search field to further refine results:
 
@@ -208,3 +211,34 @@ For example, you can enter multiple instances of `f:`, `author:`, `intitle:`, `i
 
 Combining several search criteria implies a logical *and*, but the keyword ` OR `
 can be used to combine several search criteria with a logical *or* instead: `author:Dupont OR author:Dupond`
+
+### By sorting by date
+
+You can change the sort order by clicking the toggle button available in the header.
+
+## Store your filters
+
+Once you came up with your perfect filter, it would be a shame if you need to recreate it every time you need to use it.
+
+Hopefully, there is a way to bookmark them for later use.
+We call them _user queries_.
+You can create as many as you want, the only limit is how they will be displayed on your screen.
+
+### Bookmark the current query
+
+Display the user queries drop-down by clicking the button next to the state buttons.
+![User queries drop-down](../img/users/user.queries.drop-down.empty.png)
+
+Then click on the bookmark action.
+
+Congratulations, you're done!
+
+### Using a bookmarked query
+
+Display the user queries drop-down by clicking the button next to the state buttons.
+![User queries drop-down](../img/users/user.queries.drop-down.not.empty.png)
+
+Then click on the bookmarked query, the previously stored query will be applied.
+
+> Note that only the query is stored, not the articles.
+> The results you are seing now could be different from the results on the day you've created the query.