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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
|
[HEADER]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<!--
Template made by Tian. It is based on design of Tian's website:
http://www.c-sait.net/
-->
<head>
<title>$$PAGETITLE$$</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
[JAVASCRIPT]
<script type="text/javascript">
<!--
expandTooltip="Afficher les informations de la Miniature";
collapseTooltip="Masquer les informations de la Miniature";
function prn(s)
{
document.write(s)
}
function getE(id)
{
return document.getElementById(id)
}
function expcolAll(dir,rowNum)
{
for(x=0;x < rowNum;x++) {
try {
getE('minicar'+x).style.display=dir
if(dir=="none") getE('switch'+x).innerHTML="+"
else getE('switch'+x).innerHTML="–"
}
catch(err) { }
}
}
function toggleDisplay(id,swt)
{
if((getE(id).style.display=="")||(getE(id).style.display=="none")) {
getE(id).style.display="block"
getE(swt).innerHTML="–"
getE(swt).name=collapseTooltip
} else {
getE(id).style.display="none"
getE(swt).innerHTML="+"
getE(swt).name=expandTooltip
}
return false
}
function writeExpandControl(elementId,collapse)
{
prn("<a href=\"#\" class=\"minicar-expand\" id=\"switch"+elementId+"\" onclick=\"return toggleDisplay('minicar"+elementId+"','switch"+elementId+"');\" title=\""+((collapse) ? expandTooltip : collapseTooltip)+"\">"+((collapse) ? "+" : "–")+"</a>")
}
function searchMinicars(text)
{
getE("collapseAll").click()
alldt=document.getElementsByTagName("dt")
alldd=document.getElementsByTagName("dd")
nb=alldt.length
re=new RegExp(text,"i")
for(i=0;i<nb;i++) {
s1=alldt[i].getElementsByTagName("a")[1].innerHTML
s2=alldd[i].innerHTML
res=0
if(getE("searchType").value=="all") res=(re.test(s1)||re.test(s2))
else res=re.test(s1)
if(res) st="block"
else st="none"
alldt[i].style.display=st
alldd[i].style.display=st
}
}
-->
</script>
[/JAVASCRIPT]
<style type="text/css">
body {
background:#f7f8ff;
}
h1 {
font-weight:bold;
font-size:160%;
text-align:center;
margin-bottom:1em;
}
#top {
color:#624a66 ! important;
background:transparent ! important;
}
form {
text-align:center;
border:1px solid #c0c0c0;
background:#e2e2df;
margin:0 3em;
padding:0.5em;
}
input,select {
border:2px solid #aaaaaa;
background:purple;
color:white;
margin:0 0.5em;
}
input:focus, input.submit:hover {
background:#f3e3f9;
color:black;
}
input.submit {
cursor:pointer;
}
#links {
margin-top:0.5em;
text-align:center;
font-size:120%;
color:#aaaaaa;
}
.letter {
padding:0 0.5em;
}
img {
float:left;
margin:0 1em 1em 1em;
border:1px solid #aaaaaa;
}
dt {
color:#aaaaaa;
font-size:120%;
margin:0em 0.5em;
clear:both;
}
dd {
margin:0.5em 2em 1em;
border-left:1px solid #2e3766;
border-bottom:1px solid #2e3766;
}
table {
font-size:90%;
margin:0 1em;
border:1px solid black;
width:60%;
}
th {
font-weight:bold;
text-align:left;
width:25%;
}
.tr1 {
background:#d4cce0;
}
.tr2 {
background:#c0b9cc;
}
a {
color:#2e3766;
background:transparent;
text-decoration:none;
}
a:hover, a:focus {
background-color:#e8e8ef;
}
.topl {
color:#aaaaaa;
font-size:90%;
}
.minicar-expand {
width:1em;
text-align:center;
font-size:120%;
float:left;
margin:0.2em;
}
p, #note {
background:white;
border:2px solid purple;
clear:left;
margin:1em 2em;
padding:0.5em;
}
.borrowed0 {
font-size:80%;
color:#c0b9cc;
background:transparent;
text-decoration:none;
display:block;
}
.borrowed1 {
font-size:80%;
color:purple;
background:transparent;
text-decoration:none;
display:block;
}
#note {
text-align:center;
}
#note a {
text-decoration:underline;
}
</style>
</head>
<body>
<h1><a id="top">$$PAGETITLE$$</a></h1>
[JAVASCRIPT]
<form onsubmit="searchMinicars(getE('searchText').value); return false" action="">
<div>
<input type="text" id="searchText" title="$$FORM_INPUT$$" />
<select id="searchType">
<option value="name">$$FORM_SEARCH1$$</option>
<option value="all">$$FORM_SEARCH2$$</option>
</select>
<input type="button" class="submit" value="$$FORM_SEARCHBUTTON$$" title="$$FORM_SEARCHTITLE$$" onclick="searchMinicars(getE('searchText').value)" />
<input type="button" class="submit" value="$$FORM_ALLBUTTON$$" title="$$FORM_ALLTITLE$$" onclick="searchMinicars('')" />
<br />
<br />
<input type="button" class="submit" value="$$FORM_EXPAND$$" onclick="expcolAll('block','$$TOTALNUMBER$$')" title="$$FORM_EXPANDTITLE$$" />
<input type="button" id="collapseAll" class="submit" value="$$FORM_COLLAPSE$$" onclick="expcolAll('none','$$TOTALNUMBER$$')" title="$$FORM_COLLAPSETITLE$$" />
</div>
</form>
[/JAVASCRIPT]
<div id="links">| _ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z |</div>
<dl>
[/HEADER]
[ITEM]
<dt>
[JAVASCRIPT]
<script type="text/javascript">writeExpandControl('$$IDX$$',1)</script>
[/JAVASCRIPT]
<a id="minicarlink_$$IDX$$" href="$$URL$$">$$name$$</a> | <a class="topl" href="#top">($$TOP$$)</a>
<span class="borrowed$$borrower_FLAG$$">$$borrower_YESNO$$$$borrower_OREMPTY$$</span>
</dt>
<dd>
<div id="minicar$$IDX$$" style="display:none;">
<img src="$$picture$$" alt="$$name$$" title="$$name$$" height="160" />
<table>
<tr class="tr1"><th>$$scale_LABEL$$</th><td>$$scale$$</td></tr>
<tr class="tr2"><th>$$manufacturer_LABEL$$</th><td>$$manufacturer$$</td></tr>
<tr class="tr1"><th>$$type1_LABEL$$</th><td>$$type1$$</td></tr>
<tr class="tr2"><th>$$constructor_LABEL$$</th><td>$$constructor$$</td></tr>
<tr class="tr1"><th>$$modele_LABEL$$</th><td>$$modele$$</td></tr>
<tr class="tr2"><th>$$version_LABEL$$</th><td>$$version$$</td></tr>
<tr class="tr1"><th>$$color_LABEL$$</th><td>$$color$$</td></tr>
<tr class="tr2"><th>$$pub_LABEL$$</th><td>$$pub$$</td></tr>
<tr class="tr1"><th>$$year_LABEL$$</th><td>$$year$$</td></tr>
<tr class="tr2"><th>$$reference_LABEL$$</th><td>$$reference$$</td></tr>
<tr class="tr1"><th>$$rating1_LABEL$$</th><td>$$rating1$$/10</td></tr>
</table>
<p><em>$$comments1$$</em></p>
</div>
</dd>
[/ITEM]
[FOOTER]
</dl>
<div id="note">$$GENERATOR_NOTE$$</div>
</body>
</html>
[/FOOTER]
[POST]
my %letters = ();
my $idx = 0;
foreach (@items)
{
my $name = $self->{options}->{originalList}->transformValue($_->{name}, 'name');
my $firstLetter = uc(substr($name, 0, 1));
$firstLetter =~ s/[^A-Z]/_/;
if (!$letters{$firstLetter})
{
$body =~ s/<a id="minicarlink_$idx"/<a id="$firstLetter"/;
$letters{$firstLetter} = 1;
}
$idx++;
}
foreach (keys %letters)
{
$header =~ s/\| $_ \|/| <a class="letter" href="#$_">$_<\/a> |/;
}
$header =~ s/\| ([^<|]) /| <span class="letter">$1<\/span> /g;
#$header =~ s/\| ([^<]) \|/| <span class="letter">$1<\/span> |/g;
[/POST]
|