Files
meanTorrent/modules/torrents/client/views/view-torrent.client.view.html

686 lines
44 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section ng-controller="TorrentsInfoController as vm" ng-init="vm.getTorrentInfo();">
<div class="backdrop" ng-show="vm.torrentLocalInfo">
<div class="filter">
<div class="container">
<div class="topone">
<div class="col-md-4">
<img ng-src="{{vm.tmdbConfig.poster_img_base_url}}{{vm.torrentLocalInfo.resource_detail_info.poster_path}}"
class="img-thumbnail center-block"
onload="this.style.opacity='1';">
<div class="down-torrent">
<button class="btn btn-success btn-block" ng-click="vm.downloadTorrent(vm.torrentLocalInfo._id)"
translate="DOWNLOAD_TORRENT"></button>
</div>
</div>
<div class="col-md-8">
<dl class="dl-horizontal">
<div ng-show="vm.torrentLocalInfo.resource_detail_info.original_title">
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_TITLE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.original_title}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.title">
<dt class="h-line">{{ 'TMDB_FIELDS.TITLE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.title}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.original_name">
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_NAME' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.original_name}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.name">
<dt class="h-line">{{ 'TMDB_FIELDS.NAME' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.name}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.title">
<dt class="h-line">{{ 'TMDB_FIELDS.DIRECTOR' | translate}}</dt>
<dd class="h-line">{{vm.getDirector();}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.networks.length > 0">
<dt class="h-line">{{ 'TMDB_FIELDS.NETWORK' | translate}}</dt>
<dd class="h-line list-all-network">
<span class="network-item"
ng-repeat="item in vm.torrentLocalInfo.resource_detail_info.networks">{{item.name}}</span>
</dd>
</div>
<dt class="h-line">{{ 'TMDB_FIELDS.ORIGINAL_LANGUAGE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.original_language}}</dd>
<dt class="h-line">{{ 'TMDB_FIELDS.GENRES' | translate}}</dt>
<dd class="h-line list-all-genres">
<span class="genres-item" ng-repeat="item in vm.torrentLocalInfo.resource_detail_info.genres">{{item.name}}</span>
</dd>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.production_companies.length > 0">
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COMPANIES' | translate}}</dt>
<dd class="h-line list-all-companies">
<span class="company-item"
ng-repeat="item in vm.torrentLocalInfo.resource_detail_info.production_companies">{{item.name}}</span>
</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.production_countries.length > 0">
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COUNTRIES' | translate}}</dt>
<dd class="h-line list-all-countries">
<span class="country-item"
ng-repeat="item in vm.torrentLocalInfo.resource_detail_info.production_countries">{{item.iso_3166_1}}</span>
</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.origin_country.length > 0">
<dt class="h-line">{{ 'TMDB_FIELDS.PRODUCTION_COUNTRIES' | translate}}</dt>
<dd class="h-line list-all-countries">
<span class="country-item"
ng-repeat="item in vm.torrentLocalInfo.resource_detail_info.origin_country">{{item}}</span>
<span ng-show="vm.torrentLocalInfo.resource_detail_info.origin_country.length ==0">-</span>
</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.release_date">
<dt class="h-line">{{ 'TMDB_FIELDS.RELEASE_DATE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.release_date}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.first_air_date">
<dt class="h-line">{{ 'TMDB_FIELDS.FIRST_AIR_DATE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.first_air_date}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.last_air_date">
<dt class="h-line">{{ 'TMDB_FIELDS.LAST_AIR_DATE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.last_air_date}}</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.number_of_seasons">
<dt class="h-line">{{ 'TMDB_FIELDS.TOTAL_SE' | translate}}</dt>
<dd class="h-line">
{{vm.torrentLocalInfo.resource_detail_info.number_of_episodes}} {{ 'TMDB_FIELDS.UNIT_EPISODES' | translate}} /
{{vm.torrentLocalInfo.resource_detail_info.number_of_seasons}} {{ 'TMDB_FIELDS.UNIT_SEASONS' | translate}}
</dd>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.number_of_seasons">
<dt class="h-line">{{ 'TMDB_FIELDS.THIS_SE' | translate}}</dt>
<dd class="h-line">
<span class="se-info">S{{vm.torrentLocalInfo.torrent_seasons}}E{{vm.torrentLocalInfo.torrent_episodes}}</span>
</dd>
</div>
</div>
<div ng-hide="!vm.torrentLocalInfo.resource_detail_info.runtime || vm.torrentLocalInfo.resource_detail_info.runtime == 0">
<dt class="h-line">{{ 'TMDB_FIELDS.RUNTIME' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.runtime | runtime}}</dd>
</div>
<div ng-hide="!vm.torrentLocalInfo.resource_detail_info.budget || vm.torrentLocalInfo.resource_detail_info.budget == 0">
<dt class="h-line">{{ 'TMDB_FIELDS.BUDGET' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.budget | dollar:2}}</dd>
</div>
<div ng-hide="!vm.torrentLocalInfo.resource_detail_info.revenue || vm.torrentLocalInfo.resource_detail_info.revenue == 0">
<dt class="h-line">{{ 'TMDB_FIELDS.REVENUE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.revenue | dollar:2}}</dd>
</div>
<dt class="h-line">{{ 'TMDB_FIELDS.VOTE_AVERAGE' | translate}}</dt>
<dd class="h-line">
<span ng-show="vm.torrentLocalInfo">
<span class="torrent-votes">
<kbd>IMDB</kbd>
</span> {{vm.torrentLocalInfo.resource_detail_info.vote_average}} / {{vm.torrentLocalInfo.resource_detail_info.vote_count}} {{ 'TMDB_FIELDS.VOTE_UNIT' | translate}}
</span>
</dd>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.imdb_id">
<dt class="h-line">{{ 'TMDB_FIELDS.IMDB_LINK' | translate}}</dt>
<dd class="h-line">
<a href="{{vm.imdbConfig.imdb_link_url}}{{vm.torrentLocalInfo.resource_detail_info.imdb_id}}"
target="_blank">{{vm.imdbConfig.imdb_link_url}}{{vm.torrentLocalInfo.resource_detail_info.imdb_id}}</a>
</dd>
</div>
<div ng-show="vm.torrentLocalInfo.resource_detail_info.id">
<dt class="h-line">{{ 'TMDB_FIELDS.TMDB_LINK' | translate}}</dt>
<dd class="h-line"><a href="{{vm.tmdbConfig.tmdb_movie_link_url}}{{vm.torrentLocalInfo.resource_detail_info.id}}"
target="_blank">{{vm.tmdbConfig.tmdb_movie_link_url}}{{vm.torrentLocalInfo.resource_detail_info.id}}</a>
</dd>
</div>
<dt class="h-line">{{ 'TMDB_FIELDS.OVERVIEW' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.resource_detail_info.overview}}</dd>
</dl>
<legend class="xsmall-legend strong-legend" translate="TMDB_FIELDS.CAST"></legend>
<div class="row cast-list">
<div class="col-xs-4 col-md-2 text-center"
ng-repeat="cast in vm.torrentLocalInfo.resource_detail_info.credits.cast | limitTo: 6">
<img ng-src="{{vm.tmdbConfig.cast_img_base_url}}{{cast.profile_path}}"
on-error-src="/./modules/core/client/img/default_face.jpg"
class="img-circle img-thumbnail img-responsive center-block" onload="this.style.opacity='1';">
<span class="cast-xs-info"><strong>{{cast.name}}</strong></span>
<p class="cast-xs-info character">{{cast.character}}</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="torrent-info-tabs">
<uib-tabset>
<uib-tab index="$index" ng-repeat="tab in vm.torrentTabs" disabled="tab.disabled" ng-show="tab.ng_show">
<uib-tab-heading>
{{tab.title}} <span class="badge {{b.class}}" ng-repeat="b in tab.badges">{{b.value}}</span>
</uib-tab-heading>
<div class="tab-border-view" ng-include="tab.templateUrl">
</div>
</uib-tab>
</uib-tabset>
</div>
</div>
<div class="padding-top-30" id="top_of_comments" ng-show="vm.torrentLocalInfo">
<div class="container">
<div class="panel panel-default panel-comment">
<div class="panel-heading text-center"><strong>{{ 'USER_COMMENT_LIST' | translate}}</strong> <span
class="badge badge_info">{{vm.torrentLocalInfo._replies.length}}</span></div>
<div class="panel-body">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.commentItemsPerPage" total-items="vm.commentFilterLength"
ng-model="vm.commentCurrentPage" ng-change="vm.commentPageChanged(true)"
ng-if="vm.torrentLocalInfo._replies.length > 0"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
<div id="comment-list-div">
<div class="comment-list" id="{{item._id}}" scroll-if="item._id==vm.scrollToId" offset-top="-60"
ng-repeat="item in vm.commentPagedItems">
<div class="timeline-comment-wrapper">
<a class="timeline-comment-avatar" ng-click="vm.replyComment(item);">
<img title="{{item.user.displayName}}" ng-src="/{{item.user.profileImageURL}}">
</a>
<div class="timeline-comment">
<div class="timeline-comment-header">
<div class="timeline-comment-header-text">{{item.user.displayName}}
<span class="user-ud-text">
(<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{item.user.uploaded | bytes}}
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{item.user.downloaded | bytes}}
)
</span>
<span message-to="item.user" to-class="message-to-icon"></span>
</div>
<span class="timeline-comment-header-time-text">{{item.createdat | date:'yyyy-MM-dd HH:mm:ss'}}</span>
</div>
<div class="timeline-comment-body">
<div class="timeline-comment-body-text" ng-bind-html="vm.getCommentMarked(item);"></div>
<div class="row text-right" ng-show="item.editedat">
<p class="timeline-comment-body-edited-text">[ {{item.editedby}} {{ 'COMMENT_EDITED_INFO' | translate}} {{item.editedat | date:'yyyy-MM-dd HH:mm:ss'}} ]</p>
</div>
<div class="row" ng-show="item._replies.length>0">
<div class="col-sm-10 col-sm-offset-2 timeline-comment-sub-list">
<div class="timeline-comment-sub-item" ng-repeat="sitem in item._replies">
<a class="timeline-comment-sub-avatar" ng-click="vm.replySubComment(item, sitem);">
<img title="{{sitem.user.displayName}}" ng-src="/{{sitem.user.profileImageURL}}">
</a>
<div class="timeline-comment-sub-body">
<span>{{sitem.comment}}</span>
<span style="font-size: 12px;"> -
<a ng-click="vm.markLinkClick($event, item);"
ng-href="#">@{{sitem.user.displayName}}</a>
</span>
<span style="font-size: 12px; color: #999999;">{{sitem.createdat | date: 'yyyy-MM-dd HH:mm:ss'}}</span>
<span class="glyphicon glyphicon-edit edit-button"
title="{{ 'COMMENT_EDIT_ICON_TITLE' | translate}}"
ng-if="sitem.user._id.toString()==vm.user._id || vm.user.roles[0] == 'admin'"
ng-click="vm.editSubComment(item,sitem);">
</span>
<span class="glyphicon glyphicon-remove-circle delete-button"
title="{{ 'COMMENT_DELETE_ICON_TITLE' | translate}}"
ng-if="sitem.user._id.toString()==vm.user._id || vm.user.roles[0] == 'admin'"
ng-click="vm.deleteSubComment(item,sitem);">
</span>
</div>
</div>
</div>
</div>
</div>
<div class="timeline-comment-footer">
<div class="timeline-comment-footer-button text-right">
<button class="btn btn-default btn-xs"
ng-if="item.user._id.toString()==vm.user._id || vm.user.roles[0] == 'admin'"
translate="COMMENT_REPLY_EDIT" ng-click="vm.editComment(item);"></button>
<button class="btn btn-default btn-xs"
ng-if="item.user._id.toString()==vm.user._id || vm.user.roles[0] == 'admin'"
translate="COMMENT_REPLY_DELETE" ng-click="vm.deleteComment(item);"></button>
<button class="btn btn-default btn-xs"
ng-if="vm.user"
translate="COMMENT_REPLY_BUTTON" ng-click="vm.replyComment(item);"></button>
</div>
</div>
</div>
</div>
</div>
</div>
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.commentItemsPerPage" total-items="vm.commentFilterLength"
ng-model="vm.commentCurrentPage" ng-change="vm.commentPageChanged(true)"
ng-if="vm.torrentLocalInfo._replies.length > 0"
first-text="{{ 'PAGE_TEXT_FIRST' | translate}}" previous-text="{{ 'PAGE_TEXT_PREVIOUS' | translate}}"
next-text="{{ 'PAGE_TEXT_NEXT' | translate}}" last-text="{{ 'PAGE_TEXT_LAST' | translate}}">
</ul>
<div class="padding-top-20"></div>
<div class="comment-new" ng-if="vm.user">
<div class="timeline-comment-wrapper">
<a href="#" class="timeline-comment-avatar">
<img title="{{vm.user.displayName}}" ng-src="/{{vm.user.profileImageURL}}">
</a>
<div class="timeline-comment timeline-new-comment">
<div class="timeline-comment-header">
<div class="timeline-comment-header-text">{{ vm.reply_action == 'edit' ? 'EDIT_COMMENT' : (vm.reply_action == 'reply' ? 'REPLY_COMMENT' : 'POST_NEW_COMMENT') | translate}}</div>
</div>
<div class="timeline-comment-body">
<textarea class="form-control new_comment_textarea" ng-model="vm.new_comment_content"></textarea>
<div class="row">
<div class="col-sm-6" style="display: table;">
<a class="tabnav-extra" href="https://guides.github.com/features/mastering-markdown/" target="_blank"
ng-show="vm.reply_action!='reply'"
data-ga-click="Markdown Toolbar, click, help">
<svg aria-hidden="true" height="16" version="1.1"
viewBox="0 0 16 16" width="16">
<path fill-rule="evenodd"
d="M14.85 3H1.15C.52 3 0 3.52 0 4.15v7.69C0 12.48.52 13 1.15 13h13.69c.64 0 1.15-.52 1.15-1.15v-7.7C16 3.52 15.48 3 14.85 3zM9 11H7V8L5.5 9.92 4 8v3H2V5h2l1.5 2L7 5h2v6zm2.99.5L9.5 8H11V5h2v3h1.5l-2.51 3.5z"/>
</svg>
{{ 'MARKDOWN_LINK' | translate }}
</a>
</div>
<div class="col-sm-6 text-right">
<button class="btn btn-warning" translate="SUBMIT_CANCEL" ng-click="vm.submitInit();"></button>
<button class="btn btn-success" translate="{{vm.reply_action == 'reply' ? 'SUBMIT_REPLY' : 'SUBMIT_COMMENT'}}" ng-click="vm.submitComment();"
ng-disabled="!vm.new_comment_content"></button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/ng-template" id="videoInfo.html">
<div class="padding-top-30">
<dl class="dl-horizontal" style="margin-bottom: 0;">
<dt class="h-line">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</dt>
<dd class="h-line" message-to="vm.torrentLocalInfo.user" to-class="message-to-icon">{{vm.torrentLocalInfo.user.displayName}}</dd>
<dt class="h-line">{{ 'TRANCKER_URL' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.torrent_announce}}</dd>
<div ng-if="vm.torrentLocalInfo.torrent_type == 'tvserial'">
<dt class="h-line">{{ 'TMDB_FIELDS.THIS_SE' | translate}}</dt>
<dd class="h-line">
<span class="se-info">S{{vm.torrentLocalInfo.torrent_seasons}}E{{vm.torrentLocalInfo.torrent_episodes}}</span>
</dd>
</div>
<dt class="h-line">{{ 'VIDEO_SIZE' | translate}}</dt>
<dd class="h-line">{{vm.torrentLocalInfo.torrent_size | bytes:2}}</dd>
<dt class="h-line">{{ 'ATTRIBUTE_TAGS' | translate}}</dt>
<dd class="h-line">
<div class="list-all-tags">
<span class="label label-release label-warning">{{ vm.torrentLocalInfo.resource_detail_info.release_date}}</span>
<span ng-repeat="t in vm.torrentLocalInfo.torrent_tags">
<span class="label label-tag">
{{ 'RESOURCESTAGS.' + vm.getTagTitle(t) + '.' + t | translate}}
</span>
</span>
</div>
</dd>
<dt class="h-line">{{ 'VIDEO_SALE_INFO' | translate}}</dt>
<dd class="h-line">
<span class="label label-sale"
title="{{vm.getSaleTypeDesc();}} | {{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | date: 'MM-dd HH:mm') : 'NO'}}"
ng-class="{'label-default': !vm.torrentLocalInfo.isSaling, 'label-success': vm.torrentLocalInfo.isSaling}">
{{vm.torrentLocalInfo.torrent_sale_status}} {{vm.torrentLocalInfo.isSaling ? (vm.torrentLocalInfo.torrent_sale_expires | unlife) : ''}}
</span>
<!--<span ng-if="vm.torrentLocalInfo.isSaling">-->
<!--[{{ 'SALE_EXPIRES_TIME' | translate}}: {{vm.torrentLocalInfo.torrent_sale_expires | unlife}}]-->
<!--</span>-->
</dd>
<div ng-show="vm.torrentLocalInfo.torrent_recommended != 'none'">
<dt class="h-line">{{ 'ADMIN_BASIC_RLEVEL_SET' | translate}}</dt>
<dd class="h-line">
<span class="label label-rlevel label-info">
{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + vm.torrentLocalInfo.torrent_recommended.toUpperCase() | translate}}
</span>
</dd>
</div>
<dt class="h-line" ng-show="vm.torrentLocalInfo.torrent_nfo.length>0">{{ 'VIDEO_NFO' | translate}}</dt>
<dd class="h-line" ng-show="vm.torrentLocalInfo.torrent_nfo.length>0">
<div class="row">
<div class="col-md-10">
<textarea class="form-control video-nfo margin-top-10" rows="15" ng-bind="vm.torrentLocalInfo.torrent_nfo"
readonly></textarea>
</div>
</div>
</dd>
<dt class="h-line"></dt>
<dd class="h-line">
<div class="down-torrent">
<button class="btn btn-success" ng-click="vm.downloadTorrent(vm.torrentLocalInfo._id)"
translate="DOWNLOAD_TORRENT"></button>
</div>
</dd>
</dl>
</div>
</script>
<script type="text/ng-template" id="subtitleInfo.html">
<div class="padding-top-30">
<ul class="margin-bottom-30">
<li class="h-line" translate="SUBTITLE_RULES.0"></li>
<li class="h-line" translate="SUBTITLE_RULES.1"></li>
</ul>
<dl class="dl-horizontal" ng-if="vm.user">
<dt class="h-line">{{ 'UPLOAD_SUBTITLE' | translate}}</dt>
<dd class="h-line">
<div class="row">
<div class="col-md-7">
<div class="input-group">
<input type="text" class="form-control" ng-model="vm.sFile.name" disabled>
<div class="input-group-btn">
<button class="btn btn-primary btn-file"
ngf-select="vm.fileSelected = true; vm.progress = 0;"
ng-model="vm.sFile"
accept=".srt,.ass,.zip,.rar,.7z"
ngf-resize="{width: 400}"
ngf-resize-if="$width > 400 || $height > 400">
{{ 'SELECT_FILE' | translate}}
</button>
</div>
</div>
</div>
<div class="col-md-4">
<button class="btn btn-success inline-block"
ng-click="vm.upload(vm.sFile)">{{ 'DO_UPLOAD' | translate}} ({{vm.progress}}%)
</button>
</div>
</div>
</dd>
</dl>
<div class="row margin-top-50">
<div class="col-md-10 col-md-offset-1">
<ol class="subtitle-list">
<li class="h-line" ng-repeat="s in vm.torrentLocalInfo._subtitles">
<div>
<a ng-href="#" ng-click="vm.downloadSubtitle($event, s);">{{s.subtitle_filename}}</a>
<span style="font-size: 12px;"> - {{s.subtitle_filesize | bytes: 2}}</span>
<span style="font-size: 12px; color: #999999;"> - {{s.createdat | date: 'yyyy-MM-dd HH:mm:ss'}} By </span>
<span style="font-size: 12px;">
<a ng-click="vm.markLinkClick($event, item);" ng-href="#">{{s.user.displayName}}</a>
</span>
<span class="glyphicon glyphicon-remove-circle delete-button"
title="{{ 'SUBTITLE_DELETE_ICON_TITLE' | translate}}"
ng-if="s.user._id.toString()==vm.user._id || vm.user.roles[0] == 'admin'"
ng-click="vm.deleteSubtitle(s);">
</span>
</div>
</li>
</ol>
</div>
</div>
</div>
</script>
<script type="text/ng-template" id="userInfo.html">
<div class="padding-top-30 peer-dlist">
<dl class="dl-horizontal">
<dt class="h-line text-left">{{ 'TORRENT_FINISHED_USERS' | translate}}{{vm.torrentLocalInfo.torrent_finished}}</dt>
<dd class="h-line"></dd>
</dl>
<dl class="dl-horizontal">
<dt class="h-line">{{ 'TORRENT_SEED_USERS' | translate}}{{vm.torrentLocalInfo.torrent_seeds}}</dt>
<dd class="h-line"></dd>
</dl>
<div class="table-responsive">
<table class="table table-hover table-bordered table-condensed tb-peers">
<thead>
<tr>
<th class="text-center">{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.UPLOADED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.DOWNLOADED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.STARTED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.ACTIVE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.CLIENT' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.CONNECTABLE' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="torrent-list-info" ng-repeat="item in vm.torrentLocalInfo._peers | orderBy: peer_uploaded"
ng-if="item.peer_status == 'seeder'">
<td class="text-center" message-to="item.user" to-class="message-to-icon">{{item.user.displayName}}</td>
<td class="text-center">{{item.peer_uploaded | bytes:2}}</td>
<td class="text-center">{{item.peer_downloaded | bytes:2}}</td>
<td class="text-center">{{item.peer_downloaded == 0 ? '-' : (item.peer_uploaded/item.peer_downloaded | number:2)}}</td>
<td class="text-center">{{item.peer_left == 0 ? '100%' : ((vm.torrentLocalInfo.torrent_size - item.peer_left)/vm.torrentLocalInfo.torrent_size | percentage:2)}}</td>
<td class="text-center">{{item.startedat | life}}</td>
<td class="text-center">{{item.last_announce_at | life}}</td>
<td class="text-center">{{item.user_agent}}</td>
<td class="text-center">{{item.peer_connectable}}</td>
</tr>
</tbody>
</table>
</div>
<dl class="dl-horizontal">
<dt class="h-line">{{ 'TORRENT_LEECHER_USERS' | translate}}{{vm.torrentLocalInfo.torrent_leechers}}</dt>
<dd class="h-line"></dd>
</dl>
<div class="table-responsive">
<table class="table table-hover table-bordered table-condensed tb-peers">
<thead>
<tr>
<th class="text-center">{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.UPLOADED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.DOWNLOADED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.STARTED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.ACTIVE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.CLIENT' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.CONNECTABLE' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="torrent-list-info" ng-repeat="item in vm.torrentLocalInfo._peers | orderBy: peer_downloaded"
ng-if="item.peer_status == 'leecher'">
<td class="text-center" message-to="item.user" to-class="message-to-icon">{{item.user.displayName}}</td>
<td class="text-center">{{item.peer_uploaded | bytes:2}}</td>
<td class="text-center">{{item.peer_downloaded | bytes:2}}</td>
<td class="text-center">{{item.peer_downloaded == 0 ? '-' : (item.peer_uploaded/item.peer_downloaded | number:2)}}</td>
<td class="text-center">{{item.peer_left == 0 ? '100%' : ((vm.torrentLocalInfo.torrent_size - item.peer_left)/vm.torrentLocalInfo.torrent_size | percentage:2)}}</td>
<td class="text-center">{{item.startedat | life}}</td>
<td class="text-center">{{item.last_announce_at | life}}</td>
<td class="text-center">{{item.user_agent}}</td>
<td class="text-center">{{item.peer_connectable}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/ng-template" id="otherTorrents.html">
<div>
<p><strong translate="OTHER_TORRENT_LIST_TITLE" translate-values="{x: vm.torrentLocalInfo._other_torrents.length}"></strong></p>
<div class="table-responsive">
<table class="table table-hover tb-v-middle table-bordered tb-other-torrents">
<thead>
<tr>
<th>{{ 'TABLE_FIELDS.INFO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.LIFETIME' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SIZE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SEEDS_LEECHERS_FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.PUBLISHER' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="torrent-list-info" ng-repeat="item in vm.torrentLocalInfo._other_torrents"
ng-click="vm.openTorrentInfo(item._id);">
<td class="col-md-8 td-v-middle td-text-overflow">
<div class="other-torrent-info">
<div class="text-long">{{item.torrent_filename}}</div>
<div class="list-all-tags">
<span ng-show="vm.torrentLocalInfo.resource_detail_info.release_date">
<span class="label label-warning" ng-click="$event.stopPropagation();">
{{ vm.torrentLocalInfo.resource_detail_info.release_date}}
</span>
</span>
<span class="label label-sale" ng-if="item.isSaling"
title="{{vm.getSaleTypeDesc(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 ng-repeat="t in item.torrent_tags">
<span class="label label-tag" ng-click="$event.stopPropagation();">
{{ 'RESOURCESTAGS.' + vm.getTagTitle(t) + '.' + t | translate}}
</span>
</span>
<span class="label label-download text-uppercase"
title="{{ 'TITLE_ALT.DOWNLOAD_TORRENT' | translate}}"
ng-click="vm.downloadTorrent(item._id); $event.stopPropagation();">
<i class="glyphicon glyphicon-arrow-right"></i> {{ 'CA_DOWNLOAD' | translate}}
</span>
</div>
</div>
</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">{{item.torrent_size | bytes:2}}</td>
<td class="col-md-1 td-v-middle text-center list-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">{{item.user.displayName}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/ng-template" id="myPanel.html">
<div class="padding-top-30">
<dl class="dl-horizontal">
<dt class="h-line"></dt>
<dd class="h-line margin-bottom-30">
<ul>
<li translate="MY_TORRENT_RULES.0"></li>
<li translate="MY_TORRENT_RULES.1" translate-values='{admin: vm.announce.admin}'></li>
</ul>
</dd>
<dt class="h-line"></dt>
<dd class="h-line">
</dd>
</dl>
</div>
</script>
<script type="text/ng-template" id="adminPanel.html">
<div class="padding-top-30">
<dl class="dl-horizontal">
<dt class="h-line">{{ 'ADMIN_BASIC_COMMAND' | translate}}:</dt>
<dd class="h-line">
<button class="btn btn-default btn-sm"
ng-show="vm.torrentLocalInfo.resource_detail_info.id"
ng-click="vm.updateTorrent();">
{{ 'ADMIN_BASIC_UPDATE' | translate}}
</button>
<button class="btn btn-default btn-sm" ng-click="vm.deleteTorrent();">{{ 'ADMIN_BASIC_DELETE' | translate}}</button>
</dt>
<div class="margin-top-20"></div>
<dt class="h-line">{{ 'ADMIN_SALE_TYPE_SET' | translate}}:</dt>
<dd class="h-line">
<mark>{{vm.getSaleTypeDesc();}}</mark>
</dd>
<div class="padding-top-10 margin-left-50">
<div class="btn-group sales-btn-group text-center">
<label ng-repeat="st in vm.torrentSalesType.value"
class="btn btn-sm" ng-model="vm.model_salestype" uib-btn-radio="'{{st.name}}'" uncheckable
ng-class="{'btn-default':vm.torrentLocalInfo.torrent_sale_status != st.name, 'btn-success':vm.torrentLocalInfo.torrent_sale_status == st.name}"
ng-click="vm.setSaleType();">
<small>{{st.name}}</small>
</label>
</div>
</div>
<div class="margin-top-20"></div>
<dt class="h-line">{{ 'ADMIN_RLEVEL_SET' | translate}}:</dt>
<dd class="h-line">
</dd>
<div class="padding-top-10 margin-left-50">
<div class="btn-group sales-btn-group text-center">
<label ng-repeat="litem in vm.torrentRLevels.value"
class="btn btn-sm" ng-model="vm.model_rlevel"
uib-btn-radio="'{{litem.value}}'" uncheckable
ng-class="{'btn-default':vm.torrentLocalInfo.torrent_recommended != litem.value, 'btn-success':vm.torrentLocalInfo.torrent_recommended == litem.value}"
ng-click="vm.setRecommendLevel();">
<small>{{ 'TORRENT_RECOMMEND_LEVEL_ITEM.' + litem.name | translate}}</small>
</label>
</div>
</div>
</dl>
</div>
</script>
</section>