summaryrefslogtreecommitdiffstats
path: root/lurker/ui/message.xsl
diff options
context:
space:
mode:
Diffstat (limited to 'lurker/ui/message.xsl')
-rw-r--r--lurker/ui/message.xsl208
1 files changed, 101 insertions, 107 deletions
diff --git a/lurker/ui/message.xsl b/lurker/ui/message.xsl
index b4a4ed4..d3abec7 100644
--- a/lurker/ui/message.xsl
+++ b/lurker/ui/message.xsl
@@ -48,81 +48,6 @@
</xsl:template>
-<!-- Format the reply link -->
-<xsl:template match="email[@name]" mode="mailto">
- <xsl:if test="position()!=1">, </xsl:if>
- <xsl:text>&quot;</xsl:text>
- <xsl:value-of select="@name"/>
- <xsl:text>&quot; &lt;</xsl:text>
- <xsl:value-of select="@address"/>
- <xsl:text>&gt;</xsl:text>
-</xsl:template>
-<xsl:template match="email" mode="mailto">
- <xsl:if test="position()!=1">, </xsl:if>
- <xsl:value-of select="@address"/>
-</xsl:template>
-
-<xsl:template match="br" mode="mailtobody">
- <xsl:text>&gt; </xsl:text>
-</xsl:template>
-<xsl:template match="tab" mode="mailtobody">
- <xsl:text> </xsl:text>
-</xsl:template>
-<xsl:template match="art" mode="mailtobody"/>
-<xsl:template match="mime[@type='text/plain' or @type='text/html']" mode="mailtobody">
- <xsl:apply-templates mode="mailtobody"/>
-</xsl:template>
-<xsl:template match="mime" mode="mailtobody">
- <xsl:apply-templates select="mime|signed" mode="mailtobody"/>
-</xsl:template>
-<xsl:template match="signed" mode="mailtobody">
- <xsl:apply-templates select="data/mime" mode="mailtobody"/>
-</xsl:template>
-
-<xsl:template name="reply-link">
- <xsl:element name="a">
- <xsl:attribute name="href">
- <xsl:text>mailto:</xsl:text>
- <xsl:apply-templates select="mbox/list/email[@address]" mode="mailto"/>
- <xsl:text>?subject=</xsl:text>
- <xsl:if test="not(contains(summary/subject, $regarding-subject))">
- <xsl:value-of select="$regarding-subject"/>
- </xsl:if>
- <xsl:value-of select="summary/subject"/>
- <xsl:if test="not(summary/subject)">your mail</xsl:if>
- <xsl:if test="message-id">
- <xsl:text>&amp;references=</xsl:text>
- <xsl:value-of select="message-id"/>
- <xsl:text>&amp;in-reply-to=</xsl:text>
- <xsl:value-of select="message-id"/>
- </xsl:if>
- <xsl:variable name="listmails">
- <xsl:for-each select="mbox/list/email[@address]">
- <xsl:value-of select="translate(@address, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
- <xsl:text>,</xsl:text>
- </xsl:for-each>
- </xsl:variable>
- <xsl:variable name="allmails" select="(to/email[@address] | cc/email[@address] | summary/email[@address])"/>
- <xsl:variable name="restmails" select="$allmails[not(contains($listmails,translate(concat(@address,','), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')))]"/>
- <xsl:if test="$restmails">
- <xsl:text>&amp;cc=</xsl:text>
- <xsl:apply-templates select="$restmails" mode="mailto"/>
- </xsl:if>
- <xsl:text>&amp;body=</xsl:text>
- <xsl:value-of select="$quote-open"/>
- <xsl:apply-templates select="summary" mode="text-date"/>
- <xsl:value-of select="$quote-middle"/>
- <xsl:apply-templates select="summary/email" mode="email-name"/>
- <xsl:value-of select="$quote-close"/>
- <xsl:text>
-&gt; </xsl:text>
- <xsl:apply-templates select="mime" mode="mailtobody"/>
- </xsl:attribute>
- <img src="../imgs/reply.png" alt="{$reply-to-message}" title="{$reply-to-message}"/>
- </xsl:element>
-</xsl:template>
-
-
<!-- Format the mime attachments -->
<xsl:template match="mime" mode="attach">
<xsl:if test="translate(substring-before(@type,'/'),'MULTIPART','multipart')!='multipart'">
@@ -147,10 +72,11 @@
<xsl:template name="attachments">
<table class="attachments">
<tr><th align="left"><xsl:value-of select="$attachments"/>:</th></tr>
- <tr><td>
- <a href="../mbox/{summary/id}.rfc822"><xsl:value-of select="$raw-email"/></a><br/>
- <xsl:apply-templates mode="attach" select="mime"/>
- </td></tr>
+ <tr>
+ <td>
+ <xsl:apply-templates mode="attach" select="mime"/>
+ </td>
+ </tr>
</table>
</xsl:template>
@@ -233,13 +159,10 @@
<xsl:when test="prev">
<td>
<a href="{prev/summary/id}.{$ext}#{list/id}">
- <img src="../imgs/prev.png" alt="&lt;-"/>
+ <img src="../imgs/prev.png" alt="&lt;-" title="{$subject}: {prev/summary/subject}"/>
</a>
</td>
<td align="left" width="50%">
- <a href="{prev/summary/id}.{$ext}#{list/id}">
- <xsl:value-of select="prev/summary/subject"/>
- </a>
</td>
</xsl:when>
<xsl:otherwise><td>&#160;</td><td>&#160;</td></xsl:otherwise>
@@ -247,13 +170,10 @@
<xsl:choose>
<xsl:when test="next">
<td align="right" width="50%">
- <a href="{next/summary/id}.{$ext}#{list/id}">
- <xsl:value-of select="next/summary/subject"/>
- </a>
</td>
<td>
<a href="{next/summary/id}.{$ext}#{list/id}">
- <img src="../imgs/next.png" alt="-&gt;"/>
+ <img src="../imgs/next.png" alt="-&gt;" title="{$subject}: {next/summary/subject}"/>
</a>
</td>
</xsl:when>
@@ -270,12 +190,12 @@
<td><xsl:call-template name="attachments"/></td>
</xsl:if>
<td>
+ <a href="../mbox/{summary/id}.rfc822">
+ <br/><img src="../imgs/download.png" alt="${$raw-email}" title="{$raw-email}"/>
+ </a>
<a href="javascript:trash('{server/doc-url}/zap/{summary/id}.{$ext}');">
- <img src="../imgs/trash.png" alt="{$delete-message}" title="{$delete-message}"/>
+ <br/><img src="../imgs/a.png" width="48" alt="{$delete-message}" title="{$delete-message}"/>
</a>
- <xsl:if test="mbox/list/email/@address">
- <br/><xsl:call-template name="reply-link"/>
- </xsl:if>
</td>
</tr></table>
</xsl:template>
@@ -310,9 +230,51 @@
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=1]"/>
</td>
<td align="right">
+ <xsl:choose>
+ <xsl:when test="threading/prev">
+ <a href="{threading/prev/summary/id}.{$ext}">
+ <xsl:element name="img">
+ <xsl:attribute name="src">
+ <xsl:text>../imgs/prev.png</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:text>&lt;-</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:text>Previous in thread: </xsl:text>
+ <xsl:apply-templates mode="post-description-text" select="threading/prev/summary"/>
+ </xsl:attribute>
+ </xsl:element>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="../imgs/a.png" width="32" alt="&#160;"/>
+ </xsl:otherwise>
+ </xsl:choose>
<a href="../thread/{summary/id}.{$ext}#i{summary/id}">
- <xsl:value-of select="$full-tree"/>
+ <img src="../imgs/tree.png" alt="&lt;-" title="{$full-tree}"/>
</a>
+ <xsl:choose>
+ <xsl:when test="threading/next">
+ <a href="{threading/next/summary/id}.{$ext}">
+ <xsl:element name="img">
+ <xsl:attribute name="src">
+ <xsl:text>../imgs/next.png</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:text>-&gt;</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:text>Next in thread: </xsl:text>
+ <xsl:apply-templates mode="post-description-text" select="threading/next/summary"/>
+ </xsl:attribute>
+ </xsl:element>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="../imgs/a.png" width="32" alt="&#160;"/>
+ </xsl:otherwise>
+ </xsl:choose>
</td>
</tr>
<tr>
@@ -320,30 +282,62 @@
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=2]"/>
</td>
<td nowrap="NOWRAP" align="right">
- <xsl:choose>
- <xsl:when test="threading/prev">
- <a href="{threading/prev/summary/id}.{$ext}">
- <xsl:apply-templates mode="post-description-text" select="threading/prev/summary"/>
- <img src="../imgs/prev.png" alt="&lt;-"/>
- </a>
- </xsl:when>
- <xsl:otherwise>&#160;</xsl:otherwise>
- </xsl:choose>
+ <img src="../imgs/a.png" alt="&#160;"/>
</td>
</tr>
<tr>
<td nowrap="NOWRAP">
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=3]"/>
</td>
- <td nowrap="NOWRAP" align="right">
+ <td nowrap="NOWRAP" align="right" overflow="visible">
<xsl:choose>
- <xsl:when test="threading/next">
- <a href="{threading/next/summary/id}.{$ext}">
- <xsl:apply-templates mode="post-description-text" select="threading/next/summary"/>
- <img src="../imgs/next.png" alt="-&gt;"/>
+ <xsl:when test="mbox/prev">
+ <a href="{mbox/prev/summary/id}.{$ext}#{list/id}">
+ <xsl:element name="img">
+ <xsl:attribute name="src">
+ <xsl:text>../imgs/prev.png</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:text>&lt;-</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:text>Previous in time: </xsl:text>
+ <xsl:apply-templates mode="post-description-text" select="mbox/prev/summary"/>
+ <xsl:text>&#10;Subject: </xsl:text>
+ <xsl:value-of select="mbox/prev/summary/subject"/>
+ </xsl:attribute>
+ </xsl:element>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <img src="../imgs/a.png" width="32" alt="&#160;"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <a href="../mindex/{mbox/list/id}@{summary/id}.{$ext}">
+ <img src="../imgs/chrono.png" alt="&lt;-" title="{$near-message}"/>
+ </a>
+ <xsl:choose>
+ <xsl:when test="mbox/next">
+ <a href="{mbox/next/summary/id}.{$ext}#{list/id}">
+ <xsl:element name="img">
+ <xsl:attribute name="src">
+ <xsl:text>../imgs/next.png</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="alt">
+ <xsl:text>-&gt;</xsl:text>
+ </xsl:attribute>
+ <xsl:attribute name="title">
+ <xsl:text>Next in time: </xsl:text>
+ <xsl:apply-templates mode="post-description-text" select="mbox/next/summary"/>
+ <xsl:text>&#10;Subject: </xsl:text>
+ <xsl:value-of select="mbox/next/summary/subject"/>
+ </xsl:attribute>
+ </xsl:element>
</a>
</xsl:when>
- <xsl:otherwise>&#160;</xsl:otherwise>
+ <xsl:otherwise>
+ <img src="../imgs/a.png" width="32" alt="&#160;"/>
+ </xsl:otherwise>
</xsl:choose>
</td>
</tr>