mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-04 02:28:21 +00:00
adding episode status to episode view.
This commit is contained in:
parent
21e9bad6d5
commit
41c886b5dc
3 changed files with 28 additions and 16 deletions
|
@ -17,6 +17,14 @@ define(['app', 'Episode/Layout'], function () {
|
||||||
icon = 'icon-ok';
|
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));
|
this.$el.html('<i class="{0}"/>'.format(icon));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
define(['app', 'Series/Details/EpisodeStatusCell'], function () {
|
||||||
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
NzbDrone.Series.Details.SeasonLayout = Backbone.Marionette.Layout.extend({
|
||||||
template: 'Series/Details/SeasonLayoutTemplate',
|
template: 'Series/Details/SeasonLayoutTemplate',
|
||||||
|
|
||||||
|
@ -8,27 +8,28 @@ define(['app', 'Series/Details/EpisodeDetailCell'], function () {
|
||||||
},
|
},
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
|
|
||||||
{
|
{
|
||||||
name : 'details',
|
name : 'episodeNumber',
|
||||||
label : 'Details',
|
label: '#',
|
||||||
cell : NzbDrone.Series.Details.EpisodeDetailCell
|
cell : 'integer'
|
||||||
},
|
|
||||||
{
|
|
||||||
name : 'episodeNumber',
|
|
||||||
label : '#',
|
|
||||||
cell : 'integer'
|
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
name : 'title',
|
name : 'title',
|
||||||
label : 'Title',
|
label: 'Title',
|
||||||
cell : 'string'
|
cell : 'string'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'airDate',
|
name : 'airDate',
|
||||||
label : 'Air Date',
|
label: 'Air Date',
|
||||||
cell : 'date'
|
cell : 'date'
|
||||||
//formatter: new Backgrid.AirDateFormatter()
|
//formatter: new Backgrid.AirDateFormatter()
|
||||||
|
} ,
|
||||||
|
{
|
||||||
|
name : 'status',
|
||||||
|
label: 'Status',
|
||||||
|
cell : NzbDrone.Series.Details.EpisodeStatusCell
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|
|
@ -43,12 +43,15 @@ define(['app'], function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'primary';
|
return 'primary';
|
||||||
|
},
|
||||||
|
hasAired : function () {
|
||||||
|
return Date.create(this.get('airDate')).isBefore(Date.create());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
defaults: {
|
defaults: {
|
||||||
seasonNumber: 0,
|
seasonNumber: 0,
|
||||||
status: 0
|
status : 0
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue