Log inRegister
%{ ###########################################################################
   template inheritance and general presets 
}%
%TMPL:INCLUDE{"view"}%

%{ ###########################################################################
   customization section
}%
%TMPL:DEF{"solr::defaultweb"}%%SOLR_DEFAULTWEB{default="all"}%%TMPL:END%
%TMPL:DEF{"solr::instantsearch"}%%IF{"'%SOLR_INSTANTSEARCH{default="false"}%'=~'\b(true|on)\b'" then="true" else="false"}%%TMPL:END%
%TMPL:DEF{"solr::instantsearch::delay"}%1000%TMPL:END%
%TMPL:DEF{"solr::defaultexactsearch"}%%IF{"'%SOLR_EXACTSEARCH{default="false"}%'=~'\b(true|on)\b'" then="true" else="false"}%%TMPL:END%
%TMPL:DEF{"solr::defaulttopicsearch"}%%IF{"'%SOLR_TOPICSEARCH{default="false"}%'=~'\b(true|on)\b'" then="true" else="false"}%%TMPL:END%
%TMPL:DEF{"solr::defaultrows"}%%SOLR_NUMROWS{default="10"}%%TMPL:END%
%TMPL:DEF{"solr::defaultquerytype"}%edismax%TMPL:END%
%TMPL:DEF{"solr::defaultsort"}%%SOLR_DEFAULTSORT{default="score desc"}%%TMPL:END%
%TMPL:DEF{"solr::dateformat"}%%SOLR_DATEFORMAT{default="dddd, Do MMMM YYYY, HH:mm"}%%TMPL:END%
%TMPL:DEF{"solr::fields"}%score, size%TMPL:END%
%TMPL:DEF{"DISsolr::score"}%, %TRANSLATE{"Score"}% {{:score}}%TMPL:END%
%TMPL:DEF{"solr::size"}%<!-- -->{{if size}}, %TRANSLATE{"Size"}% {{bytes: size  2}}{{/if}}%TMPL:END%
%TMPL:DEF{"solr::trashweb"}%Trash%TMPL:END%
%TMPL:DEF{"solr::archiveweb"}%%IF{"istopic '%WEB%.Archive.WebHome'" then="%WEB%.Archive" else="Archive"}%%TMPL:END%
%TMPL:DEF{"solr::queryfields"}%%SOLR_QUERYFIELDS{default=""}%%TMPL:END%
%TMPL:DEF{"solr::extrafilter"}%%SOLR_EXTRAFILTER{default=""}%%IF{ "not context isadmin" then=" -web_search:Applications" }%%TMPL:END%
%TMPL:DEF{"solr::exactsearch"}%title_std^7 catchall^0.5%TMPL:END%
%TMPL:DEF{"solr::facet::include::web"}%%SOLR_INCLUDEWEB{default=""}%%TMPL:END%
%TMPL:DEF{"solr::facet::exclude::web"}%%SOLR_EXCLUDEWEB{default="^(_.*%IF{ "not context isadmin" then="|Application.*" }%)$"}%%TMPL:END%
%TMPL:DEF{"solr::params"}%"topic": "%WEB%.%TOPIC%", "qt":"%TMPL:P{"solr::defaultquerytype"}%", "rows": %TMPL:P{"solr::defaultrows"}%, "qf": "%IF{
   "'%TMPL:P{"solr::defaultexactsearch"}%'='true'" 
   then="$percntTMPL:P{\"solr::exactsearch\"}$percnt"
   else="$percntTMPL:P{\"solr::queryfields\"}$percnt"
}%"%TMPL:END%

%{ ###########################################################################
   content: main definition that puts together all pieces
}%
%TMPL:DEF{"content"}%<noautolink>
%TMPL:P{"content::heading"}%<!-- -->
<literal>
<div id='solrSearch' style='display:none' data-more-fields='%TMPL:P{"solr::fields"}%' data-solr-url='%SCRIPTURL{"rest"}%/SolrPlugin/proxy' data-solr-params='{%TMPL:P{"solr::params"}%}' data-extra-filter='%TMPL:P{"solr::extrafilter"}%'>
</literal>
%TMPL:P{"solr::title"}%
%TMPL:P{"solr::header"}%
%TMPL:P{"solr::hits"}%
%TMPL:P{"solr::footer"}%
%TMPL:P{"solr::assets"}%
</div>
%TMPL:P{"solr::templates"}%
%TMPL:P{"solr::dictionary"}%
</noautolink>%TMPL:END%

%{ ###########################################################################
   solr::assets - css and js to be added to the html head
}%
%TMPL:DEF{"solr::assets"}%%JQREQUIRE{"focus, serialpager, photoswipe, render, jqtwisty, moment, blockui, imagetooltip" warn="off"}%
%ADDTOZONE{"script"
  id="SOLRPLUGIN::AJAX"
  requires="JQUERYPLUGIN::BLOCKUI, JQUERYPLUGIN::MOMENT"
  text="<script src='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/build/ajax-solr.js'></script>
<script src='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/build/ajax-solr-widgets.js'></script>
<script src='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/build/ajax-solr-init.js'></script>"
}%%ADDTOZONE{"head"
  id="SOLRPLUGIN"
  text="<link rel='stylesheet' href='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/build/solrplugin.css' type='text/css' media='all' />"
}%%TMPL:END%

