Towards MKWS-305.
authorMike Taylor <mike@indexdata.com>
Thu, 23 Oct 2014 10:17:41 +0000 (11:17 +0100)
committerMike Taylor <mike@indexdata.com>
Thu, 23 Oct 2014 10:17:41 +0000 (11:17 +0100)
Define Records template instead of Summary.
Entails repeating much of the boilerplate from ../../src/mkws.templates/Records.handlebars

examples/htdocs/images.html

index 0249ced..35051ca 100644 (file)
@@ -5,8 +5,10 @@
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>MKWS demo: Images</title>
     <link rel="stylesheet" type="text/css" href="//mkws.indexdata.com/mkws.css" />
-    <script type="text/javascript" src="//mkws.indexdata.com/mkws-complete.js"></script>
-    <script class="mkws-template_summary" type="text/x-handlebars-template">
+    <script type="text/javascript" src="//x.mkws.indexdata.com/mkws-complete.js"></script>
+    <script class="mkws-template-Records" type="text/x-handlebars-template">
+     {{#each hits}}
+     <div class="{{containerClass}}">
       <a href="#" id="{{_id}}" onclick="{{_onclick}}">
         {{#each md-thumburl}}
          <img src="{{this}}" alt="{{../md-title}}"/>
@@ -20,6 +22,8 @@
        <span><i>{{md-title-responsibility}}</i></span>
       {{/if}}
       </a>
+      </div>
+     {{/each}}
     </script>
     <script type="text/javascript">
       var mkws_config = {