2013-06-22 09:24:24 +03:00
|
|
|
'use strict';
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-06-24 05:31:02 +03:00
|
|
|
define(['app','cells/nzbdronecell' ], function () {
|
|
|
|
return NzbDrone.Cells.NzbDroneCell.extend({
|
2013-05-15 04:17:24 +03:00
|
|
|
|
2013-05-21 00:42:20 +03:00
|
|
|
className: 'episode-status-cell',
|
|
|
|
|
2013-05-15 04:17:24 +03:00
|
|
|
render: function () {
|
|
|
|
this.$el.empty();
|
2013-05-21 00:05:48 +03:00
|
|
|
|
|
|
|
if (this.model) {
|
|
|
|
|
|
|
|
var icon;
|
|
|
|
|
|
|
|
if (this.model.get('episodeFile')) {
|
|
|
|
icon = 'icon-ok';
|
|
|
|
|
|
|
|
}
|
2013-05-21 00:06:01 +03:00
|
|
|
else {
|
|
|
|
if (this.model.get('hasAired')) {
|
|
|
|
icon = 'icon-warning-sign';
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
icon = 'icon-time';
|
|
|
|
}
|
|
|
|
}
|
2013-05-21 00:05:48 +03:00
|
|
|
|
2013-06-22 18:58:16 +03:00
|
|
|
this.$el.html('<i class="{0}"/>'.format(icon));
|
2013-05-21 00:05:48 +03:00
|
|
|
}
|
|
|
|
|
2013-05-15 04:17:24 +03:00
|
|
|
return this;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|