documentation](http://handlebarsjs.com/).
The templates used by the core widgets can be viewed in [our git
-repository](http://git.indexdata.com/?p=mkws.git;a=tree;f=src/mkws.templates;).
+repository](http://git.indexdata.com/?p=mkws.git;a=tree;f=src/templates;).
Parameters are documented in a comment at the top of each template so
you can see what's going where. If all you want to do is add a CSS class to
something or change a `span` to a `div` it's easy to just copy the existing
mv -f $@.tmp $@
chmod 444 $@
-mkws-templates.js: *.templates/*.handlebars
- ${HANDLEBARS} -n mkws.defaultTemplates *.templates/*.handlebars -f $@.tmp
+mkws-templates.js: templates/*.handlebars
+ ${HANDLEBARS} -n mkws.defaultTemplates templates/*.handlebars -f $@.tmp
mv -f $@.tmp $@
# Checks that the JavaScript can be parsed
+++ /dev/null
-{{!
-Paragraphs and images from a reference source.
-
-sentences - number of sentences to include
-paragraphs - number of paragraphs to include
-md-* - metadata fields passed through from backend
-}}
-<img src="{{md-thumburl}}" alt="{{md-title}}">
-<h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>
-{{#if md-title-remainder}}
-<b>{{md-title-remainder}}</b>
-{{/if}}
-{{#if md-title-responsibility}}
-<i>{{md-title-responsibility}}</i>
-{{/if}}
-{{{mkws-paragraphs md-description paragraphs sentences}}}
-<p class="mkws-credit mkwsCredit">Wikipedia</p>
+++ /dev/null
-{{!
-Displayed on search completion
-
-count - number of results found
-}}
-{{{mkws-translate "Search complete: found"}}} {{count}} {{{mkws-translate "records"}}}
-
+++ /dev/null
-{{!
-A facet in the search.
-
-name - facet identifier, typically English and lowercase
-caption - caption for this facet
-terms:
- term - term name
- count - count of items matching in the current search for this team
- linkdata - attributes to add to the term element including an onclick handler
- field - for the xtargets facet ONLY, the opaque identifier of the target
-}}
-
-<div class="mkws-facet-title mkwsFacetTitle">{{caption}}</div>
-{{#each terms}}
- <div class="mkws-term mkwsTerm">
- <a href="#" {{{linkdata}}}>{{term}}</a> <span>{{count}}</span>
- </div>
-{{/each}}
+++ /dev/null
-{{!
-Records presented as images.
-
-The non-metadata keys enable an optional link to display an AJAX popup that
-fetches additional record detail.
-
-hits:
- containerClass - partial class attribute for element containing a record
- detailLinkId - id for the element triggering detail display
- detailClick - a click event handler for details
- renderedDetails - active record details rendered from the Record template
- md-* - metadata fields passed through from backend
-}}
-{{#each hits}}
- <a href="#" id="{{detailLinkId}}" onclick="{{detailClick}}">
- {{#mkws-first md-thumburl}}
- <img src="{{this}}" alt="{{../md-title}}"/>
- {{/mkws-first}}
- <br/>
- </a>
-{{/each}}
+++ /dev/null
-{{!
-Language selection widget
-
-languages
- code - two character language identifier
- selected - exists for the current language
- url - url to switch to this language
-}}
-{{#each languages}}
- {{~#if selected~}}
- <span>{{code}}</span>
- {{~else~}}
- <a href="{{{url}}}">{{code}}</a>
- {{~/if~}}
- {{#unless last}}
- |
- {{/unless}}
-{{/each}}
-
+++ /dev/null
-{{!
-Facet breadcrumbs -- filters on the current search
-
-filters
- facet - name of facet being limited
- value - limit to this value
- click - handler script to remove limit
-}}
-{{#each filters}}
- {{{mkws-translate facet}}}: <a class="mkws-removable mkwsRemovable" href="#" onclick="{{{click}}}">{{value}}</a>
- {{#unless @last}}|{{/unless}}
-{{/each}}
-
+++ /dev/null
-{{!
-Pager
-
-nextClick - handler script for "next" button, only available if there is a next page
-prevClick - handler script for "previous" button if there is a previous page
-moreNext - indicates there are more pages following those displayed
-morePrev - indicates there are more pages preceding
-first - first record displayed
-last - last record displayed
-count - number of records available
-found - number of records found
-pages:
- number - page number
- click - script to go to this page unless it is the current one
-}}
-<div style="float: right">
- {{mkws-translate "Displaying"}}:
- {{first}} {{mkws-translate "to"}} {{last}}
- {{mkws-translate "of"}} {{count}} ({{{mkws-translate "found"}}}: {{found}})
-</div>
-
-<div style="float: clear">
- {{#if prevClick}}
- <a href="#" class="mkws-prev mkwsPrev" onclick="{{prevClick}}"><< {{{mkws-translate "Prev"}}}</a> |
- {{else}}
- <span class="mkws-prev mkwsPrev"><< {{{mkws-translate "Prev"}}}</span> |
- {{/if}}
-
- {{#if morePrev}}...{{/if}}
-
- {{#each pages}}
- {{#if click}}
- <a href="#" onclick="{{click}}">{{number}}</a>
- {{else}}
- <span class="mkws-current-page mkwsCurrentPage">{{number}}</span>
- {{/if}}
- {{/each}}
-
- {{#if moreNext}}...{{/if}}
-
- {{#if nextClick}}
- | <a href="#" class="mkws-next mkwsNext" onclick="{{nextClick}}">{{{mkws-translate "Next"}}} >></a>
- {{else}}
- | <span class="mkws-next mkwsNext">{{{mkws-translate "Next"}}} >></span>
- {{/if}}
-</div>
+++ /dev/null
-{{!
-Progress
-
-done - number of targets complete
-waiting - number of targets waiting
-}}
-<span class="mkws-done mkws-done mkwsDone">{{#mkws-repeat done}}█{{/mkws-repeat}}</span>
-{{~#if waiting~}}
-<span class="mkws-waiting mkws-waiting mkwsWaiting">{{#mkws-repeat waiting}}█{{/mkws-repeat}}</span>
-{{~/if~}}
-
+++ /dev/null
-{{!
-Ranking -- widget to select sort ordering and number of records to display
-
-team - team for this widget
-showSort - set if sort control is to be displayed
-showPerPage - set if per-page control is to be displayed
-sort
- key - machine readable value for this sort option
- label - text to display for this sort option
- selected - exists if this sort is selected
-perPage
- perPage - a number of records per page that can be selected
- selected - exists if this number is the current selection
-}}
-<form>
- {{~#if showSort~}}
- {{{mkws-translate "Sort by"}}}
- <select class="mkws-sort mkwsSort mkws-team-{{team}}">
- {{#each sort}}
- {{#if selected}}
- <option value="{{{key}}}" selected="selected">{{{mkws-translate label}}}</option>
- {{else}}
- <option value="{{key}}">{{{mkws-translate label}}}</option>
- {{/if}}
- {{/each}}
- </select>
- {{~/if~}}
- {{~#if showPerPage}}
- {{{mkws-translate "and show"}}}
- <select class="mkws-perpage mkwsPerpage mkws-team-{{team}}">
- {{#each perPage}}
- {{#if selected}}
- <option value="{{perPage}}" selected="selected">{{perPage}}</option>
- {{else}}
- <option value="{{perPage}}">{{perPage}}</option>
- {{/if}}
- {{/each}}
- </select>
- {{{mkws-translate "per page"}}}
- {{~/if~}}
-</form>
-
+++ /dev/null
-{{!
-Full record display.
-
-Top level object is metadata from Service Proxy / Pazpar2
-}}
-<table>
- <tr>
- <th>{{mkws-translate "Title"}}</th>
- <td>
- {{md-title}}
- {{#if md-title-remainder}}
- ({{md-title-remainder}})
- {{/if}}
- {{#if md-title-responsibility}}
- <i>{{md-title-responsibility}}</i>
- {{/if}}
- </td>
- </tr>
- {{#if md-date}}
- <tr>
- <th>{{mkws-translate "Date"}}</th>
- <td>{{md-date}}</td>
- </tr>
- {{/if}}
- {{#if md-author}}
- <tr>
- <th>{{mkws-translate "Author"}}</th>
- <td>{{md-author}}</td>
- </tr>
- {{/if}}
- {{#if md-electronic-url}}
- <tr>
- <th>{{mkws-translate "Links"}}</th>
- <td>
- {{#each md-electronic-url}}
- <a href="{{this}}">Link{{mkws-index1}}</a>
- {{/each}}
- </td>
- </tr>
- {{/if}}
- {{#mkws-if-any location having="md-subject"}}
- <tr>
- <th>{{mkws-translate "Subject"}}</th>
- <td>
- {{#mkws-first location having="md-subject"}}
- {{#if md-subject}}
- {{#mkws-commaList md-subject}}
- {{this}}{{/mkws-commaList}}
- {{/if}}
- {{/mkws-first}}
- </td>
- </tr>
- {{/mkws-if-any}}
- <tr>
- <th>{{mkws-translate "Locations"}}</th>
- <td>
- {{#mkws-commaList location}}
- {{mkws-attr "@name"}}{{/mkws-commaList}}
- </td>
- </tr>
-</table>
+++ /dev/null
-{{!
-Records from a search.
-
-The non-metadata keys enable an optional link to display an AJAX popup that
-fetches additional record detail.
-
-hits:
- containerClass - partial class attribute for element containing a record
- detailLinkId - id for the element triggering detail display
- detailClick - a click event handler for details
- renderedDetails - active record details rendered from the Record template
- md-* - metadata fields passed through from backend
-}}
-{{#each hits}}
- <div class="{{containerClass}}">
- <a href="#" id="{{detailLinkId}}" onclick="{{detailClick}}">
- <b>{{md-title}}</b>
- </a>
- {{#if md-title-remainder}}
- <span>{{md-title-remainder}}</span>
- {{/if}}
- {{#if md-title-responsibility}}
- <span><i>{{md-title-responsibility}}</i></span>
- {{/if}}
- {{#if renderedDetails}}
- {{{renderedDetails}}}
- {{/if}}
- </div>
-{{/each}}
+++ /dev/null
-{{!
-Results -- compound widget to display search results
-
-team - team for this widget
-}}
-<table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td class="mkws-termlists-container-wide mkws-team-{{team}}" width="250" valign="top">
- <div class="mkws-termlists mkwsTermlists mkws-team-{{team}}"></div>
- </td>
- <td class="mkws-motd-container mkwsMOTDContainer mkws-team-{{team}}" valign="top">
- <div class="mkws-ranking mkwsRanking mkws-team-{{team}}"></div>
- <div class="mkws-pager mkwsPager mkws-team-{{team}}"></div>
- <div class="mkws-navi mkwsNavi mkws-team-{{team}}"></div>
- <div class="mkws-records mkwsRecords mkws-team-{{team}}"></div>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <div class="mkws-termlists-container-narrow mkws-team-{{team}}"></div>
- </td>
- </tr>
-</table>
-
+++ /dev/null
-{{!
-Search form
-
-team - MKWS team
-queryWidth - configured width for search box
-}}
-<form name="mkws-search-form" class="mkws-search-form mkws-team-{{team}}" action="">
- <input class="mkws-query mkws-query mkwsQuery mkws-team-{{team}}" type="text" size="{{queryWidth}}">
- <input class="mkws-button mkws-button mkwsButton mkws-team-{{team}}" type="submit" value="{{{mkws-translate "Search"}}}">
-</form>
-
+++ /dev/null
-{{!
-Search statistics
-
-activeclients - number of targets currently searching
-clients - total targets for this search
-records - number of records returned and available
-hits - number of hits across all targets
-}}
- -- <span class="mkws-client-count mkwsClientCount">{{{mkws-translate "Active clients"}}} : {{activeclients}}/{{clients}}</span> -- {{{mkws-translate "Retrieved records"}}} : {{records}}/{{hits}}
+++ /dev/null
-{{!
-Switch between record and target view
-
-recordClick - handler to switch to record view
-targetClick - handler to switch to target view
-}}
-<a href="#" onclick="{{{recordClick}}}">{{{mkws-translate "Records"}}}</a>
-<span>|</span>
-<a href="#" onclick="{{{targetClick}}}">{{{mkws-translate "Targets"}}}</a>
+++ /dev/null
-{{!
-Target detail
-
-data:
- id - target id, an opaque identifier
- hits - number of hits for this target, or "Error" if an error has occurred
- diagnostic - diagnostic code returned by target, if any. May be numeric or human-readable
- records - number of record retrieved from target
- state - target state (Client_Idle, Client_Working, Client_Disconnected or Client_Error)
-}}
-<table>
- <thead>
- <tr>
- <td>{{{mkws-translate "Target ID"}}}</td>
- <td>{{{mkws-translate "Hits"}}}</td>
- <td>{{{mkws-translate "Diags"}}}</td>
- <td>{{{mkws-translate "Records"}}}</td>
- <td>{{{mkws-translate "State"}}}</td>
- </td>
- </tr>
- </thead>
- <tbody>
- {{#each data}}
- <tr>
- <td>{{{id}}}</td>
- <td>{{hits}}</td>
- <td>{{diagnostic}}</td>
- <td>{{records}}</td>
- <td>{{state}}</td>
- </tr>
- {{/each}}
- </tbody>
-</table>
+++ /dev/null
-{{!
-Termlists, a container of all configured facets.
-
-team - the current team
-facets - array of facet names
-}}
-
-<div class="mkws-termlists-title mkwsTermlistsTitle">Termlists</div>
-{{#each facets}}
- <div class="mkws-facet mkwsFacet mkws-team-{{../team}}" data-mkws-facet="{{this}}"></div>
-{{/each}}
--- /dev/null
+{{!
+Displayed on search completion
+
+count - number of results found
+}}
+{{{mkws-translate "Search complete: found"}}} {{count}} {{{mkws-translate "records"}}}
+
--- /dev/null
+{{!
+A facet in the search.
+
+name - facet identifier, typically English and lowercase
+caption - caption for this facet
+terms:
+ term - term name
+ count - count of items matching in the current search for this team
+ linkdata - attributes to add to the term element including an onclick handler
+ field - for the xtargets facet ONLY, the opaque identifier of the target
+}}
+
+<div class="mkws-facet-title mkwsFacetTitle">{{caption}}</div>
+{{#each terms}}
+ <div class="mkws-term mkwsTerm">
+ <a href="#" {{{linkdata}}}>{{term}}</a> <span>{{count}}</span>
+ </div>
+{{/each}}
--- /dev/null
+{{!
+Records presented as images.
+
+The non-metadata keys enable an optional link to display an AJAX popup that
+fetches additional record detail.
+
+hits:
+ containerClass - partial class attribute for element containing a record
+ detailLinkId - id for the element triggering detail display
+ detailClick - a click event handler for details
+ renderedDetails - active record details rendered from the Record template
+ md-* - metadata fields passed through from backend
+}}
+{{#each hits}}
+ <a href="#" id="{{detailLinkId}}" onclick="{{detailClick}}">
+ {{#mkws-first md-thumburl}}
+ <img src="{{this}}" alt="{{../md-title}}"/>
+ {{/mkws-first}}
+ <br/>
+ </a>
+{{/each}}
--- /dev/null
+{{!
+Language selection widget
+
+languages
+ code - two character language identifier
+ selected - exists for the current language
+ url - url to switch to this language
+}}
+{{#each languages}}
+ {{~#if selected~}}
+ <span>{{code}}</span>
+ {{~else~}}
+ <a href="{{{url}}}">{{code}}</a>
+ {{~/if~}}
+ {{#unless last}}
+ |
+ {{/unless}}
+{{/each}}
+
--- /dev/null
+{{!
+Facet breadcrumbs -- filters on the current search
+
+filters
+ facet - name of facet being limited
+ value - limit to this value
+ click - handler script to remove limit
+}}
+{{#each filters}}
+ {{{mkws-translate facet}}}: <a class="mkws-removable mkwsRemovable" href="#" onclick="{{{click}}}">{{value}}</a>
+ {{#unless @last}}|{{/unless}}
+{{/each}}
+
--- /dev/null
+{{!
+Pager
+
+nextClick - handler script for "next" button, only available if there is a next page
+prevClick - handler script for "previous" button if there is a previous page
+moreNext - indicates there are more pages following those displayed
+morePrev - indicates there are more pages preceding
+first - first record displayed
+last - last record displayed
+count - number of records available
+found - number of records found
+pages:
+ number - page number
+ click - script to go to this page unless it is the current one
+}}
+<div style="float: right">
+ {{mkws-translate "Displaying"}}:
+ {{first}} {{mkws-translate "to"}} {{last}}
+ {{mkws-translate "of"}} {{count}} ({{{mkws-translate "found"}}}: {{found}})
+</div>
+
+<div style="float: clear">
+ {{#if prevClick}}
+ <a href="#" class="mkws-prev mkwsPrev" onclick="{{prevClick}}"><< {{{mkws-translate "Prev"}}}</a> |
+ {{else}}
+ <span class="mkws-prev mkwsPrev"><< {{{mkws-translate "Prev"}}}</span> |
+ {{/if}}
+
+ {{#if morePrev}}...{{/if}}
+
+ {{#each pages}}
+ {{#if click}}
+ <a href="#" onclick="{{click}}">{{number}}</a>
+ {{else}}
+ <span class="mkws-current-page mkwsCurrentPage">{{number}}</span>
+ {{/if}}
+ {{/each}}
+
+ {{#if moreNext}}...{{/if}}
+
+ {{#if nextClick}}
+ | <a href="#" class="mkws-next mkwsNext" onclick="{{nextClick}}">{{{mkws-translate "Next"}}} >></a>
+ {{else}}
+ | <span class="mkws-next mkwsNext">{{{mkws-translate "Next"}}} >></span>
+ {{/if}}
+</div>
--- /dev/null
+{{!
+Progress
+
+done - number of targets complete
+waiting - number of targets waiting
+}}
+<span class="mkws-done mkws-done mkwsDone">{{#mkws-repeat done}}█{{/mkws-repeat}}</span>
+{{~#if waiting~}}
+<span class="mkws-waiting mkws-waiting mkwsWaiting">{{#mkws-repeat waiting}}█{{/mkws-repeat}}</span>
+{{~/if~}}
+
--- /dev/null
+{{!
+Ranking -- widget to select sort ordering and number of records to display
+
+team - team for this widget
+showSort - set if sort control is to be displayed
+showPerPage - set if per-page control is to be displayed
+sort
+ key - machine readable value for this sort option
+ label - text to display for this sort option
+ selected - exists if this sort is selected
+perPage
+ perPage - a number of records per page that can be selected
+ selected - exists if this number is the current selection
+}}
+<form>
+ {{~#if showSort~}}
+ {{{mkws-translate "Sort by"}}}
+ <select class="mkws-sort mkwsSort mkws-team-{{team}}">
+ {{#each sort}}
+ {{#if selected}}
+ <option value="{{{key}}}" selected="selected">{{{mkws-translate label}}}</option>
+ {{else}}
+ <option value="{{key}}">{{{mkws-translate label}}}</option>
+ {{/if}}
+ {{/each}}
+ </select>
+ {{~/if~}}
+ {{~#if showPerPage}}
+ {{{mkws-translate "and show"}}}
+ <select class="mkws-perpage mkwsPerpage mkws-team-{{team}}">
+ {{#each perPage}}
+ {{#if selected}}
+ <option value="{{perPage}}" selected="selected">{{perPage}}</option>
+ {{else}}
+ <option value="{{perPage}}">{{perPage}}</option>
+ {{/if}}
+ {{/each}}
+ </select>
+ {{{mkws-translate "per page"}}}
+ {{~/if~}}
+</form>
+
--- /dev/null
+{{!
+Full record display.
+
+Top level object is metadata from Service Proxy / Pazpar2
+}}
+<table>
+ <tr>
+ <th>{{mkws-translate "Title"}}</th>
+ <td>
+ {{md-title}}
+ {{#if md-title-remainder}}
+ ({{md-title-remainder}})
+ {{/if}}
+ {{#if md-title-responsibility}}
+ <i>{{md-title-responsibility}}</i>
+ {{/if}}
+ </td>
+ </tr>
+ {{#if md-date}}
+ <tr>
+ <th>{{mkws-translate "Date"}}</th>
+ <td>{{md-date}}</td>
+ </tr>
+ {{/if}}
+ {{#if md-author}}
+ <tr>
+ <th>{{mkws-translate "Author"}}</th>
+ <td>{{md-author}}</td>
+ </tr>
+ {{/if}}
+ {{#if md-electronic-url}}
+ <tr>
+ <th>{{mkws-translate "Links"}}</th>
+ <td>
+ {{#each md-electronic-url}}
+ <a href="{{this}}">Link{{mkws-index1}}</a>
+ {{/each}}
+ </td>
+ </tr>
+ {{/if}}
+ {{#mkws-if-any location having="md-subject"}}
+ <tr>
+ <th>{{mkws-translate "Subject"}}</th>
+ <td>
+ {{#mkws-first location having="md-subject"}}
+ {{#if md-subject}}
+ {{#mkws-commaList md-subject}}
+ {{this}}{{/mkws-commaList}}
+ {{/if}}
+ {{/mkws-first}}
+ </td>
+ </tr>
+ {{/mkws-if-any}}
+ <tr>
+ <th>{{mkws-translate "Locations"}}</th>
+ <td>
+ {{#mkws-commaList location}}
+ {{mkws-attr "@name"}}{{/mkws-commaList}}
+ </td>
+ </tr>
+</table>
--- /dev/null
+{{!
+Records from a search.
+
+The non-metadata keys enable an optional link to display an AJAX popup that
+fetches additional record detail.
+
+hits:
+ containerClass - partial class attribute for element containing a record
+ detailLinkId - id for the element triggering detail display
+ detailClick - a click event handler for details
+ renderedDetails - active record details rendered from the Record template
+ md-* - metadata fields passed through from backend
+}}
+{{#each hits}}
+ <div class="{{containerClass}}">
+ <a href="#" id="{{detailLinkId}}" onclick="{{detailClick}}">
+ <b>{{md-title}}</b>
+ </a>
+ {{#if md-title-remainder}}
+ <span>{{md-title-remainder}}</span>
+ {{/if}}
+ {{#if md-title-responsibility}}
+ <span><i>{{md-title-responsibility}}</i></span>
+ {{/if}}
+ {{#if renderedDetails}}
+ {{{renderedDetails}}}
+ {{/if}}
+ </div>
+{{/each}}
--- /dev/null
+{{!
+Paragraphs and images from a reference source.
+
+sentences - number of sentences to include
+paragraphs - number of paragraphs to include
+md-* - metadata fields passed through from backend
+}}
+<img src="{{md-thumburl}}" alt="{{md-title}}">
+<h1><a href="{{md-electronic-url}}">{{md-title}}</a></h1>
+{{#if md-title-remainder}}
+<b>{{md-title-remainder}}</b>
+{{/if}}
+{{#if md-title-responsibility}}
+<i>{{md-title-responsibility}}</i>
+{{/if}}
+{{{mkws-paragraphs md-description paragraphs sentences}}}
+<p class="mkws-credit mkwsCredit">Wikipedia</p>
--- /dev/null
+{{!
+Results -- compound widget to display search results
+
+team - team for this widget
+}}
+<table width="100%" border="0" cellpadding="6" cellspacing="0">
+ <tr>
+ <td class="mkws-termlists-container-wide mkws-team-{{team}}" width="250" valign="top">
+ <div class="mkws-termlists mkwsTermlists mkws-team-{{team}}"></div>
+ </td>
+ <td class="mkws-motd-container mkwsMOTDContainer mkws-team-{{team}}" valign="top">
+ <div class="mkws-ranking mkwsRanking mkws-team-{{team}}"></div>
+ <div class="mkws-pager mkwsPager mkws-team-{{team}}"></div>
+ <div class="mkws-navi mkwsNavi mkws-team-{{team}}"></div>
+ <div class="mkws-records mkwsRecords mkws-team-{{team}}"></div>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="mkws-termlists-container-narrow mkws-team-{{team}}"></div>
+ </td>
+ </tr>
+</table>
+
--- /dev/null
+{{!
+Search form
+
+team - MKWS team
+queryWidth - configured width for search box
+}}
+<form name="mkws-search-form" class="mkws-search-form mkws-team-{{team}}" action="">
+ <input class="mkws-query mkws-query mkwsQuery mkws-team-{{team}}" type="text" size="{{queryWidth}}">
+ <input class="mkws-button mkws-button mkwsButton mkws-team-{{team}}" type="submit" value="{{{mkws-translate "Search"}}}">
+</form>
+
--- /dev/null
+{{!
+Search statistics
+
+activeclients - number of targets currently searching
+clients - total targets for this search
+records - number of records returned and available
+hits - number of hits across all targets
+}}
+ -- <span class="mkws-client-count mkwsClientCount">{{{mkws-translate "Active clients"}}} : {{activeclients}}/{{clients}}</span> -- {{{mkws-translate "Retrieved records"}}} : {{records}}/{{hits}}
--- /dev/null
+{{!
+Switch between record and target view
+
+recordClick - handler to switch to record view
+targetClick - handler to switch to target view
+}}
+<a href="#" onclick="{{{recordClick}}}">{{{mkws-translate "Records"}}}</a>
+<span>|</span>
+<a href="#" onclick="{{{targetClick}}}">{{{mkws-translate "Targets"}}}</a>
--- /dev/null
+{{!
+Target detail
+
+data:
+ id - target id, an opaque identifier
+ hits - number of hits for this target, or "Error" if an error has occurred
+ diagnostic - diagnostic code returned by target, if any. May be numeric or human-readable
+ records - number of record retrieved from target
+ state - target state (Client_Idle, Client_Working, Client_Disconnected or Client_Error)
+}}
+<table>
+ <thead>
+ <tr>
+ <td>{{{mkws-translate "Target ID"}}}</td>
+ <td>{{{mkws-translate "Hits"}}}</td>
+ <td>{{{mkws-translate "Diags"}}}</td>
+ <td>{{{mkws-translate "Records"}}}</td>
+ <td>{{{mkws-translate "State"}}}</td>
+ </td>
+ </tr>
+ </thead>
+ <tbody>
+ {{#each data}}
+ <tr>
+ <td>{{{id}}}</td>
+ <td>{{hits}}</td>
+ <td>{{diagnostic}}</td>
+ <td>{{records}}</td>
+ <td>{{state}}</td>
+ </tr>
+ {{/each}}
+ </tbody>
+</table>
--- /dev/null
+{{!
+Termlists, a container of all configured facets.
+
+team - the current team
+facets - array of facet names
+}}
+
+<div class="mkws-termlists-title mkwsTermlistsTitle">Termlists</div>
+{{#each facets}}
+ <div class="mkws-facet mkwsFacet mkws-team-{{../team}}" data-mkws-facet="{{this}}"></div>
+{{/each}}