blob: 79ccc120e980ed5bdf17435de32e45bd9d553eca [file] [log] [blame]
[comment encoding = UTF-8 /]
[module generateToc('http://www.eclipse.org/intent/intentdocument/0.8','http://www.eclipse.org/intent/markup/0.7', 'http://www.eclipse.org/intent/modelingunit/0.8','http://www.eclipse.org/intent/markup/generator/0.7')]
[import org::eclipse::mylyn::docs::intent::markup::gen::files::html/]
[import org::eclipse::mylyn::docs::intent::markup::gen::files::htmlGenDocument/]
[import org::eclipse::mylyn::docs::intent::exporter::queries::documentQueries /]
[template public generateTOCRoot(intentElement : IntentSection)]
<div id="table_of_content" class="sidebar-nav toc" [if not(shouldShowTableOfContents())]style="display:none" [/if]>
<div class="summary">
<h3 class="summaryTitle">Table Of Contents</h3>
<div id="toc" class="demo">
<ul id="menu" >
[comment Do not display Intent document in TOC /]
[if intentElement.oclIsKindOf(IntentDocument)]
[for (subSection : IntentSection | intentElement.intentContent->filter(IntentSection))]
[subSection.generateToc(subSection.getIndex())/]
[/for]
[else]
[intentElement.generateToc('')/]
[/if]
</ul>
</div>
</div>
</div>
[/template]
[template public generateTOCRoot(intentElement : IntentStructuredElement)]
[/template]
[template public generateToc (subSectionContainer : IntentSection, index : String) ]
<li id="toc_[index/]">
<a href="#" onClick="javascript:window.location = '#[index/]';">
[generateSubSectionTitle(subSectionContainer, true)/]
</a>
<ul>
[for (subSection : IntentSection | subSectionContainer.intentContent->filter(IntentSection))]
[subSection.generateToc(subSection.getIndex())/]
[/for]
</ul>
</li>
[/template]
[template public generateSubSectionTitle(subSectionContainer : IntentSection, showUntitled : Boolean)]
[if subSectionContainer.title.oclIsUndefined()._not() and subSectionContainer.title.content->size() > 0]
[subSectionContainer.title.content.toHTML()/]
[else]
[if showUntitled]
Untitled
[else]
[/if]
[/if]
[/template]