mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
cleaned up template helpers
This commit is contained in:
@@ -1,18 +1,17 @@
|
||||
'use strict';
|
||||
define(
|
||||
[
|
||||
'handlebars',
|
||||
'sugar'
|
||||
], {
|
||||
register: function (handlebars) {
|
||||
handlebars.registerHelper('ShortDate', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
], function (Handlebars) {
|
||||
Handlebars.registerHelper('ShortDate', function (input) {
|
||||
if (!input) {
|
||||
return '';
|
||||
}
|
||||
|
||||
var date = Date.create(input);
|
||||
var result = '<span title="' + date.full() + '">' + date.short() + '</span>';
|
||||
var date = Date.create(input);
|
||||
var result = '<span title="' + date.full() + '">' + date.short() + '</span>';
|
||||
|
||||
return new handlebars.SafeString(result);
|
||||
});
|
||||
}
|
||||
return new Handlebars.SafeString(result);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user