소스 검색

UX and HTML corrections

Put the infobox first. Result first is more useful for the user.
Add id in form for "for".
htmlentities in the URL.
Take care of spaces in categories.
Cqoicebordel 10 년 전
부모
커밋
34b5d95669
1개의 변경된 파일6개의 추가작업 그리고 8개의 파일을 삭제
  1. 6
    8
      searx/templates/oscar/results.html

+ 6
- 8
searx/templates/oscar/results.html 파일 보기

@@ -51,6 +51,11 @@
51 51
         </div><!-- /#main_results -->
52 52
 
53 53
         <div class="col-sm-4" id="sidebar_results">
54
+            {% if infoboxes %}
55
+                {% for infobox in infoboxes %}
56
+                    {% include 'oscar/infobox.html' %}
57
+                {% endfor %}
58
+            {% endif %} 
54 59
 
55 60
             {% if suggestions %}
56 61
             <div class="panel panel-default">
@@ -76,7 +81,7 @@
76 81
                     <form role="form">
77 82
                         <div class="form-group">
78 83
                             <label for="search_url">{{ _('Search URL') }}</label>
79
-                            <input type="url" class="form-control select-all-on-click cursor-text" name="search_url" value="{{ base_url }}?q={{ q|urlencode }}&pageno={{ pageno }}{% if selected_categories %}&category_{{ selected_categories|join("&category_") }}{% endif %}" readonly>
84
+                            <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>
80 85
                         </div>
81 86
                     </form>
82 87
                     
@@ -94,13 +99,6 @@
94 99
                     <div class="clearfix"></div>
95 100
                 </div>
96 101
             </div>
97
-        
98
-        {% if infoboxes %}
99
-            {% for infobox in infoboxes %}
100
-                {% include 'oscar/infobox.html' %}
101
-            {% endfor %}
102
-        {% endif %}    
103
-        
104 102
         </div><!-- /#sidebar_results -->
105 103
     </div>
106 104
 {% endblock %}