view/html: Split tags and make badges clickable.
authorRicardo Wurmus <rekado@elephly.net>
Wed, 13 May 2020 10:04:52 +0000 (12:04 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Wed, 13 May 2020 10:04:52 +0000 (12:04 +0200)
mumi/web/view/html.scm

index aaa4e1a7091c48fb6deb97a1d5c365f96af8dd3c..23f59b2d602a5bbcfebca28e1a5ea80a5dc5db91 100644 (file)
@@ -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))