##// END OF EJS Templates
hgweb: support rendering sub-topic indexes...
Gregory Szorc -
r27581:3aa6a813 default
parent child Browse files
Show More
@@ -1256,6 +1256,19 b' def help(web, req, tmpl):'
1256 return tmpl('helptopics', topics=topics, earlycommands=earlycommands,
1256 return tmpl('helptopics', topics=topics, earlycommands=earlycommands,
1257 othercommands=othercommands, title='Index')
1257 othercommands=othercommands, title='Index')
1258
1258
1259 # Render an index of sub-topics.
1260 if topicname in helpmod.subtopics:
1261 topics = []
1262 for entries, summary, _doc in helpmod.subtopics[topicname]:
1263 topics.append({
1264 'topic': '%s.%s' % (topicname, entries[0]),
1265 'basename': entries[0],
1266 'summary': summary,
1267 })
1268
1269 return tmpl('helptopics', topics=topics, title=topicname,
1270 subindex=True)
1271
1259 u = webutil.wsgiui()
1272 u = webutil.wsgiui()
1260 u.verbose = True
1273 u.verbose = True
1261 try:
1274 try:
@@ -2631,6 +2631,82 b' Dish up an empty repo; serve it cold.'
2631 </html>
2631 </html>
2632
2632
2633
2633
2634 Sub-topic indexes rendered properly
2635
2636 $ get-with-headers.py 127.0.0.1:$HGPORT "help/internals"
2637 200 Script output follows
2638
2639 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2640 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
2641 <head>
2642 <link rel="icon" href="/static/hgicon.png" type="image/png" />
2643 <meta name="robots" content="index, nofollow" />
2644 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
2645 <script type="text/javascript" src="/static/mercurial.js"></script>
2646
2647 <title>Help: internals</title>
2648 </head>
2649 <body>
2650
2651 <div class="container">
2652 <div class="menu">
2653 <div class="logo">
2654 <a href="https://mercurial-scm.org/">
2655 <img src="/static/hglogo.png" alt="mercurial" /></a>
2656 </div>
2657 <ul>
2658 <li><a href="/shortlog">log</a></li>
2659 <li><a href="/graph">graph</a></li>
2660 <li><a href="/tags">tags</a></li>
2661 <li><a href="/bookmarks">bookmarks</a></li>
2662 <li><a href="/branches">branches</a></li>
2663 </ul>
2664 <ul>
2665 <li><a href="/help">help</a></li>
2666 </ul>
2667 </div>
2668
2669 <div class="main">
2670 <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
2671 <form class="search" action="/log">
2672
2673 <p><input name="rev" id="search1" type="text" size="30" /></p>
2674 <div id="hint">Find changesets by keywords (author, files, the commit message), revision
2675 number or hash, or <a href="/help/revsets">revset expression</a>.</div>
2676 </form>
2677 <table class="bigtable">
2678 <tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
2679
2680 <tr><td>
2681 <a href="/help/internals.bundles">
2682 bundles
2683 </a>
2684 </td><td>
2685 container for exchange of repository data
2686 </td></tr>
2687 <tr><td>
2688 <a href="/help/internals.changegroups">
2689 changegroups
2690 </a>
2691 </td><td>
2692 representation of revlog data
2693 </td></tr>
2694
2695
2696
2697
2698
2699 </table>
2700 </div>
2701 </div>
2702
2703 <script type="text/javascript">process_dates()</script>
2704
2705
2706 </body>
2707 </html>
2708
2709
2634 $ killdaemons.py
2710 $ killdaemons.py
2635
2711
2636 #endif
2712 #endif
General Comments 0
You need to be logged in to leave comments. Login now