diff options
author | tcit <tcit@tcit.fr> | 2014-04-02 17:44:47 +0200 |
---|---|---|
committer | tcit <tcit@tcit.fr> | 2014-04-02 17:44:47 +0200 |
commit | d967a1fa14237648fc63c44f6a28c9c077b3e1bc (patch) | |
tree | e8c81af9d50c140f00da15e720eb3f29cdaede96 /themes/courgette | |
parent | 22db488d21bc23dc28fc2d60574803525fe53b53 (diff) | |
download | wallabag-d967a1fa14237648fc63c44f6a28c9c077b3e1bc.tar.gz wallabag-d967a1fa14237648fc63c44f6a28c9c077b3e1bc.tar.zst wallabag-d967a1fa14237648fc63c44f6a28c9c077b3e1bc.zip |
Important fixes for search engine (thx @mariroz)
So sorry for the mess... :(
* search only in users' own articles
* sanitized what is searched
* display what is searched
* pagination, sorting available when searching
* use existing function to query db
* bad encoding caracters fixed
* link to JQuery into default theme, no longer in each theme
* some spaces instead of tabs
Diffstat (limited to 'themes/courgette')
-rwxr-xr-x | themes/courgette/home.twig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/themes/courgette/home.twig b/themes/courgette/home.twig index 5b229ce9..6ba72d35 100755 --- a/themes/courgette/home.twig +++ b/themes/courgette/home.twig | |||
@@ -26,9 +26,15 @@ | |||
26 | {% block pager %} | 26 | {% block pager %} |
27 | {% if nb_results > 1 %} | 27 | {% if nb_results > 1 %} |
28 | <div class="results"> | 28 | <div class="results"> |
29 | <div class="nb-results">{{ nb_results }} {% trans "results" %}</div> | 29 | <div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %}{% trans " found for « " %} {{ search_term }} »{% endif %}</div> |
30 | {{ page_links | raw }} | 30 | {{ page_links | raw }} |
31 | </div> | 31 | </div> |
32 | {% elseif nb_results == 1 %} | ||
33 | {% if search_term is defined %} | ||
34 | <div class="results"> | ||
35 | <div class="nb-results">{% trans "Only one result found for " %} « {{ search_term }} »</div> | ||
36 | </div> | ||
37 | {% endif %} | ||
32 | {% endif %} | 38 | {% endif %} |
33 | {% endblock %} | 39 | {% endblock %} |
34 | {% for entry in entries %} | 40 | {% for entry in entries %} |