This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 5ab7ae13 Show notice in Secretary banner
5ab7ae13 is described below
commit 5ab7ae13043f896de0153085d06a085969daa59f
Author: Sebb <[email protected]>
AuthorDate: Wed Oct 2 23:42:40 2024 +0100
Show notice in Secretary banner
---
www/secretary/workbench/views/index.html.rb | 9 ++++++++-
www/secretary/workbench/views/parts.html.rb | 9 ++++++++-
2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/www/secretary/workbench/views/index.html.rb
b/www/secretary/workbench/views/index.html.rb
index 1aa78370..91ea00c1 100644
--- a/www/secretary/workbench/views/index.html.rb
+++ b/www/secretary/workbench/views/index.html.rb
@@ -8,6 +8,7 @@ _html do
end
unavailable = Status.updates_disallowed_reason # are updates disallowed?
+ noticetext, noticepath = Status.notice
_title 'ASF Secretary Mail'
_link rel: 'stylesheet', type: 'text/css', href: "secmail.css?#{@cssmtime}"
@@ -15,7 +16,13 @@ _html do
_header_ do
_h1.bg_success do
_a 'ASF Secretary Mail', href: '.'
- _span.small unavailable if unavailable
+ if unavailable
+ _span.small unavailable
+ elsif noticetext
+ _span.small do
+ _a noticetext, href: noticepath
+ end
+ end
end
_a 'Deleted messages', href: 'deleted'
_ '-'
diff --git a/www/secretary/workbench/views/parts.html.rb
b/www/secretary/workbench/views/parts.html.rb
index 5e049c24..f39a99db 100644
--- a/www/secretary/workbench/views/parts.html.rb
+++ b/www/secretary/workbench/views/parts.html.rb
@@ -9,11 +9,18 @@ _html do
href: "../../secmail.css?#{@cssmtime}"
unavailable = Status.updates_disallowed_reason # are updates disallowed?
+ noticetext, noticepath = Status.notice
_header_ do
_h3.bg_success do
_a 'ASF Secretary Mail', href: '../..', target: '_parent'
- _span.small unavailable if unavailable
+ if unavailable
+ _span.small unavailable
+ elsif noticetext
+ _span.small do
+ _a noticetext, href: noticepath
+ end
+ end
end
end