mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-12-16 11:37:58 +02:00
QualityProfile added to series table
This commit is contained in:
parent
fe48fd9fe9
commit
135cf3ce17
24
UI/Cells/QualityProfileCell.js
Normal file
24
UI/Cells/QualityProfileCell.js
Normal 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;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
@ -9,12 +9,24 @@ define(
|
|||||||
'Cells/AirDateCell',
|
'Cells/AirDateCell',
|
||||||
'Cells/SeriesTitleCell',
|
'Cells/SeriesTitleCell',
|
||||||
'Cells/TemplatedCell',
|
'Cells/TemplatedCell',
|
||||||
|
'Cells/QualityProfileCell',
|
||||||
'Series/Index/Table/SeriesStatusCell',
|
'Series/Index/Table/SeriesStatusCell',
|
||||||
'Series/Index/Table/Row',
|
'Series/Index/Table/Row',
|
||||||
'Shared/Toolbar/ToolbarLayout',
|
'Shared/Toolbar/ToolbarLayout',
|
||||||
'Shared/LoadingView'
|
'Shared/LoadingView'
|
||||||
], function (Marionette, PosterCollectionView, ListCollectionView, EmptyView, SeriesCollection, AirDateCell, SeriesTitleCell, TemplatedCell, SeriesStatusCell, SeriesIndexRow,
|
], function (Marionette,
|
||||||
ToolbarLayout, LoadingView) {
|
PosterCollectionView,
|
||||||
|
ListCollectionView,
|
||||||
|
EmptyView,
|
||||||
|
SeriesCollection,
|
||||||
|
AirDateCell,
|
||||||
|
SeriesTitleCell,
|
||||||
|
TemplatedCell,
|
||||||
|
QualityProfileCell,
|
||||||
|
SeriesStatusCell,
|
||||||
|
SeriesIndexRow,
|
||||||
|
ToolbarLayout,
|
||||||
|
LoadingView) {
|
||||||
return Marionette.Layout.extend({
|
return Marionette.Layout.extend({
|
||||||
template: 'Series/Index/SeriesIndexLayoutTemplate',
|
template: 'Series/Index/SeriesIndexLayoutTemplate',
|
||||||
|
|
||||||
@ -41,9 +53,9 @@ define(
|
|||||||
cell : 'integer'
|
cell : 'integer'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'quality',
|
name : 'qualityProfileId',
|
||||||
label: 'Quality',
|
label: 'Quality',
|
||||||
cell : 'integer'
|
cell : QualityProfileCell
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name : 'network',
|
name : 'network',
|
||||||
|
Loading…
Reference in New Issue
Block a user