MPXDOC-97

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@115217 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier
2004-05-10 22:25:05 +00:00
parent 3ca4145fae
commit 6d8943c45e
10 changed files with 87 additions and 37 deletions

View File

@@ -55,6 +55,7 @@
@pluginName the name of the plugin. @plugin:report goal must exist
@description text description of report
@link the nav-bar link for this report
@target the target for the new page (_self, _blank, ...)
-->
<maven:pluginVar var="reports" plugin="maven-xdoc-plugin" property="reports" />
@@ -73,6 +74,7 @@
${report.put('pluginName', pluginName)}
${report.put('description', description)}
${report.put('link', link)}
${report.put('target', target)}
${reports.add(report)}
</j:set>
</j:if>
@@ -182,13 +184,28 @@
@name
@img
@state - expanded / collapsed / none
@target
-->
<define:tag name="itemLink">
<a href="${pathTool.calculateLink(link,relativePath)}">
<x:element name="a">
<x:attribute name="href">${pathTool.calculateLink(link,relativePath)}</x:attribute>
<j:choose>
<j:when test="${target != null and target.equals('_blank')}">
<x:attribute name="class">newWindow</x:attribute>
<x:attribute name="title">New Window</x:attribute>
</j:when>
<j:when test="${link.startsWith('http')}">
<x:attribute name="class">externalLink</x:attribute>
<x:attribute name="title">External Link</x:attribute>
</j:when>
</j:choose>
<j:if test="${!empty(target)}">
<x:attribute name="target">${target}</x:attribute>
</j:if>
<j:if test="${empty(state)}"><j:set var="state" value="none"/></j:if>
<j:if test="${empty(img)}">${name}</j:if>
<j:if test="${!empty(img)}"><img style="border: 1px" src="${img}" title="${name}" alt="${name}"/></j:if>
</a>
<j:if test="${!empty(img)}"><img style="border: 1px" src="${pathTool.calculateLink(img,relativePath)}" title="${name}" alt="${name}"/></j:if>
</x:element>
</define:tag>
<define:tag name="text-xdoc">

View File

