From 54dd20399539b2fa7a6302a188f42e55cd091f75 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 13 May 2020 12:04:52 +0200 Subject: view/html: Split tags and make badges clickable. --- mumi/web/view/html.scm | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index aaa4e1a..23f59b2 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -615,13 +615,16 @@ M7 1C3.14 1 0 4.14 0 8\ s3.14 7 7 7 7-3.14 7-7-3.14-7-7-7z\ m1 3H6v5h2V4zm0 6H6v2h2v-2z"))))) '()) - ,(or (and=> (bug-tags bug) - (lambda (tag) - `(span - (@ (class ,(string-append "badge badge-info mr-2 " - tag))) - ,tag))) - '()) + ,@(or (and=> (bug-tags bug) + (lambda (tags) + (map (lambda (tag) + `(a (@ (href ,(string-append "search?query=tag:" tag))) + (span + (@ (class ,(string-append "badge badge-info mr-1 " + tag))) + ,tag))) + (string-split tags #\space)))) + '()) ,(if id `(a (@ (href ,(string-append "/" id))) ,(bug-subject* bug)) -- cgit v1.2.3