diff options
author | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 23:53:22 +0200 |
---|---|---|
committer | Ricardo Wurmus <rekado@elephly.net> | 2020-03-31 23:53:22 +0200 |
commit | bae40a20154bdd7f371b41b766d89c3dbe871e81 (patch) | |
tree | 6afcf2496f7df753bb95f3ba899d794c035b31fb | |
parent | f335e3b97130161171f9164c9d00469ff5088b77 (diff) |
view/html: list-of-matching-bugs: Use search-widget.
-rw-r--r-- | mumi/web/view/html.scm | 42 |
1 files 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)))))))) |