Parcourir la source

[enh] prettier search url display

Adam Tauber il y a 10 ans
Parent
révision
01bebc0c30

+ 2
- 2
searx/templates/courgette/results.html Voir le fichier

@@ -10,7 +10,7 @@
10 10
     <div id="sidebar">
11 11
         <div id="search_url">
12 12
             {{ _('Search URL') }}:
13
-            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}&amp;pageno={{ pageno }}{% if selected_categories %}&amp;category_{{ selected_categories|join("&category_")|replace(' ','+') }}{% endif %}" readonly />
13
+            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly />
14 14
         </div>
15 15
         <div id="apis">
16 16
             {{ _('Download results') }}<br />
@@ -84,4 +84,4 @@
84 84
     </div>
85 85
     {% endif %}
86 86
 </div>
87
-{% endblock %}
87
+{% endblock %}

+ 1
- 1
searx/templates/default/results.html Voir le fichier

@@ -11,7 +11,7 @@
11 11
 
12 12
         <div id="search_url">
13 13
             {{ _('Search URL') }}:
14
-            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}&amp;pageno={{ pageno }}{% if selected_categories %}&amp;category_{{ selected_categories|join("&category_")|replace(' ','+') }}{% endif %}" readonly />
14
+            <input type="text" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly />
15 15
         </div>
16 16
         <div id="apis">
17 17
         {{ _('Download results') }}

+ 1
- 1
searx/templates/oscar/results.html Voir le fichier

@@ -108,7 +108,7 @@
108 108
                     <form role="form">
109 109
                         <div class="form-group">
110 110
                             <label for="search_url">{{ _('Search URL') }}</label>
111
-                            <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ base_url }}?q={{ q|urlencode }}&amp;pageno={{ pageno }}{% if selected_categories %}&amp;category_{{ selected_categories|join("&category_")|replace(' ','+') }}{% endif %}" readonly>
111
+                            <input id="search_url" type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&amp;categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&amp;pageno={{ pageno }}{% endif %}" readonly>
112 112
                         </div>
113 113
                     </form>
114 114