diff options
-rw-r--r-- | mumi/web/controller.scm | 2 | ||||
-rw-r--r-- | mumi/web/view/html.scm | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/mumi/web/controller.scm b/mumi/web/controller.scm index e420311..56b8eaf 100644 --- a/mumi/web/controller.scm +++ b/mumi/web/controller.scm @@ -90,7 +90,7 @@ '(error . "There was an error submitting your comment!")) (_ #f)))) (apply render-html (or (and=> (fetch-bug id) - issue-page) + (lambda (bug) (issue-page bug message))) (unknown id))))) (('GET "issue" (? string->number id) "attachment" (? string->number msg-num) diff --git a/mumi/web/view/html.scm b/mumi/web/view/html.scm index 2f73b01..cbc907d 100644 --- a/mumi/web/view/html.scm +++ b/mumi/web/view/html.scm @@ -289,7 +289,7 @@ some examples.") ,message (p (a (@ (href "/")) "Try something else?")))))) -(define (issue-page bug) +(define* (issue-page bug #:optional flash-message) "Render the conversation for the given BUG." (define id (bug-num bug)) (define messages (patch-messages id)) @@ -367,6 +367,16 @@ some examples.") `(,(header) (div (@ (class "container")) + ,@(match flash-message + (('error . text) + `((div (@ (class "alert alert-danger") + (role "alert")) + ,text))) + (('info . text) + `((div (@ (class "alert alert-info") + (role "alert")) + ,text))) + (_ '())) (div (@ (class "title col-md-12")) (h1 ,(bug-subject* bug)) |