mirror of
https://github.com/Radarr/Radarr
synced 2025-02-25 15:43:08 +00:00
parent
281e516495
commit
c2d40051d4
2 changed files with 22 additions and 17 deletions
|
@ -11,24 +11,26 @@
|
|||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="form-group" style="display: inline-block; float: left; margin-bottom: 0;">
|
||||
<label class="col-sm-3 control-label">Show Existing</label>
|
||||
<div class="form-horizontal" style="margin-top: 15px;">
|
||||
<div class="form-group" style="margin-bottom: 0px;">
|
||||
<label class="col-sm-3 control-label">Display Existing Movies</label>
|
||||
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<label class="checkbox toggle well">
|
||||
<input class="x-show-existing" type="checkbox" checked="checked" name="showExisting"/>
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group">
|
||||
<label class="checkbox toggle well">
|
||||
<input class="x-show-existing" type="checkbox" checked="checked" name="showExisting"/>
|
||||
<p>
|
||||
<span>Yes</span>
|
||||
<span>No</span>
|
||||
</p>
|
||||
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
<div class="btn btn-primary slide-button"/>
|
||||
</label>
|
||||
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-sonarr-form-info" title="Should Radarr display movies already in your collection?"/>
|
||||
</span>
|
||||
<span class="help-inline-checkbox">
|
||||
<i class="icon-sonarr-form-info" title="Should Radarr display movies already in your collection?"/>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
var Marionette = require('marionette');
|
||||
var SearchResultView = require('./SearchResultView');
|
||||
var MoviesCollection = require('../Movies/MoviesCollection');
|
||||
var vent = require('vent');
|
||||
|
||||
module.exports = Marionette.CollectionView.extend({
|
||||
|
@ -43,13 +44,15 @@ module.exports = Marionette.CollectionView.extend({
|
|||
},
|
||||
|
||||
appendHtml : function(collectionView, itemView, index) {
|
||||
if(this.isExisting) {
|
||||
var tmdbId = itemView.model.get('tmdbId');
|
||||
var existingMovies = MoviesCollection.where({ tmdbId: tmdbId });
|
||||
if(existingMovies.length > 0) {
|
||||
if(this.showExisting) {
|
||||
if (index < this.showing || index === 0) {
|
||||
collectionView.$el.append(itemView.el);
|
||||
}
|
||||
}
|
||||
} else if(!this.isExisting) {
|
||||
} else {
|
||||
if (index < this.showing || index === 0) {
|
||||
collectionView.$el.append(itemView.el);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue