aboutsummaryrefslogtreecommitdiff
path: root/app/layout
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2022-06-02 08:41:08 +0200
committerGravatar GitHub <noreply@github.com> 2022-06-02 08:41:08 +0200
commitf85c510ed49be031145f6b35e815ce890cd4f9aa (patch)
treec7ac947ba5ddacf85dc5d97330f38f7d91b0964c /app/layout
parentf988b996ab69104bc45b222fa88d34b5c78f98b3 (diff)
New search engine (#4378)
* New possibility to invoke user queries from a search expression From the search field: `S:"My query"`. Can be combined with other filters such as `S:"My query" date:P3d` as long as the user queries do not contain `OR`. A use-case is to have an RSS filter with a stable address or an external API call with the ability to update the user query. * Draft of parenthesis logic * More draft * Working parenthesis (a OR b) (c OR d) * Working (A) OR (B) * Support nested parentheses + unit tests + documentation * search:MySearch and S:3
Diffstat (limited to 'app/layout')
-rw-r--r--app/layout/nav_menu.phtml18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/layout/nav_menu.phtml b/app/layout/nav_menu.phtml
index 3fd6f9e0e..ee15cfe61 100644
--- a/app/layout/nav_menu.phtml
+++ b/app/layout/nav_menu.phtml
@@ -39,14 +39,16 @@
<a href="<?= _url('configure', 'queries') ?>"><?= _i('configure') ?></a>
</li>
- <?php
- foreach (FreshRSS_Context::$user_conf->queries as $raw_query) {
- $query = new FreshRSS_UserQuery($raw_query);
- ?>
- <li class="item query">
- <a href="<?= $query->getUrl() ?>"><?= $query->getName() ?></a>
- </li>
- <?php } ?>
+ <?php foreach (FreshRSS_Context::$user_conf->queries as $raw_query): ?>
+ <li class="item query">
+ <?php if (!empty($raw_query['url'])): ?>
+ <a href="<?= $raw_query['url'] ?>"><?= $raw_query['name'] ?></a>
+ <?php else: ?>
+ <?php $query = new FreshRSS_UserQuery($raw_query); ?>
+ <a href="<?= $query->getUrl() ?>"><?= $query->getName() ?></a>
+ <?php endif; ?>
+ </li>
+ <?php endforeach; ?>
<?php if (count(FreshRSS_Context::$user_conf->queries) > 0) { ?>
<li class="separator"></li>