Mercurial > hg
annotate mercurial/templates/paper/graph.tmpl @ 48517:99a0b5422cf5
rust: add vcsgraph crate as dependency
Preparing the integration of the vcsgraph library, which will provide generic
algorithms for computations on version control graphs.
Differential Revision: https://phab.mercurial-scm.org/D11945
author | pacien <pacien.trangirard@pacien.net> |
---|---|
date | Fri, 10 Dec 2021 15:22:24 +0100 |
parents | 5faaa31a6082 |
children |
rev | line source |
---|---|
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
1 {header} |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
2 <title>{repo|escape}: revision graph</title> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
3 <link rel="alternate" type="application/atom+xml" |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
4 href="{url|urlescape}atom-log" title="Atom feed for {repo|escape}: log" /> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
5 <link rel="alternate" type="application/rss+xml" |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
6 href="{url|urlescape}rss-log" title="RSS feed for {repo|escape}: log" /> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
7 </head> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
8 <body> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
9 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
10 <div class="container"> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
11 <div class="menu"> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
12 <div class="logo"> |
13964
616ad3f6fd33
hgweb: support alternate logo url
Steven Stallion <sstallion@gmail.com>
parents:
13610
diff
changeset
|
13 <a href="{logourl}"> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
14 <img src="{staticurl|urlescape}{logoimg}" alt="mercurial" /></a> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
15 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
16 <ul> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
17 <li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
18 <li class="active">graph</li> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
19 <li><a href="{url|urlescape}tags{sessionvars%urlparameter}">tags</a></li> |
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
20 <li><a href="{url|urlescape}bookmarks{sessionvars%urlparameter}">bookmarks</a></li> |
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
21 <li><a href="{url|urlescape}branches{sessionvars%urlparameter}">branches</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
22 </ul> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
23 <ul> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
24 <li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
25 <li><a href="{url|urlescape}file/{symrev}{path|urlescape}{sessionvars%urlparameter}">browse</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
26 </ul> |
12666
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
10856
diff
changeset
|
27 <ul> |
38482
5faaa31a6082
hgweb: add archive entries to graph page
Anton Shestakov <av6@dwimlabs.net>
parents:
35654
diff
changeset
|
28 {archives%archiveentry} |
5faaa31a6082
hgweb: add archive entries to graph page
Anton Shestakov <av6@dwimlabs.net>
parents:
35654
diff
changeset
|
29 </ul> |
5faaa31a6082
hgweb: add archive entries to graph page
Anton Shestakov <av6@dwimlabs.net>
parents:
35654
diff
changeset
|
30 <ul> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
31 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li> |
12666
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
10856
diff
changeset
|
32 </ul> |
18200
b31266671918
hgweb: add (Atom) subscribe link to the main paper template pages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
17580
diff
changeset
|
33 <div class="atom-logo"> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
34 <a href="{url|urlescape}atom-log" title="subscribe to atom feed"> |
23830
c4f6fc4eb01e
hgweb: close <img> elements
Anton Shestakov <engored@ya.ru>
parents:
23829
diff
changeset
|
35 <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed" /> |
18200
b31266671918
hgweb: add (Atom) subscribe link to the main paper template pages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
17580
diff
changeset
|
36 </a> |
b31266671918
hgweb: add (Atom) subscribe link to the main paper template pages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
17580
diff
changeset
|
37 </div> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
38 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
39 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
40 <div class="main"> |
18258
bebb05a7e249
hgweb: add a "URL breadcrumb" to the index and repository pages
Angel Ezquerra <angel.ezquerra at gmail.com>
parents:
18200
diff
changeset
|
41 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
42 <h3>graph</h3> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
43 |
32758
cba4461aa0a0
hgweb: consolidate search form for paper
Gregory Szorc <gregory.szorc@gmail.com>
parents:
30766
diff
changeset
|
44 {searchform} |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
45 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
46 <div class="navigate"> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
47 <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
48 <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a> |
10254
8d5de52431f2
hgweb: changenav: separate pages before and after the current position
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9999
diff
changeset
|
49 | rev {rev}: {changenav%navgraph} |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
50 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
51 |
7725
6a888d491eaf
coal/paper: switch to XHTML 1.1
Benoit Allard <benoit@aeteurope.nl>
parents:
7411
diff
changeset
|
52 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
53 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
54 <div id="wrapper"> |
35407
27ab3150cd50
hgweb: calculate <canvas> width and height client-side
Anton Shestakov <av6@dwimlabs.net>
parents:
35255
diff
changeset
|
55 <canvas id="graph"></canvas> |
35529
5afe0ca59b07
paper: make actual changeset entries have backgrounds on /graph
Anton Shestakov <av6@dwimlabs.net>
parents:
35415
diff
changeset
|
56 <ul id="graphnodes" class="stripes2">{nodes%graphentry}</ul> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
57 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
58 |
30766
d7bf7d2bd5ab
hgweb: support Content Security Policy
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27913
diff
changeset
|
59 <script type="text/javascript"{if(nonce, ' nonce="{nonce}"')}> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
60 var data = {jsdata|json}; |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
61 var graph = new Graph(); |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
62 graph.scale({bg_height}); |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
63 graph.render(data); |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
64 </script> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
65 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
66 <div class="navigate"> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
67 <a href="{url|urlescape}graph/{symrev}{lessvars%urlparameter}">less</a> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24041
diff
changeset
|
68 <a href="{url|urlescape}graph/{symrev}{morevars%urlparameter}">more</a> |
10254
8d5de52431f2
hgweb: changenav: separate pages before and after the current position
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
9999
diff
changeset
|
69 | rev {rev}: {changenav%navgraph} |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
70 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
71 |
30766
d7bf7d2bd5ab
hgweb: support Content Security Policy
Gregory Szorc <gregory.szorc@gmail.com>
parents:
27913
diff
changeset
|
72 <script type="text/javascript"{if(nonce, ' nonce="{nonce}"')}> |
19783
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
73 ajaxScrollInit( |
35409
f84b01257e06
hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents:
35407
diff
changeset
|
74 '{url|urlescape}graph/%next%{graphvars%urlparameter}', |
f84b01257e06
hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents:
35407
diff
changeset
|
75 '{nextentry%"{node}"}', <!-- NEXTHASH |
35654
59c842a3d1e1
hgweb: remove unused second argument of nextPageVarGet()
Anton Shestakov <av6@dwimlabs.net>
parents:
35605
diff
changeset
|
76 function (htmlText) \{ |
35409
f84b01257e06
hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents:
35407
diff
changeset
|
77 var m = htmlText.match(/'(\w+)', <!-- NEXTHASH/); |
f84b01257e06
hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents:
35407
diff
changeset
|
78 return m ? m[1] : null; |
f84b01257e06
hgweb: render next pages on /graph incrementally
Anton Shestakov <av6@dwimlabs.net>
parents:
35407
diff
changeset
|
79 }, |
19783
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
80 '#wrapper', |
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
81 '<div class="%class%" style="text-align: center;">%text%</div>', |
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
82 'graph' |
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
83 ); |
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
84 </script> |
1c2a309bba4f
paper: add infinite scrolling to graph by calling ajaxScrollInit at the page
Alexander Plavin <alexander@plav.in>
parents:
19453
diff
changeset
|
85 |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
86 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
87 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
88 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
89 {footer} |