Mercurial > hg
annotate mercurial/templates/paper/manifest.tmpl @ 37400:47aea60d114d
hgweb: fix search {entries} to not return results of template expansion
"{entries%changelogentry}" in raw/search.tmpl was utterly wrong because
"{entries}" here was a generator yielding results of template expansion.
That's why we have a weird hack in runmap(), which I'm going to get rid of.
https://www.mercurial-scm.org/repo/hg/file/4.5.2/mercurial/templater.py#l469
We have two choices:
a) drop "%changelogentry" from raw/search.tmpl
b) fix "{entries}" to yield mappings
I take (b) because that's what the other log-like "{entries}" do. The
"entries" keyword is wrapped by mappinggenerator so "{entries}" without
"%searchentry" still works.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 18 Mar 2018 20:51:39 +0900 |
parents | 9acc0360ff67 |
children | c2e3bc99fba4 |
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}: {node|short} {path|escape}</title> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
3 </head> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
4 <body> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
5 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
6 <div class="container"> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
7 <div class="menu"> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
8 <div class="logo"> |
13964
616ad3f6fd33
hgweb: support alternate logo url
Steven Stallion <sstallion@gmail.com>
parents:
13597
diff
changeset
|
9 <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
|
10 <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
|
11 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
12 <ul> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
25132
diff
changeset
|
13 <li><a href="{url|urlescape}shortlog/{symrev}{sessionvars%urlparameter}">log</a></li> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
25132
diff
changeset
|
14 <li><a href="{url|urlescape}graph/{symrev}{sessionvars%urlparameter}">graph</a></li> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
15 <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
|
16 <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
|
17 <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
|
18 </ul> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
19 <ul> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
25132
diff
changeset
|
20 <li><a href="{url|urlescape}rev/{symrev}{sessionvars%urlparameter}">changeset</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
21 <li class="active">browse</li> |
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> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
24 {archives%archiveentry} |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
25 </ul> |
12666
ead4e21f49f1
web: add a help view for getting hg help output
Augie Fackler <durin42@gmail.com>
parents:
9999
diff
changeset
|
26 <ul> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
27 <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:
9999
diff
changeset
|
28 </ul> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
29 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
30 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
31 <div class="main"> |
18258
bebb05a7e249
hgweb: add a "URL breadcrumb" to the index and repository pages
Angel Ezquerra <angel.ezquerra at gmail.com>
parents:
14913
diff
changeset
|
32 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> |
25617
63be46407a50
hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
33 <h3> |
63be46407a50
hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
34 directory {path|escape} @ {rev}:<a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}">{node|short}</a> |
35064
9acc0360ff67
hgweb: move changeset "tags" to a template in map file (paper and coal)
Anton Shestakov <av6@dwimlabs.net>
parents:
32758
diff
changeset
|
35 {alltags} |
25617
63be46407a50
hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
36 </h3> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
37 |
32758
cba4461aa0a0
hgweb: consolidate search form for paper
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25617
diff
changeset
|
38 {searchform} |
7411
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 <table class="bigtable"> |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
19795
diff
changeset
|
41 <thead> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
42 <tr> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
43 <th class="name">name</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
44 <th class="size">size</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
45 <th class="permissions">permissions</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
46 </tr> |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
19795
diff
changeset
|
47 </thead> |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
18526
diff
changeset
|
48 <tbody class="stripes2"> |
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
18526
diff
changeset
|
49 <tr class="fileline"> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
25132
diff
changeset
|
50 <td class="name"><a href="{url|urlescape}file/{symrev}{up|urlescape}{sessionvars%urlparameter}">[up]</a></td> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
51 <td class="size"></td> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
52 <td class="permissions">drwxr-xr-x</td> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
53 </tr> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
54 {dentries%direntry} |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
55 {fentries%fileentry} |
19447
182942b38d24
hgweb: make stripes in directory view with CSS
Alexander Plavin <me@aplavin.ru>
parents:
18526
diff
changeset
|
56 </tbody> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
57 </table> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
58 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
59 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
60 {footer} |