%{ ###########################################################################
   solr::dictionary - defines a set of keys to be displayed using a different lable
}%
%TMPL:DEF{"solr::dictionary"}%<literal>
<div class="solrDictionary solrJsonData" data-id="default">
{ %TMPL:P{"solr::dictionary::content"}% }
</div>
</literal>%TMPL:END%

%TMPL:DEF{"solr::dictionary::content"}%
%TMPL:P{"solr::dictionary::webs"}%
%TMPL:P{"solr::dictionary::languages"}%
%TMPL:P{"solr::dictionary::misc"}%
%TMPL:P{"solr::dictionary::topictypes"}%
"":""
%TMPL:END%

%TMPL:DEF{"solr::dictionary::misc"}%
  "keyword": "%TRANSLATE{"keyword"}%",
  "tag": "%TRANSLATE{"tag"}%",
  "webcat": "%TRANSLATE{"Category"}%",
  "web_search": "%TRANSLATE{"Web"}%",
  "field_TopicType_first_s": "%TRANSLATE{"Type"}%",
%TMPL:END%

%TMPL:DEF{"solr::dictionary::languages"}%
  "ar":"%TRANSLATE{"Arabic"}%",
  "bg":"%TRANSLATE{"Bulgarian"}%",
  "ca":"%TRANSLATE{"Catalan"}%",
  "ckb":"%TRANSLATE{"Kurdish"}%",
  "cjk":"%TRANSLATE{"Japanese"}%",
  "cz":"%TRANSLATE{"Czech"}%",
  "da":"%TRANSLATE{"Danish"}%",
  "de":"%TRANSLATE{"German"}%",
  "el":"%TRANSLATE{"Greek"}%",
  "en":"%TRANSLATE{"English"}%",
  "es":"%TRANSLATE{"Spanish"}%",
  "fa":"%TRANSLATE{"Persian"}%",
  "fi":"%TRANSLATE{"Finnish"}%",
  "fr":"%TRANSLATE{"French"}%",
  "ga":"%TRANSLATE{"Irish"}%",
  "gl":"%TRANSLATE{"Galician"}%",
  "hi":"%TRANSLATE{"Hindi"}%",
  "hu":"%TRANSLATE{"Hungarian"}%",
  "hy":"%TRANSLATE{"Armenian"}%",
  "id":"%TRANSLATE{"Indonesian"}%",
  "it":"%TRANSLATE{"Italian"}%",
  "ja":"%TRANSLATE{"Japanese"}%",
  "ko":"%TRANSLATE{"Korean"}%",
  "lv":"%TRANSLATE{"Latvian"}%",
  "nl":"%TRANSLATE{"Dutch"}%",
  "no":"%TRANSLATE{"Norwegian"}%",
  "pl":"%TRANSLATE{"Polish"}%",
  "pt-br":"%TRANSLATE{"Portuguese"}%",
  "pt":"%TRANSLATE{"Portuguese"}%",
  "ro":"%TRANSLATE{"Romanian"}%",
  "ru":"%TRANSLATE{"Russian"}%",
  "sv":"%TRANSLATE{"Swedish"}%",
  "tr":"%TRANSLATE{"Turkish"}%",
  "uk":"%TRANSLATE{"Ukrainian"}%",
  "zh-cn":"%TRANSLATE{"Chinese"}%",
  "zh-tw":"%TRANSLATE{"Chinese"}%",
%TMPL:END%

%TMPL:DEF{"solr::dictionary::webs"}%
  %FLEXWEBLIST{
    webs="public"
    format="\"$web\": \"$percntENCODE{\"$percntTRANSLATE{\"$title\"}$percnt\" type=\"quote\"}$percnt\""
    subheader=",$n"
    separator=",$n"
  }%,
%TMPL:END%

%TMPL:DEF{"solr::dictionary::topictypes"}%
  %DBQUERY{
    "TopicType=~'\bTopicType\b'"
    format="\"$topic\": \"$expand(topictitle)\","
    separator="$n  "
  }%
%TMPL:END%

%{ ###########################################################################
   solr::templates - defines all jquery.tmpl templates required
}%
%TMPL:DEF{"solr::templates"}%
%TMPL:P{"solr::templates::hits"}%
%TMPL:P{"solr::templates::facetfield"}%
%TMPL:P{"solr::templates::currentselection"}%
%TMPL:P{"solr::templates::togglefacet"}%
%TMPL:P{"solr::templates::toggle"}%
%TMPL:P{"solr::templates::tagcloud"}%
%TMPL:P{"solr::templates::hierarchy"}%
%TMPL:P{"solr::templates::resultsperpage"}%
%TMPL:P{"solr::templates::spellcorrection"}%
%TMPL:END%

