slitaz-dev-tools annotate slitaz-mercurial-style/templates/slitaz/graph.tmpl @ rev 170

hg style: update header link and style
author Christophe Lincoln <pankso@slitaz.org>
date Tue Apr 10 22:47:01 2012 +0200 (2012-04-10)
parents 4bea43b9ed45
children ae38bd81aa6d
rev   line source
slaxemulator@14 1 {header}
slaxemulator@14 2 <title>{repo|escape}: revision graph</title>
slaxemulator@14 3 <link rel="alternate" type="application/atom+xml"
slaxemulator@14 4 href="{url}atom-log" title="Atom feed for {repo|escape}: log" />
slaxemulator@14 5 <link rel="alternate" type="application/rss+xml"
slaxemulator@14 6 href="{url}rss-log" title="RSS feed for {repo|escape}: log" />
slaxemulator@14 7 <!--[if IE]><script type="text/javascript" src="{staticurl}excanvas.js"></script><![endif]-->
slaxemulator@14 8 </head>
slaxemulator@14 9 <body>
slaxemulator@14 10
slaxemulator@14 11 <!-- Header -->
slaxemulator@14 12 <div id="header">
pankso@42 13 <div id="logo"></div>
pankso@42 14 <div id="network">
pankso@170 15 <a href="http://www.slitaz.org/">Home</a>
pankso@42 16 <a href="http://scn.slitaz.org/">Community</a>
pankso@42 17 <a href="http://doc.slitaz.org/">Doc</a>
pankso@42 18 <a href="http://forum.slitaz.org/">Forum</a>
pankso@170 19 <a href="http://slitaz.pro/">Pro</a>
claudinei@71 20 <a href="http://bugs.slitaz.org">Bugs</a>
pankso@42 21 <a href="http://hg.slitaz.org/">Hg</a>
pankso@170 22 <a href="http://cook.slitaz.org/">Cook</a>
pankso@42 23 </div>
pankso@42 24 <h1><a href="http://hg.slitaz.org/">SliTaz Repositories</a></h1>
pankso@42 25 </div>
pankso@42 26
pankso@42 27 <!-- Block -->
pankso@42 28 <div id="block">
pankso@42 29 <!-- Navigation -->
pankso@42 30 <div id="block_nav">
pankso@42 31 <h4>Navigation</h4>
pankso@42 32 <div class="right_box">
pankso@42 33 <ul>
pankso@42 34 <li><a href="{url}rev/{node|short}{sessionvars%urlparameter}">Changeset</a></li>
pankso@42 35 <li><a href="{url}file/{node|short}{path|urlescape}{sessionvars%urlparameter}">Browse</a></li>
pankso@42 36 </ul>
pankso@42 37 </div>
pankso@42 38 <div class="left_box">
pankso@42 39 <ul>
pankso@42 40 <li><a href="{url}summary{sessionvars%urlparameter}">Summary</a></li>
pankso@42 41 <li><a href="{url}shortlog/{node|short}{sessionvars%urlparameter}">Changelog</a></li>
pankso@42 42 <li>Graph</li>
pankso@42 43 <li><a href="{url}tags{sessionvars%urlparameter}">Tags</a></li>
pankso@42 44 <li><a href="{url}branches{sessionvars%urlparameter}">Branches</a></li>
pankso@42 45 </ul>
pankso@42 46 </div>
pankso@42 47 </div>
pankso@42 48 <!-- Information/image -->
pankso@42 49 <div id="block_info">
pankso@42 50 <h4>Project: {repo|escape}</h4>
pankso@42 51 <p>
pankso@42 52 Clone project: hg clone http://hg.slitaz.org/{repo|escape}
pankso@42 53 </p>
pankso@42 54 <p>
pankso@42 55 Revision graph
pankso@42 56 </p>
pankso@42 57 <h4>Search</h4>
pankso@42 58 <form class="search" action="{url}log">
pankso@42 59 {sessionvars%hiddenformentry}
pankso@42 60 <p><input name="rev" id="search1" type="text" /></p>
pankso@42 61 <!-- <div id="hint">find changesets by author, revision,
pankso@42 62 files, or words in the commit message</div> -->
pankso@42 63 </form>
pankso@42 64 </div>
slaxemulator@14 65 </div>
slaxemulator@14 66
slaxemulator@14 67 <!-- Content -->
pankso@42 68 <div id="content">
slaxemulator@14 69
slaxemulator@14 70 <h2><a href="{url}{sessionvars%urlparameter}">{repo|escape}</a> graph</h2>
slaxemulator@14 71
slaxemulator@14 72 <div class="navigate">
slaxemulator@14 73 <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
slaxemulator@14 74 <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
slaxemulator@36 75 | rev {rev}: {changenav%navgraph}
slaxemulator@14 76 </div>
slaxemulator@14 77
slaxemulator@14 78 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
slaxemulator@14 79
slaxemulator@14 80 <div id="wrapper">
slaxemulator@14 81 <ul id="nodebgs"></ul>
slaxemulator@14 82 <canvas id="graph" width="224" height="{canvasheight}"></canvas>
slaxemulator@14 83 <ul id="graphnodes"></ul>
slaxemulator@14 84 </div>
slaxemulator@14 85
slaxemulator@14 86 <script type="text/javascript" src="{staticurl}graph.js"></script>
slaxemulator@14 87 <script type="text/javascript">
slaxemulator@14 88 <!-- hide script content
slaxemulator@14 89
slaxemulator@14 90 var data = {jsdata|json};
slaxemulator@14 91 var graph = new Graph();
slaxemulator@14 92 graph.scale({bg_height});
slaxemulator@14 93
slaxemulator@34 94 graph.edge = function(x0, y0, x1, y1, color) \{
slaxemulator@14 95
slaxemulator@14 96 this.setColor(color, 0.0, 0.65);
slaxemulator@14 97 this.ctx.beginPath();
slaxemulator@14 98 this.ctx.moveTo(x0, y0);
slaxemulator@14 99 this.ctx.lineTo(x1, y1);
slaxemulator@14 100 this.ctx.stroke();
slaxemulator@14 101
slaxemulator@14 102 }
slaxemulator@14 103
slaxemulator@14 104 var revlink = '<li style="_STYLE"><span class="desc">';
slaxemulator@14 105 revlink += '<a href="{url}rev/_NODEID{sessionvars%urlparameter}" title="_NODEID">_DESC</a>';
slaxemulator@14 106 revlink += '</span>_TAGS<span class="info">_DATE ago, by _USER</span></li>';
slaxemulator@14 107
slaxemulator@34 108 graph.vertex = function(x, y, color, parity, cur) \{
slaxemulator@14 109
slaxemulator@14 110 this.ctx.beginPath();
slaxemulator@14 111 color = this.setColor(color, 0.25, 0.75);
slaxemulator@14 112 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
slaxemulator@14 113 this.ctx.fill();
slaxemulator@14 114
slaxemulator@14 115 var bg = '<li class="bg parity' + parity + '"></li>';
slaxemulator@14 116 var left = (this.columns + 1) * this.bg_height;
slaxemulator@14 117 var nstyle = 'padding-left: ' + left + 'px;';
slaxemulator@14 118 var item = revlink.replace(/_STYLE/, nstyle);
slaxemulator@14 119 item = item.replace(/_PARITY/, 'parity' + parity);
slaxemulator@14 120 item = item.replace(/_NODEID/, cur[0]);
slaxemulator@14 121 item = item.replace(/_NODEID/, cur[0]);
slaxemulator@14 122 item = item.replace(/_DESC/, cur[3]);
slaxemulator@14 123 item = item.replace(/_USER/, cur[4]);
slaxemulator@14 124 item = item.replace(/_DATE/, cur[5]);
slaxemulator@14 125
slaxemulator@14 126 var tagspan = '';
slaxemulator@34 127 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) \{
slaxemulator@14 128 tagspan = '<span class="logtags">';
slaxemulator@35 129 if (cur[6][1]) \{
slaxemulator@14 130 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
slaxemulator@14 131 tagspan += cur[6][0] + '</span> ';
slaxemulator@34 132 } else if (!cur[6][1] && cur[6][0] != 'default') \{
slaxemulator@14 133 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
slaxemulator@14 134 tagspan += cur[6][0] + '</span> ';
slaxemulator@14 135 }
slaxemulator@34 136 if (cur[7].length) \{
slaxemulator@34 137 for (var t in cur[7]) \{
slaxemulator@14 138 var tag = cur[7][t];
slaxemulator@14 139 tagspan += '<span class="tag">' + tag + '</span> ';
slaxemulator@14 140 }
slaxemulator@14 141 }
slaxemulator@14 142 tagspan += '</span>';
slaxemulator@14 143 }
slaxemulator@14 144
slaxemulator@14 145 item = item.replace(/_TAGS/, tagspan);
slaxemulator@14 146 return [bg, item];
slaxemulator@14 147
slaxemulator@14 148 }
slaxemulator@14 149
slaxemulator@14 150 graph.render(data);
slaxemulator@14 151
slaxemulator@14 152 // stop hiding script -->
slaxemulator@14 153 </script>
slaxemulator@14 154
slaxemulator@14 155 <div class="navigate">
slaxemulator@14 156 <a href="{url}graph/{rev}{lessvars%urlparameter}">less</a>
slaxemulator@14 157 <a href="{url}graph/{rev}{morevars%urlparameter}">more</a>
slaxemulator@36 158 | rev {rev}: {changenav%navgraph}
slaxemulator@14 159 </div>
slaxemulator@14 160
slaxemulator@14 161 <!-- End of content -->
slaxemulator@14 162 </div>
slaxemulator@14 163
slaxemulator@14 164 {footer}