51
<!-- Format the reply link -->
52
<xsl:template match="email[@name]" mode="mailto">
53
<xsl:if test="position()!=1">, </xsl:if>
54
<xsl:text>"</xsl:text>
55
<xsl:value-of select="@name"/>
56
<xsl:text>" <</xsl:text>
57
<xsl:value-of select="@address"/>
58
<xsl:text>></xsl:text>
60
<xsl:template match="email" mode="mailto">
61
<xsl:if test="position()!=1">, </xsl:if>
62
<xsl:value-of select="@address"/>
65
<xsl:template match="br" mode="mailtobody">
66
<xsl:text>> </xsl:text>
68
<xsl:template match="tab" mode="mailtobody">
69
<xsl:text> </xsl:text>
71
<xsl:template match="art" mode="mailtobody"/>
72
<xsl:template match="mime[@type='text/plain' or @type='text/html']" mode="mailtobody">
73
<xsl:apply-templates mode="mailtobody"/>
75
<xsl:template match="mime" mode="mailtobody">
76
<xsl:apply-templates select="mime|signed" mode="mailtobody"/>
78
<xsl:template match="signed" mode="mailtobody">
79
<xsl:apply-templates select="data/mime" mode="mailtobody"/>
82
<xsl:template name="reply-link">
83
<xsl:element name="a">
84
<xsl:attribute name="href">
85
<xsl:text>mailto:</xsl:text>
86
<xsl:apply-templates select="mbox/list/email[@address]" mode="mailto"/>
87
<xsl:text>?Subject=</xsl:text>
88
<xsl:if test="not(contains(summary/subject, $regarding-subject))">
89
<xsl:value-of select="$regarding-subject"/>
91
<xsl:value-of select="summary/subject"/>
92
<xsl:if test="not(summary/subject)">your mail</xsl:if>
93
<xsl:if test="message-id">
94
<xsl:text>&References=</xsl:text>
95
<xsl:value-of select="message-id"/>
96
<xsl:text>&In-Reply-To=</xsl:text>
97
<xsl:value-of select="message-id"/>
99
<xsl:variable name="listmails">
100
<xsl:for-each select="mbox/list/email[@address]">
101
<xsl:value-of select="translate(@address, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>
102
<xsl:text>,</xsl:text>
105
<xsl:variable name="allmails" select="(to/email[@address] | cc/email[@address] | summary/email[@address])"/>
106
<xsl:variable name="restmails" select="$allmails[not(contains($listmails,translate(concat(@address,','), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')))]"/>
107
<xsl:if test="$restmails">
108
<xsl:text>&CC=</xsl:text>
109
<xsl:apply-templates select="$restmails" mode="mailto"/>
111
<xsl:text>&Body=</xsl:text>
112
<xsl:value-of select="$quote-open"/>
113
<xsl:apply-templates select="summary" mode="text-date"/>
114
<xsl:value-of select="$quote-middle"/>
115
<xsl:apply-templates select="summary/email" mode="email-name"/>
116
<xsl:value-of select="$quote-close"/>
119
<xsl:apply-templates select="mime" mode="mailtobody"/>
121
<img src="../imgs/reply.png" alt="{$reply-to-message}" title="{$reply-to-message}"/>
51
126
<!-- Format the mime attachments -->
52
127
<xsl:template match="mime" mode="attach">
53
128
<xsl:if test="translate(substring-before(@type,'/'),'MULTIPART','multipart')!='multipart'">
105
181
<xsl:template mode="body" match="br">
106
182
<xsl:if test="not(ancestor::art)"><br/></xsl:if>
184
<xsl:template mode="body" match="mime[@type='image/gif']">
185
<a href="../attach/{@id}@{/message/summary/id}.gif">
186
<img class="inline" src="../attach/{@id}@{/message/summary/id}.gif"/>
189
<xsl:apply-templates/>
191
<xsl:template mode="body" match="mime[@type='image/jpeg']">
192
<a href="../attach/{@id}@{/message/summary/id}.jpg">
193
<img class="inline" src="../attach/{@id}@{/message/summary/id}.jpg"/>
196
<xsl:apply-templates/>
198
<xsl:template mode="body" match="mime[@type='image/png']">
199
<a href="../attach/{@id}@{/message/summary/id}.png">
200
<img class="inline" src="../attach/{@id}@{/message/summary/id}.png"/>
203
<xsl:apply-templates/>
205
<xsl:template match="tab" mode="body">
206
<xsl:text>    </xsl:text>
108
208
<xsl:template mode="body" match="signed">
109
209
<xsl:element name="div">
110
210
<xsl:attribute name="class">
266
<!-- Format the operation box on the right -->
267
<xsl:template name="opsbox">
268
<table class="opsbox"><tr>
269
<xsl:if test="/message/server/raw-email">
270
<td><xsl:call-template name="attachments"/></td>
273
<a href="javascript:trash('{server/doc-url}/zap/{summary/id}.{$ext}');">
274
<img src="../imgs/trash.png" alt="{$delete-message}" title="{$delete-message}"/>
276
<xsl:if test="mbox/list/email/@address">
277
<br/><xsl:call-template name="reply-link"/>
166
284
<!-- Format a message request -->
167
285
<xsl:template match="message">
168
286
<html lang="{$lang}">
170
<link rel="stylesheet" href="../fmt/default.css" type="text/css"/>
288
<link rel="stylesheet" href="../ui/default.css" type="text/css"/>
171
289
<title><xsl:value-of select="summary/subject"/></title>
172
<script type="text/javascript" src="../fmt/common.js"/>
290
<script type="text/javascript" src="../ui/common.js"/>
175
293
<div class="header">
235
353
<div class="body">
236
<xsl:if test="/message/server/raw-email">
237
<xsl:call-template name="attachments"/>
239
<xsl:call-template name="header-fields"/>
355
<!-- don't let the attachments run into the signature box -->
356
<xsl:when test="//signed">
357
<table class="opsbar"><tr>
358
<td><xsl:call-template name="header-fields"/></td>
359
<td align="right"><xsl:call-template name="opsbox"/></td>
363
<div class="opsfloat"><xsl:call-template name="opsbox"/></div>
364
<div><xsl:call-template name="header-fields"/></div>
240
367
<div class="messageBody">
241
368
<xsl:apply-templates mode="body" select="mime"/>