summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2020-05-13 12:04:52 +0200
committerRicardo Wurmus <rekado@elephly.net>2020-05-13 12:04:52 +0200
commit54dd20399539b2fa7a6302a188f42e55cd091f75 (patch)
tree189ed623de658c74a49a07c8fbaa2b601a2cb73f
parent2fffa874d0eeaa5568383d5b89e13b097d609408 (diff)
view/html: Split tags and make badges clickable.
-rw-r--r--mumi/web/view/html.scm17
1 files 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))