Generic table display for search results
Documentation
TODO
Parameters
- BASESEARCH - REQUIRED: Base search string (in DBCachePlugin DBQUERY format). For example:
name = '.*'
- e.g. finds all topics.
- EXCLUDE - Option regex for results to exclude. Defaults to
\bWeb*
- e.g. excludes topics starting with "Web".
- FACETS - Optional list of facets to use in the filter bar and search results.
- INITSORT - Optionally set initial sort. Defaults to "modified".
- INITLIMIT - Optionally set initial limit to # of results. Defaults to "all".
- SEARCH_FORMAT - Optional setting for different format for search results.
- HEADER_FORMAT - Optional setting for different format for search results header.
- FOOTER_FORMAT - Optional setting for different format for search results footer.
Css
Implementation
%STARTINCLUDE%
<div class="jqDataTablesContainer" data-paginate="true" data-searching="true" data-info="true">
%TABLE{tablewidth="100%" columnwidths="250px,300px,50px,50px"}%
%~~ DBQUERY{"
*~~
%~~ DBCALL{"%TCAOWEB%.RenderSearchString"
~~~ BASESEARCH="%IF{"defined BASESEARCH" then="%BASESEARCH%" else="name = '.*'"}%"
~~~ INITSORT="%IF{"defined INITSORT" then="%INITSORT%" else="modified" }%"
~~~ INITLIMIT="%IF{"defined INITLIMIT" then="%INITLIMIT%" else="all"}%"
~~~ FACETS="%IF{"defined FACETS" then="%FACETS%" }%"
~~~ }%"
~~~ web="%BASEWEB%"
~~~ exclude="%IF{"defined EXCLUDE" then="$percntEXCLUDE$percnt" else="\bWeb*"}%"
~~~ header="$percntIF{\"defined HEADER_FORMAT\"
~~~ then=\"$percntHEADER_FORMAT$percnt\"
~~~ else=\"| *Topic* | *Summary* | *Modified by* | *On* |$n\"
~~~ }$percnt"
~~~ footer="$percntIF{\"defined FOOTER_FORMAT\"
~~~ then=\"%FOOTER_FORMAT%\"
~~~ else=\"\" }$percnt"
~~~ format="
*~~ $percntIF{\"defined SEARCH_FORMAT\"
~~~ then=\"%SEARCH_FORMAT%\"
~~~ else=\"| [[$web.$topic][$percntSPACEOUT{$topic}$percnt]] <span class=\"foswikiSmall\" ><em>
*~~ $percntIF{\"'$expand(TopicType or Classification)'!=''\" then=\"<noautolink>$expand(TopicType or Classification)</noautolink>\" }$percnt</em></span> |
~~~ <noautolink>$formfield(Summary)</noautolink> |
~~~ $percntUSERSWEB$percnt.$expand(info.author) | $formatTime(info.date, '$day $month $year') |\"
~~~ }$percnt"
~~~ }%
</div>
%JQREQUIRE{"datatables"}%
<!-- interrupt glue -->
%STOPINCLUDE%
Test
Calls to 'RenderTableSearchResults'
Copyright
(C) 2006
LynnwoodBrown@Skyloom.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.