summaryrefslogtreecommitdiff
path: root/templates/searchquery.tmpl
blob: bf36f3330a86386e1e2a1a2bf83f68204af255ac (plain)
  1. $setmap{prefix,title,S}
  2. $setmap{prefix,link,LINK}
  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. $def{NEXT,
  11. $if{$ne{$last,$msize},<INPUT TYPE=image NAME="&gt;" ALT="&gt;"
  12. SRC="/images/xapian-omega/next.png" BORDER=0 HEIGHT=30 WIDTH=30>,
  13. <IMG ALT="" SRC="/images/xapian-omega/nextoff.png" HEIGHT=30 WIDTH=30>}
  14. }
  15. $def{P,<INPUT TYPE=image NAME="$1" VALUE="$1" SRC="/images/xapian-omega/page-$2.png" BORDER=0$opt{a} ALT="$1">}
  16. $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}}}
  17. $def{S,<IMG SRC="/images/xapian-omega/page-$2s.png"$opt{a} ALT=$1>}
  18. $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}}}
  19. }
  20. $def{PREV,$if{$ne{$topdoc,0},<INPUT TYPE=submit NAME="&lt;" VALUE="Previous">}}
  21. $def{PAGE,<INPUT TYPE=submit NAME="[" VALUE="$1">}
  22. $def{SPAGE,<INPUT TYPE=submit NAME="[" VALUE="$1" DISABLED=disabled>}
  23. $def{NEXT,$if{$ne{$last,$msize},<INPUT TYPE=submit NAME="&gt;" VALUE="Next">}}
  24. <p>
  25. <FORM NAME=P METHOD=GET
  26. ACTION="$html{$env{CGIURL}}" TARGET="_top">
  27. <center>
  28. <INPUT NAME=P VALUE="$html{$query}" SIZE=65>
  29. <INPUT TYPE=SUBMIT VALUE="Search">
  30. <hr>
  31. <SELECT NAME=DEFAULTOP>
  32. <OPTION VALUE=or $if{$eq{$defaultop,or},SELECTED}>Matching any words
  33. <OPTION VALUE=and $if{$eq{$defaultop,and},SELECTED}>Matching all words
  34. </SELECT>
  35. $if{$opt{topterms},
  36. <div title="Suggested terms to add to your query"
  37. style="text-align:left;background:#cfc;border:1px solid green;padding:2px;font:11px verdana$. arial$. helvetica$. sans-serif;">
  38. $map{$topterms,<span style="white-space:nowrap"><INPUT TYPE=checkbox NAME=X VALUE="$prettyterm{$_}" onClick="C(this)">$prettyterm{$_}</span> }
  39. <BR><NOSCRIPT><INPUT TYPE=hidden NAME=ADD VALUE=1></NOSCRIPT>
  40. </div>
  41. }
  42. $or{$html{$error},
  43. $if{$eq{$msize,0},
  44. $if{$query,No documents match your query,
  45. <hr>Searching $nice{$dbsize} documents
  46. },
  47. $if{$not{$msizeexact},
  48. $nice{$add{$topdoc,1}}-$nice{$last} of about $nice{$msize} matches,
  49. $if{$and{$eq{$last,$msize},$eq{$topdoc,0}},
  50. All $nice{$msize} matches,
  51. $nice{$add{$topdoc,1}}$if{$ne{$add{$topdoc,1},$last},-$nice{$last}} of exactly $nice{$msize} matches}
  52. }
  53. <hr>
  54. </center>
  55. $list{$map{$queryterms,$list{$html{$uniq{$unstem{$_}}},<b>,</b>/<b>,</b>}:&nbsp;$nice{$freq{$_}}},Term frequencies: ,$. ,}
  56. <br><small>Search took $time seconds</small>
  57. <table>
  58. $hitlist{<tr><td valign=top>
  59. ${<IMG SRC="/images/xapian-omega/score-$div{$percentage,10}.png" ALT="$percentage%" HEIGHT=16 WIDTH=32>}
  60. <div title="$percentage%" style='float:left;width:60px;height:10px;border:1px solid black;margin-top:4px;'>
  61. <div style='width:$div{$mul{$percentage,6},10}px; height:10px; background-color: red;'>
  62. </div></div>
  63. <div style='float:left;margin-top:2px;font-size:x-small;'>
  64. <span title="$html{$date{$field{modtime},%Y-%m-%d %H:%M:%S}}">
  65. Modified:<br><b>$html{$date{$field{modtime},%Y-%m-%d}}</b></span><br>
  66. $if{$field{language},Language: <b>$html{$field{language}}</b><br>}
  67. $if{$field{size},<span title="$html{$field{size}} bytes">Size: <b>$html{$filesize{$field{size}}}</b></span><br>}
  68. </div>
  69. </td>
  70. <td><B><A HREF="$field{url}">$html{$or{$field{caption},$field{title},$field{url},Untitled}}</A></B><BR>
  71. <small>$highlight{$field{sample},$terms}$if{$field{sample},...}</small><br>
  72. <small>
  73. $percentage% relevant$. matching:
  74. <i>$list{$map{$terms,$html{$prettyterm{$_}}},$. ,</i> and <i>}</i></small>${for lynx:}<p></td></tr>}
  75. </table>
  76. <br><center>
  77. ${suppress next, prev, and page links if there's only one page}
  78. $if{$ne{$lastpage,1},
  79. $set{a,$if{$opt{pagelink_height}, HEIGHT=$opt{pagelink_height}}$if{$opt{pagelink_width}, WIDTH=$opt{pagelink_width}}}
  80. ${1-W ... X-(this)-Y ...}
  81. $set{w,$min{3,$add{$thispage,-1}}}
  82. $set{x,$max{$add{$opt{w},1},$add{$thispage,-3}}}
  83. $set{y,$min{$lastpage,$add{$thispage,8}}}
  84. $PREV
  85. $map{$range{1,$opt{w}},$PAGE{$_}}
  86. $if{$ne{$add{$opt{w},1},$opt{x}},...}
  87. $map{$range{$opt{x},$add{$thispage,-1}},$PAGE{$_}}
  88. $SPAGE{$thispage}
  89. $map{$range{$add{$thispage,1},$opt{y}},$PAGE{$_}}
  90. $if{$ne{$opt{y},$lastpage},...}
  91. $NEXT
  92. }
  93. }}
  94. </center><br>
  95. $if{$dbname,<INPUT TYPE=hidden NAME=DB VALUE="$html{$dbname}">}
  96. $if{$ne{$topdoc,0},<INPUT TYPE=hidden NAME=TOPDOC VALUE=$topdoc>}
  97. $if{$ne{$hitsperpage,10},<INPUT TYPE=hidden NAME=HITSPERPAGE VALUE=$hitsperpage>}
  98. $if{$fmt,<INPUT TYPE=hidden NAME=FMT VALUE="$html{$fmt}">}
  99. $if{$cgi{COLLAPSE},<INPUT TYPE=hidden NAME=COLLAPSE VALUE="$html{$cgi{COLLAPSE}}">}
  100. $if{$queryterms,<INPUT TYPE=hidden NAME=xP VALUE="$html{$queryterms}">}
  101. <INPUT TYPE=hidden NAME=xDB VALUE="$html{$dbname}">
  102. <INPUT TYPE=hidden NAME=xFILTERS VALUE="$html{$filters}">
  103. $list{$relevants,<INPUT TYPE=hidden NAME=R VALUE=",.,">}
  104. $if{$cgi{THRESHOLD},<INPUT TYPE=hidden NAME=THRESHOLD VALUE="$html{$cgi{THRESHOLD}}">}
  105. </FORM>
  106. <hr><div align=right><i><small><a href="http://www.xapian.org/">$html{$version}</a></small></i></div>