Add a support for "hierarchical" site navigation in breadcrumbs

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@154533 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
michal committed 2005-02-20 17:30:03 +00:00
1 parent eef70d4737
commit ccd7db286e
6 files changed
+83 -47

No files matched your search

+71 -39
View File
@@ -151,33 +151,43 @@
</div>
<div id="breadcrumbs">
<maven:property var="version" name="maven.xdoc.version" defaultValue="${pom.currentVersion}"/>
<j:if test="${date == 'left'}">
<div class="xleft">
Last published: ${build.date}
<j:if test="${!empty(version)}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
Doc for ${version}
</j:if>
</div>
</j:if>
<maven:property var="version" name="maven.xdoc.version" defaultValue="${pom.currentVersion}"/>
<j:set var="breadcrumbsUsed" value=""/>
<x:if select="$nav/body/breadcrumbs">
<j:set var="breadcrumbsUsed" value="'true'"/>
</x:if>
<div class="xleft">
<j:if test="${empty(breadcrumbsUsed)}">
<j:if test="${date == 'left'}">
Last published: ${build.date}
<j:if test="${!empty(version)}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
Doc for ${version}
</j:if>
</j:if>
</j:if>
<j:if test="${!empty( breadcrumbsUsed )}">
<jsl:applyTemplates select="$nav/body/breadcrumbs" />
${pom.name} <span class="separator">&gt;</span> ${docTitle}
</j:if>
</div>
<div class="xright">
<j:if test="${date == 'right'}">
Last published: ${build.date}
<j:if test="${!empty(version)}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
Doc for ${version}
</j:if>
<x:if select="$nav/body/links">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
</x:if>
</j:if>
<j:if test="${empty(breadcrumbsUsed)}">
<j:if test="${date == 'right'}">
Last published: ${build.date}
<j:if test="${!empty(version)}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
Doc for ${version}
</j:if>
</j:if>
</j:if>
<!-- render links -->
<x:if select="$nav/body/links">
<jsl:applyTemplates select="$nav/body/links" />
@@ -188,10 +198,7 @@
<!-- left column start -->
<div id="leftColumn">
<div id="navcolumn">
<j:if test="${date == 'navigation-top'}">
<div id="lastPublished">Last published: ${build.date}</div>
</j:if>
<div id="navcolumn">
<x:if select="$nav">
<jsl:applyTemplates select="$nav/body/menu[not(@type) | @type='header'] | $nav/body/search"/>
</x:if>
@@ -218,10 +225,12 @@
<a id="poweredBy" href="${poweredbyurl}" title="${poweredbytitle}">
<img alt="${maven.xdoc.poweredby.title}" src="${relativePath}/images/logos/${poweredbyimage}" />
</a>
</j:if>
<j:if test="${date == 'navigation-bottom'}">
<div id="lastPublished">Last published: ${build.date}</div>
</j:if>
</j:if>
<j:if test="${empty( breadcrumbsUsed )}">
<j:if test="${date == 'navigation-bottom'}">
<div id="lastPublished">Last published: ${build.date}</div>
</j:if>
</j:if>
</div>
</div>
<!-- left column end -->
@@ -238,6 +247,14 @@
<!-- footer start -->
<div id="footer">
<jsl:applyTemplates select="$nav/body/footer"/>
<j:if test="${!empty(breadcrumbsUsed)}">
<div class="xleft">
<div id="lastPublished">Last published: ${build.date} Doc for ${pom.currentVersion}</div>
</div>
</j:if>
<div class="xright">
<j:if test="${!empty(pom.organization.name)}">
<j:if test="${!empty(pom.inceptionYear)}">
@@ -250,11 +267,14 @@
</j:if>
<j:if test="${empty(pom.inceptionYear)}">
&#169; ${mavenCurrentYear}, ${pom.organization.name}
</j:if>
</j:if>
<j:if test="${date == 'bottom'}">
&#169; - Last published: ${build.date}
</j:if>
</j:if>
<j:if test="${empty(breadcrumbsUsed)}">
<j:if test="${date == 'bottom'}">
- Last published: ${build.date}
</j:if>
</j:if>
</j:if>
</div>
<div class="clear"><hr /></div>
</div>
@@ -356,6 +376,18 @@
<j:set var="linkCount" value="${1+linkCount}"/>
</x:forEach>
</jsl:template>
<!-- Process the breadcrumb navbar -->
<jsl:template match="breadcrumbs" trim="true">
<x:forEach var="link" select="item">
<j:set var="_name"><x:expr select="@name"/></j:set>
<j:set var="_link"><x:expr select="@href"/></j:set>
<a href="${_link}">${_name}</a>
<span class="separator">&gt;</span>
</x:forEach>
</jsl:template>
<!-- Process a menu for the navigation bar -->
<jsl:template match="menu" trim="true">