diff options
author | Christopher Baines <mail@cbaines.net> | 2020-02-13 23:11:59 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2020-02-13 23:11:59 +0000 |
commit | 374dc25440efaef619cdc8d3288261c20ce45858 (patch) | |
tree | ed44f30245828ce3e54e225f0a3f70dab570fad8 /guix-data-service/web/view | |
parent | dfccbf911c7badfdffc96398d0967e86a55da80e (diff) | |
download | data-service-374dc25440efaef619cdc8d3288261c20ce45858.tar data-service-374dc25440efaef619cdc8d3288261c20ce45858.tar.gz |
Improve system and target query parameter handling
Diffstat (limited to 'guix-data-service/web/view')
-rw-r--r-- | guix-data-service/web/view/html.scm | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/guix-data-service/web/view/html.scm b/guix-data-service/web/view/html.scm index 4c1c9ce..e45a67a 100644 --- a/guix-data-service/web/view/html.scm +++ b/guix-data-service/web/view/html.scm @@ -104,7 +104,8 @@ options (allow-selecting-multiple-options #t) font-family - (type "text")) + (type "text") + (null-string-value "none")) (define (value->text value) (match value (#f "") @@ -163,14 +164,26 @@ (map (match-lambda ((option-label . option-value) `(option - (@ ,@(if (member option-value selected-options) + (@ ,@(if (member (if (and + (string? option-value) + (string=? option-value + null-string-value)) + "" + option-value) + selected-options) '((selected "")) '()) (value ,option-value)) ,(value->text option-label))) (option-value `(option - (@ ,@(if (member option-value selected-options) + (@ ,@(if (member (if (and + (string? option-value) + (string=? option-value + null-string-value)) + "" + option-value) + selected-options) '((selected "")) '())) ,(value->text option-value)))) |