Renamed Activity to History in episode details modal

Closes #624
pull/3113/head
Mark McDowall 9 years ago
parent 6983f36f4d
commit 08714f79da

@ -129,7 +129,7 @@ td.episode-status-cell, td.quality-cell, td.history-quality-cell, td.progress-ce
} }
} }
.episode-activity-details-cell { .episode-history-details-cell {
width : 18px; width : 18px;
} }

@ -1 +0,0 @@
<div class="activity-table table-responsive"></div>

@ -1,3 +0,0 @@
<p class="text-warning">
No activity for this episode.
</p>

@ -1,7 +1,7 @@
var Marionette = require('marionette'); var Marionette = require('marionette');
var SummaryLayout = require('./Summary/EpisodeSummaryLayout'); var SummaryLayout = require('./Summary/EpisodeSummaryLayout');
var SearchLayout = require('./Search/EpisodeSearchLayout'); var SearchLayout = require('./Search/EpisodeSearchLayout');
var EpisodeActivityLayout = require('./Activity/EpisodeActivityLayout'); var EpisodeHistoryLayout = require('./History/EpisodeHistoryLayout');
var SeriesCollection = require('../Series/SeriesCollection'); var SeriesCollection = require('../Series/SeriesCollection');
var Messenger = require('../Shared/Messenger'); var Messenger = require('../Shared/Messenger');
@ -10,14 +10,14 @@ module.exports = Marionette.Layout.extend({
template : 'Episode/EpisodeDetailsLayoutTemplate', template : 'Episode/EpisodeDetailsLayoutTemplate',
regions : { regions : {
summary : '#episode-summary', summary : '#episode-summary',
activity : '#episode-activity', history : '#episode-history',
search : '#episode-search' search : '#episode-search'
}, },
ui : { ui : {
summary : '.x-episode-summary', summary : '.x-episode-summary',
activity : '.x-episode-activity', history : '.x-episode-history',
search : '.x-episode-search', search : '.x-episode-search',
monitored : '.x-episode-monitored' monitored : '.x-episode-monitored'
}, },
@ -25,7 +25,7 @@ module.exports = Marionette.Layout.extend({
events : { events : {
'click .x-episode-summary' : '_showSummary', 'click .x-episode-summary' : '_showSummary',
'click .x-episode-activity' : '_showActivity', 'click .x-episode-history' : '_showHistory',
'click .x-episode-search' : '_showSearch', 'click .x-episode-search' : '_showSearch',
'click .x-episode-monitored' : '_toggleMonitored' 'click .x-episode-monitored' : '_toggleMonitored'
}, },
@ -77,13 +77,13 @@ module.exports = Marionette.Layout.extend({
})); }));
}, },
_showActivity : function(e) { _showHistory : function(e) {
if (e) { if (e) {
e.preventDefault(); e.preventDefault();
} }
this.ui.activity.tab('show'); this.ui.history.tab('show');
this.activity.show(new EpisodeActivityLayout({ this.history.show(new EpisodeHistoryLayout({
model : this.model, model : this.model,
series : this.series series : this.series
})); }));

@ -13,12 +13,12 @@
<div class="modal-body"> <div class="modal-body">
<ul class="nav nav-tabs" id="myTab"> <ul class="nav nav-tabs" id="myTab">
<li><a href="#episode-summary" class="x-episode-summary">Summary</a></li> <li><a href="#episode-summary" class="x-episode-summary">Summary</a></li>
<li><a href="#episode-activity" class="x-episode-activity">Activity</a></li> <li><a href="#episode-history" class="x-episode-history">History</a></li>
<li><a href="#episode-search" class="x-episode-search">Search</a></li> <li><a href="#episode-search" class="x-episode-search">Search</a></li>
</ul> </ul>
<div class="tab-content"> <div class="tab-content">
<div class="tab-pane" id="episode-summary"/> <div class="tab-pane" id="episode-summary"/>
<div class="tab-pane" id="episode-activity"/> <div class="tab-pane" id="episode-history"/>
<div class="tab-pane" id="episode-search"/> <div class="tab-pane" id="episode-search"/>
</div> </div>
</div> </div>

@ -6,7 +6,7 @@ var HistoryDetailsView = require('../../Activity/History/Details/HistoryDetailsV
require('bootstrap'); require('bootstrap');
module.exports = NzbDroneCell.extend({ module.exports = NzbDroneCell.extend({
className : 'episode-activity-details-cell', className : 'episode-history-details-cell',
render : function() { render : function() {
this.$el.empty(); this.$el.empty();

@ -4,16 +4,16 @@ var HistoryCollection = require('../../Activity/History/HistoryCollection');
var EventTypeCell = require('../../Cells/EventTypeCell'); var EventTypeCell = require('../../Cells/EventTypeCell');
var QualityCell = require('../../Cells/QualityCell'); var QualityCell = require('../../Cells/QualityCell');
var RelativeDateCell = require('../../Cells/RelativeDateCell'); var RelativeDateCell = require('../../Cells/RelativeDateCell');
var EpisodeActivityActionsCell = require('./EpisodeActivityActionsCell'); var EpisodeHistoryActionsCell = require('./EpisodeHistoryActionsCell');
var EpisodeActivityDetailsCell = require('./EpisodeActivityDetailsCell'); var EpisodeHistoryDetailsCell = require('./EpisodeHistoryDetailsCell');
var NoActivityView = require('./NoActivityView'); var NoHistoryView = require('./NoHistoryView');
var LoadingView = require('../../Shared/LoadingView'); var LoadingView = require('../../Shared/LoadingView');
module.exports = Marionette.Layout.extend({ module.exports = Marionette.Layout.extend({
template : 'Episode/Activity/EpisodeActivityLayoutTemplate', template : 'Episode/History/EpisodeHistoryLayoutTemplate',
regions : { regions : {
activityTable : '.activity-table' historyTable : '.history-table'
}, },
columns : [ columns : [
@ -41,13 +41,13 @@ module.exports = Marionette.Layout.extend({
{ {
name : 'this', name : 'this',
label : '', label : '',
cell : EpisodeActivityDetailsCell, cell : EpisodeHistoryDetailsCell,
sortable : false sortable : false
}, },
{ {
name : 'this', name : 'this',
label : '', label : '',
cell : EpisodeActivityActionsCell, cell : EpisodeHistoryActionsCell,
sortable : false sortable : false
} }
], ],
@ -58,19 +58,19 @@ module.exports = Marionette.Layout.extend({
this.collection = new HistoryCollection({ this.collection = new HistoryCollection({
episodeId : this.model.id, episodeId : this.model.id,
tableName : 'episodeActivity' tableName : 'episodeHistory'
}); });
this.collection.fetch(); this.collection.fetch();
this.listenTo(this.collection, 'sync', this._showTable); this.listenTo(this.collection, 'sync', this._showTable);
}, },
onRender : function() { onRender : function() {
this.activityTable.show(new LoadingView()); this.historyTable.show(new LoadingView());
}, },
_showTable : function() { _showTable : function() {
if (this.collection.any()) { if (this.collection.any()) {
this.activityTable.show(new Backgrid.Grid({ this.historyTable.show(new Backgrid.Grid({
collection : this.collection, collection : this.collection,
columns : this.columns, columns : this.columns,
className : 'table table-hover table-condensed' className : 'table table-hover table-condensed'
@ -78,7 +78,7 @@ module.exports = Marionette.Layout.extend({
} }
else { else {
this.activityTable.show(new NoActivityView()); this.historyTable.show(new NoHistoryView());
} }
} }
}); });

@ -0,0 +1 @@
<div class="history-table table-responsive"></div>

@ -1,5 +1,5 @@
var Marionette = require('marionette'); var Marionette = require('marionette');
module.exports = Marionette.ItemView.extend({ module.exports = Marionette.ItemView.extend({
template : 'Episode/Activity/NoActivityViewTemplate' template : 'Episode/History/NoHistoryViewTemplate'
}); });

@ -0,0 +1,3 @@
<p class="text-warning">
No history for this episode.
</p>

@ -287,7 +287,7 @@
font-size : 12px; font-size : 12px;
} }
.episode-activity-details-cell .popover { .episode-history-details-cell .popover {
max-width: 800px; max-width: 800px;
} }

Loading…
Cancel
Save