1
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
4
<xsl:import href="common.xsl"/>
6
<!-- Format message links by subject -->
7
<xsl:template match="summary" mode="post-subject">
8
<xsl:value-of select="subject"/>
10
<xsl:template match="summary" mode="post-subject-link">
11
<a href="{id}.{$ext}">
12
<xsl:apply-templates mode="post-subject" select="."/>
15
<xsl:template match="summary" mode="post-subject-list">
16
<xsl:if test="position()!=1">, </xsl:if>
17
<xsl:apply-templates mode="post-subject-link" select="."/>
21
<!-- Format the message header fields -->
22
<xsl:template name="header-fields">
23
<b><xsl:value-of select="$author"/>: </b>
24
<xsl:apply-templates select="summary/email" mode="email-link"/><br/>
25
<b><xsl:value-of select="$date"/>: </b>
26
<xsl:apply-templates select="summary" mode="text-date"/>
27
<xsl:text> </xsl:text>
28
<xsl:apply-templates select="summary" mode="timezone"/>
31
<b><xsl:value-of select="$to"/>: </b>
32
<xsl:apply-templates mode="email-list" select="to/email"/><br/>
35
<b><xsl:value-of select="$cc"/>: </b>
36
<xsl:apply-templates mode="email-list" select="cc"/><br/>
38
<xsl:if test="threading/inreplyto">
39
<b><xsl:value-of select="$old-topics"/>: </b>
40
<xsl:apply-templates mode="post-subject-list" select="threading/inreplyto/summary"/><br/>
42
<xsl:if test="threading/drift">
43
<b><xsl:value-of select="$new-topics"/>: </b>
44
<xsl:apply-templates mode="post-subject-list" select="threading/drift/summary"/><br/>
46
<b><xsl:value-of select="$subject"/>: </b>
47
<xsl:value-of select="summary/subject"/><br/>
51
<!-- Format the mime attachments -->
52
<xsl:template match="mime" mode="attach">
53
<xsl:if test="translate(substring-before(@type,'/'),'MULTIPART','multipart')!='multipart'">
54
<a href="../attach/{@id}@{/message/summary/id}.attach">
55
<img src="../imgs/paperclip.png" alt="+"/>
57
<xsl:text> </xsl:text>
58
<xsl:value-of select="@name"/>
60
<xsl:text> (</xsl:text>
61
<xsl:value-of select="@type"/>
62
<xsl:text>)</xsl:text>
66
<xsl:apply-templates mode="attach" select="mime|signed"/>
68
<xsl:template match="signed" mode="attach">
69
<xsl:apply-templates mode="attach" select="data/mime"/>
71
<xsl:template name="attachments">
72
<table class="attachments">
73
<tr><th align="left"><xsl:value-of select="$attachments"/></th></tr>
75
<a href="../mbox/{summary/id}.rfc822"><xsl:value-of select="$raw-email"/></a><br/>
76
<xsl:apply-templates mode="attach" select="mime"/>
82
<!-- Format the message body -->
83
<xsl:template mode="body" match="mailto">
84
<a class="email-address" href="mailto:{.}">
85
<xsl:value-of select="."/>
88
<xsl:template mode="body" match="url">
90
<xsl:when test="substring(., 1, 4) = 'www.'">
91
<a class="url" href="http://{.}"><xsl:value-of select="."/></a>
94
<a class="url" href="{.}"><xsl:value-of select="."/></a>
98
<xsl:template mode="body" match="quote">
99
<i class="quote"><xsl:apply-templates mode="body"/></i>
101
<xsl:template mode="body" match="art">
102
<br/><!-- browsers ignore the first br before a pre, so we need one more -->
103
<pre class="art"><xsl:apply-templates mode="body"/></pre>
105
<xsl:template mode="body" match="br">
106
<xsl:if test="not(ancestor::art)"><br/></xsl:if>
108
<xsl:template mode="body" match="signed">
109
<xsl:element name="div">
110
<xsl:attribute name="class">
112
<xsl:when test="@ok='yes'">goodsig</xsl:when>
113
<xsl:when test="@ok='unknown'">unknownsig</xsl:when>
114
<xsl:otherwise>badsig</xsl:otherwise>
117
<xsl:if test="photo"><img src="{photo}" class="photo"/></xsl:if>
118
<div class="details"><xsl:apply-templates mode="body" select="details"/></div>
119
<div class="data"><xsl:apply-templates mode="body" select="data"/></div>
124
<!-- Format the mailing lists -->
125
<xsl:template mode="appear-in" match="mbox">
127
<td nowrap="NOWRAP" class="padded">
128
<b><a name="{list/id}"/><xsl:value-of select="list/email/@name"/></b><br/>
129
<a href="../list/{list/id}.{$ext}"><xsl:value-of select="$list-info"/></a> |
130
<a href="../mindex/{list/id}@{../summary/id}.{$ext}"><xsl:value-of select="$near-message"/></a>
133
<xsl:when test="prev">
135
<a href="{prev/summary/id}.{$ext}#{list/id}">
136
<img src="../imgs/prev.png" alt="<-"/>
139
<td align="left" width="50%">
140
<a href="{prev/summary/id}.{$ext}#{list/id}">
141
<xsl:value-of select="prev/summary/subject"/>
145
<xsl:otherwise><td> </td><td> </td></xsl:otherwise>
148
<xsl:when test="next">
149
<td align="right" width="50%">
150
<a href="{next/summary/id}.{$ext}#{list/id}">
151
<xsl:value-of select="next/summary/subject"/>
155
<a href="{next/summary/id}.{$ext}#{list/id}">
156
<img src="../imgs/next.png" alt="->"/>
160
<xsl:otherwise><td> </td><td> </td></xsl:otherwise>
166
<!-- Format a message request -->
167
<xsl:template match="message">
168
<html lang="{$lang}">
170
<link rel="stylesheet" href="../fmt/default.css" type="text/css"/>
171
<title><xsl:value-of select="summary/subject"/></title>
172
<script type="text/javascript" src="../fmt/common.js"/>
176
<table class="external">
180
<xsl:value-of select="substring(summary/subject,1,60)"/>
181
<xsl:if test="string-length(summary/subject) > 60">…</xsl:if>
184
<td align="right"><xsl:call-template name="navbar"/></td>
188
<table class="navigation">
189
<tr><th align="left" colspan="2"><xsl:value-of select="$tree-context"/></th></tr>
192
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=1]"/>
195
<a href="../thread/{summary/id}.{$ext}#{summary/id}">
196
<xsl:value-of select="$full-tree"/>
202
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=2]"/>
204
<td nowrap="NOWRAP" align="right">
206
<xsl:when test="threading/prev">
207
<a href="{threading/prev/summary/id}.{$ext}">
208
<xsl:apply-templates mode="post-description-text" select="threading/prev/summary"/>
209
<img src="../imgs/prev.png" alt="<-"/>
212
<xsl:otherwise> </xsl:otherwise>
218
<xsl:apply-templates mode="tree" select="threading/snippet/tree[position()=3]"/>
220
<td nowrap="NOWRAP" align="right">
222
<xsl:when test="threading/next">
223
<a href="{threading/next/summary/id}.{$ext}">
224
<xsl:apply-templates mode="post-description-text" select="threading/next/summary"/>
225
<img src="../imgs/next.png" alt="->"/>
228
<xsl:otherwise> </xsl:otherwise>
236
<xsl:if test="/message/server/raw-email">
237
<xsl:call-template name="attachments"/>
239
<xsl:call-template name="header-fields"/>
240
<div class="messageBody">
241
<xsl:apply-templates mode="body" select="mime"/>
246
<table class="navigation">
248
<th colspan="5" align="left">
249
<xsl:value-of select="$mail-appears-in"/>
252
<xsl:apply-templates mode="appear-in" select="mbox"/>
254
<xsl:call-template name="lurker-signature"/>