mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
hgweb: add bookmarks listing to summary page of gitweb/monoblue styles
This commit is contained in:
parent
fe54e1ef28
commit
109c433261
@ -460,6 +460,15 @@ def summary(web, req, tmpl):
|
||||
node=hex(n),
|
||||
date=web.repo[n].date())
|
||||
|
||||
def bookmarks(**map):
|
||||
parity = paritygen(web.stripecount)
|
||||
b = web.repo._bookmarks.items()
|
||||
for k, n in sorted(b)[:10]: # limit to 10 bookmarks
|
||||
yield {'parity': parity.next(),
|
||||
'bookmark': k,
|
||||
'date': web.repo[n].date(),
|
||||
'node': hex(n)}
|
||||
|
||||
def branches(**map):
|
||||
parity = paritygen(web.stripecount)
|
||||
|
||||
@ -504,6 +513,7 @@ def summary(web, req, tmpl):
|
||||
owner=get_contact(web.config) or "unknown",
|
||||
lastchange=tip.date(),
|
||||
tags=tagentries,
|
||||
bookmarks=bookmarks,
|
||||
branches=branches,
|
||||
shortlog=changelist,
|
||||
node=tip.hex(),
|
||||
|
@ -50,6 +50,12 @@ summary |
|
||||
<tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></div>
|
||||
<table cellspacing="0">
|
||||
{bookmarks%bookmarkentry}
|
||||
<tr class="light"><td colspan="3"><a class="list" href="{url}bookmarks{sessionvars%urlparameter}">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="#">branches</a></div>
|
||||
<table cellspacing="0">
|
||||
{branches%branchentry}
|
||||
|
@ -58,6 +58,14 @@
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2><a href="{url}bookmarks{sessionvars%urlparameter}">Bookmarks</a></h2>
|
||||
<table>
|
||||
{bookmarks%bookmarkentry}
|
||||
<tr class="light">
|
||||
<td colspan="3"><a class="list" href="{url}bookmarks{sessionvars%urlparameter}">...</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<h2 class="no-link">Branches</h2>
|
||||
<table>
|
||||
{branches%branchentry}
|
||||
|
@ -723,6 +723,30 @@ Overviews
|
||||
<tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
|
||||
<table cellspacing="0">
|
||||
|
||||
<tr class="parity0">
|
||||
<td class="age"><i>1970-01-01</i></td>
|
||||
<td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
|
||||
<td class="link">
|
||||
<a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
|
||||
<a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
|
||||
<a href="/file/2ef0ac749a14?style=gitweb">files</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="parity1">
|
||||
<td class="age"><i>1970-01-01</i></td>
|
||||
<td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
|
||||
<td class="link">
|
||||
<a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
|
||||
<a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
|
||||
<a href="/file/1d22e65f027e?style=gitweb">files</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
|
||||
</table>
|
||||
|
||||
<div><a class="title" href="#">branches</a></div>
|
||||
<table cellspacing="0">
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user