mirror of https://github.com/Radarr/Radarr
Show no activity when no activity for episode
This commit is contained in:
parent
308f76d0fe
commit
be6d5aa4c2
|
@ -8,8 +8,9 @@ define(
|
||||||
'Cells/EventTypeCell',
|
'Cells/EventTypeCell',
|
||||||
'Cells/QualityCell',
|
'Cells/QualityCell',
|
||||||
'Cells/RelativeDateCell',
|
'Cells/RelativeDateCell',
|
||||||
|
'Episode/Activity/NoActivityView',
|
||||||
'Shared/LoadingView'
|
'Shared/LoadingView'
|
||||||
], function (App, Marionette, Backgrid, HistoryCollection, EventTypeCell, QualityCell, RelativeDateCell, LoadingView) {
|
], function (App, Marionette, Backgrid, HistoryCollection, EventTypeCell, QualityCell, RelativeDateCell, NoActivityView, LoadingView) {
|
||||||
|
|
||||||
return Marionette.Layout.extend({
|
return Marionette.Layout.extend({
|
||||||
template: 'Episode/Activity/EpisodeActivityLayoutTemplate',
|
template: 'Episode/Activity/EpisodeActivityLayoutTemplate',
|
||||||
|
@ -57,11 +58,17 @@ define(
|
||||||
},
|
},
|
||||||
|
|
||||||
_showTable: function () {
|
_showTable: function () {
|
||||||
this.activityTable.show(new Backgrid.Grid({
|
if (this.collection.any()) {
|
||||||
collection: this.collection,
|
this.activityTable.show(new Backgrid.Grid({
|
||||||
columns : this.columns,
|
collection: this.collection,
|
||||||
className : 'table table-hover table-condensed'
|
columns : this.columns,
|
||||||
}));
|
className : 'table table-hover table-condensed'
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
this.activityTable.show(new NoActivityView());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
'use strict';
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'marionette'
|
||||||
|
], function (Marionette) {
|
||||||
|
|
||||||
|
return Marionette.ItemView.extend({
|
||||||
|
template: 'Episode/Activity/NoActivityViewTemplate'
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
|
@ -0,0 +1,3 @@
|
||||||
|
<p class="text-warning">
|
||||||
|
No activity for this episode.
|
||||||
|
</p>
|
Loading…
Reference in New Issue