wok-next diff slitaz-mercurial-style/stuff/templates/slitaz/graph.tmpl @ rev 6715

linux/bootloader.sh: fix signed 16bits
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 14 17:08:12 2010 +0200 (2010-10-14)
parents
children 5e5a67e17e5a
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/slitaz-mercurial-style/stuff/templates/slitaz/graph.tmpl	Thu Oct 14 17:08:12 2010 +0200
     1.3 @@ -0,0 +1,141 @@
     1.4 +{header}
     1.5 +<title>{repo|escape}: revision graph</title>
     1.6 +<link rel="alternate" type="application/atom+xml"
     1.7 +   href="{url}atom-log" title="Atom feed for {repo|escape}: log" />
     1.8 +<link rel="alternate" type="application/rss+xml"
     1.9 +   href="{url}rss-log" title="RSS feed for {repo|escape}: log" />
    1.10 +<!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
    1.11 +</head>
    1.12 +<body>
    1.13 +
    1.14 +<!-- Header -->
    1.15 +<div id="header">
    1.16 +    <a href="http://hg.slitaz.org/"><img id="logo"
    1.17 +    src="{staticurl}logo.png" title="www.slitaz.org" alt="www.slitaz.org"
    1.18 +    style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    1.19 +    <p id="titre">#!/Hg/repos</p>
    1.20 +</div>
    1.21 +
    1.22 +<div class="container">
    1.23 +<div id="nav">
    1.24 +
    1.25 +<div class="nav_box">
    1.26 +<h4>Navigation</h4>
    1.27 +<ul>
    1.28 +	<li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">log</a></li>
    1.29 +	<li class="active">graph</li>
    1.30 +	<li><a href="{url}tags{sessionvars%urlparameter}">tags</a></li>
    1.31 +	<li><a href="{url}branches{sessionvars%urlparameter}">branches</a></li>
    1.32 +	<li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">changeset</a></li>
    1.33 +	<li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">browse</a></li>
    1.34 +</ul>
    1.35 +</div>
    1.36 +
    1.37 +<div class="nav_box">
    1.38 +<h4>Search</h4>
    1.39 +<form class="search" action="{url}log">
    1.40 +{sessionvars%hiddenformentry}
    1.41 +<p><input name="rev" id="search1" type="text" /></p>
    1.42 +<div id="hint">find changesets by author, revision,
    1.43 +files, or words in the commit message</div>
    1.44 +</form>
    1.45 +</div>
    1.46 +</div>
    1.47 +
    1.48 +<div class="main">
    1.49 +<h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a></h2>
    1.50 +<h3>graph</h3>
    1.51 +
    1.52 +<div class="navigate">
    1.53 +<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
    1.54 +<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
    1.55 +| rev {rev}: {changenav%navgraphentry}
    1.56 +</div>
    1.57 +
    1.58 +<noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
    1.59 +
    1.60 +<div id="wrapper">
    1.61 +<ul id="nodebgs"></ul>
    1.62 +<canvas id="graph" width="224" height="{canvasheight}"></canvas>
    1.63 +<ul id="graphnodes"></ul>
    1.64 +</div>
    1.65 +
    1.66 +<script type="text/javascript" src="{staticurl}graph.js"></script>
    1.67 +<script type="text/javascript">
    1.68 +<!-- hide script content
    1.69 +
    1.70 +var data = {jsdata|json};
    1.71 +var graph = new Graph();
    1.72 +graph.scale({bg_height});
    1.73 +
    1.74 +graph.edge = function(x0, y0, x1, y1, color) {
    1.75 +
    1.76 +	this.setColor(color, 0.0, 0.65);
    1.77 +	this.ctx.beginPath();
    1.78 +	this.ctx.moveTo(x0, y0);
    1.79 +	this.ctx.lineTo(x1, y1);
    1.80 +	this.ctx.stroke();
    1.81 +
    1.82 +}
    1.83 +
    1.84 +var revlink = '<li style="_STYLE"><span class="desc">';
    1.85 +revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
    1.86 +revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>';
    1.87 +
    1.88 +graph.vertex = function(x, y, color, parity, cur) {
    1.89 +
    1.90 +	this.ctx.beginPath();
    1.91 +	color = this.setColor(color, 0.25, 0.75);
    1.92 +	this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
    1.93 +	this.ctx.fill();
    1.94 +
    1.95 +	var bg = '<li class="bg parity' + parity + '"></li>';
    1.96 +	var left = (this.columns + 1) * this.bg_height;
    1.97 +	var nstyle = 'padding-left: ' + left + 'px;';
    1.98 +	var item = revlink.replace(/_STYLE/, nstyle);
    1.99 +	item = item.replace(/_PARITY/, 'parity' + parity);
   1.100 +	item = item.replace(/_NODEID/, cur[0]);
   1.101 +	item = item.replace(/_NODEID/, cur[0]);
   1.102 +	item = item.replace(/_DESC/, cur[3]);
   1.103 +	item = item.replace(/_USER/, cur[4]);
   1.104 +	item = item.replace(/_DATE/, cur[5]);
   1.105 +
   1.106 +	var tagspan = '';
   1.107 +	if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) {
   1.108 +		tagspan = '<span class="logtags">';
   1.109 +		if (cur[6][1]) {
   1.110 +			tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
   1.111 +			tagspan += cur[6][0] + '</span> ';
   1.112 +		} else if (!cur[6][1] && cur[6][0] != 'default') {
   1.113 +			tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
   1.114 +			tagspan += cur[6][0] + '</span> ';
   1.115 +		}
   1.116 +		if (cur[7].length) {
   1.117 +			for (var t in cur[7]) {
   1.118 +				var tag = cur[7][t];
   1.119 +				tagspan += '<span class="tag">' + tag + '</span> ';
   1.120 +			}
   1.121 +		}
   1.122 +		tagspan += '</span>';
   1.123 +	}
   1.124 +
   1.125 +	item = item.replace(/_TAGS/, tagspan);
   1.126 +	return [bg, item];
   1.127 +
   1.128 +}
   1.129 +
   1.130 +graph.render(data);
   1.131 +
   1.132 +// stop hiding script -->
   1.133 +</script>
   1.134 +
   1.135 +<div class="navigate">
   1.136 +<a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
   1.137 +<a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
   1.138 +| rev {rev}: {changenav%navgraphentry}
   1.139 +</div>
   1.140 +
   1.141 +</div>
   1.142 +</div>
   1.143 +
   1.144 +{footer}