[jbosstools-issues] [JBoss JIRA] Commented: (JBDS-320) Markers for new and updated info in TOC

Gleb Galkin (JIRA) jira-events at lists.jboss.org
Fri May 30 10:08:46 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBDS-320?page=comments#action_12415006 ] 
            
Gleb Galkin commented on JBDS-320:
----------------------------------

In order to create image marker in html version you should:

1. add new.png, updated.png to the folder where images are stored

2. add following styles in css:
a.new {
	background:transparent url(../images/new.png) no-repeat scroll right top;
	padding-right:70px;
}
a.updated {
	background:transparent url(../images/updated.png) no-repeat scroll right top;
	padding-right:70px;
}

3. Add following code to common xsl:
<xsl:template name="toc.line">
  <xsl:param name="toc-context" select="."/>
  <xsl:param name="depth" select="1"/>
  <xsl:param name="depth.from.context" select="8"/>

 <span>
  <xsl:attribute name="class"><xsl:value-of select="local-name(.)"/></xsl:attribute>

  <!-- * if $autotoc.label.in.hyperlink is zero, then output the label -->
  <!-- * before the hyperlinked title (as the DSSSL stylesheet does) -->
  <xsl:if test="$autotoc.label.in.hyperlink = 0">
    <xsl:variable name="label">
      <xsl:apply-templates select="." mode="label.markup"/>
    </xsl:variable>
    <xsl:copy-of select="$label"/>
    <xsl:if test="$label != ''">
      <xsl:value-of select="$autotoc.label.separator"/>
    </xsl:if>
  </xsl:if>

  <a>
    <xsl:attribute name="href">
      <xsl:call-template name="href.target">
        <xsl:with-param name="context" select="$toc-context"/>
        <xsl:with-param name="toc-context" select="$toc-context"/>
      </xsl:call-template>
    </xsl:attribute>
	
<xsl:choose>
	<xsl:when test="@role='new'">
		<xsl:attribute name="class">
			<xsl:value-of select="@role"/>
		</xsl:attribute>
	</xsl:when>
	<xsl:when test="@role='updated'">
		<xsl:attribute name="class">
			<xsl:value-of select="@role"/>
		</xsl:attribute>
	</xsl:when>
</xsl:choose>
    
  <!-- * if $autotoc.label.in.hyperlink is non-zero, then output the label -->
  <!-- * as part of the hyperlinked title -->
  <xsl:if test="not($autotoc.label.in.hyperlink = 0)">
    <xsl:variable name="label">
      <xsl:apply-templates select="." mode="label.markup"/>
    </xsl:variable>
    <xsl:copy-of select="$label"/>
    <xsl:if test="$label != ''">
      <xsl:value-of select="$autotoc.label.separator"/>
    </xsl:if>
  </xsl:if>

    <xsl:apply-templates select="." mode="titleabbrev.markup"/>
  </a>
  </span>
</xsl:template>

<xsl:template match="book" mode="toc">
  <xsl:param name="toc-context" select="."/>

  <xsl:call-template name="subtoc">
    <xsl:with-param name="toc-context" select="$toc-context"/>
    <xsl:with-param name="nodes" select="part|reference                                          |preface|chapter|appendix                                          |article                                          |bibliography|glossary|index                                          |refentry                                          |bridgehead[$bridgehead.in.toc != 0]"/>
  </xsl:call-template>
</xsl:template>

> Markers for new and updated info in TOC
> ---------------------------------------
>
>                 Key: JBDS-320
>                 URL: http://jira.jboss.com/jira/browse/JBDS-320
>             Project: Developer Studio
>          Issue Type: Task
>          Components: documentation
>    Affects Versions: 1.0.0.beta2
>            Reporter: Svetlana mukhina
>         Assigned To: Gleb Galkin
>             Fix For: LATER
>
>         Attachments: new.png, updated.png
>
>
> Create an images to mark updated and new info in TOC

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list