Browse Source

[mod] simplify no results on pages > 1 to "There are no more results."

BTW: remove not needed whitespaces in the generated HTML

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 1 year ago
parent
commit
6129b16165
1 changed files with 15 additions and 12 deletions
  1. 15 12
      searx/templates/simple/messages/no_results.html

+ 15 - 12
searx/templates/simple/messages/no_results.html

@@ -1,25 +1,28 @@
 {% from 'simple/icons.html' import icon_big %}
 {% from 'simple/icons.html' import icon_big %}
-<div class="dialog-error-block" role="alert">
-  <p>
+<div class="dialog-error-block" role="alert">{{- '' -}}
+  <p>{{- '' -}}
     <strong>
     <strong>
       {%- if pageno == 1 -%}
       {%- if pageno == 1 -%}
         {{ _('Sorry!') }}
         {{ _('Sorry!') }}
-      {%- else -%}
-        {{ _("Oops!") }}
       {%- endif -%}
       {%- endif -%}
-    </strong>
-  </p>
+    </strong>{{- '' -}}
+  </p>{{- '' -}}
   <p>
   <p>
     {%- if pageno == 1 -%}
     {%- if pageno == 1 -%}
       {{ _("No results were found. You can try to:") }}
       {{ _("No results were found. You can try to:") }}
     {%- else -%}
     {%- else -%}
-      {{ _("Looks like there isn't any more results. You can try to:") }}
+      {{ _("There are no more results. You can try to:") }}
     {%- endif -%}
     {%- endif -%}
-  </p>
+  </p>{{- '' -}}
   <ul>
   <ul>
-    <li>{{ _("Refresh the page.") }}</li>
-    <li>{{ _("Search for another query or select another category (above).") }}</li>
-    <li>{{ _("Change the search engine used in the preferences:") }} <a href="/preferences">/preferences</a></li>
-    <li>{{ _("Switch to another instance:") }} <a href="https://searx.space">https://searx.space</a></li>
+    {%- if pageno == 1 -%}
+      <li>{{ _("Refresh the page.") }}</li>{{- '' -}}
+      <li>{{ _("Search for another query or select another category (above).") }}</li>{{- '' -}}
+      <li>{{ _("Change the search engine used in the preferences:") }} <a href="/preferences">/preferences</a></li>{{- '' -}}
+      <li>{{ _("Switch to another instance:") }} <a href="https://searx.space">https://searx.space</a></li>{{- '' -}}
+    {%- else -%}
+      <li>{{ _("Search for another query or select another category.") }}</li>{{- '' -}}
+      <li>{{ _("Go back to the previous page using the previous page button.") }}</li>{{- '' -}}
+    {%- endif -%}
   </ul>
   </ul>
 </div>
 </div>