diff mercurial/templates/gitweb/graph.tmpl @ 35220:dc623009e0b0

gitweb: render changesets server-side on /graph page
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 04 Dec 2017 17:43:45 +0800
parents 69a865dc2ada
children ad0de63e1d6a
line wrap: on
line diff
--- a/mercurial/templates/gitweb/graph.tmpl	Mon Dec 04 16:21:15 2017 +0800
+++ b/mercurial/templates/gitweb/graph.tmpl	Mon Dec 04 17:43:45 2017 +0800
@@ -39,7 +39,7 @@
 <div id="wrapper">
 <ul id="nodebgs"></ul>
 <canvas id="graph" width="{canvaswidth}" height="{canvasheight}"></canvas>
-<ul id="graphnodes"></ul>
+<ul id="graphnodes">{nodes%graphentry}</ul>
 </div>
 
 <script{if(nonce, ' nonce="{nonce}"')}>
@@ -58,39 +58,13 @@
 	
 	var bg = '<li class="bg parity' + parity + '"></li>';
 	var left = (this.bg_height - this.box_size) + (this.columns + 1) * this.box_size;
-	var nstyle = 'padding-left: ' + left + 'px;';
 	
-	var tagspan = '';
-	if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) \{
-		tagspan = '<span class="logtags">';
-		if (cur[6][1]) \{
-			tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
-			tagspan += cur[6][0] + '</span> ';
-		} else if (!cur[6][1] && cur[6][0] != 'default') \{
-			tagspan += '<span class="inbranchtag" 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="tagtag">' + tag + '</span> ';
-			}
-		}
-		if (cur[8].length) \{
-			for (var t in cur[8]) \{
-				var bookmark = cur[8][t];
-				tagspan += '<span class="bookmarktag">' + bookmark + '</span> ';
-			}
-		}
-		tagspan += '</span>';
+	var item = document.querySelector('[data-node="' + cur.node + '"]');
+	if (item) \{
+		item.style.paddingLeft = left + 'px';
 	}
 	
-	var item = '<li style="' + nstyle + '"><span class="desc">';
-	item += '<a class="list" href="{url|urlescape}rev/' + cur[0] + '{sessionvars%urlparameter}" title="' + cur[0] + '"><b>' + cur[3] + '</b></a>';
-	item += '</span> ' + tagspan + '';
-	item += '<span class="info">' + cur[5] + ', by ' + cur[4] + '</span></li>';
-
-	return [bg, item];
+	return [bg, ''];
 	
 }