From: Mike Taylor Date: Fri, 14 Feb 2014 10:29:33 +0000 (+0000) Subject: Modify default full-record template not to render URLs. X-Git-Tag: 1.0.0~1431 X-Git-Url: http://git.indexdata.com/?p=mkws-moved-to-github.git;a=commitdiff_plain;h=e5ef5a50508cf1d503e813280a11b3455f7991af Modify default full-record template not to render URLs. Add new Handlebars helper {{index1}} to form link texts. --- 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}}\ \ \