mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
templates: make earlycommands and othercommands optional
We now have sub-topics in the help system. The "helptopics" template serves as a mechanism for displaying an index of help topics. Previously, it was only used to show the top-level list of help topics, which includes special groupings of topics. In the near future, we'll adapt "helptopics" for showing the index of sub-topics. In this patch, we optionally render {earlycommands} and {othercommands} since they aren't present on sub-topics.
This commit is contained in:
parent
901d6a2088
commit
627d3b55af
@ -30,11 +30,16 @@ help
|
|||||||
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
||||||
{topics % helpentry}
|
{topics % helpentry}
|
||||||
|
|
||||||
|
{if(earlycommands, '
|
||||||
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
||||||
{earlycommands % helpentry}
|
{earlycommands % helpentry}
|
||||||
|
')}
|
||||||
|
|
||||||
|
{if(othercommands, '
|
||||||
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
||||||
{othercommands % helpentry}
|
{othercommands % helpentry}
|
||||||
|
')}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{footer}
|
{footer}
|
||||||
|
@ -35,11 +35,15 @@
|
|||||||
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
||||||
{topics % helpentry}
|
{topics % helpentry}
|
||||||
|
|
||||||
|
{if(earlycommands, '
|
||||||
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
||||||
{earlycommands % helpentry}
|
{earlycommands % helpentry}
|
||||||
|
')}
|
||||||
|
|
||||||
|
{if(othercommands, '
|
||||||
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
||||||
{othercommands % helpentry}
|
{othercommands % helpentry}
|
||||||
|
')}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
{footer}
|
{footer}
|
||||||
|
@ -32,11 +32,16 @@
|
|||||||
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#topics">Topics</a></h2></td></tr>
|
||||||
{topics % helpentry}
|
{topics % helpentry}
|
||||||
|
|
||||||
|
{if(earlycommands, '
|
||||||
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
||||||
{earlycommands % helpentry}
|
{earlycommands % helpentry}
|
||||||
|
')}
|
||||||
|
|
||||||
|
{if(othercommands, '
|
||||||
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
||||||
{othercommands % helpentry}
|
{othercommands % helpentry}
|
||||||
|
')}
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1787,6 +1787,7 @@ Dish up an empty repo; serve it cold.
|
|||||||
This is the topic to test omit indicating.
|
This is the topic to test omit indicating.
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="main" href="#main">Main Commands</a></h2></td></tr>
|
||||||
|
|
||||||
<tr><td>
|
<tr><td>
|
||||||
@ -1909,6 +1910,8 @@ Dish up an empty repo; serve it cold.
|
|||||||
update working directory (or switch revisions)
|
update working directory (or switch revisions)
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
<tr><td colspan="2"><h2><a name="other" href="#other">Other Commands</a></h2></td></tr>
|
||||||
|
|
||||||
<tr><td>
|
<tr><td>
|
||||||
@ -2149,6 +2152,8 @@ Dish up an empty repo; serve it cold.
|
|||||||
</td><td>
|
</td><td>
|
||||||
output version and copyright information
|
output version and copyright information
|
||||||
</td></tr>
|
</td></tr>
|
||||||
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user