diff options
-rw-r--r-- | assets/mumi.scss | 14 | ||||
-rw-r--r-- | mumi/web/view/html.scm | 185 |
2 files changed, 108 insertions, 91 deletions
diff --git a/assets/mumi.scss b/assets/mumi.scss index d37a76c..a0185ab 100644 --- a/assets/mumi.scss +++ b/assets/mumi.scss @@ -367,6 +367,20 @@ a.message-anchor { } } +.issue-details > ul { + padding: 0; + li { + display: inline-block; + list-style: none; + margin: 0; + padding: 0; + vertical-align: top; + } +} +.issue-details > details dl dd { + margin-left: 1em; +} + details { margin-top: .5em; } diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 0780992..336260b 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -455,100 +455,103 @@ failed to process associated messages.") ,(time->string (date message))))))) messages-with-numbers))) (define issue-details - `(span (@ (class "details")) - ,(status-tag bug) - ,(string-append "Submitted by " - ;; We don't use bug-originator here - ;; because it includes the email address. - ;; We cannot use extract-name on the - ;; return value, because it swallows - ;; non-ASCII characters. - (sender-name (first messages)) - ".") - (div - (a (@ (href ,(uri->string + `(div + (@ (class "issue-details")) + (ul + (li ,(status-tag bug)) + (li + (a (@ (href ,(uri->string + (build-uri (%config 'qa-scheme) + #:host (%config 'qa-host) + #:path (build-uri-path "issue" + (number->string id)))))) + (img (@ (src ,(uri->string (build-uri (%config 'qa-scheme) #:host (%config 'qa-host) #:path (build-uri-path "issue" - (number->string id)))))) - (img (@ (src ,(uri->string - (build-uri (%config 'qa-scheme) - #:host (%config 'qa-host) - #:path (build-uri-path "issue" - (number->string id) - "status-badge-medium.svg")))))))) - (details - (@ (class "info")) - (summary "Details") - (dl - (@ (class "stat")) - ,@(let ((num (length parties))) - `((dt ,(if (= num 1) - "One participant" - (string-append (number->string num) - " participants"))) - (dd - (ul ,(map (lambda (name) - `(li (span (@ (class "name"))) - ,name)) - (map extract-name parties))))))) - (dl - (@ (class "stat")) - (dt "Owner") - (dd - ,(or (and=> (bug-owner bug) extract-name) "unassigned"))) - (dl - (@ (class "stat")) - (dt "Severity") - (dd ,(bug-severity bug))) - ,@(if (bug-mergedwith bug) - `((dl - (@ (class "stat")) - (dt "Merged with") - (dd (ul ,(map (lambda (id) - `(li (a (@ (href ,(string-append "/" id))) - ,id))) - ;; XXX: This field can either hold a - ;; string of multiple ids, or a single - ;; number. Deal with this mess. - (match (bug-mergedwith bug) - ((? string? str) - (string-split str #\space)) - ((? number? n) - (list (number->string n))))))))) - '()) - ,@(if (bug-blocks bug) - `((dl - (@ (class "stat")) - (dt "Blocks") - (dd (ul ,(map (lambda (id) - `(li (a (@ (href ,(string-append "/" id))) - ,id))) - ;; XXX: This field can either hold a - ;; string of multiple ids, or a single - ;; number. Deal with this mess. - (match (bug-blocks bug) - ((? string? str) - (string-split str #\space)) - ((? number? n) - (list (number->string n))))))))) - '()) - ,@(if (bug-blockedby bug) - `((dl - (@ (class "stat")) - (dt "Blocked by") - (dd (ul ,(map (lambda (id) - `(li (a (@ (href ,(string-append "/" id))) - ,id))) - ;; XXX: This field can either hold a - ;; string of multiple ids, or a single - ;; number. Deal with this mess. - (match (bug-blockedby bug) - ((? string? str) - (string-split str #\space)) - ((? number? n) - (list (number->string n))))))))) - '())))) + (number->string id) + "status-badge-medium.svg"))))))))) + (details + (@ (class "info")) + (summary "Details") + (dl + (@ (class "stat")) + ,@(let ((num (length parties))) + `((dt ,(if (= num 1) + "One participant" + (string-append (number->string num) + " participants"))) + (dd + (ul ,(map (lambda (name) + `(li (span (@ (class "name"))) + ,name)) + (map extract-name parties))))))) + (dl + (@ (class "stat")) + (dt "Owner") + (dd + ,(or (and=> (bug-owner bug) extract-name) "unassigned"))) + (dl + (@ (class "stat")) + (dt "Submitted by") + ;; We don't use bug-originator here + ;; because it includes the email address. + ;; We cannot use extract-name on the + ;; return value, because it swallows + ;; non-ASCII characters. + (dd ,(sender-name (first messages)))) + (dl + (@ (class "stat")) + (dt "Severity") + (dd ,(bug-severity bug))) + ,@(if (bug-mergedwith bug) + `((dl + (@ (class "stat")) + (dt "Merged with") + (dd (ul ,(map (lambda (id) + `(li (a (@ (href ,(string-append "/" id))) + ,id))) + ;; XXX: This field can either hold a + ;; string of multiple ids, or a single + ;; number. Deal with this mess. + (match (bug-mergedwith bug) + ((? string? str) + (string-split str #\space)) + ((? number? n) + (list (number->string n))))))))) + '()) + ,@(if (bug-blocks bug) + `((dl + (@ (class "stat")) + (dt "Blocks") + (dd (ul ,(map (lambda (id) + `(li (a (@ (href ,(string-append "/" id))) + ,id))) + ;; XXX: This field can either hold a + ;; string of multiple ids, or a single + ;; number. Deal with this mess. + (match (bug-blocks bug) + ((? string? str) + (string-split str #\space)) + ((? number? n) + (list (number->string n))))))))) + '()) + ,@(if (bug-blockedby bug) + `((dl + (@ (class "stat")) + (dt "Blocked by") + (dd (ul ,(map (lambda (id) + `(li (a (@ (href ,(string-append "/" id))) + ,id))) + ;; XXX: This field can either hold a + ;; string of multiple ids, or a single + ;; number. Deal with this mess. + (match (bug-blockedby bug) + ((? string? str) + (string-split str #\space)) + ((? number? n) + (list (number->string n))))))))) + '())))) (define comment-box `(div (@ (class "comment-box")) |