浏览代码

[fix] whitespace remove and proper no-result warning display

Adam Tauber 10 年前
父节点
当前提交
8d1d4819ae
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5
    5
      searx/templates/oscar/results.html

+ 5
- 5
searx/templates/oscar/results.html 查看文件

25
                 {% endif %}
25
                 {% endif %}
26
             </div>
26
             </div>
27
             {% endfor %}
27
             {% endfor %}
28
-            
29
-            {% if not results %}
28
+
29
+            {% if not results and not answers %}
30
                 {% include 'oscar/messages/no_results.html' %}
30
                 {% include 'oscar/messages/no_results.html' %}
31
             {% endif %}
31
             {% endif %}
32
 
32
 
82
                 {% for infobox in infoboxes %}
82
                 {% for infobox in infoboxes %}
83
                     {% include 'oscar/infobox.html' %}
83
                     {% include 'oscar/infobox.html' %}
84
                 {% endfor %}
84
                 {% endfor %}
85
-            {% endif %} 
85
+            {% endif %}
86
 
86
 
87
             {% if suggestions %}
87
             {% if suggestions %}
88
             <div class="panel panel-default">
88
             <div class="panel panel-default">
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 }}&amp;pageno={{ pageno }}{% if selected_categories %}&amp;category_{{ selected_categories|join("&category_")|replace(' ','+') }}{% endif %}" readonly>
112
                         </div>
112
                         </div>
113
                     </form>
113
                     </form>
114
-                    
114
+
115
                     <label>{{ _('Download results') }}</label>
115
                     <label>{{ _('Download results') }}</label>
116
                     <div class="clearfix"></div>
116
                     <div class="clearfix"></div>
117
                     {% for output_type in ('csv', 'json', 'rss') %}
117
                     {% for output_type in ('csv', 'json', 'rss') %}
122
                         <input type="hidden" name="pageno" value="{{ pageno }}">
122
                         <input type="hidden" name="pageno" value="{{ pageno }}">
123
                         <button type="submit" class="btn btn-default">{{ output_type }}</button>
123
                         <button type="submit" class="btn btn-default">{{ output_type }}</button>
124
                     </form>
124
                     </form>
125
-                    {% endfor %} 
125
+                    {% endfor %}
126
                     <div class="clearfix"></div>
126
                     <div class="clearfix"></div>
127
                 </div>
127
                 </div>
128
             </div>
128
             </div>