mirror of https://github.com/Sonarr/Sonarr
adding episode status to episode view.
This commit is contained in:
parent
21e9bad6d5
commit
41c886b5dc
|
@ -17,6 +17,14 @@ define(['app', 'Episode/Layout'], function () {
|
|||
icon = 'icon-ok';
|
||||
|
||||
}
|
||||
else {
|
||||
if (this.model.get('hasAired')) {
|
||||
icon = 'icon-warning-sign';
|
||||
}
|
||||
else {
|
||||
icon = 'icon-time';
|
||||
}
|
||||
}
|
||||
|
||||
this.$el.html('<i class="{0}"/>'.format(icon));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
'use strict';
|
||||
define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
||||
define(['app', 'Series/Details/EpisodeStatusCell'], function () {
|
||||
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
||||
template: 'Series/Details/SeasonLayoutTemplate',
|
||||
|
||||
|
@ -8,11 +8,7 @@ define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
|||
},
|
||||
|
||||
columns: [
|
||||
{
|
||||
name : 'details',
|
||||
label : 'Details',
|
||||
cell : NzbDrone.Series.Details.EpisodeDetailCell
|
||||
},
|
||||
|
||||
{
|
||||
name : 'episodeNumber',
|
||||
label: '#',
|
||||
|
@ -29,6 +25,11 @@ define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
|||
label: 'Air Date',
|
||||
cell : 'date'
|
||||
//formatter: new Backgrid.AirDateFormatter()
|
||||
} ,
|
||||
{
|
||||
name : 'status',
|
||||
label: 'Status',
|
||||
cell : NzbDrone.Series.Details.EpisodeStatusCell
|
||||
}
|
||||
],
|
||||
|
||||
|
|
|
@ -43,6 +43,9 @@ define(['app'], function () {
|
|||
}
|
||||
|
||||
return 'primary';
|
||||
},
|
||||
hasAired : function () {
|
||||
return Date.create(this.get('airDate')).isBefore(Date.create());
|
||||
}
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue