From bae40a20154bdd7f371b41b766d89c3dbe871e81 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 31 Mar 2020 23:53:22 +0200 Subject: view/html: list-of-matching-bugs: Use search-widget. --- mumi/web/view/html.scm | 42 +++++++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 8693fdc..1b93827 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -531,20 +531,28 @@ m1 3H6v5h2V4zm0 6H6v2h2v-2z"))))) (define (list-of-matching-bugs query bugs) (layout #:body - `(,(header) - (div (@ (class "container")) - ,@(if (null? bugs) - `((h1 "No issues found") - (p "We could not find any issues matching your query " - (code ,query) ". " - (a (@ (href "/")) - "Try searching for something else?"))) - `((h1 "Submissions matching " (code ,query)) - (table (@ (class "table table-condensed table-sm table-hover")) - (thead - (tr (th "ID") - (th "Subject") - (th "Date submitted") - (th "Status"))) - (tbody - ,@(list-of-bugs bugs))))))))) + `(,(header #:search-bar? #f) + (div + (@ (class "container")) + (h1 "Your search for " (code ,query)) + ,(search-widget #:text query) + ,(if (null? bugs) + `(div + (@ (class "alert alert-warning") + (role "alert")) + (h4 + (@ (class "alert-heading")) + "Nothing found!") + (p "We could not find any issues matching your query " + (code ,query) ". " + (a (@ (href "/")) + "Try searching for something else?"))) + `(table + (@ (class "table table-borderless table-hover")) + (tbody + (tr (@ (class "heading")) + (th "ID") + (th "Subject") + (th "Date submitted") + (th "Status")) + ,@(list-of-bugs bugs)))))))) -- cgit v1.2.3