@@ -96,6 +96,16 @@ a:link.selfref, a:visited.selfref {
color: @UI_HREF_LINK_SELFREF@ !important;
}
a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url(../images/external-classic.png) right center no-repeat;
padding-right: 15px;
}
a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url(../images/newwindow-classic.png) right center no-repeat;
padding-right: 18px;
}
h2, h3 {
margin-top: 1em;
margin-bottom: 0;
@@ -114,7 +124,7 @@ img.handle {
#navcolumn div div {
padding-left: 10px;
}
/* $Id: maven-classic.css,v 1.1 2004/05/03 23:51:22 brett Exp $
/* $Id: maven-classic.css,v 1.2 2004/05/10 22:25:05 aheritier Exp $
This file defines basic default formatting for HTML conforming to Tigris application style. To extend or override these rules for your instance, edit inst.css instead of this file. */

View File

@@ -14,6 +14,14 @@ a:visited {
a:active, a:hover {
color:#69c;
}
a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
background: url(../images/external.png) right center no-repeat;
padding-right: 15px;
}
a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
background: url(../images/newwindow.png) right center no-repeat;
padding-right: 18px;
}
h2 {
padding: 4px 4px 4px 6px;
border: 1px solid #999;
@@ -45,9 +53,9 @@ p {
background-color: #eee;
}
#navcolumn h5 {
font-size: smaller;
border-bottom: 1px solid #aaaaaa;
padding-top: 2px;
font-size: smaller;
border-bottom: 1px solid #aaaaaa;
padding-top: 2px;
}
table.bodyTable th {

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 951 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

View File

@@ -54,20 +54,10 @@
<j:forEach var="report" items="${reports}">
<j:set var="link" value="${report.link}"/>
<j:if test="${!empty(link)}">
<item name="${report.name}" href="/${report.link}.html"/>
<item name="${report.name}" href="/${report.link}.html" target="${report.target}"/>
</j:if>
</j:forEach>
</item>
<!-- j:if test="${pom.reports.isEmpty()}">
<j:if test="${sourcesPresent}">
<item name="JavaDocs" href="/apidocs/index.html"/>
<item name="Source XReference" href="/xref/index.html"/>
<j:if test="${unitTestSourcesPresent == 'true'}">
<item name="Test XReference" href="/xref-test/index.html"/>
</j:if>
</j:if>
</j:if -->
<j:set var="devProcess" value="false"/>
<util:available file="${maven.docs.src}/development-process.xml">
<j:set var="devProcess" value="true"/>

View File

@@ -253,6 +253,7 @@
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_img" select="string(@img)"/>
<x:set var="_target" select="string(@target)"/>
<x:set var="_childCount" select="count(./item)"/>
<j:set var="_isCollapsed" value="${navbean.isCollapsed(item.get(0))}"/>
<j:set var="_state" value="none"/>
@@ -262,10 +263,10 @@
</j:if>
<li class="${_state}">
<j:if test="${navbean.isSelected(item.get(0))}">
<strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}"/></strong>
<strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/></strong>
</j:if>
<j:if test="${!navbean.isSelected(item.get(0))}">
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}"/>
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/>
</j:if>
<j:if test="${_state == 'expanded'}">
<ul>
@@ -279,15 +280,17 @@
<jsl:template match="links" trim="true">
<j:set var="linkCount" value="1"/>
<x:forEach var="link" select="item">
<j:set var="_img"><x:expr select="@img"/></j:set>
<j:set var="_name"><x:expr select="@name"/></j:set>
<j:set var="_link"><x:expr select="@href"/></j:set>
<j:set var="_target"><x:expr select="@target"/></j:set>
<j:whitespace trim="false">
<j:if test="${linkCount != 1}">
<j:if test="${!(maven.xdoc.crumb.separator == '')}">
<span class="separator">${maven.xdoc.crumb.separator}</span>
</j:if>
</j:if>
<doc:itemLink name="${_name}" link="${_link}"/>
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/>
</j:whitespace>
<j:set var="linkCount" value="${1+linkCount}"/>
</x:forEach>
@@ -446,25 +449,47 @@
<!-- remove the space at the end of parsed "a" anchors and fix local hrefs -->
<jsl:template match="a" trim="true">
<j:set var="href"><x:expr select="@href" /></j:set>
<j:choose>
<j:when test="${!empty(href) and href.startsWith('#')}">
<x:element name="a" trim="true">
<x:forEach var="attr" select="@*">
<j:choose>
<j:when test="${attr.name == 'href'}">
<x:attribute name="href"><doc:escapeNameToken value="${attr.value}"/></x:attribute>
<x:element name="a" trim="true">
<x:forEach var="attr" select="@*">
<j:choose>
<j:when test="${attr.name == 'href'}">
<j:set var="href">${attr.value}</j:set>
<j:choose>
<j:when test="${href.startsWith('#')}">
<x:attribute name="href">
<doc:escapeNameToken value="${href}"/>
</x:attribute>
</j:when>
<j:when test="${href.startsWith('http://')}">
<x:attribute name="href">${href}</x:attribute>
<x:attribute name="class">externalLink</x:attribute>
<x:attribute name="title">External Link</x:attribute>
</j:when>
<j:otherwise>
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
<x:attribute name="href">${href}</x:attribute>
</j:otherwise>
</j:choose>
</x:forEach>
<jsl:applyTemplates/>
</x:element>
</j:when>
<j:otherwise><jsl:copy><jsl:applyTemplates/></jsl:copy></j:otherwise>
</j:choose>
</j:when>
<j:when test="${attr.name == 'target'}">
<j:set var="target">${attr.value}</j:set>
<j:if test="${!empty(target) and target.equals('_blank')}">
<x:attribute name="class">newWindow</x:attribute>
<x:attribute name="title">New Window</x:attribute>
</j:if>
<x:attribute name="target">${target}</x:attribute>
</j:when>
<j:when test="${attr.name == 'name'}">
<x:attribute name="name">
<doc:escapeNameToken value="${attr.value}"/>
</x:attribute>
</j:when>
<j:otherwise>
<x:attribute name="${attr.name}">${attr.value}</x:attribute>
</j:otherwise>
</j:choose>
</x:forEach>
<jsl:applyTemplates/>
</x:element>
</jsl:template>
<!-- copy any other elements through -->

View File

@@ -39,7 +39,7 @@
#foreach ($report in $reports)
#if ($report.link && $report.link.length() != 0)
<tr>
<td><a href="${report.link}.html">$report.name</a></td>
<td><a href="${report.link}.html" target="${report.target}">$report.name</a></td>
<td>$report.description</td>
</tr>
#end