Author: sebb
Date: Sun Jul 6 20:51:18 2025
New Revision: 1927017
URL: http://svn.apache.org/viewvc?rev=1927017&view=rev
Log:
Add check for current agenda
Modified:
comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py
comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js
comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
Modified: comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py?rev=1927017&r1=1927016&r2=1927017&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py (original)
+++ comdev/reporter.apache.org/trunk/scripts/rapp/whimsy.py Sun Jul 6 20:51:18
2025
@@ -135,6 +135,7 @@ def agenda(environ, user, fproject = Non
'filed': report and report.get('report') and True or False,
'report': report,
'comments': comments,
+ 'timestamp': agenda[0].get('timestamp', 0),
}
return {
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js?rev=1927017&r1=1927016&r2=1927017&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/unified.js Sun Jul
6 20:51:18 2025
@@ -276,7 +276,13 @@ function UnifiedEditor_compile() {
text += "<br/><button class='btn btn-warning' onclick='save_draft();'>Save
as draft</button>"
if (!meta_data.found) {
text += " <button class='btn btn-secondary' disabled
title='Your project is not listed in the current agenda!'>Publish via
Whimsy</button>";
- text += "<br/><span style='color: maroon;'>Your project is not
expected to report this month. You may save drafts but you cannot publish
yet.</span>";
+ // Is there a timestamp to check?
+ let ts = 'timestamp' in meta_data ? meta_data.timestamp : 0
+ if (ts > 0 && ts < new Date().valueOf()) {
+ text += "<br/><span style='color: maroon;'>This month's agenda is
not yet available. You may save drafts but you cannot publish yet.</span>";
+ } else { // assume we have a recent agenda
+ text += "<br/><span style='color: maroon;'>Your project is not
expected to report this month. You may save drafts but you cannot publish
yet.</span>";
+ }
}
else if (this.compiles) text += " <button
onclick='publish_report();' class='btn btn-success'>Publish via Whimsy</button>"
else text += " <button class='btn btn-secondary' disabled
title='Please fix the above issues before you can publish'>Publish via
Whimsy</button>"
Modified: comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js
URL:
http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js?rev=1927017&r1=1927016&r2=1927017&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sun Jul 6
20:51:18 2025
@@ -3571,7 +3571,13 @@ function UnifiedEditor_compile() {
text += "<br/><button class='btn btn-warning' onclick='save_draft();'>Save
as draft</button>"
if (!meta_data.found) {
text += " <button class='btn btn-secondary' disabled
title='Your project is not listed in the current agenda!'>Publish via
Whimsy</button>";
- text += "<br/><span style='color: maroon;'>Your project is not
expected to report this month. You may save drafts but you cannot publish
yet.</span>";
+ // Is there a timestamp to check?
+ let ts = 'timestamp' in meta_data ? meta_data.timestamp : 0
+ if (ts > 0 && ts < new Date().valueOf()) {
+ text += "<br/><span style='color: maroon;'>This month's agenda is
not yet available. You may save drafts but you cannot publish yet.</span>";
+ } else { // assume we have a recent agenda
+ text += "<br/><span style='color: maroon;'>Your project is not
expected to report this month. You may save drafts but you cannot publish
yet.</span>";
+ }
}
else if (this.compiles) text += " <button
onclick='publish_report();' class='btn btn-success'>Publish via Whimsy</button>"
else text += " <button class='btn btn-secondary' disabled
title='Please fix the above issues before you can publish'>Publish via
Whimsy</button>"