%{ ###########################################################################
   solr::templates::hits - defines all jquery.tmpl templates to render search hits
   of different types. each type has got a ...::<name-of-type> sup-template that
   is customized to that type.
}%
%TMPL:DEF{"solr::templates::hits"}%
%TMPL:P{"solr::templates::hits::topic"}%
%TMPL:P{"solr::templates::hits::image"}%
%TMPL:P{"solr::templates::hits::comment"}%
%TMPL:P{"solr::templates::hits::listy"}%
%TMPL:P{"solr::templates::hits::attachment"}%
%TMPL:P{"solr::templates::hits::file"}%
%TMPL:P{"solr::templates::hits::misc"}%
%TMPL:P{"solr::templates::hits::metadata"}%
%TMPL:P{"solr::templates::hits::ClassifiedTopic"}%
%TMPL:P{"solr::templates::hits::TaggedTopic"}%
%TMPL:P{"solr::templates::hits::CategorizedTopic"}%
<script id="solrHitTemplate" type="text/x-jsrender"> 
{{include tmpl=~getTemplateName() /}}
</script>%TMPL:END%

%TMPL:DEF{"solr::thumbnail"}%
{{if thumbnail}}
      <div class='solrThumbnail'>
          {{if thumbnail.startsWith("http")}}
            <a href='{{:url}}'><img src='{{:thumbnail}}' alt='{{:name}}' width='70' /></a>
          {{else}}
            <a href='{{:url}}' title='{{:name}}' class='imageHref imageSimple jqImageTooltip' data-web='{{:web}}' data-topic='{{:topic}}' data-image='{{:thumbnail}}' data-orig-width='{{:width}}' data-orig-height='{{:height}}'>
              {{if thumbnail.endsWith(".svg")}}
                <img src='{{:~getPubUrlPath(web, topic, thumbnail)}}' width='70' alt='{{:name}}' />
              {{else}}
                <img src='%SCRIPTURLPATH{"rest"}%/ImagePlugin/resize?topic={{:web}}.{{:topic}};file={{:~encodeURIComponent(thumbnail)}};size=70x70;crop=on' alt='{{:name}}' width='70' />
              {{/if}}
            </a>
          {{/if}}
      </div>
{{/if}}
%TMPL:END%

%TMPL:DEF{"solr::templates::hits::CategorizedTopic"}%<script id="solrHitTemplate_CategorizedTopic" type="text/x-jsrender">%TMPL:P{"solr::templates::hits::ClassifiedTopic::impl"}%</script>%TMPL:END%
%TMPL:DEF{"solr::templates::hits::TaggedTopic"}%<script id="solrHitTemplate_TaggedTopic" type="text/x-jsrender">%TMPL:P{"solr::templates::hits::ClassifiedTopic::impl"}%</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::ClassifiedTopic::impl"}%
  <div class='solrSearchHit solrTopicHit clearfix'>
    %TMPL:P{"solr::thumbnail"}%
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:~getScriptUrlPath("view", web, topic)}}'>{{:title}}</a>
      <span class=' solrContainerLink foswikiGrayText foswikiNormal'>
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::size"}%%TMPL:P{"solr::score"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
    <div class='solrTopicInfo foswikiGrayText'>
      {{:~renderTopicInfo()}}
    </div>
  </div>
%TMPL:END%

