Files
meanTorrent/modules/ranking/client/views/ranking.client.view.html
2017-09-18 16:17:38 +08:00

215 lines
13 KiB
HTML

<section class="container padding-top-10" ng-controller="RankingController as vm" ng-init="vm.getRankingList();">
<div class="tab-ranking margin-top-30">
<uib-tabset class="mt-responsive-tabs-xs">
<uib-tab index="$index" ng-repeat="tab in vm.rankingTabs" ng-show="tab.ng_show" title="{{tab.title}}">
<uib-tab-heading>
<i class="fa {{tab.icon}} fa-2x" aria-hidden="true"></i><span class="tab-title">{{tab.title}}</span>
</uib-tab-heading>
<div ng-include="tab.templateUrl">
</div>
</uib-tab>
</uib-tabset>
</div>
<script type="text/ng-template" id="upload_ranking.html">
<div class="padding-top-30">
<span class="xs-show">
<h4 class="margin-bottom-30">
{{'PAGE_HEADER_RANKING_UPLOAD' | translate}}:
</h4>
</span>
<div class="table-responsive">
<table class="table table-hover table-striped table-valign-middle">
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center"></th>
<th>{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center ranking-active-col">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SCORE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.JOINED' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="ranking-list-info" ng-repeat="user in vm.upload_ranking">
<td class="text-center">{{$index + 1}}</td>
<td class="text-center"><img class="ranking-user-img" title="{{user.displayName}}" ng-src="/{{user.profileImageURL}}">
</td>
<td>
<span user-info="user" info-name></span>
<span vip-flag="user"></span>
<span message-to="user" to-class="message-to-icon"></span>
</td>
<td class="text-center ranking-active-col">{{user.uploaded | bytes:2}}</td>
<td class="text-center">{{user.downloaded | bytes:2}}</td>
<td class="text-center"><span
ng-class="user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ user.ratio | ratio}}</span></td>
<td class="text-center">{{user.score}}</td>
<td class="text-center">{{user.seeded}}</td>
<td class="text-center">{{user.leeched}}</td>
<td class="text-center">{{user.finished}}</td>
<td class="text-center">{{user.created | life}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/ng-template" id="download_ranking.html">
<div class="padding-top-30">
<span class="xs-show">
<h4 class="margin-bottom-30">
{{'PAGE_HEADER_RANKING_DOWNLOAD' | translate}}:
</h4>
</span>
<div class="table-responsive">
<table class="table table-hover table-striped table-valign-middle">
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center"></th>
<th>{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center ranking-active-col">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SCORE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.JOINED' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="ranking-list-info" ng-repeat="user in vm.download_ranking">
<td class="text-center">{{$index + 1}}</td>
<td class="text-center"><img class="ranking-user-img" title="{{user.displayName}}" ng-src="/{{user.profileImageURL}}">
</td>
<td>
<span user-info="user" info-name></span>
<span vip-flag="user"></span>
<span message-to="user" to-class="message-to-icon"></span>
</td>
<td class="text-center ranking-active-col">{{user.downloaded | bytes:2}}</td>
<td class="text-center">{{user.uploaded | bytes:2}}</td>
<td class="text-center"><span
ng-class="user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ user.ratio | ratio}}</span></td>
<td class="text-center">{{user.score}}</td>
<td class="text-center">{{user.seeded}}</td>
<td class="text-center">{{user.leeched}}</td>
<td class="text-center">{{user.finished}}</td>
<td class="text-center">{{user.created | life}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/ng-template" id="ratio_ranking.html">
<div class="padding-top-30">
<span class="xs-show">
<h4 class="margin-bottom-30">
{{'PAGE_HEADER_RANKING_RATIO' | translate}}:
</h4>
</span>
<div class="table-responsive">
<table class="table table-hover table-striped table-valign-middle">
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center"></th>
<th>{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center ranking-active-col">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SCORE' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.JOINED' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="ranking-list-info" ng-repeat="user in vm.ratio_ranking">
<td class="text-center">{{$index + 1}}</td>
<td class="text-center"><img class="ranking-user-img" title="{{user.displayName}}" ng-src="/{{user.profileImageURL}}">
</td>
<td>
<span user-info="user" info-name></span>
<span vip-flag="user"></span>
<span message-to="user" to-class="message-to-icon"></span>
</td>
<td class="text-center ranking-active-col"><span
ng-class="user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ user.ratio | ratio}}</span></td>
<td class="text-center">{{user.uploaded | bytes:2}}</td>
<td class="text-center">{{user.downloaded | bytes:2}}</td>
<td class="text-center">{{user.score}}</td>
<td class="text-center">{{user.seeded}}</td>
<td class="text-center">{{user.leeched}}</td>
<td class="text-center">{{user.finished}}</td>
<td class="text-center">{{user.created | life}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
<script type="text/ng-template" id="score_ranking.html">
<div class="padding-top-30">
<span class="xs-show">
<h4 class="margin-bottom-30">
{{'PAGE_HEADER_RANKING_SCORE' | translate}}:
</h4>
</span>
<div class="table-responsive">
<table class="table table-hover table-striped table-valign-middle">
<thead>
<tr>
<th class="text-center">#</th>
<th class="text-center"></th>
<th>{{ 'TABLE_FIELDS.USERNAME' | translate}}</th>
<th class="text-center ranking-active-col">{{ 'TABLE_FIELDS.SCORE' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.UPLOAD' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.DOWNLOAD' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.RATIO' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.SEEDED' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.LEECHED' | translate}}</th>
<th class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{ 'TABLE_FIELDS.FINISHED' | translate}}</th>
<th class="text-center">{{ 'TABLE_FIELDS.JOINED' | translate}}</th>
</tr>
</thead>
<tbody>
<tr class="ranking-list-info" ng-repeat="user in vm.score_ranking">
<td class="text-center">{{$index + 1}}</td>
<td class="text-center"><img class="ranking-user-img" title="{{user.displayName}}" ng-src="/{{user.profileImageURL}}">
</td>
<td>
<span user-info="user" info-name></span>
<span vip-flag="user"></span>
<span message-to="user" to-class="message-to-icon"></span>
</td>
<td class="text-center ranking-active-col">{{user.score}}</td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.uploaded | bytes:2}}</td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.downloaded | bytes:2}}</td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode"><span
ng-class="user.ratio == 0 ? 'ratio-warning' : 'ratio-normal' ">{{ user.ratio | ratio}}</span></td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.seeded}}</td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.leeched}}</td>
<td class="text-center" ng-if="vm.announce.privateTorrentCmsMode">{{user.finished}}</td>
<td class="text-center">{{user.created | life}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</script>
</section>