1
0
Fork 0
mirror of https://github.com/Sonarr/Sonarr synced 2024-12-26 09:47:39 +00:00

QualityProfile added to series table

This commit is contained in:
Mark McDowall 2013-07-17 17:39:41 -07:00
parent fe48fd9fe9
commit 135cf3ce17
2 changed files with 40 additions and 4 deletions

View file

@ -0,0 +1,24 @@
'use strict';
define(
[
'backgrid',
'Quality/QualityProfileCollection'
], function (Backgrid, QualityProfileCollection) {
return Backgrid.Cell.extend({
className: 'quality-profile-cell',
render: function () {
this.$el.empty();
var qualityProfileId = this.model.get(this.column.get('name'));
var profile = _.findWhere(QualityProfileCollection.models, { id: qualityProfileId });
if (profile) {
this.$el.html(profile.get('name'));
}
return this;
}
});
});

View file

@ -9,12 +9,24 @@ define(
'Cells/AirDateCell',
'Cells/SeriesTitleCell',
'Cells/TemplatedCell',
'Cells/QualityProfileCell',
'Series/Index/Table/SeriesStatusCell',
'Series/Index/Table/Row',
'Shared/Toolbar/ToolbarLayout',
'Shared/LoadingView'
], function (Marionette, PosterCollectionView, ListCollectionView, EmptyView, SeriesCollection, AirDateCell, SeriesTitleCell, TemplatedCell, SeriesStatusCell, SeriesIndexRow,
ToolbarLayout, LoadingView) {
], function (Marionette,
PosterCollectionView,
ListCollectionView,
EmptyView,
SeriesCollection,
AirDateCell,
SeriesTitleCell,
TemplatedCell,
QualityProfileCell,
SeriesStatusCell,
SeriesIndexRow,
ToolbarLayout,
LoadingView) {
return Marionette.Layout.extend({
template: 'Series/Index/SeriesIndexLayoutTemplate',
@ -41,9 +53,9 @@ define(
cell : 'integer'
},
{
name : 'quality',
name : 'qualityProfileId',
label: 'Quality',
cell : 'integer'
cell : QualityProfileCell
},
{
name : 'network',