view/html: Do not allow commenting on archived issues.
authorRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:38:01 +0000 (08:38 +0200)
committerRicardo Wurmus <rekado@elephly.net>
Sun, 10 May 2020 06:45:56 +0000 (08:45 +0200)
mumi/web/view/html.scm

index b5300aed379e39ac52f41828f725a6061f38defa..8de7264c59e563dcfba186ad8cde9e0aecf34063 100644 (file)
@@ -422,7 +422,8 @@ failed to process associated messages.")
        (@ (class "message"))
        (div
         (@ (class "card"))
-        ,@(if (mailer-enabled?)
+        ,@(if (and (mailer-enabled?)
+                   (not (bug-archived bug)))
               `((form
                  (@ (action ,(format #f "/issue/~a/comment"
                                      (number->string id)))
@@ -459,8 +460,11 @@ failed to process associated messages.")
                       (span (@ (class "address")) "Your comment")))
                 (div
                  (@ (class "body card-body"))
-                 (p "Comments via the web interface are not currently
-supported.  To comment on this conversation "
+                 ,(if (bug-archived bug)
+                      '(p "This issue is archived.")
+                      '(p "Commenting via the web interface is
+currently disabled."))
+                 (p "To comment on this conversation "
                     (a (@ (href ,(string-append "mailto:"
                                                 (number->string id) "@" (%config 'debbugs-domain)
                                                 "?subject=" (bug-subject* bug))))