Item name is always displayed even if img attribute is setted. In the navigation file the new attribute 'hideName' can be used to hide the name in the link (if you want to display only the image for example).

An image can be used in the menu entry for a report.

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@386905 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
aheritier committed 2006-03-19 00:19:09 +00:00
1 parent 236ab1a6b0
commit a634b0e4fd
9 files changed
+40 -11

No files matched your search

@@ -154,3 +154,11 @@ div.clear hr{
margin: 0px;
padding: 0px;
}
#navcolumn img.imageLink, .imageLink{
padding-left: 0px;
padding-bottom: 0px;
padding-top: 0px;
padding-right: 2px;
border: 0px;
margin: 0px;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 950 B

+4 -2
View File
@@ -82,12 +82,14 @@
</j:if>
<item name="${report.name}"
href="/${link}${fileSuffix}"
target="${report.target}" />
target="${report.target}"
img="${report.image}"/>
</j:if>
<j:if test="${empty(link) and !empty(externalLink)}">
<item name="${report.name}"
href="${externalLink}"
target="${report.target}" />
target="${report.target}"
img="${report.image}"/>
</j:if>
</j:forEach>
</item>
+7 -4
View File
@@ -673,13 +673,14 @@
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_target" select="string(@target)"/>
<x:set var="_hideName" select="string(@hideName)"/>
<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}" img="${_img}" target="${_target}"/>
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}" hideName="${_hideName}"/>
</j:whitespace>
<j:set var="linkCount" value="${1+linkCount}"/>
</x:forEach>
@@ -692,8 +693,9 @@
<x:set var="_name" select="string(@name)"/>
<x:set var="_link" select="string(@href)"/>
<x:set var="_target" select="string(@target)"/>
<x:set var="_hideName" select="string(@hideName)"/>
<j:whitespace trim="false">
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}"/>&#160;<span class="separator">&gt;</span>
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" target="${_target}" hideName="${_hideName}"/>&#160;<span class="separator">&gt;</span>
</j:whitespace>
</x:forEach>
</jsl:template>
@@ -742,6 +744,7 @@
<x:set var="_link" select="string(@href)"/>
<x:set var="_img" select="string(@img)"/>
<x:set var="_target" select="string(@target)"/>
<x:set var="_hideName" select="string(@hideName)"/>
<x:set var="_childCount" select="count(./item)"/>
<j:set var="_isCollapsed" value="${navbean.isCollapsed(item.get(0))}"/>
<j:set var="_state" value="none"/>
@@ -771,10 +774,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}" target="${_target}"/></strong>
<strong><doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}" hideName="${_hideName}"/></strong>
</j:if>
<j:if test="${!navbean.isSelected(item.get(0))}">
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}"/>
<doc:itemLink name="${_name}" link="${_link}" img="${_img}" state="${_state}" target="${_target}" hideName="${_hideName}"/>
</j:if>
<j:if test="${_state == 'expanded'}">
<ul>
@@ -97,6 +97,7 @@
<xs:attribute name="target" type="xs:string"/>
<xs:attribute name="img" type="xs:string"/>
<!-- img is an href that will be used as the image for link -->
<xs:attribute name="hideName" type="xs:boolean"/>
</xs:complexType>
</xs:element>
</xs:schema>