Merge branch 'master' of ssh://git.cyclocoop.org/cyclowiki
[cyclowiki.git] / templates / searchquery.tmpl
1 $setmap{prefix,title,S}
2 $setmap{prefix,link,XLINK}
3 $set{thousand,$.}$set{decimal,.}$setmap{BN,,Any Country,uk,England,fr,France}
4 ${
5 $def{PREV,
6 $if{$ne{$topdoc,0},<INPUT TYPE=image NAME="&lt;" ALT="&lt;"
7 SRC="/images/xapian-omega/prev.png" BORDER=0 HEIGHT=30 WIDTH=30>,
8 <IMG ALT="" SRC="/images/xapian-omega/prevoff.png" HEIGHT=30 WIDTH=30>}
9 }
10
11 $def{NEXT,
12 $if{$ne{$last,$msize},<INPUT TYPE=image NAME="&gt;" ALT="&gt;"
13 SRC="/images/xapian-omega/next.png" BORDER=0 HEIGHT=30 WIDTH=30>,
14 <IMG ALT="" SRC="/images/xapian-omega/nextoff.png" HEIGHT=30 WIDTH=30>}
15 }
16
17 $def{P,<INPUT TYPE=image NAME="$1" VALUE="$1" SRC="/images/xapian-omega/page-$2.png" BORDER=0$opt{a} ALT="$1">}
18 $def{PAGE,$if{$gt{$1,9},$if{$gt{$1,99},$P{$1,$div{$1,100}}}$P{$1,$mod{$div{$1,10},10}}}$P{$1,$mod{$1,10}}}
19
20 $def{S,<IMG SRC="/images/xapian-omega/page-$2s.png"$opt{a} ALT=$1>}
21 $def{SPAGE,$if{$gt{$1,9},$if{$gt{$1,99},$S{$1,$div{$1,100}}}$S{$1,$mod{$div{$1,10},10}}}$S{$1,$mod{$1,10}}}
22 }
23
24 $def{PREV,$if{$ne{$topdoc,0},<INPUT TYPE=submit NAME="&lt;" VALUE="Previous">}}
25
26 $def{PAGE,<INPUT TYPE=submit NAME="[" VALUE="$1">}
27
28 $def{SPAGE,<INPUT TYPE=submit NAME="[" VALUE="$1" DISABLED=disabled>}
29
30 $def{NEXT,$if{$ne{$last,$msize},<INPUT TYPE=submit NAME="&gt;" VALUE="Next">}}
31
32 <p>
33
34 <FORM NAME=P METHOD=GET
35 ACTION="$html{$env{CGIURL}}" TARGET="_top">
36 <div style="text-align:center">
37 <INPUT type="hidden" id="searchdo" name="do" value="search" />
38 <INPUT NAME=P VALUE="$html{$query}" SIZE=65>
39 <INPUT TYPE=SUBMIT VALUE="Rechercher">
40 $env{HELPLINK}
41 <hr>
42 <SELECT NAME=DEFAULTOP>
43 <OPTION VALUE=or $if{$eq{$defaultop,or},SELECTED}>Au moins un des mots
44 <OPTION VALUE=and $if{$eq{$defaultop,and},SELECTED}>Tous les mots
45 </SELECT>
46 $or{$html{$error},
47 $if{$eq{$msize,0},
48 $if{$query,Aucun document trouvé,
49 <hr>Recherche dans $nice{$dbsize} documents
50 },
51 $if{$not{$msizeexact},
52 $nice{$add{$topdoc,1}}-$nice{$last} of about $nice{$msize} matches,
53 $if{$and{$eq{$last,$msize},$eq{$topdoc,0}},
54 $nice{$msize} documents trouvés,
55 $nice{$add{$topdoc,1}}$if{$ne{$add{$topdoc,1},$last},-$nice{$last}} of exactly $nice{$msize} matches}
56 }
57 <hr>
58 </div>
59 $list{$map{$queryterms,$list{$html{$uniq{$unstem{$_}}},<b>,</b>/<b>,</b>}:&nbsp;$nice{$freq{$_}}},Term frequencies: ,$. ,}
60 <br><small>La recherche a pris $time secondes</small>
61 <table>
62 $hitlist{<tr><td valign=top>
63 ${<IMG SRC="/images/xapian-omega/score-$div{$percentage,10}.png" ALT="$percentage%" HEIGHT=16 WIDTH=32>}
64 <div title="$percentage%" style='float:left;width:60px;height:10px;border:1px solid black;margin-top:4px;'>
65 <div style='width:$div{$mul{$percentage,6},10}px; height:10px; background-color: red;'>
66 </div></div>
67 <div style='float:left;margin-top:2px;font-size:x-small;'>
68 <span title="$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}">
69 Modified:<br><b>$html{$date{$field{modtime},%Y-%m-%d}}</b></span><br>
70 $if{$field{language},Langage: <b>$html{$field{language}}</b><br>}
71 $if{$field{size},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesize{$field{size}}}</b></span><br>}
72 </div>
73 </td>
74 <td><B><A HREF="$html{$field{url}}">$html{$or{$field{caption},$field{title},$field{url},Untitled}}</A></B><BR>
75 <small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br>
76 <small>
77 $percentage% pertinent$. contenant :
78 <i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> et <i>}</i></small>${for lynx:}<p></td></tr>}
79 </table>
80
81 <br />
82
83 <div style="text-align:center">
84 ${suppress next, prev, and page links if there's only one page}
85 $if{$ne{$lastpage,1},
86 $set{a,$if{$opt{pagelink_height}, HEIGHT=$opt{pagelink_height}}$if{$opt{pagelink_width}, WIDTH=$opt{pagelink_width}}}
87
88 ${1-W ... X-(this)-Y ...}
89 $set{w,$min{3,$add{$thispage,-1}}}
90 $set{x,$max{$add{$opt{w},1},$add{$thispage,-3}}}
91 $set{y,$min{$lastpage,$add{$thispage,8}}}
92 $PREV
93 $map{$range{1,$opt{w}},$PAGE{$_}}
94 $if{$ne{$add{$opt{w},1},$opt{x}},...}
95 $map{$range{$opt{x},$add{$thispage,-1}},$PAGE{$_}}
96 $SPAGE{$thispage}
97 $map{$range{$add{$thispage,1},$opt{y}},$PAGE{$_}}
98 $if{$ne{$opt{y},$lastpage},...}
99 $NEXT
100 }
101 }}
102 </div><br />
103 $if{$dbname,<INPUT TYPE=hidden NAME=DB VALUE="$html{$dbname}">}
104 $if{$ne{$topdoc,0},<INPUT TYPE=hidden NAME=TOPDOC VALUE=$topdoc>}
105 $if{$ne{$hitsperpage,10},<INPUT TYPE=hidden NAME=HITSPERPAGE VALUE=$hitsperpage>}
106 $if{$fmt,<INPUT TYPE=hidden NAME=FMT VALUE="$html{$fmt}">}
107 $if{$cgi{COLLAPSE},<INPUT TYPE=hidden NAME=COLLAPSE VALUE="$html{$cgi{COLLAPSE}}">}
108 $if{$queryterms,<INPUT TYPE=hidden NAME=xP VALUE="$html{$queryterms}">}
109 <INPUT TYPE=hidden NAME=xDB VALUE="$html{$dbname}">
110 <INPUT TYPE=hidden NAME=xFILTERS VALUE="$html{$filters}">
111 $list{$relevants,<INPUT TYPE=hidden NAME=R VALUE=",.,">}
112 $if{$cgi{THRESHOLD},<INPUT TYPE=hidden NAME=THRESHOLD VALUE="$html{$cgi{THRESHOLD}}">}
113 </FORM>
114 <hr><div align=right><i><small><a href="http://www.xapian.org/">$html{$version}</a></small></i></div>