##// END OF EJS Templates
hgweb: add bookmarks listing to summary page of gitweb/monoblue styles
Yuya Nishihara -
r13924:ea726c97 default
parent child Browse files
Show More
@@ -460,6 +460,15 b' def summary(web, req, tmpl):'
460 node=hex(n),
460 node=hex(n),
461 date=web.repo[n].date())
461 date=web.repo[n].date())
462
462
463 def bookmarks(**map):
464 parity = paritygen(web.stripecount)
465 b = web.repo._bookmarks.items()
466 for k, n in sorted(b)[:10]: # limit to 10 bookmarks
467 yield {'parity': parity.next(),
468 'bookmark': k,
469 'date': web.repo[n].date(),
470 'node': hex(n)}
471
463 def branches(**map):
472 def branches(**map):
464 parity = paritygen(web.stripecount)
473 parity = paritygen(web.stripecount)
465
474
@@ -504,6 +513,7 b' def summary(web, req, tmpl):'
504 owner=get_contact(web.config) or "unknown",
513 owner=get_contact(web.config) or "unknown",
505 lastchange=tip.date(),
514 lastchange=tip.date(),
506 tags=tagentries,
515 tags=tagentries,
516 bookmarks=bookmarks,
507 branches=branches,
517 branches=branches,
508 shortlog=changelist,
518 shortlog=changelist,
509 node=tip.hex(),
519 node=tip.hex(),
@@ -50,6 +50,12 b' summary |'
50 <tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
50 <tr class="light"><td colspan="3"><a class="list" href="{url}tags{sessionvars%urlparameter}">...</a></td></tr>
51 </table>
51 </table>
52
52
53 <div><a class="title" href="{url}bookmarks{sessionvars%urlparameter}">bookmarks</a></div>
54 <table cellspacing="0">
55 {bookmarks%bookmarkentry}
56 <tr class="light"><td colspan="3"><a class="list" href="{url}bookmarks{sessionvars%urlparameter}">...</a></td></tr>
57 </table>
58
53 <div><a class="title" href="#">branches</a></div>
59 <div><a class="title" href="#">branches</a></div>
54 <table cellspacing="0">
60 <table cellspacing="0">
55 {branches%branchentry}
61 {branches%branchentry}
@@ -58,6 +58,14 b''
58 </tr>
58 </tr>
59 </table>
59 </table>
60
60
61 <h2><a href="{url}bookmarks{sessionvars%urlparameter}">Bookmarks</a></h2>
62 <table>
63 {bookmarks%bookmarkentry}
64 <tr class="light">
65 <td colspan="3"><a class="list" href="{url}bookmarks{sessionvars%urlparameter}">...</a></td>
66 </tr>
67 </table>
68
61 <h2 class="no-link">Branches</h2>
69 <h2 class="no-link">Branches</h2>
62 <table>
70 <table>
63 {branches%branchentry}
71 {branches%branchentry}
@@ -723,6 +723,30 b' Overviews'
723 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
723 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
724 </table>
724 </table>
725
725
726 <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
727 <table cellspacing="0">
728
729 <tr class="parity0">
730 <td class="age"><i>1970-01-01</i></td>
731 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
732 <td class="link">
733 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
734 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
735 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
736 </td>
737 </tr>
738 <tr class="parity1">
739 <td class="age"><i>1970-01-01</i></td>
740 <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
741 <td class="link">
742 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
743 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
744 <a href="/file/1d22e65f027e?style=gitweb">files</a>
745 </td>
746 </tr>
747 <tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
748 </table>
749
726 <div><a class="title" href="#">branches</a></div>
750 <div><a class="title" href="#">branches</a></div>
727 <table cellspacing="0">
751 <table cellspacing="0">
728
752
General Comments 0
You need to be logged in to leave comments. Login now