Modify default full-record template not to render URLs.
authorMike Taylor <mike@indexdata.com>
Fri, 14 Feb 2014 10:29:33 +0000 (10:29 +0000)
committerMike Taylor <mike@indexdata.com>
Fri, 14 Feb 2014 10:29:33 +0000 (10:29 +0000)
Add new Handlebars helper {{index1}} to form link texts.

tools/htdocs/mkws.js

index 0cfea64..fe9473a 100644 (file)
@@ -65,6 +65,12 @@ Handlebars.registerHelper('commaList', function(items, options) {
 });
 
 
+Handlebars.registerHelper('index1', function(obj) {
+    mkws.debug($.toJSON(obj));
+    return obj.data.index + 1;
+});
+
+
 
 // Set up global mkws object. Contains truly global state such as SP
 // authentication, and a hash of team objects, indexed by windowid.
@@ -805,10 +811,10 @@ function team($, teamName) {
   {{/if}}\
   {{#if md-electronic-url}}\
   <tr>\
-    <th>{{translate "URL"}}</th>\
+    <th>{{translate "Links"}}</th>\
     <td>\
       {{#each md-electronic-url}}\
-       <a href="{{this}}">{{this}}</a><br/>\
+       <a href="{{this}}">Link{{index1}}</a>\
       {{/each}}\
     </td>\
   </tr>\