1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 21:07:59 +01:00

Allow separate email addresses and hrefs for authors. Make mailto more obvious.

This commit is contained in:
Kris Maglione
2009-11-03 21:44:37 -05:00
parent ec71ee9d4a
commit 20dea05613

View File

@@ -375,28 +375,34 @@
<xsl:template name="info"> <xsl:template name="info">
<xsl:param name="label"/> <xsl:param name="label"/>
<xsl:param name="link" select="@href"/> <xsl:param name="link" select="@href"/>
<xsl:param name="nodes" select="node()"/>
<xsl:param name="extra"/>
<div liberator:highlight="HelpInfo"> <div liberator:highlight="HelpInfo">
<div liberator:highlight="HelpInfoLabel"> <div liberator:highlight="HelpInfoLabel">
<xsl:value-of select="$label"/>: <xsl:value-of select="$label"/>:
</div> </div>
<a liberator:highlight="HelpInfoValue"> <span liberator:highlight="HelpInfoValue">
<a>
<xsl:if test="$link"> <xsl:if test="$link">
<xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute> <xsl:attribute name="href"><xsl:value-of select="$link"/></xsl:attribute>
</xsl:if> </xsl:if>
<xsl:apply-templates/> <xsl:copy-of select="exsl:node-set($nodes)"/>
</a> </a>
<xsl:copy-of select="exsl:node-set($extra)"/>
</span>
</div> </div>
</xsl:template> </xsl:template>
<xsl:template match="liberator:author[@email]" mode="pass-2"> <xsl:template match="liberator:author[@email]" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'Author'"/> <xsl:with-param name="label" select="'Author'"/>
<xsl:with-param name="link" select="concat('mailto:', @email)"/> <xsl:with-param name="extra">
<xsl:text> </xsl:text><a href="mailto:{@email}"></a>
</xsl:with-param>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:author" mode="pass-2"> <xsl:template match="liberator:author" mode="pass-2">
<xsl:call-template name="info"> <xsl:call-template name="info">
<xsl:with-param name="label" select="'Author'"/> <xsl:with-param name="label" select="'Author'"/>
<xsl:with-param name="link" select="@href"/>
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:license" mode="pass-2"> <xsl:template match="liberator:license" mode="pass-2">
@@ -405,14 +411,12 @@
</xsl:call-template> </xsl:call-template>
</xsl:template> </xsl:template>
<xsl:template match="liberator:plugin" mode="pass-2"> <xsl:template match="liberator:plugin" mode="pass-2">
<div liberator:highlight="HelpInfo"> <xsl:call-template name="info">
<div liberator:highlight="HelpInfoLabel"> <xsl:with-param name="label" select="'Plugin'"/>
Plugin: <xsl:with-param name="nodes">
</div> <span><xsl:value-of select="@name"/></span>
<a liberator:highlight="HelpInfoValue" href="{@href}"> </xsl:with-param>
<xsl:value-of select="@name"/> </xsl:call-template>
</a>
</div>
<xsl:apply-templates/> <xsl:apply-templates/>
</xsl:template> </xsl:template>