Mercurial > hg
changeset 35061:e9a8a941950a
hgweb: move changeset "tags" to a template in map file (gitweb and monoblue)
Less duplication and it's also easier to add extra "tags" everywhere at once.
These aren't tags as defined `hg help glossary` (hence the quotes), they are
simply called that. They include branch name (in different styles if changeset
is a head of that branch or not), (actual) tags and bookmarks. Good candidates
to add to this list would be changeset phase and obsoletion status.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Wed, 15 Nov 2017 19:36:16 +0800 |
parents | f9b23fa35cb3 |
children | 1706eae096e2 |
files | mercurial/templates/gitweb/changelogentry.tmpl mercurial/templates/gitweb/changeset.tmpl mercurial/templates/gitweb/manifest.tmpl mercurial/templates/gitweb/map mercurial/templates/monoblue/changelogentry.tmpl mercurial/templates/monoblue/changeset.tmpl mercurial/templates/monoblue/manifest.tmpl mercurial/templates/monoblue/map |
diffstat | 8 files changed, 12 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/templates/gitweb/changelogentry.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/changelogentry.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -2,7 +2,7 @@ <a class="title" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> <span class="age">{date|rfc822date}</span> {desc|strip|firstline|escape|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </div> <div class="title_text">
--- a/mercurial/templates/gitweb/changeset.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/changeset.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -32,7 +32,7 @@ <div> <a class="title" href="{url|urlescape}raw-rev/{node|short}"> {desc|strip|escape|firstline|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </div> <div class="title_text">
--- a/mercurial/templates/gitweb/manifest.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/manifest.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -28,7 +28,7 @@ {searchform} </div> -<div class="title">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></div> +<div class="title">{path|escape} {alltags}</div> <table cellspacing="0"> <tr class="parity{upparity}"> <td style="font-family:monospace">drwxr-xr-x</td>
--- a/mercurial/templates/gitweb/map Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/gitweb/map Wed Nov 15 19:36:16 2017 +0800 @@ -266,6 +266,7 @@ branchtag = '<span class="branchtag" title="{name|escape}">{name|escape}</span> ' inbranchtag = '<span class="inbranchtag" title="{name|escape}">{name|escape}</span> ' bookmarktag = '<span class="bookmarktag" title="{name|escape}">{name|escape}</span> ' +alltags = '<span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>' shortlogentry = ' <tr class="parity{parity}"> <td class="age"><i class="age">{date|rfc822date}</i></td> @@ -273,7 +274,7 @@ <td> <a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> <b>{desc|strip|firstline|escape|nonempty}</b> - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </td> <td class="link" nowrap> @@ -288,7 +289,7 @@ <td> <a class="list" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> <b>{desc|strip|firstline|escape|nonempty}</b> - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </td> <td class="link">
--- a/mercurial/templates/monoblue/changelogentry.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/monoblue/changelogentry.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -1,7 +1,7 @@ <h3 class="changelog"> <a class="title" href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> {desc|strip|firstline|escape|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </h3> <ul class="changelog-entry">
--- a/mercurial/templates/monoblue/changeset.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/monoblue/changeset.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -35,7 +35,7 @@ <h3 class="changeset"> <a href="{url|urlescape}raw-rev/{node|short}"> {desc|strip|escape|firstline|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </h3> <p class="changeset-age"><span class="age">{date|rfc822date}</span></p>
--- a/mercurial/templates/monoblue/manifest.tmpl Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/monoblue/manifest.tmpl Wed Nov 15 19:36:16 2017 +0800 @@ -30,7 +30,7 @@ </ul> <h2 class="no-link no-border">files</h2> - <p class="files">{path|escape} <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span></p> + <p class="files">{path|escape} {alltags}</p> <table> <tr class="parity{upparity}">
--- a/mercurial/templates/monoblue/map Wed Nov 15 16:06:00 2017 +0800 +++ b/mercurial/templates/monoblue/map Wed Nov 15 19:36:16 2017 +0800 @@ -225,6 +225,7 @@ branchtag = '<span class="branchtag" title="{name|escape}">{name|escape}</span> ' inbranchtag = '<span class="inbranchtag" title="{name|escape}">{name|escape}</span> ' bookmarktag = '<span class="bookmarktag" title="{name|escape}">{name|escape}</span> ' +alltags = '<span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span>' shortlogentry = ' <tr class="parity{parity}"> <td class="nowrap age">{date|rfc822date}</td> @@ -232,7 +233,7 @@ <td> <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> {desc|strip|firstline|escape|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </td> <td class="nowrap"> @@ -247,7 +248,7 @@ <td> <a href="{url|urlescape}rev/{node|short}{sessionvars%urlparameter}"> {desc|strip|firstline|escape|nonempty} - <span class="logtags">{inbranch%inbranchtag}{branches%branchtag}{tags%tagtag}{bookmarks%bookmarktag}</span> + {alltags} </a> </td> <td class="nowrap">