Radarr/UI/Handlebars/Helpers/Quality.js

22 lines
544 B
JavaScript
Raw Normal View History

2013-07-16 23:54:45 +00:00
'use strict';
define(
[
'handlebars',
'Quality/QualityProfileCollection',
'underscore'
], function (Handlebars, QualityProfileCollection, _) {
Handlebars.registerHelper('qualityProfile', function (profileId) {
var profile = QualityProfileCollection.get(profileId);
if (profile) {
return new Handlebars.SafeString('<span class="label quality-profile-lable">' + profile.get("name") + '</span>');
}
return undefined;
});
});