add movie keyword on search panel

This commit is contained in:
OldHawk
2017-04-06 09:46:11 +08:00
parent 48da324e3e
commit 9c365243f5
7 changed files with 50 additions and 16 deletions

View File

@@ -72,6 +72,7 @@
INFO: '种子信息',
SIZE: '大小',
SEEDS_LEECHERS_FINISHED: '做种/下载/完成',
PUBLISHER: 'Publisher',
LIFETIME: '存活时间',
VOTES: '评分'
},
@@ -79,6 +80,8 @@
//TorrentsController & views
MOVIE_PAGE_INFO_ERROR: '获取电影分页列表失败',
TAGS_SEARCH: '电影 - 标签检索',
CA_KEYWORD: '关键字',
PH_KEYWORD: '搜索关键字',
//TorrentsUploadsController
TORRENTS_UPLOAD_SUCCESSFULLY: '文件上传成功',

View File

@@ -80,6 +80,8 @@
//TorrentsController & views
MOVIE_PAGE_INFO_ERROR: 'Get movie page info faild',
TAGS_SEARCH: 'Movie - Tags Search',
CA_KEYWORD: 'Keyword',
PH_KEYWORD: 'Search keyword',
//TorrentsUploadsController & views
TORRENTS_UPLOAD_SUCCESSFULLY: 'Successfully uploads file',

View File

@@ -177,10 +177,10 @@
> .td-text-overflow {
.text-long {
@media (min-width: @screen-lg-min) {
max-width: 620px;
max-width: 600px;
}
@media (max-width: @screen-lg-min) {
max-width: 500px;
max-width: 580px;
}
white-space: nowrap;
overflow: hidden;
@@ -206,6 +206,13 @@
font-weight: normal;
display: inline-block;
}
.label-tag {
color: #0366d6;
background-color: #f1f8ff;
&:hover {
color: #f00;
}
}
}
.list-all-genres {
.genres-item:not(:first-child) {

View File

@@ -125,7 +125,7 @@
<div class="container">
<div class="row">
<legend class="xsmall-legend strong-legend text-uppercase" translate="MENU_TORRENTS_SUB.SUB_MOVIE"></legend>
<!--<legend class="xsmall-legend strong-legend text-uppercase" translate="MENU_TORRENTS_SUB.SUB_MOVIE"></legend>-->
<div class="col-xs-4 col-sm-2">
</div>

View File

@@ -36,8 +36,10 @@
vm.getMoviePageInfo = function (p) {
TorrentsService.query({
skip: (p - 1) * vm.pageNumber + 0,
limit: p * vm.pageNumber
skip: (p - 1) * vm.pageNumber + vm.topNumber,
limit: p * vm.pageNumber,
torrent_status: 'reviewed',
torrent_type: 'movie'
}, function (items) {
vm.moviePageInfo = items;
console.log(items);
@@ -60,7 +62,7 @@
});
});
if(!find){
if (!find) {
angular.forEach(vm.resourcesTags.movie.checkbox, function (item) {
angular.forEach(item.value, function (sitem) {
if (sitem.name === tag) {

View File

@@ -39,6 +39,14 @@
<div class="panel-body">
<div class="col-md-10 col-md-offset-1">
<dl class="dl-horizontal">
<dt class="h-line">{{ 'CA_KEYWORD' | translate}}:</dt>
<dd class="h-line">
<div class="row">
<div class="col-sm-7">
<input type="text" class="form-control" placeholder="{{ 'PH_KEYWORD' | translate}}">
</div>
</div>
</dd>
<div ng-repeat="item in vm.resourcesTags.movie.radio">
<dt class="h-line">{{ 'RESOURCESTAGS.'+item.name+'.SELF' | translate}}</dt>
<dd class="h-line">
@@ -109,7 +117,7 @@
<!--<span class="label label-success text-uppercase">{{ item.torrent_type}}</span>-->
<span class="label label-warning">{{ item.torrent_release}}</span>
<span ng-repeat="t in item.torrent_tags">
<span class="label label-info">{{ 'RESOURCESTAGS.' + vm.getTagTitle(t) + '.' + t | translate}}</span>
<span class="label label-tag">{{ 'RESOURCESTAGS.' + vm.getTagTitle(t) + '.' + t | translate}}</span>
</span>
</div>
</div>

View File

@@ -256,6 +256,7 @@ exports.list = function (req, res) {
var skip = 0;
var limit = 0;
var status = 'reviewed';
var stype = 'movie';
if (req.query.skip !== undefined) {
skip = req.query.skip;
@@ -266,16 +267,27 @@ exports.list = function (req, res) {
if (req.query.status !== undefined) {
status = req.query.status;
}
if (req.query.stype !== undefined) {
stype = req.query.stype;
}
Torrent.find({'torrent_status': status}).sort('-createdat').populate('user', 'displayName').skip(skip).limit(limit).exec(function (err, torrents) {
if (err) {
return res.status(422).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.json(torrents);
}
});
Torrent.find({
'torrent_status': status,
'torrent_type': stype
})
.sort('-createdat')
.populate('user', 'displayName')
.skip(skip)
.limit(limit)
.exec(function (err, torrents) {
if (err) {
return res.status(422).send({
message: errorHandler.getErrorMessage(err)
});
} else {
res.json(torrents);
}
});
};
/**