%{
}%
%{ ###########################################################################
   inherit settings from standard view template
}%
%TMPL:INCLUDE{"view"}%
%{
}%

%{
}%
%{ ###########################################################################
   websearch - default settings and switches
}%
%TMPL:DEF{"searchbox"}%%TMPL:END%
%TMPL:DEF{"sidebar"}%%TMPL:END%
%TMPL:DEF{"bodyclass"}%natViewBody natSearchBody%TMPL:END%
%TMPL:DEF{"revinfo"}%%TMPL:END%
%TMPL:DEF{"topicactions"}%%TMPL:END%
%TMPL:DEF{"meta"}% <meta name="robots" content="noindex, nofollow" /> %TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   content: main definition that puts together all pieces
}%
%TMPL:DEF{"content"}%<div class="natSearch">
%TMPL:P{"websearch::form"}%
%TMPL:P{"websearch::hits"}%
%JQREQUIRE{"focus"}%<!-- -->
</form>
</div>%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form: this is the form to be submitted; it consists of several 
   steps that make up the rows of the form; all form steps are wraped into
   a start and end part
}%

%TMPL:DEF{"websearch::form"}%<!-- -->
%TMPL:P{"websearch::form::start"}%
%TMPL:P{"websearch::form::rssstep"}%
%TMPL:P{"websearch::form::inputstep"}%
%TMPL:P{"websearch::form::end"}%
%TMPL:P{"websearch::form::limit"}%
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form::start - this is the head of the form
}%
%TMPL:DEF{"websearch::form::start"}%<!-- -->
<form id="searchform" name="searchform" action="%SCRIPTURLPATH{"view"}%/%BASEWEB%/%BASETOPIC%">
<div class="foswikiFormSteps">
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form::rss - this one holds the rss link
}%
%TMPL:DEF{"websearch::form::rssstep"}%<!-- -->
<div class="foswikiRight">
<a href='%SCRIPTURL{"view"}%/%BASEWEB%/WebRss?search=%URLPARAM{"search" encode="url"}%;limit=%URLPARAM{"limit" encode="url" default="all"}%;web=%URLPARAM{"web" default="%BASEWEB%"}%' title='%MAKETEXT{"Get notified on changes on this search"}%'>%JQICON{"feed"}%</a>
</div>
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form::inputstep - this one holds the input field together with the submit/cancel buttons
}%
%TMPL:DEF{"websearch::form::inputstep"}%<!-- websearch::form::inputstep -->
<div class="foswikiFormStep">
  <input type="text" class="foswikiInputField jqFocus foswikiRight" id="search" name="search" size="50" value="%URLPARAM{"search" encode="entity"}%" style="float:left;margin-right:8px;"/>
  %BUTTON{"%MAKETEXT{"Search"}%" type="submit" title="%MAKETEXT{"submit the query"}%" icon="find"}%
  %CLEAR%
  %TMPL:P{"websearch::form::options"}%<!-- -->
</div>
<!-- -->%TMPL:END%
%{
}%

%{
}%
%TMPL:DEF{"websearch::form::limit"}%<!-- -->
<div class="foswikiRight" style="margin:1em 0 1em 1em">
  <table class="foswikiLayoutTable">
    <tr>
      <th>
        %MAKETEXT{"Topics per web"}%:
      </th>
      <td>
        <select name="limit" class='foswikiSelect'>
          <option %IF{"$'URLPARAM{limit}'='5'" then="selected"}%>5</option>
          <option %IF{"$'URLPARAM{limit}'='10' or $'URLPARAM{limit}'=''" then="selected"}%>10</option>
          <option %IF{"$'URLPARAM{limit}'='20'" then="selected"}%>20</option>
          <option %IF{"$'URLPARAM{limit}'='30'" then="selected"}%>30</option>
          <option %IF{"$'URLPARAM{limit}'='40'" then="selected"}%>40</option>
          <option %IF{"$'URLPARAM{limit}'='50'" then="selected"}%>50</option>
          <option %IF{"$'URLPARAM{limit}'='100'" then="selected"}%>100</option>
          <option %IF{"$'URLPARAM{limit}'='all'" then="selected"}%>all</option>
        </select>
      </td>
    </tr>
  </table>
</div>
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form::options - this one renders the row of search options
}%
%TMPL:DEF{"websearch::form::options"}%<!-- websearch::form::options -->
<input type="checkbox" class="foswikiCheckbox" id="web" name="web" value="all" %IF{"$'URLPARAM{web}'='all'" then=" checked"}%/>
<label class="foswikiLabel" for="web">%MAKETEXT{"Search in all webs"}%</label>
<!-- //websearch::form::options -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::form::end - finally close the form
}%
%TMPL:DEF{"websearch::form::end"}%</div>%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::hits - this block displays the list of hits as found by SEARCH
}%
%TMPL:DEF{"websearch::hits"}%<!-- -->
%SEARCH{
  "%URLPARAM{"search" encode="quote"}%"
  nosearch="on"
  type="%URLPARAM{"type" default="keyword"}%"
  scope="%URLPARAM{"scope" default="all" encode="quote"}%"
  web="%URLPARAM{"web" encode="quote"}%"
  excludetopic="%URLPARAM{"excludetopic" encode="quote"}%"
  casesensitive="%URLPARAM{"casesensitive" default="off" encode="quote"}%"
  nosummary="%URLPARAM{"nosummary" encode="quote"}%"
  nototal="on"
  order="%URLPARAM{"order" encode="quote"}%"
  reverse="%URLPARAM{"reverse" encode="quote"}%"
  limit="%URLPARAM{"limit" encode="quote"}%"
  zeroresults="%IF{ "defined search and $search!=''" then="on" else="off" }%"
  footer="$percntTMPL:P{\"websearch::hits::footer\" count=\"$ntopics\"}$percnt"
  format="$percntTMPL:P{
    \"websearch::hits::topic\"
    topic=\"$topic\"
    web=\"$web\"
    author=\"$wikiname\"
    changed=\"$date\"
    summary=\"$summary\"
  }$percnt"
}%
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::hits::topic - this is called for each found hit
}%
%TMPL:DEF{"websearch::hits::topic"}%<!-- -->
<div class="natSearchHit">
<span class="natSearchTarget">[[%web%.%topic%]]</span>
<span class="natSearchTargetWeb foswikiGrayText">in <nop>%WEBLINK{format="$web" web="%web%"}% </span>
<div class="natSearchSummary"> <noautolink> %summary% </noautolink> </div>
<div class="natSearchRevision">
  <a href='%SCRIPTURLPATH{"rdiff"}%/%web%/%topic%?type=last'>%changed%</a>, <span class='natSearchAuthor'> [[%USERSWEB%.%author%]] </span>
</div>
</div>
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::hits::header - this prepended to the hit set of a web
}%
%TMPL:DEF{"websearch::hits::header"}%<!-- -->
---+++ %MAKETEXT{"Results from [_1] web" args="<nop>%web%"}%%TMPL:END%
<!-- -->%TMPL:END%
%{
}%

%{
}%
%{ ###########################################################################
   websearch::hits::footer - this appended to the hit set of a web
}%
%TMPL:DEF{"websearch::hits::footer"}%<!-- -->
<div class='natSearchTotal'>%MAKETEXT{"[_1] topic(s) found" args="<span>%count%</span>"}%</div>
<!-- -->%TMPL:END%
%{
}%
Topic revision: r1 - 2019-02-14, UnknownUser
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback