Mercurial > kallithea
comparison pylons_app/templates/changelog/changelog.html @ 143:787689980bcd
Tempaltes changes for changelog and shortlog, changed menu generation in base
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 09 May 2010 17:23:11 +0200 |
parents | |
children | 50a39f923f31 |
comparison
equal
deleted
inserted
replaced
142:f7218849798a | 143:787689980bcd |
---|---|
1 <%inherit file="/base/base.html"/> | |
2 | |
3 <%def name="title()"> | |
4 ${_('Repository managment')} | |
5 </%def> | |
6 <%def name="breadcrumbs()"> | |
7 ${h.link_to(u'Home',h.url('/'))} | |
8 / | |
9 ${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))} | |
10 / | |
11 ${_('changelog')} | |
12 </%def> | |
13 <%def name="page_nav()"> | |
14 <form action="log"> | |
15 <dl class="search"> | |
16 <dt><label>Search: </label></dt> | |
17 <dd><input type="text" name="rev" /></dd> | |
18 </dl> | |
19 </form> | |
20 | |
21 ${self.menu('changelog')} | |
22 </%def> | |
23 | |
24 <%def name="main()"> | |
25 | |
26 <h2 class="no-link no-border">${_('Changelog')} - ${_('showing ')} ${c.size} ${_('revisions')}</h2> | |
27 <noscript>${_('The revision graph only works with JavaScript-enabled browsers.')}</noscript> | |
28 <div> | |
29 ${h.form(h.url.current(),method='get')} | |
30 ${_('Show')}: ${h.text('size',size=5,value=c.size)} ${_('revisions')} | |
31 ${h.submit('','set')} | |
32 ${h.end_form()} | |
33 </div> | |
34 <div id="wrapper" style="height:${c.canvasheight}px"> | |
35 <div style="float:left;height:${c.canvasheight}px"> | |
36 <canvas id="graph" width="224" height="${c.canvasheight}"></canvas> | |
37 </div> | |
38 <div style="float:left;height:${c.canvasheight}px"> | |
39 <ul id="graphnodes"></ul> | |
40 </div> | |
41 </div> | |
42 | |
43 <script type="text/javascript" src="/js/graph.js"></script> | |
44 <script> | |
45 <!-- hide script content | |
46 | |
47 var data = ${c.jsdata|n}; | |
48 var graph = new Graph(); | |
49 graph.scale(39); | |
50 | |
51 graph.edge = function(x0, y0, x1, y1, color) { | |
52 | |
53 this.setColor(color, 0.0, 0.65); | |
54 this.ctx.beginPath(); | |
55 this.ctx.moveTo(x0, y0); | |
56 this.ctx.lineTo(x1, y1); | |
57 this.ctx.stroke(); | |
58 | |
59 } | |
60 | |
61 var revlink = '<li style="_STYLE"><span class="desc">'; | |
62 revlink += '<a class="list" href="/${c.repo_name}/changeset/_NODEID" title="_NODEID"><b>_DESC</b></a>'; | |
63 revlink += '</span> _TAGS'; | |
64 revlink += '<span class="info">_DATE, by _USER</span></li>'; | |
65 | |
66 graph.vertex = function(x, y, color, parity, cur) { | |
67 | |
68 this.ctx.beginPath(); | |
69 color = this.setColor(color, 0.25, 0.75); | |
70 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true); | |
71 this.ctx.fill(); | |
72 | |
73 var bg = '<li class="bg parity' + parity + '"></li>'; | |
74 var left = (this.columns + 1) * this.bg_height; | |
75 var nstyle = 'padding-left: ' + left + 'px;'; | |
76 var item = revlink.replace(/_STYLE/, nstyle); | |
77 item = item.replace(/_PARITY/, 'parity' + parity); | |
78 item = item.replace(/_NODEID/, cur[0]); | |
79 item = item.replace(/_NODEID/, cur[0]); | |
80 item = item.replace(/_DESC/, cur[3]); | |
81 item = item.replace(/_USER/, cur[4]); | |
82 item = item.replace(/_DATE/, cur[5]); | |
83 | |
84 var tagspan = ''; | |
85 if (cur[7].length || (cur[6][0] != 'default' || cur[6][1])) { | |
86 tagspan = '<span class="logtags">'; | |
87 if (cur[6][1]) { | |
88 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">'; | |
89 tagspan += cur[6][0] + '</span> '; | |
90 } else if (!cur[6][1] && cur[6][0] != 'default') { | |
91 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">'; | |
92 tagspan += cur[6][0] + '</span> '; | |
93 } | |
94 if (cur[7].length) { | |
95 for (var t in cur[7]) { | |
96 var tag = cur[7][t]; | |
97 tagspan += '<span class="tagtag">' + tag + '</span> '; | |
98 } | |
99 } | |
100 tagspan += '</span>'; | |
101 } | |
102 | |
103 item = item.replace(/_TAGS/, tagspan); | |
104 return [bg, item]; | |
105 | |
106 } | |
107 | |
108 graph.render(data); | |
109 | |
110 // stop hiding script --> | |
111 </script> | |
112 <div> | |
113 <h2>${c.pagination.pager('$link_previous ~2~ $link_next')}</h2> | |
114 </div> | |
115 </%def> |