diff --git a/src/UI/Cells/ReleaseTitleCell.js b/src/UI/Cells/ReleaseTitleCell.js new file mode 100644 index 000000000..08e6639da --- /dev/null +++ b/src/UI/Cells/ReleaseTitleCell.js @@ -0,0 +1,28 @@ +'use strict'; + +define( + [ + 'Cells/NzbDroneCell' + ], function (NzbDroneCell) { + return NzbDroneCell.extend({ + + className: 'release-title-cell', + + render: function () { + this.$el.empty(); + + var title = this.model.get('title'); + var infoUrl = this.model.get('infoUrl'); + + if (infoUrl) { + this.$el.html('{1}'.format(infoUrl, title)); + } + + else { + this.$el.html(title); + } + + return this; + } + }); + }); diff --git a/src/UI/Cells/cells.less b/src/UI/Cells/cells.less index e7cc528c0..47bccc211 100644 --- a/src/UI/Cells/cells.less +++ b/src/UI/Cells/cells.less @@ -102,7 +102,7 @@ td.episode-status-cell, td.quality-cell { } } -.nzb-title-cell { +.release-title-cell { max-width: 400px; word-wrap: break-word; } diff --git a/src/UI/Episode/Search/ManualLayout.js b/src/UI/Episode/Search/ManualLayout.js index d91d95007..65f8a1035 100644 --- a/src/UI/Episode/Search/ManualLayout.js +++ b/src/UI/Episode/Search/ManualLayout.js @@ -3,12 +3,13 @@ define( [ 'marionette', 'backgrid', + 'Cells/ReleaseTitleCell', 'Cells/FileSizeCell', 'Cells/QualityCell', 'Cells/ApprovalStatusCell', 'Release/DownloadReportCell', 'Release/AgeCell' - ], function (Marionette, Backgrid, FileSizeCell, QualityCell, ApprovalStatusCell, DownloadReportCell, AgeCell) { + ], function (Marionette, Backgrid, ReleaseTitleCell, FileSizeCell, QualityCell, ApprovalStatusCell, DownloadReportCell, AgeCell) { return Marionette.Layout.extend({ template: 'Episode/Search/ManualLayoutTemplate', @@ -25,9 +26,9 @@ define( cell : AgeCell }, { - name : 'title', + name : 'this', label : 'Title', - cell : Backgrid.StringCell.extend({ className: 'nzb-title-cell' }) + cell : ReleaseTitleCell }, { name : 'indexer', @@ -44,7 +45,6 @@ define( label : 'Quality', cell : QualityCell }, - { name : 'rejections', label : '',