Files
meanTorrent/modules/requests/client/views/requests-view.client.view.html

261 lines
21 KiB
HTML

<div ng-controller="RequestsViewController as vm" ng-init="vm.init();">
<div class="pagetop">
<div class="container">
<div class="padding-top-30">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="requests-desc" ng-bind-html="vm.getRequestsDesc();"></div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="margin-bottom-10 margin-top-10">
<div class="row">
<div class="col-sm-12">
<div class="request-wrapper">
<span user-info="vm.request.user" info-class="request-avatar" info-avatar></span>
<div class="request-list">
<div class="table-responsive request-item">
<table class="table table-hover table-bordered tb-v-middle top-border bottom-border">
<thead>
<tr>
<th>{{ 'REQUESTS.FIELD_TITLE' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_TYPE' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_LIFE' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_REWARDS' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_RESPONSES' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_COMMENTS' | translate}}</th>
<th class="text-center">{{ 'REQUESTS.FIELD_USER' | translate}}</th>
</tr>
</thead>
<tbody>
<tr>
<td class="col-md-6 td-v-middle td-text-overflow">
<h4>
<div class="text-long">
<a ui-sref="#">
<span editable-line readonly="!vm.request.isCurrentUserOwner && !vm.user.isOper"
ng-model="vm.request.title"
callback="onRequestTitleEdited"></span>
</a>
</div>
</h4>
</td>
<td class="col-md-1 td-v-middle text-center">{{'MENU_TORRENTS_SUB.'+vm.request.type.toUpperCase() | translate}}</td>
<td class="col-md-1 td-v-middle text-center">
{{vm.request.createdAt | life }}
<div>
<span class="badge badge_danger"
ng-if="vm.isExpired(vm.request) && !vm.request.accept">Expired</span>
<span class="badge badge_success" ng-if="vm.request.accept">Finished</span>
</div>
</td>
<td class="col-md-1 td-v-middle text-center">{{vm.request.rewards}}</td>
<td class="col-md-1 td-v-middle text-center">{{vm.request.torrents.length}}</td>
<td class="col-md-1 td-v-middle text-center">{{vm.request.comments.length}}</td>
<td class="col-md-1 td-v-middle text-center">
<span user-info="vm.request.user" info-name></span>
</td>
</tr>
<tr>
<td colspan="7">
<div class="item-marked-desc" id="{{vm.request._id}}" data-provide="markdown"
ng-bind-html="vm.getRequestDescContent(vm.request)">
</div>
</td>
</tr>
<tr>
<td colspan="7">
<div class="form-inline">
<fieldset ng-disabled="vm.request.accept || vm.isExpired(vm.request);">
<a ui-sref="torrents.uploads({req: vm.request._id})"
ng-if="!vm.request.isCurrentUserOwner"
class="btn btn-success btn-width-120">
{{ 'DO_UPLOAD' | translate}}
</a>
<button class="btn btn-default btn-width-120"
ng-if="vm.request.isCurrentUserOwner || vm.user.isOper"
ng-click="vm.beginEditMakerDesc(vm.request)">
{{ 'REQUESTS.BTN_EDIT_DESC' | translate}}
</button>
</fieldset>
<button class="btn btn-default btn-width-120"
ng-disabled="vm.request.accept"
ng-if="vm.request.isCurrentUserOwner || vm.user.isOper"
ng-click="vm.removeRequest();">
{{ 'BTN_REMOVE' | translate}}
</button>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="response-wrapper">
<div class="response-list">
<div class="jumbotron text-center margin-left-80" ng-if="vm.request.torrents.length<=0">
<i class="fa fa-users fa-2x text-muted" aria-hidden="true"></i>
<h3 class="text-muted">{{'REQUESTS.NO_RESPONSES' | translate}}</h3>
</div>
<div ng-if="vm.request.torrents.length>0">
<div class="response-title">{{ 'REQUESTS.RESPONSE_TITLE' | translate}}</div>
<div class="table-responsive">
<table class="table table-hover tb-v-middle top-border bottom-border">
<thead>
<tr>
<th></th>
<th>{{ 'TABLE_FIELDS.INFO' | translate}}</th>
<th>{{ 'TABLE_FIELDS.VOTES' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.LIFETIME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SIZE' | translate}}</th>
<th>
<abbr title="{{ 'TABLE_FIELDS.ABBR_SEEDS_LEECHERS_FINISHED' | translate}}" class="initialism">
{{ 'TABLE_FIELDS.SEEDS_LEECHERS_FINISHED' | translate}}
</abbr>
</th>
<th class="text-center">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="torrent-list-info" ng-repeat="item in vm.request.torrents"
ng-click="vm.TGI.openTorrentDetailInfo(item._id);"
ng-class="{'accepted-item': vm.request.accept == item._id}" ng-disabled="true">
<td class="td-v-middle">
<div class="div-accept">
<button class="btn btn-success btn-block btn-response-accept"
ng-click="vm.acceptResponse(item); $event.stopPropagation();"
ng-if="!vm.request.accept && !vm.isExpired(vm.request) && item.torrent_status == 'reviewed'">
{{ 'REQUESTS.BTN_ACCEPT' | translate}}
</button>
<i class="fa fa-lock fa-accept pull-right" aria-hidden="true"
ng-if="vm.request.accept == item._id"></i>
</div>
</td>
<td class="col-md-7 td-v-middle td-text-overflow">
<div class="media">
<div class="media-left">
<img class="media-object" torrent-logo="item"
ng-src="{{vm.TGI.getTorrentListImage(item)}}"
alt="{{vm.TGI.getTorrentTitle(item)}}">
<div class="layer-download" ng-class="{'music': item.torrent_type=='music'}">
<i class="fa fa-arrow-circle-o-down fa-3x" aria-hidden="true"
title="{{ 'TITLE_ALT.DOWNLOAD_TORRENT' | translate}}"
ng-click="vm.DLS.downloadTorrent(item._id); $event.stopPropagation();"
ng-class="{'fa-arrow-circle-down': vm.hover}"
ng-mouseover="vm.hover = true;" ng-mouseleave="vm.hover = false;"></i>
</div>
</div>
<div class="media-body">
<h5 class="media-heading">
<a ui-sref="torrents.view({torrentId: item._id})">{{vm.TGI.getTorrentDoubleTitle(item)}}</a>
</h5>
<div class="list-all-genres">
<span class="genres-item"
ng-repeat="t in item.resource_detail_info.genres">{{t.name}}</span>
</div>
<div class="torrent-filename text-long">{{item.resource_detail_info.subtitle}}</div>
<div class="torrent-filename text-long">{{item.torrent_filename | filename}}</div>
<div class="list-all-tags">
<!--<span class="label label-success text-uppercase">{{ item.torrent_type}}</span>-->
<span class="label label-ttype label-primary" ng-click="$event.stopPropagation();">
{{'TORRENT_TYPE_LABEL.' + item.torrent_type.toUpperCase() | translate}}
</span>
<span class="label label-tstatus label-danger" ng-show="item.torrent_status == 'new'"
ng-click="$event.stopPropagation();">
{{'TORRENT_STATUS_LABEL.' + item.torrent_status.toUpperCase() | translate}}
</span>
<span class="label label-release label-warning"
ng-show="item.resource_detail_info.release_date"
ng-click="$event.stopPropagation();">
{{ item.resource_detail_info.release_date}}
</span>
<span class="label label-rlevel label-info"
ng-show="item.torrent_recommended != 'none'"
ng-click="$event.stopPropagation();">
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + item.torrent_recommended.toUpperCase() | translate}}
</span>
<span class="label label-sale" ng-if="item.isSaling"
title="{{vm.TGI.getTorrentSaleTypeDesc(item);}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{item.torrent_sale_expires | date: 'MM-dd HH:mm'}}"
ng-click="$event.stopPropagation();"
ng-class="{'label-default': !item.isSaling, 'label-success': item.isSaling}">
{{item.torrent_sale_status}} {{item.torrent_sale_expires | unlife}}
</span>
<span class="label label-se-info" ng-if="item.torrent_type == 'tvserial'"
ng-click="$event.stopPropagation();">S{{item.torrent_seasons}}E{{item.torrent_episodes}}</span>
<span class="label label-hnr-info" ng-if="item.torrent_hnr"
ng-click="$event.stopPropagation();">H&R</span>
<span class="label label-vip-info" ng-if="item.torrent_vip"
ng-click="$event.stopPropagation();">VIP</span>
<span ng-repeat="t in item.torrent_tags">
<span class="label label-tag" ng-class="{'used': vm.searchTags.indexOf(t) !== -1}"
ng-click="$event.stopPropagation();"
ng-if="vm.RTS.tagInList(t);">
{{ 'RESOURCESTAGS.' + vm.RTS.getTagTitle(t) + '.' + t.toUpperCase() | translate}}
</span>
</span>
</div>
</div>
</div>
</td>
<td class="col-md-1 td-v-middle td-imdb">
<span title="{{ 'TITLE_ALT.IMDB_VOTES' | translate}}"
class="torrent-votes"><kbd>{{vm.TGI.getVoteTitle(item)}}</kbd> {{item.resource_detail_info.vote_average | number : 1}}</span>
</td>
<td class="col-md-1 td-v-middle text-center">{{item.createdat | life}}</td>
<td class="col-md-1 td-v-middle text-center td-size">{{item.torrent_size | bytes:2}}</td>
<td class="col-md-1 td-v-middle list-user-info td-user-info">
<p class="no-margin-p" title="{{ 'TITLE_ALT.SEEDS' | translate}}">
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>
{{item.torrent_seeds}}
</p>
<p class="no-margin-p" title="{{ 'TITLE_ALT.LEECHERS' | translate}}">
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>
{{item.torrent_leechers}}
</p>
<p class="no-margin-p" title="{{ 'TITLE_ALT.FINISHED' | translate}}">
<span class="glyphicon glyphicon-ok torrent-finished"></span>
{{item.torrent_finished}}
</p>
</td>
<td class="col-md-1 td-v-middle text-center td-uploader">
<span user-info="item.user" info-name></span>
</td>
<td class="td-v-middle text-center"
ng-class="{'div-overlay-accept': item.torrent_status != 'reviewed'}"
ng-click="$event.stopPropagation();"
ng-if="item.torrent_status != 'reviewed'">
<p>{{ 'REQUESTS.WAITING_REVIEW' | translate}}</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>