community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1864320 - in /comdev/reporter.apache.org/trunk/site/wizard/js: source/generators.js wizard.js
Date Sat, 03 Aug 2019 07:58:30 GMT
Author: humbedooh
Date: Sat Aug  3 07:58:30 2019
New Revision: 1864320

URL: http://svn.apache.org/viewvc?rev=1864320&view=rev
Log:
always show last 3 releases

Modified:
    comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
    comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js

Modified: comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js
URL: http://svn.apache.org/viewvc/comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js?rev=1864320&r1=1864319&r2=1864320&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/source/generators.js Sat Aug  3 07:58:30
2019
@@ -291,14 +291,23 @@ function activity_tips(data) {
     
     // Releases
     let rtxt = "";
+    let new_releases = 0;
     for (var rel in data.releases[project]) {
         let reldate = moment(data.releases[project][rel] * 1000.0);
         if (reldate > three_months_ago) {
+          new_releases++;
+        }
+    }
+    let releases_shown = 0;
+    for (var rel in data.releases[project]) {
+        let reldate = moment(data.releases[project][rel] * 1000.0);
+        if (reldate > three_months_ago || (new_releases < 3 && releases_shown
< 3)) {
             rtxt += "<li>%s was released on %s.</li>".format(rel, reldate.format('YYYY-MM-DD'));
+            releases_shown++;
         }
     }
     if (rtxt != '') {
-        rtxt = "<h6>Releases this quarter: </h6><ul>" + rtxt + "</ul><hr/>";
+        rtxt = "<h6>Recent releases: </h6><ul>" + rtxt + "</ul><hr/>";
     }
     
     

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=1864320&r1=1864319&r2=1864320&view=diff
==============================================================================
--- comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js (original)
+++ comdev/reporter.apache.org/trunk/site/wizard/js/wizard.js Sat Aug  3 07:58:30 2019
@@ -1460,14 +1460,23 @@ function activity_tips(data) {
     
     // Releases
     let rtxt = "";
+    let new_releases = 0;
     for (var rel in data.releases[project]) {
         let reldate = moment(data.releases[project][rel] * 1000.0);
         if (reldate > three_months_ago) {
+          new_releases++;
+        }
+    }
+    let releases_shown = 0;
+    for (var rel in data.releases[project]) {
+        let reldate = moment(data.releases[project][rel] * 1000.0);
+        if (reldate > three_months_ago || (new_releases < 3 && releases_shown
< 3)) {
             rtxt += "<li>%s was released on %s.</li>".format(rel, reldate.format('YYYY-MM-DD'));
+            releases_shown++;
         }
     }
     if (rtxt != '') {
-        rtxt = "<h6>Releases this quarter: </h6><ul>" + rtxt + "</ul><hr/>";
+        rtxt = "<h6>Recent releases: </h6><ul>" + rtxt + "</ul><hr/>";
     }
     
     



Mime
View raw message