community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1680433 - in /comdev/projects.apache.org/site: committee.html js/projects.js
Date Wed, 20 May 2015 00:36:50 GMT
Author: hboutemy
Date: Wed May 20 00:36:50 2015
New Revision: 1680433

URL: http://svn.apache.org/r1680433
Log:
move PMC info in committee.html and rephrase TLP to Committee

Added:
    comdev/projects.apache.org/site/committee.html
      - copied, changed from r1679869, comdev/projects.apache.org/site/project.html
Modified:
    comdev/projects.apache.org/site/js/projects.js

Copied: comdev/projects.apache.org/site/committee.html (from r1679869, comdev/projects.apache.org/site/project.html)
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/committee.html?p2=comdev/projects.apache.org/site/committee.html&p1=comdev/projects.apache.org/site/project.html&r1=1679869&r2=1680433&rev=1680433&view=diff
==============================================================================
--- comdev/projects.apache.org/site/project.html (original)
+++ comdev/projects.apache.org/site/committee.html Wed May 20 00:36:50 2015
@@ -8,9 +8,9 @@
    <script src="js/jquery.js" type="text/javascript"></script>
    <script src="script.js"></script>
    <script src="js/projects.js" charset="UTF-8"></script>
-   <title>Apache Project Information</title>
+   <title>Apache Committee Information</title>
 </head>
-<body onload="preloadEverything(buildProjectPage);">
+<body onload="preloadEverything(buildCommitteePage);">
 
 <div id="logo"></div>
 <div id='cssmenu'>

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1680433&r1=1680432&r2=1680433&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Wed May 20 00:36:50 2015
@@ -309,79 +309,25 @@ function renderProjectPage(project, proj
     }
 
     // Title + description
-    var pt = "Top Level Project";
+    var pt = "";
     if (isIncubating) {
         pt = "Incubating";
     } else if (project && !tlpsByName[project.name] && tlps[project.pmc])
{
-	pt = (project.pmc == "attic") ? "in the Attic" : "Sub-project"
+	pt = (project.pmc == "attic") ? "in the Attic" : ""
     } else {
 	isTLP = true
     }
     var name = (project && project.name) ? project.name : tlp.name;
-    if (!name.match(/incubating/i)) {
+    if (!name.match(/incubating/i) && pt != "") {
         name +=  " (" + pt + ")";
     }
-    obj.innerHTML = "<h1>" + name + "</h1>";
+    obj.innerHTML = "<h1>" + name + " <font size='-1'>(a project managed by <a
href='committee.html?" + tlpId + "'>" + tlp.name + " Committee</a>)</font></h1>";
 
     // project description
     appendElementWithInnerHTML(obj,'p',description.replace(/([^\r\n]+)\r?\n\r?\n/g,function(a)
{ return "<p>"+a+"</p>"}));
 
     var ul = document.createElement('ul');
 
