Mercurial > hg
annotate mercurial/templates/paper/filelog.tmpl @ 35064:9acc0360ff67
hgweb: move changeset "tags" to a template in map file (paper and coal)
This patch puts all these changeset "tags" into one template shared everywhere
in paper and coal themes. But it should be noted that some of the templates had
different sets of tags, in some cases it was intended, in others - most likely
not.
First, what's up with all these different ways to get changeset's branch. There
are actually 3 ways to do it in hgweb, they can all be seen in this patch;
"branches", "inbranch" and "branch". They are all lists that consist of 1 or 0
items:
- "branches" has ctx.branch() if current changeset is the tip of that branch
- "inbranch" has ctx.branch() if current changeset is _not_ the tip of that
branch and the branch is not "default"
- "branch" aka "changesetbranch" has ctx.branch() if the branch is not
"default"
The majority of cases (7 vs 2 + /graph) in paper theme used only option 3,
which meant that "default" was never displayed. But other parts of the theme
disagreed with this and used option 1 and option 2 together. For example, the
default view (log) displays "default" on the branch tip (can be seen right
about now on m-s.o/repo/hg), but it disappears when you click on the commit.
Also, using option 3 alone meant that there was no way to tell if a changeset
is the tip of its branch or not (it was always assumed that it's not, see how
some css classes change from "branchname" to the correct "branchhead" in tests)
-- so the two different css styles that exist in paper just for this were
underused.
I think this patch improves the situation, even though it changes the old (even
if inconsistent) behavior. The new behavior matches that of gitweb and
monoblue.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 15 Nov 2017 23:55:09 +0800 |
parents | cba4461aa0a0 |
children | 79cbf5cc4fb8 |
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}: {file|escape} history</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/tip/{file|urlescape}" title="Atom feed for {repo|escape}:{file}" /> |
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/tip/{file|urlescape}" title="RSS feed for {repo|escape}:{file}" /> |
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:
13597
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:
24054
diff
changeset
|
17 <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:
24054
diff
changeset
|
18 <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
|
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:
24054
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:
24054
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> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
27 <ul> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
28 <li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
29 <li><a href="{url|urlescape}diff/{symrev}/{file|urlescape}{sessionvars%urlparameter}">diff</a></li> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
30 <li><a href="{url|urlescape}comparison/{symrev}/{file|urlescape}{sessionvars%urlparameter}">comparison</a></li> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
31 <li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
32 <li class="active">file log</li> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
33 <li><a href="{url|urlescape}raw-file/{symrev}/{file|urlescape}">raw</a></li> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
34 </ul> |
12680
d664547ef540
hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents:
10254
diff
changeset
|
35 <ul> |
18526
9409aeaafdc1
hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents:
18258
diff
changeset
|
36 <li><a href="{url|urlescape}help{sessionvars%urlparameter}">help</a></li> |
12680
d664547ef540
hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents:
10254
diff
changeset
|
37 </ul> |
18200
b31266671918
hgweb: add (Atom) subscribe link to the main paper template pages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
17202
diff
changeset
|
38 <div class="atom-logo"> |
27554
1c66497261b2
hgweb: fixed invalid atom-log feed url in file log page
Yoshinari Takaoka <mumumu@mumumu.org>
parents:
27081
diff
changeset
|
39 <a href="{url|urlescape}atom-log/tip/{file|urlescape}" title="subscribe to atom feed"> |
23830
c4f6fc4eb01e
hgweb: close <img> elements
Anton Shestakov <engored@ya.ru>
parents:
23829
diff
changeset
|
40 <img class="atom-logo" src="{staticurl|urlescape}feed-icon-14x14.png" alt="atom feed" /> |
c4f6fc4eb01e
hgweb: close <img> elements
Anton Shestakov <engored@ya.ru>
parents:
23829
diff
changeset
|
41 </a> |
18200
b31266671918
hgweb: add (Atom) subscribe link to the main paper template pages
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
17202
diff
changeset
|
42 </div> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
43 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
44 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
45 <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
|
46 <h2 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h2> |
27081
37290f2f2c3b
paper: show current revision on file log page
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
47 <h3> |
37290f2f2c3b
paper: show current revision on file log page
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
48 log {file|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
|
49 {alltags} |
31665
5e6d44511317
hgweb: handle a "linerange" request parameter in filelog command
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
27554
diff
changeset
|
50 {if(linerange, |
31939
604d31507f86
hgweb: handle a "descend" query parameter in filelog command
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
31665
diff
changeset
|
51 ' (following lines {linerange}{if(descend, ', descending')} <a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">back to filelog</a>)')} |
27081
37290f2f2c3b
paper: show current revision on file log page
Anton Shestakov <av6@dwimlabs.net>
parents:
25606
diff
changeset
|
52 </h3> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
53 |
32758
cba4461aa0a0
hgweb: consolidate search form for paper
Gregory Szorc <gregory.szorc@gmail.com>
parents:
31939
diff
changeset
|
54 {searchform} |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
55 |
10246
b9d02695bde4
hgweb: add less/more links to shortlog/filelog nav
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9999
diff
changeset
|
56 <div class="navigate"> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
57 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
58 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a> |
10254
8d5de52431f2
hgweb: changenav: separate pages before and after the current position
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10246
diff
changeset
|
59 | {nav%filenav}</div> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
60 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
61 <table class="bigtable"> |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
24041
diff
changeset
|
62 <thead> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
63 <tr> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
64 <th class="age">age</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
65 <th class="author">author</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
66 <th class="description">description</th> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
67 </tr> |
24054
fdf7794be41d
hgweb: replace implicit <tbody> with explicit <thead> where appropriate
Anton Shestakov <engored@ya.ru>
parents:
24041
diff
changeset
|
68 </thead> |
19454
f4a3b50a30bd
hgweb: make stripes in file log with CSS
Alexander Plavin <me@aplavin.ru>
parents:
18526
diff
changeset
|
69 <tbody class="stripes2"> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
70 {entries%filelogentry} |
19454
f4a3b50a30bd
hgweb: make stripes in file log with CSS
Alexander Plavin <me@aplavin.ru>
parents:
18526
diff
changeset
|
71 </tbody> |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
72 </table> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
73 |
10246
b9d02695bde4
hgweb: add less/more links to shortlog/filelog nav
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9999
diff
changeset
|
74 <div class="navigate"> |
25606
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
75 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{lessvars%urlparameter}">less</a> |
3bb6f5f478a7
hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents:
24054
diff
changeset
|
76 <a href="{url|urlescape}log/{symrev}/{file|urlescape}{morevars%urlparameter}">more</a> |
10254
8d5de52431f2
hgweb: changenav: separate pages before and after the current position
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
10246
diff
changeset
|
77 | {nav%filenav} |
10246
b9d02695bde4
hgweb: add less/more links to shortlog/filelog nav
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9999
diff
changeset
|
78 </div> |
b9d02695bde4
hgweb: add less/more links to shortlog/filelog nav
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
9999
diff
changeset
|
79 |
7411
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
80 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
81 </div> |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
82 |
b71ee3e00e81
coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
83 {footer} |