%TMPL:DEF{"solr::templates::hits::topic"}%<script id="solrHitTemplate_topic" type="text/x-jsrender">
  <div class='solrSearchHit solrTopicHit clearfix'>
    %TMPL:P{"solr::thumbnail"}%
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:~getScriptUrlPath("view", web, topic)}}'>{{:title}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink'>
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::size"}%%TMPL:P{"solr::score"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::image"}%<script id="solrHitTemplate_image" type="text/x-jsrender">
  <div class='solrSearchHit solrImageHit clearfix'>
    %TMPL:P{"solr::thumbnail"}%
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:name}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink'>
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::comment"}%<script id="solrHitTemplate_Comment" type="text/x-jsrender">
  <div class='solrSearchHit solrCommentHit clearfix'>
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:title}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink'>
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::listy"}%<script id="solrHitTemplate_Listy" type="text/x-jsrender">
  <div class='solrSearchHit solrListyHit clearfix'>
    <h3> 
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:title}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink'>
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::attachment"}%<script id="solrHitTemplate_Attachment" type="text/x-jsrender">
  <div class='solrSearchHit solrFileHit clearfix'>
    %TMPL:P{"solr::thumbnail"}%
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:name}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink' >
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
    {{if comment}}
      <div class='foswikiGrayText'>{{:comment}}</div>
    {{/if}}
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::metadata"}%<script id="solrHitTemplate_metadata" type="text/x-jsrender">
  <div class='solrSearchHit solrMetaDataHit clearfix'>
    <h3> 
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:title}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink' >
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
    {{if comment}}
      <div class='foswikiGrayText'>{{:comment}}</div>
    {{/if}}
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::file"}%<script id="solrHitTemplate_file" type="text/x-jsrender">
  <div class='solrSearchHit solrMiscHit clearfix'>
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:name}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink' >
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hits::misc"}%<script id="solrHitTemplate_misc" type="text/x-jsrender">
  <div class='solrSearchHit solrMiscHit clearfix'>
    <h3>
      {{:~getIcon(icon)}}
      <a href='{{:url}}'>{{:title}}</a>
      <span class='foswikiGrayText foswikiNormal solrContainerLink' >
        %TRANSLATE{"in [_1]" args="<a href='{{:container_url}}'>{{:container_title}}</a>"}%
      </span>
    </h3>
    <div class='foswikiTopicSummary'>{{:summary}}</div>
    <div class='solrRevision'> 
      {{:~formatDate(date,'%TMPL:P{"solr::dateformat"}%')}}, {{:author_title}}%TMPL:P{"solr::score"}%%TMPL:P{"solr::size"}%
    </div>
    <div class='solrHilite'>
      {{:~getHilite(id)}}
    </div>
    {{if comment}}
      <div class='foswikiGrayText'>{{:comment}}</div>
    {{/if}}
    <div class='solrTopicInfo foswikiGrayText'>
      {{:~renderTopicInfo()}}
    </div>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::facetfield"}%<script id="solrFacetFieldTemplate" type="text/x-jsrender"> 
  <div class="jqSerialPager" data-pagesize="10">
    <ul>
      {{for widget.facetCounts ~widget=widget}}
        <li>
          <table class='foswikiLayoutTable' width='100%'>
            <tr>
            <td width='12px'>
              <input type='{{:~widget.inputType}}' name='{{:~widget.field}}' title='{{:~getFacetKey(facet)}}' value='{{:~getFacetValue(facet)}}' id='{{:~widget.field}}_{{:#index}}' autocomplete='off' class='solrFacetValue {{:~widget.inputClass}}' {{:~checked(facet)}} />
            </td>
            <td><label for='{{:~widget.field}}_{{:#index}}' style='display:block'>{{:~getFacetKey(facet)}} <span class='solrFacetCounter'>{{:count}}</span></label></td>
            </tr>
          </table>
        </li>
      {{/for}}
    </ul>
  </div>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::currentselection"}%<script id="solrCurrentSelectionTemplate" type="text/x-jsrender"> 
  <li>
    <table class='foswikiLayoutTable' width='100%'>
      <tr>
        <td width='12px'>
          <input type='checkbox' class='foswikiCheckbox' id='{{:id}}' name='filter' checked='checked'/>
        </td>
        <td>
          <label for='{{:id}}' style='display:block'>{{:facet}} <nobr>({{:field}})</nobr></label>
        </td>
      </tr>
    </table>
  </li>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::togglefacet"}%<script id="solrToggleFacetTemplate" type="text/x-jsrender"> 
  <input type='checkbox' class='foswikiCheckbox' id='{{:id}}' />
  <label class='foswikiLabel' for='{{:id}}'>{{:title}}</label>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::toggle"}%<script id="solrToggleTemplate" type="text/x-jsrender"> 
  <input type='checkbox' class='foswikiCheckbox' id='{{:id}}' />
  <label class='foswikiLabel' for='{{:id}}'>{{:title}}</label>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::tagcloud"}%<script id="solrTagCloudTemplate" type="text/x-jsrender">
{{:group}}<span style='font-size:{{:weight}}px'><a href='#' title='{{:count}}' style='color:{{:color}};' class='solrFacetValue {{:current}} tag_{{:facet}}'>{{:facet}}</a> </span>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::hierarchy"}%<script id="solrHierarchyTemplate" type="text/x-jsrender">
{{:~getIcon(icon)}}
<a href='#' class='solrFacetFalue cat_{{:id}}' data-value='{{:id}}'>{{:title}}</a> {{:~renderFacetCount(id)}}
<div class='solrHierarchyChildren'>
{{for ~getChildren}}
  {{if index < 5}}
    <a href='#' class='solrFacetValue' data-cat='cat_{{:id}}' data-value='{{:id}}'>{{:title}}</a>
  {{/if}}
{{/for}}
{{if ~getChildren().length >= 5}} 
  <a href='#' class='solrFacetFalue cat_{{:id}}' data-value='{{:id}}'>...</a>
{{/if}}
</div>
</li>
</script>%TMPL:END%

%TMPL:DEF{"solr::templates::resultsperpage"}%<script id="solrResultsPerPageTemplate" type="text/x-jsrender">
%TMPL:P{"solr::counter"}%
</script>%TMPL:END%

%TMPL:DEF{"solr::counter"}%<div class="solrCounter">
 {{if count > 0}}
   %TRANSLATE{"Results [_1] - [_2] of <b>[_3]</b>" args="{{:from}}, {{:to}}, {{:count}}"}%
 {{else}}
    <span class="foswikiAlert">%TRANSLATE{"nothing found"}%</span>
 {{/if}}
</div>%TMPL:END%

%TMPL:DEF{"solr::sortby"}%<div class="solrSorting">
%TRANSLATE{"Sort by"}%: 
<select class='foswikiSelect' data-default-sort="%TMPL:P{"solr::defaultsort"}%">
  %TMPL:P{"solr::sortby::options"}%
