New: Show source/seed info in manual search

This commit is contained in:
Keivan Beigi
2014-12-19 17:21:03 -08:00
parent 3d1e0e7042
commit d849a4ab48
18 changed files with 169 additions and 56 deletions

View File

@@ -0,0 +1,28 @@
'use strict';
define(['backgrid'], function (Backgrid) {
return Backgrid.Cell.extend({
className : 'protocol-cell',
render : function () {
var protocol = this.model.get('protocol') || 'Unknown';
var label = '??';
if (protocol) {
if (protocol === 'torrent') {
label = 'torrent';
}
else if (protocol === 'usenet') {
label = 'nzb';
}
this.$el.html('<div class="label label-default protocol-{0}" title="{0}">{1}</div>'.format(protocol, label));
}
this.delegateEvents();
return this;
}
});
});