From e5ef5a50508cf1d503e813280a11b3455f7991af Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 14 Feb 2014 10:29:33 +0000 Subject: [PATCH] Modify default full-record template not to render URLs. Add new Handlebars helper {{index1}} to form link texts. --- tools/htdocs/mkws.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/htdocs/mkws.js b/tools/htdocs/mkws.js index 0cfea64..fe9473a 100644 --- a/tools/htdocs/mkws.js +++ b/tools/htdocs/mkws.js @@ -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}}\ \ - {{translate "URL"}}\ + {{translate "Links"}}\ \ {{#each md-electronic-url}}\ - {{this}}
\ + Link{{index1}}\ {{/each}}\ \ \ -- 1.7.10.4