</select>
</div>%TMPL:END%

%TMPL:DEF{"solr::sortby::options"}%<!-- -->
  <option class='foswikiOption' value='score desc'>%TRANSLATE{"Relevance"}%</option>
  <option class='foswikiOption' value='date desc'>%TRANSLATE{"Last changed"}%</option>
  <option class='foswikiOption' value='createdate desc'>%TRANSLATE{"Create date"}%</option>
  <option class='foswikiOption' value='title_sort asc'>%TRANSLATE{"Name"}%</option>
  <option class='foswikiOption' value='size desc'>%TRANSLATE{"Size"}%</option>
<!-- -->%TMPL:END%

%TMPL:DEF{"solr::pagelength"}%<div class="solrPageLength">
%TRANSLATE{"Results per page"}%:
<select class="foswikiSelect">
  %TMPL:P{"solr::pagelength::options"}%
</select>
</div>%TMPL:END%

%TMPL:DEF{"solr::pagelength::options"}%<!-- -->
  <option class="foswikiOption" value="5">5</option>
  <option class="foswikiOption" value="10">10</option>
  <option class="foswikiOption" value="20">20</option>
  <option class="foswikiOption" value="30">30</option>
  <option class="foswikiOption" value="40">40</option>
  <option class="foswikiOption" value="50">50</option>
  <option class="foswikiOption" value="100">100</option>
<!-- -->%TMPL:END%

%TMPL:DEF{"solr::templates::spellcorrection"}%<script id="solrSpellCorrectionTemplate" type="text/x-jsrender">
%TRANSLATE{"Did you mean [_1] ?" args="{{for suggestions}}{{if #index > 0}} or {{/if}} <a class='solrCorrection' href='#'>{{:#data}}</a>{{/for}}"}%
</script>%TMPL:END%

%{ ###########################################################################
   solr::header - header to be put infront of the search hits. this provides
   the containers for spellcheck corrections, pagination, counters and the like.
   It also calls the "solr::searchform" to display the search input field.
}%
%TMPL:DEF{"solr::header"}%<div class='solrHeader'>
%TMPL:P{"solr::searchform"}%
%TMPL:P{"solr::spellchecker"}%
<div class="solrStatus">
%TMPL:P{"solr::resultsperpage"}%
%TMPL:P{"solr::sortby"}%
%TMPL:P{"solr::pagelength"}%
</div>
%TMPL:P{"solr::pager"}%
</div>%TMPL:END%

%TMPL:DEF{"solr::spellchecker"}%<div class='solrSpellchecking'></div>%TMPL:END%
%TMPL:DEF{"solr::resultsperpage"}%<div class='solrResultsPerPage'></div>%TMPL:END%
%TMPL:DEF{"solr::pager"}%<div class='solrPager clearfix' data-next-text="%TRANSLATE{"Next"}%" data-prev-text="%TRANSLATE{"Previous"}%"></div>%TMPL:END%
%TMPL:DEF{"solr::footer"}%<div class='solrFooter'>%TMPL:P{"solr::pager"}%</div>%TMPL:END%

%{ ###########################################################################
   solr::searchform - this calls the separate steps comprising the form steps.
   this macro can be redefined to include more steps as needed.
}%
%TMPL:DEF{"solr::searchform"}%
%TMPL:P{"solr::formstart"}%
%TMPL:P{"solr::inputstep"}%
%TMPL:P{"solr::tagcloudstep"}%
%TMPL:P{"solr::formend"}%
%TMPL:END%

%{ ###########################################################################
   solr::formstart - beginning of the solr::searchform. contains the starting form 
}%
%TMPL:DEF{"solr::formstart"}%
<form name="searchform" class='solrSearchForm' id='solrSearchBox' data-instant-search='%TMPL:P{"solr::instantsearch"}%' data-instant-search-delay='%TMPL:P{"solr::instantsearch::delay"}%'>
<div class='foswikiFormSteps clearfix'>
%TMPL:END%

%{ ###########################################################################
   solr::inputstep - this is a part of the solr::searchform defining the 
   actual input field
}%
%TMPL:DEF{"solr::inputstep"}%
<div class='foswikiFormStep clearfix solrInputStep'>
  <input type='search' autocomplete='off' class='foswikiInputField jqFocus solrSearchField' size='60' />
  %BUTTON{"%TRANSLATE{"Search"}%" type="submit" icon="fa-search" class="solrSubmitButton"}%
</div>
%TMPL:END%

%{ ###########################################################################
   solr::formend - closing markup of the solr::searchform
}%
%TMPL:DEF{"solr::formend"}%
</div>
</form>
%TMPL:END%

%{ ###########################################################################
   solr::sidebar: this hooks into the skin to display all sidebar facets. the topmost
   widget is the "your selection" area displaying a summary of the current filters
   followed by the list of facets. Each facet is displayed calling the "facet" macro
}%
%TMPL:DEF{"solr::sidebar"}%
<noautolink>
%TMPL:P{"solr::selection"}%
%TMPL:P{"solr::settings"}%
%TMPL:P{"solr::facets"}%
</noautolink>%TMPL:END%

