File: mindex.xsl

package info (click to toggle)
lurker 2.1-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,800 kB
  • ctags: 1,088
  • sloc: cpp: 10,527; sh: 1,348; xml: 1,278; perl: 206; makefile: 198
file content (167 lines) | stat: -rw-r--r-- 5,546 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:import href="common.xsl"/>

<!-- Format a message row -->
<xsl:template match="row" mode="message">
 <xsl:element name="tr">
  <xsl:attribute name="onClick">
   <xsl:text>self.location='</xsl:text>
   <xsl:value-of select="../server/doc-url"/>
   <xsl:text>/message/</xsl:text>
   <xsl:value-of select="summary/id"/>
   <xsl:text>.</xsl:text>
   <xsl:value-of select="$ext"/>
   <xsl:text>';</xsl:text>
  </xsl:attribute>
  <xsl:attribute name="onMouseOver">rollIn(this);</xsl:attribute>
  <xsl:attribute name="onMouseOut">rollOut(this);</xsl:attribute>
  <xsl:attribute name="class">
   <xsl:choose>
    <xsl:when test="@selected">lit</xsl:when>
    <xsl:when test="(position() mod 2) = 0">row1</xsl:when>
    <xsl:otherwise>row2</xsl:otherwise>
   </xsl:choose>
  </xsl:attribute>
  <td nowrap="NOWRAP">
   <div class="squash">
    <a href="../message/{summary/id}.{$ext}">
     <xsl:value-of select="summary/subject"/>
    </a>
   </div>
  </td>
  <td nowrap="NOWRAP">
   <div class="squash">
    <xsl:apply-templates mode="email-name" select="summary/email"/>
   </div>
  </td>
  <td nowrap="NOWRAP">
   <xsl:apply-templates mode="text-date" select="summary"/>
  </td>
 </xsl:element>
 <xsl:text>&#10;</xsl:text>
</xsl:template>


<!-- Format a mindex request -->
<xsl:template match="mindex">
 <html lang="{$lang}">
  <head>
   <link rel="stylesheet" href="../ui/default.css" type="text/css"/>
   <title><xsl:value-of select="list/email/@name"/></title>
   <script type="text/javascript" src="../ui/common.js"/>
  </head>
  <body>
   <div class="header">
    <table class="external">
     <tr>
      <td align="left"><h1><xsl:value-of select="list/email/@name"/></h1></td>
      <td align="right"><xsl:call-template name="navbar"/></td>
     </tr>
    </table>
    
    <table class="navigation">
     <tr><th align="left" colspan="3"><xsl:value-of select="$jump-to-date"/></th></tr>
     <tr>
      <td>
       <xsl:choose>
        <xsl:when test="prev">
         <a href="{list/id}@{prev}.{$ext}"><img alt="&lt;-" src="../imgs/prev.png"/></a>
        </xsl:when>
        <xsl:otherwise>
         <img src="../imgs/a.png" alt=".."/>
        </xsl:otherwise>
       </xsl:choose>
      </td>
      <td width="100%" nowrap="NOWRAP" align="center">
       <form action="{server/cgi-url}/jump.cgi" onsubmit="form_timezone(this)">
        <input type="hidden" name="doc-url" value="{server/doc-url}"/>
        <input type="hidden" name="format" value="{$ext}"/>
        <input type="hidden" name="list" value="{list/id}"/>
        
        <xsl:call-template name="date-fields">
         <xsl:with-param name="date" select="row[position()=11]/summary/id"/>
        </xsl:call-template>
        <input type="submit" value="{$jump-button}"/>
       </form>
      </td>
      <td align="right">
       <xsl:choose>
        <xsl:when test="next">
         <a href="{list/id}@{next}.{$ext}"><img alt="-&gt;" src="../imgs/next.png"/></a>
        </xsl:when>
        <xsl:otherwise>
         <img src="../imgs/a.png" alt=".."/>
        </xsl:otherwise>
       </xsl:choose>
      </td>
     </tr>
     <tr>
      <td colspan="3" align="center">
       [ <a href="../list/{list/id}.{$ext}"><xsl:value-of select="$list-info"/></a> ]
       [ <a href="../splash/index.{$ext}#{list/group}"><xsl:value-of select="$jump-group"/></a> ]
       <xsl:if test="list/email/@address">
        [ <a href="mailto:{list/email/@address}"><xsl:value-of select="$post-new"/></a> ]
       </xsl:if>
       <xsl:if test="list/link">
        [ <a href="{list/link}"><xsl:value-of select="$subscribe"/></a> ]
       </xsl:if>
      </td>
     </tr>
    </table>
   </div>
   
   
   <div class="body">
    <div class="mozbug">
     <table class="index squash">
      <col width="60%" align="left"/>
      <col width="30%" align="left"/>
      <col width="170" align="left"/>
      <tr>
       <th align="left"><xsl:value-of select="$subject"/></th>
       <th align="left"><xsl:value-of select="$author"/></th>
       <th align="left"><xsl:value-of select="$date"/>
           <xsl:text>&#160;(</xsl:text>
           <xsl:apply-templates select="row[position()=1]/summary" mode="timezone"/>
           <xsl:text>)</xsl:text>
       </th>
      </tr>
      <xsl:apply-templates mode="message" select="row"/>
     </table>
    </div>
   </div>   
   
   <div class="footer">
    <table class="navigation">
     <tr><th align="left" colspan="2"><xsl:value-of select="$search-list"/></th></tr>
     <tr>
      <td>
        <!-- make this the same height as mindex -->
        <img src="../imgs/a.png" width="1" height="24" alt=""/>
      </td>
      <td nowrap="NOWRAP" align="center">
       <form action="{server/cgi-url}/keyword.cgi" accept-charset="UTF-8">
        <input type="hidden" name="doc-url" value="{server/doc-url}"/>
        <input type="hidden" name="format"  value="{$ext}"/>
        <input type="text"   name="query"   value="ml:{list/id} " class="longtext"/>
        <input type="submit" name="submit"  value="{$search-button}"/>
       </form>
      </td>
     </tr>
     <tr>
      <td colspan="2" align="center">
       <xsl:value-of select="$use-special-word-list"/>
       <b>ml:<xsl:value-of select="list/id"/></b>
       <xsl:value-of select="$to-search-list"/>
      </td>
     </tr>
    </table>
    <xsl:call-template name="lurker-signature"/>
   </div>
  </body>
 </html>
</xsl:template>

</xsl:stylesheet>