Render a search tool for
ClassifiedTopics
Documentation
TODO
Parameters
- QTEXT: text to query for
- QTAGS
- QCATS
- SEARCHALLWEBS: on/off
Css
Implementation
%STARTINCLUDE%<!-- render web class search -->
<div class="twikiPageForm">
<form action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%#results" DISmethod="post">
<input type="hidden" name="trigger" value="on" />
<input type="hidden" name="refresh" value="on" />
<table>
<tr>
<th>Text:</th>
<td><input type="text" name="qtext" size="50" value="%IFDEFINED{"%QTEXT%"}%" />
</tr>
<tr>
<th>Tags:</th>
<td><input type="text" name="qtags" size="50" value="%IFDEFINED{"%QTAGS%"}%" />
</tr>
<tr>
<th>Categories:</th>
<td><input type="text" name="qcats" size="50" value="%IFDEFINED{"%QCATS%"}%" />
</tr>
<tr>
<th> </th>
<td><input type="submit" value="Ok" class="twikiSubmit natOkButton" />
<input type="button" value="Reset" class="twikiButton natCancelButton" onclick="window.location.href= '%SCRIPTURLPATH{view}%/%BASEWEB%/%BASETOPIC%';" />
<label><input type="checkbox" value="on" name="searchallwebs" %IFDEFINED{"%SEARCHALLWEBS%" as="on" then=" checked "}% /> search in all webs</label>
<input type="hidden" name="searchallwebs" value="off" />
</tr>
</table>
</form>
</div>
%IFDEFINEDTHEN{"%URLPARAM{"trigger"}%" as="on" glue="off"}%
<a namne="results"></a>
%~~ FORMATLIST$nop{"%$nopIFDEFINED{"%SEARCHALLWEBS%" as="on" then="$percntWEBLIST{separator=\", \"}$percnt" else="%BASEWEB%"}%"
~~~ separator="<p />"
~~~ format="$percntDBQUERY{\"
~~~ 1
~~~
%~~ FORMATLIST{"%QTEXT%"
~~~ header=" AND "
~~~ format="lc(all) =~ lc('$1')"
~~~ separator=" AND "
~~~ footer=" "
~~~ }%
~~~
%~~ FORMATLIST{"%QTAGS%"
~~~ header=" AND Tag =~ '("
~~~ format="$1"
~~~ separator="|"
~~~ footer=")' "
~~~ }%
~~~
%~~ FORMATLIST{"%QCATS%"
~~~ header=" AND "
~~~ format="topic ISA '$1'"
~~~ separator="AND "
~~~ footer=" "
~~~ }%
~~~ \"
~~~ web=\"$1\"
~~~ header=\"
~~~ <h2>Results in $1</h2>
~~~ *Found <span class='twikiAlert'> $dollarcount </span> topic(s)* %BR%
~~~ <noautolink><div class='clsHitList'> $n
~~~ | *Nr* | *Topic* | *Summary* | *Changed* | *By* |$n
~~~ $dollarpercntTABLE{tablewidth=\\"100%\\"}$dollarpercnt$n\"
~~~ format=\"
~~~ | $dollarindex
~~~ | <a href='%SCRIPTURLPATH{"view"}%/$web/$topic'>$expand(TopicTitle or topic)</a>
~~~ | $flatten($expand(Summary or 'no description'))
~~~ | <span style='white-space:nowrap'>$formatTime(info.date)</span>
~~~ | [[%MAINWEB%.$expand(info.author)][$expand(info.author)]]
~~~ |\"
~~~ footer=\"$n</div></noautolink>\"
~~~ }$percnt"
~~~ }%
%FIDEFINED%
%STOPINCLUDE%
Test
Calls to 'RenderWebClassSearch'
Copyright
© 2008 Michael Daum
info@michaeldaumconsulting.com
This file is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version. For
more details read the
LICENSE.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.