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/baggy/home.twig | |
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/baggy/home.twig')
-rwxr-xr-x | themes/baggy/home.twig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/themes/baggy/home.twig b/themes/baggy/home.twig index e34897fa..5dd91307 100755 --- a/themes/baggy/home.twig +++ b/themes/baggy/home.twig | |||
@@ -25,9 +25,15 @@ | |||
25 | {% block pager %} | 25 | {% block pager %} |
26 | {% if nb_results > 1 %} | 26 | {% if nb_results > 1 %} |
27 | <div class="results"> | 27 | <div class="results"> |
28 | <div class="nb-results">{{ nb_results }} {% trans "results" %}</div> | 28 | <div class="nb-results">{{ nb_results }} {% trans "results" %}{% if search_term is defined %}{% trans " found for « " %} {{ search_term }} »{% endif %}</div> |
29 | {{ page_links | raw }} | 29 | {{ page_links | raw }} |
30 | </div> | 30 | </div> |
31 | {% elseif nb_results == 1 %} | ||
32 | {% if search_term is defined %} | ||
33 | <div class="results"> | ||
34 | <div class="nb-results">{% trans "Only one result found for " %} « {{ search_term }} »</div> | ||
35 | </div> | ||
36 | {% endif %} | ||
31 | {% endif %} | 37 | {% endif %} |
32 | {% endblock %} | 38 | {% endblock %} |
33 | <div id="list-entries" class="list-entries"> | 39 | <div id="list-entries" class="list-entries"> |