From c791e3bc0865ac55857d2ad6d0c91aa23af28a65 Mon Sep 17 00:00:00 2001 From: kilo Date: Mon, 16 Oct 2017 11:52:36 +0200 Subject: [PATCH] Show refine constantly in no results page (#1675) * Update search.jet.html * show refine constantly in "no results" page * no results page is now a box * remove useless class --- controllers/search/search.go | 2 +- templates/errors/no_results.jet.html | 2 +- templates/layouts/partials/helpers/search.jet.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/controllers/search/search.go b/controllers/search/search.go index 686c2341..a0045985 100644 --- a/controllers/search/search.go +++ b/controllers/search/search.go @@ -75,7 +75,7 @@ func SearchHandler(c *gin.Context) { searchForm.TorrentParam, searchForm.Category = searchParam, category - if c.Query("refine") == "1" { + if c.Query("refine") == "1" || nbTorrents == 0 { searchForm.ShowRefine = true } diff --git a/templates/errors/no_results.jet.html b/templates/errors/no_results.jet.html index 1bc33dd2..f264fe00 100644 --- a/templates/errors/no_results.jet.html +++ b/templates/errors/no_results.jet.html @@ -1,7 +1,7 @@ {{ extends "layouts/index_site" }} {{block title()}}{{ T("err_no_results")}}{{end}} {{block content_body()}} -
+

{{ T("err_no_results")}}

no results
diff --git a/templates/layouts/partials/helpers/search.jet.html b/templates/layouts/partials/helpers/search.jet.html index d5f6efc9..c8de683d 100644 --- a/templates/layouts/partials/helpers/search.jet.html +++ b/templates/layouts/partials/helpers/search.jet.html @@ -12,7 +12,7 @@ {{end}} {{block search_refine(url="") }} -
+

{{ T("refine_search") }}