-    if (isTLP) {
-        appendElementWithInnerHTML(obj,'h4',"Top Level Project data:");
-
-        appendLiInnerHTML(ul, "<b>Website:</b> <a href='" + tlp.homepage +
"' target='_blank'>" + tlp.homepage + "</a>");
-
-        appendLiInnerHTML(ul, "<b>Project established:</b> " + tlp.established);
-
-        // VP
-        appendLiInnerHTML(ul, "<b>PMC Chair:</b> " + people[tlp.chair]);
-
-        // Reporting cycle
-        var cycles = [ "every month", "January, April, July, October", "February, May, August,
November", "March, June, September, December" ];
-        appendLiInnerHTML(ul, "<b>Reporting cycle:</b> " + cycles[tlp.reporting]
+ ", see <a href='https://whimsy.apache.org/board/minutes/" + camelCase(tlpId) + ".html'>minutes</a>");
-
-        // PMC
-        if (unixgroups[unixgroup+"-pmc"]) {
-            var pmcl = [];
-            var pmcgroup = unixgroups[unixgroup+"-pmc"];
-            for (i in pmcgroup) {
-                pmcl.push(linkCommitterIndex(pmcgroup[i]));
-            }
-            appendLiInnerHTML(ul, "<b>PMC Members (" + pmcgroup.length + "):</b>
<blockquote>" + pmcl.join(", &nbsp;") + "</blockqoute>");
-        }
-
-        // Committers
-        if (unixgroups[unixgroup+"-pmc"]) {
-            var commitl = [];
-            var commitgroup = unixgroups[unixgroup];
-            for (i in commitgroup) {
-                commitl.push(linkCommitterIndex(commitgroup[i]));
-            }
-            appendLiInnerHTML(ul, "<b>Committers (" + commitgroup.length + "):</b>
<blockquote>" + commitl.join(", &nbsp;") + "</blockqoute>");
-        }
-
-        var subprojects = [];
-        for (p in projects) {
-            if (projects[p].pmc == tlpId) {
-                subprojects.push(p);
-            }
-        }
-        if (subprojects.length > 1) {
-            var phtml = [];
-            for (p in subprojects) {
-                p = subprojects[p];
-                phtml.push(projectLink(p));
-            }
-            appendLiInnerHTML(ul, "<b>Sub-projects (" + subprojects.length + "):</b>
" + phtml.join(", "));
-        }
-
-        obj.appendChild(ul);
-
-        ul = document.createElement('ul');
-    }
-
     // TLP Owner?
     if (project.pmc) {
         if (project.pmc.match(/http:\/\/([a-z0-9]+)/i)) {
@@ -492,6 +438,85 @@ function buildProjectPage() {
     GetAsyncJSON("json/projects/" + projectId + ".json?" + Math.random(), projectId, renderProjectPage)
 }
 
+function renderCommitteePage(committeeId) {
+    var obj = document.getElementById('contents');
+
+    if (!tlps[committeeId]) {
+        obj.innerHTML = "<h2>Sorry, I don't have any information available about this
committee</h2>";
+        return;
+    }
+
+    var unixgroup = committeeId; // there are probably a few exceptions...
+    var tlp = tlps[committeeId];
+
+    obj.innerHTML = "<h1>" + tlp.name + " Committee</h1>";
+
+    var ul = document.createElement('ul');
+
+    appendElementWithInnerHTML(obj, 'h4', "Committee data:");
+
+    appendLiInnerHTML(ul, "<b>Website:</b> <a href='" + tlp.homepage + "'
target='_blank'>" + tlp.homepage + "</a>");
+
+    appendLiInnerHTML(ul, "<b>Committee established:</b> " + tlp.established);
+
+    // VP
+    appendLiInnerHTML(ul, "<b>PMC Chair:</b> " + people[tlp.chair]);
+
+    // Reporting cycle
+    var cycles = ["every month", "January, April, July, October", "February, May, August,
November", "March, June, September, December"];
+    appendLiInnerHTML(ul, "<b>Reporting cycle:</b> " + cycles[tlp.reporting]
+ ", see <a href='https://whimsy.apache.org/board/minutes/" + camelCase(committeeId) +
".html'>minutes</a>");
+
+    // PMC
+    if (unixgroups[unixgroup + "-pmc"]) {
+        var pmcl = [];
+        var pmcgroup = unixgroups[unixgroup + "-pmc"];
+        for (i in pmcgroup) {
+            pmcl.push(linkCommitterIndex(pmcgroup[i]));
+        }
+        appendLiInnerHTML(ul, "<b>PMC Members (" + pmcgroup.length + "):</b>
<blockquote>" + pmcl.join(", &nbsp;") + "</blockqoute>");
+    }
+
+    // Committers
+    if (unixgroups[unixgroup + "-pmc"]) {
+        var commitl = [];
+        var commitgroup = unixgroups[unixgroup];
+        for (i in commitgroup) {
+            commitl.push(linkCommitterIndex(commitgroup[i]));
+        }
+        appendLiInnerHTML(ul, "<b>Committers (" + commitgroup.length + "):</b>
<blockquote>" + commitl.join(", &nbsp;") + "</blockqoute>");
+    }
+
+    obj.appendChild(ul);
+
+    var subprojects = [];
+    for (p in projects) {
+        if (projects[p].pmc == committeeId) {
+            subprojects.push(p);
+        }
+    }
+    if ((subprojects.length == 0) && (committeeId != 'comdev') && (committeeId
!= 'labs')) {
+        // if a committee did not declare any project, consider there is a default one with
the id of the committee
+        // only Labs and Community Development don't manage projects
+        subprojects.push({ 'id': committeeId, 'name': tlp.name, 'pmc': committeeId });
+    }
+    if (subprojects.length >= 1) {
+        appendElementWithInnerHTML(obj, 'h4', "Projects managed by this Committee:");
+
+        ul = document.createElement('ul');
+        var phtml = [];
+        for (p in subprojects) {
+            p = subprojects[p];
+            appendLiInnerHTML(ul, projectLink(p));
+        }
+        obj.appendChild(ul);
+    }
+}
+
+function buildCommitteePage() {
+    var committeeId = document.location.search.substr(1);
+    renderCommitteePage(committeeId);
+}
+
 
 // ------------ Projects listing ------------\\
 
@@ -499,12 +524,17 @@ function camelCase(str) {
     return str.replace(/^([a-z])(.+)$/, function(c,a,b) { return a.toUpperCase() + b.toLowerCase()
} );
 }
 
-function projectIcon(name) {
-    if (isTLP(name)) {
-	return "<img src='images/tlp.png' title='Top Level Project' style='vertical-align: middle;
padding: 2px;'/> "
-    } else {
-	return "<img src='images/sub.png' title='Sub-project' style='vertical-align: middle;
padding: 2px;'/> "
-    }
+function committeeIcon() {
+     return "<img src='images/tlp.png' title='Committee' style='vertical-align: middle;
padding: 2px;'/> ";
+}
+
+function projectIcon() {
+    return "<img src='images/sub.png' title='Project' style='vertical-align: middle; padding:
2px;'/> "
+}
+
+function committeeLink(id) {
+    var tlp = tlps[id];
+    return "<a href='committee.html?" + id + "'>" + tlp.name + "</a>";
 }
 
 function projectLink(id) {
@@ -688,7 +718,8 @@ function renderProjectsByDate() {
 	    for (i in tlpsByName) {
 		i = tlpsByName[i];
                 if (i.established == date) {
-                    appendLiInnerHTML(cul, projectIcon(i.name) + projectLink(i.id));
+                    //appendLiInnerHTML(cul, projectIcon(i.name) + projectLink(i.id));
+                    appendLiInnerHTML(cul, committeeIcon() + committeeLink(i.id));
                 }
 	    }
 	    li.appendChild(cul);
@@ -749,27 +780,27 @@ function renderProjectsByPMC() {
     obj.innerHTML = "";
     var projectsSorted = sortProjects();
 
-	var dcount = {};
+    var dcount = {};
     for (tlp in tlps) {
         dcount[tlp] = 0;
     }
-	for (project in projects) {
-        project = projects[project];
-	    // Fix Incubating projects
-	    if (project.name.match("incubating", "i")) {
-            project.pmc = 'incubator'
-	    }
-	    if (tlps[project.pmc]) {
-    		dcount[project.pmc]++;
-	    }
-	}
+    for (project in projects) {
+    project = projects[project];
+        // Fix Incubating projects
+        if (project.name.match("incubating", "i")) {
+        project.pmc = 'incubator'
+        }
+        if (tlps[project.pmc]) {
+            dcount[project.pmc]++;
+        }
+    }
 
-	// Construct pmc list
-	var ul = document.createElement('ul');
-	
-	for (lpmc in tlps) {
+    // Construct pmc list
+    var ul = document.createElement('ul');
+
+    for (lpmc in tlps) {
         var c = dcount[lpmc];
-	    var li = document.createElement('li');
+        var li = document.createElement('li');
         var cul = document.createElement('ul');
         if (c == 0) {
             appendLiInnerHTML(cul, projectIcon(tlps[lpmc].name) + "<a href='project.html?"
+ lpmc + "'>" + tlps[lpmc].name + "</a>");
@@ -790,12 +821,12 @@ function renderProjectsByPMC() {
                 }
             }
         }
-        li.innerHTML = "<h3><a id='" + lpmc + "'>" + tlps[lpmc].name + " (" +
c + ")</a>" + (c>0?":": "") + "</h3>";
+        li.innerHTML = "<h3>" + committeeIcon() + "<a id='" + lpmc + "' href='committee.html?"+
lpmc + "'>" + tlps[lpmc].name + " PMC</a> (" + c + ")" + (c>0?":": "") + "</h3>";
         li.appendChild(cul);
-	    ul.appendChild(li);
-	}
-	
-	obj.appendChild(ul);
+        ul.appendChild(li);
+    }
+
+    obj.appendChild(ul);
 
     if (location.hash.length > 1) {
         setTimeout(function() { location.href = location.href;}, 250);



Mime
View raw message