~ubuntu-branches/ubuntu/raring/lurker/raring

« back to all changes in this revision

Viewing changes to ui/message.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Meurer
  • Date: 2006-12-20 05:05:31 UTC
  • mfrom: (3.1.6 feisty)
  • Revision ID: james.westby@ubuntu.com-20061220050531-79inzy7o6uu95qx7
Tags: 2.1-7
* updated vi debconf translations, thanks to Clytie Siddall
  <clytie@riverland.net.au>
* fixed typo in one template (that you would like, not that
  would you like), thanks as well to Clytie Siddall
  - unfuzzied all translations

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
</xsl:template>
49
49
 
50
50
 
 
51
<!-- Format the reply link -->
 
52
<xsl:template match="email[@name]" mode="mailto">
 
53
  <xsl:if test="position()!=1">, </xsl:if>
 
54
  <xsl:text>&quot;</xsl:text>
 
55
  <xsl:value-of select="@name"/>
 
56
  <xsl:text>&quot; &lt;</xsl:text>
 
57
  <xsl:value-of select="@address"/>
 
58
  <xsl:text>&gt;</xsl:text>
 
59
</xsl:template>
 
60
<xsl:template match="email" mode="mailto">
 
61
  <xsl:if test="position()!=1">, </xsl:if>
 
62
  <xsl:value-of select="@address"/>
 
63
</xsl:template>
 
64
 
 
65
<xsl:template match="br" mode="mailtobody">
 
66
  <xsl:text>&gt; </xsl:text>
 
67
</xsl:template>
 
68
<xsl:template match="tab" mode="mailtobody">
 
69
  <xsl:text>    </xsl:text>
 
70
</xsl:template>
 
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"/>
 
74
</xsl:template>
 
75
<xsl:template match="mime" mode="mailtobody">
 
76
  <xsl:apply-templates select="mime|signed" mode="mailtobody"/>
 
77
</xsl:template>
 
78
<xsl:template match="signed" mode="mailtobody">
 
79
  <xsl:apply-templates select="data/mime" mode="mailtobody"/>
 
80
</xsl:template>
 
81
 
 
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"/>
 
90
   </xsl:if>
 
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>&amp;References=</xsl:text>
 
95
    <xsl:value-of select="message-id"/>
 
96
    <xsl:text>&amp;In-Reply-To=</xsl:text>
 
97
    <xsl:value-of select="message-id"/>
 
98
   </xsl:if>
 
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>
 
103
    </xsl:for-each>
 
104
   </xsl:variable>
 
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>&amp;CC=</xsl:text>
 
109
     <xsl:apply-templates select="$restmails" mode="mailto"/>
 
110
   </xsl:if>
 
111
   <xsl:text>&amp;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"/>
 
117
   <xsl:text>
 
118
&gt; </xsl:text>
 
119
   <xsl:apply-templates select="mime" mode="mailtobody"/>
 
120
  </xsl:attribute>
 
121
  <img src="../imgs/reply.png" alt="{$reply-to-message}" title="{$reply-to-message}"/>
 
122
 </xsl:element>
 
123
</xsl:template>
 
124
 
 
125
 
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'">
68
143
<xsl:template match="signed" mode="attach">
69
144
 <xsl:apply-templates mode="attach" select="data/mime"/>
70
145
</xsl:template>
 
146
 
71
147
<xsl:template name="attachments">
72
148
 <table class="attachments">
73
 
  <tr><th align="left"><xsl:value-of select="$attachments"/></th></tr>
 
149
  <tr><th align="left"><xsl:value-of select="$attachments"/>:</th></tr>
74
150
  <tr><td>
75
151
   <a href="../mbox/{summary/id}.rfc822"><xsl:value-of select="$raw-email"/></a><br/>
76
152
   <xsl:apply-templates mode="attach" select="mime"/>
105
181
<xsl:template mode="body" match="br">
106
182
 <xsl:if test="not(ancestor::art)"><br/></xsl:if>
107
183
</xsl:template>
 
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"/>
 
187
  </a>
 
188
  <br/>
 
189
  <xsl:apply-templates/>
 
190
</xsl:template>
 
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"/>
 
194
  </a>
 
195
  <br/>
 
196
  <xsl:apply-templates/>
 
197
</xsl:template>
 
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"/>
 
201
  </a>
 
202
  <br/>
 
203
  <xsl:apply-templates/>
 
204
</xsl:template>
 
205
<xsl:template match="tab" mode="body">
 
206
  <xsl:text>&#160;&#160;&#160;&#160;</xsl:text>
 
207
</xsl:template>
108
208
<xsl:template mode="body" match="signed">
109
209
 <xsl:element name="div">
110
210
  <xsl:attribute name="class">
163
263
</xsl:template>
164
264
 
165
265
 
 
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>
 
271
  </xsl:if>
 
272
  <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}"/>
 
275
   </a>
 
276
   <xsl:if test="mbox/list/email/@address">
 
277
    <br/><xsl:call-template name="reply-link"/>
 
278
   </xsl:if>
 
279
  </td>
 
280
 </tr></table>
 
281
</xsl:template>
 
282
 
 
283
 
166
284
<!-- Format a message request -->
167
285
<xsl:template match="message">
168
286
 <html lang="{$lang}">
169
287
  <head>
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"/>
173
291
  </head>
174
292
  <body>
175
293
   <div class="header">
233
351
   </div>
234
352
   
235
353
   <div class="body">
236
 
    <xsl:if test="/message/server/raw-email">
237
 
      <xsl:call-template name="attachments"/>
238
 
    </xsl:if>
239
 
    <xsl:call-template name="header-fields"/>
 
354
    <xsl:choose>
 
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>
 
360
      </tr></table>
 
361
     </xsl:when>
 
362
     <xsl:otherwise>
 
363
      <div class="opsfloat"><xsl:call-template name="opsbox"/></div>
 
364
      <div><xsl:call-template name="header-fields"/></div>
 
365
     </xsl:otherwise>
 
366
    </xsl:choose>
240
367
    <div class="messageBody">
241
368
     <xsl:apply-templates mode="body" select="mime"/>
242
369
    </div>