Rename all the templates MKWS-313
[mkws-moved-to-github.git] / src / templates / facet.handlebars
diff --git a/src/templates/facet.handlebars b/src/templates/facet.handlebars
new file mode 100644 (file)
index 0000000..7a4eedf
--- /dev/null
@@ -0,0 +1,18 @@
+{{!
+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}}