mercurial/templates/paper/filediff.tmpl
author Anton Shestakov <av6@dwimlabs.net>
Wed, 15 Nov 2017 23:55:09 +0800
changeset 35064 9acc0360ff67
parent 32758 cba4461aa0a0
child 37829 2ead51dcde71
permissions -rw-r--r--
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.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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} diff</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: 13948
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: 25134
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: 25134
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: 25134
diff changeset
    20
<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: 25134
diff changeset
    21
<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
    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: 25134
diff changeset
    24
<li><a href="{url|urlescape}file/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file</a></li>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    25
<li><a href="{url|urlescape}file/tip/{file|urlescape}{sessionvars%urlparameter}">latest</a></li>
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    26
<li class="active">diff</li>
25606
3bb6f5f478a7 hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents: 25134
diff changeset
    27
<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: 25134
diff changeset
    28
<li><a href="{url|urlescape}annotate/{symrev}/{file|urlescape}{sessionvars%urlparameter}">annotate</a></li>
3bb6f5f478a7 hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents: 25134
diff changeset
    29
<li><a href="{url|urlescape}log/{symrev}/{file|urlescape}{sessionvars%urlparameter}">file log</a></li>
3bb6f5f478a7 hgweb: don't dereference symbolic revision in paper & coal style (issue2296)
Anton Shestakov <av6@dwimlabs.net>
parents: 25134
diff changeset
    30
<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
    31
</ul>
12680
d664547ef540 hgweb: add help link to templates missed in ead4e21f49f1
Augie Fackler <durin42@gmail.com>
parents: 9999
diff changeset
    32
<ul>
18526
9409aeaafdc1 hgweb: urlescape all urls, HTML escape repo/tag/branch/... names
Thomas Arendsen Hein <thomas@intevation.de>
parents: 18258
diff changeset
    33
<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: 9999
diff changeset
    34
</ul>
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    35
</div>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    36
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    37
<div class="main">
18258
bebb05a7e249 hgweb: add a "URL breadcrumb" to the index and repository pages
Angel Ezquerra <angel.ezquerra at gmail.com>
parents: 17202
diff changeset
    38
<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
    39
<h3>
63be46407a50 hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net>
parents: 25606
diff changeset
    40
 diff {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
    41
 {alltags}
25617
63be46407a50 hgweb: link to revision by node hash in paper & coal
Anton Shestakov <av6@dwimlabs.net>
parents: 25606
diff changeset
    42
</h3>
7411
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: 25617
diff changeset
    44
{searchform}
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    45
18628
52305554fd6e hgweb: apply the websub filter to revision descriptions
Angel Ezquerra <angel.ezquerra@gmail.com>
parents: 18526
diff changeset
    46
<div class="description">{desc|strip|escape|websub|nonempty}</div>
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    47
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    48
<table id="changesetEntry">
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    49
<tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    50
 <th>author</th>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    51
 <td>{author|obfuscate}</td>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    52
</tr>
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
 <th>date</th>
15375
fe9d36a6853e hgweb: fix dynamic date calculation not working under Safari
Brodie Rao <brodie@bitheap.org>
parents: 14913
diff changeset
    55
 <td class="date age">{date|rfc822date}</td>
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    56
</tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    57
<tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    58
 <th>parents</th>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    59
 <td>{parent%filerevparent}</td>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    60
</tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    61
<tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    62
 <th>children</th>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    63
 <td>{child%filerevchild}</td>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    64
</tr>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    65
</table>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    66
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    67
<div class="overflow">
19433
a79b21ece345 hgweb: add line wrapping switch to file diff and changeset views
Alexander Plavin <me@aplavin.ru>
parents: 19432
diff changeset
    68
<div class="sourcefirst linewraptoggle">line wrap: <a class="linewraplink" href="javascript:toggleLinewrap()">on</a></div>
19432
e92d4b8530cb hgweb: file diff and changesets views behave like file source view
Alexander Plavin <me@aplavin.ru>
parents: 18628
diff changeset
    69
<div class="sourcefirst"> line diff</div>
e92d4b8530cb hgweb: file diff and changesets views behave like file source view
Alexander Plavin <me@aplavin.ru>
parents: 18628
diff changeset
    70
<div class="stripes2 diffblocks">
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    71
{diff}
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    72
</div>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    73
</div>
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    74
</div>
19432
e92d4b8530cb hgweb: file diff and changesets views behave like file source view
Alexander Plavin <me@aplavin.ru>
parents: 18628
diff changeset
    75
</div>
7411
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    76
b71ee3e00e81 coal/paper: move actual templates from coal to paper
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff changeset
    77
{footer}