community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1652030 - /comdev/projects.apache.org/site/js/projects.js
Date Thu, 15 Jan 2015 10:14:21 GMT
Author: humbedooh
Date: Thu Jan 15 10:14:20 2015
New Revision: 1652030

URL: http://svn.apache.org/r1652030
Log:
Also list project categories in project info view.

Modified:
    comdev/projects.apache.org/site/js/projects.js

Modified: comdev/projects.apache.org/site/js/projects.js
URL: http://svn.apache.org/viewvc/comdev/projects.apache.org/site/js/projects.js?rev=1652030&r1=1652029&r2=1652030&view=diff
==============================================================================
--- comdev/projects.apache.org/site/js/projects.js (original)
+++ comdev/projects.apache.org/site/js/projects.js Thu Jan 15 10:14:20 2015
@@ -260,6 +260,19 @@ function renderProjectPage(json, state)
 	obj.appendChild(p);	
 	var ul = document.createElement('ul');
 	
+	// Categories
+	if (json['category']) {
+	    var li = document.createElement('li');
+	    pl = json['category']
+	    var arr = pl.split(/,\s*/)
+	    pls = "";
+	    for (i in arr) {
+		pls += "<a href='/projects.html?category#" + arr[i] + "'>" + arr[i] + "</a>
&nbsp; "
+	    }
+	    li.innerHTML = "<b>Category:</b> " + pls
+	    ul.appendChild(li)
+	}
+	
 	// Website
 	if (json.homepage) {
 	    var li = document.createElement('li');



Mime
View raw message