Bibliography Xblock
[mkwsxb-moved-to-github.git] / mkwsbiblio / mkwsbiblio / static / js / src / EdxChooser.handlebars
diff --git a/mkwsbiblio/mkwsbiblio/static/js/src/EdxChooser.handlebars b/mkwsbiblio/mkwsbiblio/static/js/src/EdxChooser.handlebars
new file mode 100644 (file)
index 0000000..e3f8656
--- /dev/null
@@ -0,0 +1,26 @@
+{{!
+Records from a search.
+
+hits:
+  containerClass - class  attribute for same
+  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="$('#mkwsCurrentRecord').attr('autosearch', '{{md-title}}'); mkws.init('Click select', $('#mkwsCurrentRecordContainer'));">
+      <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}}