templates/coal/graph.tmpl
changeset 7408 f031a12dfc31
parent 7345 55651328dfcc
--- a/templates/coal/graph.tmpl	Tue Nov 25 22:51:10 2008 +0100
+++ b/templates/coal/graph.tmpl	Tue Nov 25 22:32:11 2008 +0100
@@ -70,8 +70,7 @@
 
 var revlink = '<li style="_STYLE"><span class="desc">';
 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
-revlink += '</span><span class="tag">_TAGS</span>';
-revlink += '<span class="info">_DATE ago, by _USER</span></li>';
+revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>';
 
 graph.vertex = function(x, y, color, parity, cur) {
 	
@@ -90,8 +89,27 @@
 	item = item.replace(/_DESC/, cur[3]);
 	item = item.replace(/_USER/, cur[4]);
 	item = item.replace(/_DATE/, cur[5]);
-	item = item.replace(/_TAGS/, cur[7].join('&nbsp; '));
+
+	var tagspan = '';
+	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
+		tagspan = '<span class="logtags">';
+		if (cur[6][1]) {
+			tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		} else if (!cur[6][1] && cur[6][0] != 'default') {
+			tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
+			tagspan += cur[6][0] + '</span> ';
+		}
+		if (cur[7].length) {
+			for (var t in cur[7]) {
+				var tag = cur[7][t];
+				tagspan += '<span class="tag">' + tag + '</span> ';
+			}
+		}
+		tagspan += '</span>';
+	}
 	
+	item = item.replace(/_TAGS/, tagspan);
 	return [bg, item];
 	
 }