kaltura/mwEmbed — pull request #1369 by ranyefet (2014-12-29 14:50:49+00:00)
Title: Template enhancements

This pull request add few enhancements for tempates.

1. Allow loading template files from ```kwidget-ps``` by using ```{html5ps}``` prefix.
2. Support for registering template helpers.

In ```myPlugin.js```:
```javascript
mw.util.registerTemplateHelper('trDateFormat', function( unixTimestamp ){
var d = new Date(unixTimestamp*1000);
var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
var year = d.getFullYear();
var month = months[d.getMonth()];
var day = d.getDate();
var hour = d.getHours();
var min = d.getMinutes();
var sec = d.getSeconds();
return day + '-' + month + '-' + year + ' ' + hour + ':' + min;
});
```

In ```myTemplate.html```:
```html
Entry created at: <%=helpers.trDateFormat(entry.createdAt);%>
```

Please review & merge