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) {
|
2013-07-17 00:41:04 +00:00
|
|
|
return new Handlebars.SafeString('<span class="label quality-profile-label">' + profile.get("name") + '</span>');
|
2013-07-16 23:54:45 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return undefined;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|