%{ ###########################################################################
   solr::facets: list of all facets as displayed in the sidebar
}%
%TMPL:DEF{"solr::facets"}%
%TMPL:P{"solr::facet"
  id="source"
  title="%TRANSLATE{"Source"}%"
  sort="title" 
  multivalue="true" 
  union="true" 
  exclusion="true" 
}%
%TMPL:P{"solr::facet"
  id="web"
  class="solrWebFacetField"
  title="%TRANSLATE{"Web"}%"
  include="%TMPL:P{"solr::facet::include::web"}%"
  exclude="%TMPL:P{"solr::facet::exclude::web"}%"
  multivalue="true" 
  union="true" 
  exclusion="true" 
  sort="title" 
  limit="-1"
}%
%TMPL:P{"solr::facet"
  id="field_TopicType_first_s"
  exclude="^$"
  sort="title" 
  title="%TRANSLATE{"Topic Type"}%"
  multivalue="true" 
  union="true" 
  exclusion="true" 
}%
%TMPL:P{"solr::facet"
  id="type"
  title="%TRANSLATE{"Media Type"}%"
  sort="title" 
  exclude="^(\d+)$"
  multivalue="true" 
  union="true" 
  exclusion="true" 
}%
%TMPL:P{"solr::facetquery"
  id="date"
  exclusion="true" 
  title="%TRANSLATE{"Recent changes"}%"
  queries="[
      { \"key\": \"%TRANSLATE{"1 hour"}%\", \"value\": \"date:[NOW-1HOUR TO NOW]\" }, 
      { \"key\": \"%TRANSLATE{"4 hours"}%\", \"value\": \"date:[NOW-4HOUR TO NOW]\" },
      { \"key\": \"%TRANSLATE{"today"}%\", \"value\": \"date:[NOW/DAY TO NOW]\" },
      { \"key\": \"%TRANSLATE{"2 days"}%\", \"value\": \"date:[NOW/DAY-1DAY TO NOW]\" },
      { \"key\": \"%TRANSLATE{"7 days"}%\", \"value\": \"date:[NOW/DAY-7DAY TO NOW]\" },
      { \"key\": \"%TRANSLATE{"1 month"}%\", \"value\": \"date:[NOW-1MONTH TO NOW]\" },
      { \"key\": \"%TRANSLATE{"2 months"}%\", \"value\": \"date:[NOW-2MONTH TO NOW]\" },
      { \"key\": \"%TRANSLATE{"1 year"}%\", \"value\": \"date:[NOW-1YEAR TO NOW]\" },
      { \"key\": \"%TRANSLATE{"older"}%\", \"value\": \"date:[* TO NOW/YEAR]\" }
    ]"
}%
%TMPL:P{"solr::facet"
  id="language"
  title="%TRANSLATE{"Language"}%"
  hidefilter="true"
  multivalue="true" 
  union="true" 
  exclusion="true" 
}%
%TMPL:END%

%{ ###########################################################################
   solr::facet - format a facet for the given field id

   Parameters:
      * id - the field name of the facet, e.g. category, author
      * title - the heading 
      * multivalue - boolean
      * union - boolean
      * exclusion - boolean
      * sort - count or title
      * reverse - boolean
      * exclude - count or title
      * include - count or title
      * mincount - lower boundary for facet values to display
      * hidesingle - boolean
      * hidenullvalues - boolean
      * hidefilter - boolean
      * initialstate - boolean: open (default)/ close
      * limit - max number of facet values to return
}%
%TMPL:DEF{"solr::facet"}%<div data-field='%id%' %IF{
  "not '%class%'=~'^([%]class%)?$'"
  then="class='%class%'"
  else="class='solrFacetField'"
}%%IF{
  "not '%hidesingle%'=~'^([%]hidesingle%)?$'"
  then=" data-hide-single='%hidesingle%'"
}%%IF{
  "not '%hidenullvalues%'=~'^([%]hidenullvalues%)?$'"
  then=" data-hide-null-values='%hidenullvalues%'"
}%%IF{
  "not '%multivalue%'=~'^([%]multivalue%)?$'"
  then=" data-multi-value='%multivalue%'"
}%%IF{
  "not '%union%'=~'^[%]union%$'"
  then=" data-union='%union%'"
}%%IF{
  "not '%exclusion%'=~'^([%]exclusion%)?$'"
  then=" data-exclusion='%exclusion%'"
}%%IF{
  "not '%sort%'=~'^([%]sort%)?$'"
  then=" data-facet-sort='%sort%'"
}%%IF{
  "not '%exclude%'=~'^([%]exclude%)?$'"
  then=" data-exclude='%exclude%'"
}%%IF{
  "not '%mincount%'=~'^([%]mincount%)?$'"
  then=" data-facet-mincount='%mincount%'"
}%%IF{
  "not '%limit%'=~'^([%]limit%)?$'"
  then=" data-facet-limit='%limit%'"
}%%IF{
  "not '%include%'=~'^([%]include%)?$'"
  then=" data-include='%include%'"
}%%IF{
  "not '%reverse%'=~'^([%]reverse%)?$'"
  then="data-facet-sort-reverse='%reverse%'"
}%>
<h2 class='clearfix'>
<span class='jqTwisty' data-initial-state='%IF{"not '%initialstate%'=~'^([%]initialstate%)?$'" then="%initialstate%" else="open"}%' data-target='#solrFacetField_%id%'>%title%</span>
%IF{
  "'%hidefilter%'!='on' and '%hidefilter%'!='true'"
  then="<div class='jqTwisty solrFacetFieldTwisty foswikiRight' data-initial-state='close' title='%TRANSLATE{"Filter values"}%'>%JQICON{"fa-filter"}%</div>
        <div class='solrFacetFieldFilter foswikiRight'><input type='text' size='20' class='foswikiInputField' placeholder='%TRANSLATE{"Filter"}%' /></div>"
}%</h2>
  <div class='solrFacetFieldContainer' id='solrFacetField_%id%'></div>
</div>%TMPL:END%

%{ ###########################################################################
   solr::facetquery - format a facet query

   Parameters: 
      * id - the field name
      * title - the heading 
      * queries - json object of the form [ {"key":"some label", "value": "some query"}, ...]
      * multivalue - boolean
      * union - boolean
      * exclusion - boolean
}%
%TMPL:DEF{"solr::facetquery"}%<div class='solrFacetField' data-field='%id%' data-facet-type='facet_queries' %IF{
  "not '%multivalue%'=~'^([%]multivalue%)?$'"
  then=" data-multi-value='%multivalue%'"
}%%IF{
  "not '%union%'=~'^[%]union%$'"
  then=" data-union='%union%'"
}%%IF{
  "not '%exclusion%'=~'^([%]exclusion%)?$'"
  then=" data-exclusion='%exclusion%'"
}%>
  <literal>
  <div class="solrJsonData">%queries%</div>
  </literal>
  <h2 class='jqTwisty' data-initial-state='open'>%title%</h2>
  <div class='solrFacetFieldContainer'></div>
</div>%TMPL:END%

%{ ###########################################################################
   solr::facetrange - renders a range facet

   Parameters:
      * id - the field name
      * title - the heading 
      * start - start of range
      * end - end of range
      * gap - increment from start to end
      * other - TODO: look up solr docu
      * include - TODO: look up solr docu
      * dateformat - format string used when the facet goes over a date range
      * hidesingle - boolean
      * sort - count or title
      * reverse - boolean
}%
%TMPL:DEF{"solr::facetrange"}%<div class='solrFacetField' data-field='%id%' data-facet-type='facet_ranges'%IF{
  "not '%start%'=~'^([%]start%)?$'"
  then=" data-facet-range-start='%start%'"
  else=" date-facet-range-start='NOW/DAY-7DAYS'"
}%%IF{
  "not '%hidesingle%'=~'^([%]hidesingle%)?$'"
  then=" data-hide-single='%hidesingle%'"
}%%IF{
  "not '%dateformat%'=~'^([%]dateformat%)?$'"
  then=" data-date-format='%dateformat%'"
}%%IF{
  "not '%end%'=~'^([%]end%)?$'"
  then=" data-facet-range-end='%end%'"
  else=" data-facet-range-end='NOW/DAY+1DAYS'"
}%%IF{
  "not '%gap%'=~'^([%]gap%)?$'"
  then=" data-facet-range-gap='%gap%'"
  else=" data-facet-range-gap='+1DAY'"
}%%IF{
  "not '%other%'=~'^([%]other%)?$'"
  then=" data-facet-range-other='%other%'"
  else=" data-facet-range-other='before'"
}%%IF{ 
  "not '%sort%'=~'^([%]sort%)?$'"
  then=" data-facet-sort='%sort%'"
}%%IF{
  "not '%reverse%'=~'^([%]reverse%)?$'"
  then=" data-facet-sort-reverse='%reverse%'"
}%>
  <h2 class='jqTwisty' data-initial-state='open'>%title%</h2>
  <div class='solrFacetFieldContainer'></div>
</div>%TMPL:END%

%{ ###########################################################################
   solr::selection - renders the "your selection" part in the solr::sidebar
}%
%TMPL:DEF{"solr::selection"}%
<h2>%TRANSLATE{"Your selection"}%:</h2>
<div id='solrCurrentSelection'>
  <ul>
    <li class='solrNoSelection'>%TRANSLATE{"(none)"}%</li>
  </ul>
  <a href='#' class="solrClear">%TRANSLATE{"Clear"}%</a>
  <span class='foswikiClear'></span>
</div>
%TMPL:END%

%{ ###########################################################################
   solr::hits - display all search hits
}%
%TMPL:DEF{"solr::hits"}%<div class="solrSearchHits jqPhotoSwipe" data-history="false" data-enable-scroll="true" data-item-selector=".solrImageFrame a" data-block-ui="window"></div>%TMPL:END%

%{ ###########################################################################
   solr::settings: configuration of the search
}%
%TMPL:DEF{"solr::settings"}%
<h2 class="jqTwisty" data-initial-state="open">%TRANSLATE{"Settings"}%</h2>
<ul>%TMPL:P{"solr::settings::checkboxes"}%</ul>
%TMPL:END%

%TMPL:DEF{"solr::settings::checkboxes"}%
  %IF{"'%TMPL:P{"solr::defaultweb"}%'='all'" 
    then="$percntTMPL:P{\"solr::checkbox::incurrentweb\"}$percnt"
    else="$percntTMPL:P{\"solr::checkbox::inallwebs\"}$percnt"
  }%
  %TMPL:P{"solr::checkbox::intrashwebs"}%
  %TMPL:P{"solr::checkbox::inarchive"}%
  %TMPL:P{"solr::checkbox::inmycontribs"}%
  %TMPL:P{"solr::checkbox::topicsearch"}%
  %TMPL:P{"solr::checkbox::exactsearch"}%
%TMPL:END%

%{ ###########################################################################
   solr::checkbox::incurrentweb - display a "In current web" checkbox
}%
%TMPL:DEF{"solr::checkbox::incurrentweb"}%<li>
<span class='solrToggleFacet' data-field='web' data-value='%FORMATLIST{"%BASEWEB%" split="/" separator="."}%' data-title='%TRANSLATE{"In current web"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::inallwebs - display a "In all webs" checkbox
}%
%TMPL:DEF{"solr::checkbox::inallwebs"}%<li>
<span class='solrToggleFacet' data-field='web' data-value='%FORMATLIST{"%TMPL:P{"solr::defaultweb"}%" split="/" separator="."}%' data-checked="false" data-inverse="true" data-title='%TRANSLATE{"In all webs"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::intrashwebs - toggle searching in trash webs only
}%
%TMPL:DEF{"solr::checkbox::intrashwebs"}%<li>
<span class='solrToggleFacet' data-field='web_search' data-exclude='true' data-value='%TMPL:P{"solr::trashweb"}%' data-title='%TRANSLATE{"In Trash"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::inarchive - toggle searching in archive webs only
}%
%TMPL:DEF{"solr::checkbox::inarchive"}%<li>
<span class='solrToggleFacet' data-field='web_search' data-exclude="true" data-value='%TMPL:P{"solr::archiveweb"}%' data-title='%TRANSLATE{"In Archive"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::inmycontribs - display a "In my contribs" checkbox
}%
%TMPL:DEF{"solr::checkbox::inmycontribs"}%<li>
<span class='solrToggleFacet' data-field='contributor' data-value='%USERINFO{format="$wikiname"}%' data-title='%TRANSLATE{"In my contributions"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::topicsearch - display a "Topic search" checkbox
}%
%TMPL:DEF{"solr::checkbox::topicsearch"}%<li>
<span class='solrToggleFacet' data-field='type' data-checked='%TMPL:P{"solr::defaulttopicsearch"}%' data-value='topic' data-title='%TRANSLATE{"Topic search"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::checkbox::exactsearch - display a "Exact Search" checkbox
}%
%TMPL:DEF{"solr::checkbox::exactsearch"}%<li>
<span class='solrToggle' data-field='qf' data-value='%TMPL:P{"solr::exactsearch"}%' data-title='%TRANSLATE{"Exact search"}%'></span>
</li>%TMPL:END%

%{ ###########################################################################
   solr::tagcloudstep - part of the solr::searchform. this contains the tagcloud facet
}%
%TMPL:DEF{"solr::tagcloudstep"}%
<div class='foswikiFormStep solrTagCloud' data-field='tag' data-start-color="[%TAGCLOUD_START{default="111, 169, 255"}%]" data-end-color='[%TAGCLOUD_END{default="0, 89, 224"}%]'>
  <h3><a href='#' class='jqTwisty' data-target='.solrTagCloudContainer' data-open-img='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/assets/toggle-collapse.png' data-close-img='%PUBURLPATH%/%SYSTEMWEB%/SolrPlugin/assets/toggle.png'>%TRANSLATE{"Tags"}%</a></h3>
%CLEAR%
  <div class='solrTagCloudContainer tagCloud'></div>
</div>%TMPL:END%

%{ ###########################################################################
   solr::hierarchystep - part of the solr::searchform. this contains the category list
}%
%TMPL:DEF{"solr::hierarchystep"}%
<div class='solrHierarchy' data-field='webcat' data-facet-sort='title'>
  <div class='solrHierarchyBreadcrumbs'>
    <span class='solrHierarchyBreadcrumbsTitle'>%TRANSLATE{"You are here:"}%</span>
    <span class='solrHierarchyBreadcrumbsContainer'></span>
  </div>
  <ul class='solrHierarchyContainer clearfix'></ul>
</div>%TMPL:END%
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 DACHELA Wiki? Send feedback
This page was cached on 09 Jun 2026 - 13:32.
This website is using cookies. More info. That's Fine