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 0bf31788 Countdown
0bf31788 is described below

commit 0bf3178803b7a4bcf7dba2026a5e13c0095efd3b
Author: Sebb <s...@apache.org>
AuthorDate: Sun Feb 18 13:39:31 2024 +0000

    Countdown
---
 www/members/board-nominations.cgi | 12 ++++++++++++
 www/members/nominations.cgi       | 11 +++++++++++
 2 files changed, 23 insertions(+)

diff --git a/www/members/board-nominations.cgi 
b/www/members/board-nominations.cgi
index 2c7ee5d3..9db4b23a 100755
--- a/www/members/board-nominations.cgi
+++ b/www/members/board-nominations.cgi
@@ -9,6 +9,11 @@ require 'whimsy/asf'
 require 'whimsy/asf/member-files'
 require 'whimsy/asf/meeting-util'
 require_relative '../../tools/parsemail'
+require 'whimsy/asf/time-utils'
+
+t_now = Time.now.to_i
+t_end = ASF::MeetingUtil.get_invite_times.first
+
 
 # link to members private-arch
 MBOX = 'https://mail-search.apache.org/members/private-arch/members/'
@@ -104,6 +109,13 @@ _html do
         _ 'Entries are highlighted if they are not present in both lists.'
       }
     ) do
+      if t_end > t_now
+        _h3 "Nominations close in #{ASFTime.secs2text(t_end - t_now)} at 
#{Time.at(t_end).utc}"
+        _p 'Please ensure all posted nominations are added to SVN before then.'
+      else
+        _h1 'Nominations are now closed!'
+        _p 'Nominations must no longer be added to the nominations file'
+      end
       cur_mtg_dir = File.basename(ASF::MeetingUtil.get_latest(MEETINGS))
       nominations, emails = setup_data
       _div.flexbox do
diff --git a/www/members/nominations.cgi b/www/members/nominations.cgi
index 768d81b5..ab0a5d39 100755
--- a/www/members/nominations.cgi
+++ b/www/members/nominations.cgi
@@ -9,6 +9,10 @@ require 'whimsy/asf'
 require 'whimsy/asf/member-files'
 require 'whimsy/asf/meeting-util'
 require_relative '../../tools/parsemail'
+require 'whimsy/asf/time-utils'
+
+t_now = Time.now.to_i
+t_end = ASF::MeetingUtil.get_invite_times.first
 
 # link to members private-arch
 MBOX = 'https://mail-search.apache.org/members/private-arch/members/'
@@ -116,6 +120,13 @@ _html do
         _ 'Entries are highlighted if they are not present in both lists.'
       }
     ) do
+      if t_end > t_now
+        _h3 "Nominations close in #{ASFTime.secs2text(t_end - t_now)} at 
#{Time.at(t_end).utc}"
+        _p 'Please ensure all posted nominations are added to SVN before then.'
+      else
+        _h1 'Nominations are now closed!'
+        _p 'Nominations must no longer be added to the nominations file'
+      end
       cur_mtg_dir = File.basename(ASF::MeetingUtil.get_latest(MEETINGS))
       nominations, emails = setup_data
       _div.flexbox do

Reply via email to