Files
meanTorrent/modules/invitations/client/views/detail.client.view.html
2018-05-20 21:54:14 +08:00

178 lines
10 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 class="container" ng-controller="InviteController as vm" ng-init="vm.getMyInvitations();">
<div class="margin-top-30">
<div class="row" ng-hide="vm.inviteConfig.openInvite">
<div class="col-sm-12">
<div class="alert alert-warning" role="alert">
<strong>{{ 'NOTE_CAPTION' | translate }}</strong> <span translate="INVITE_INFO"></span>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading text-center mt-title">
{{ 'INVITATION.MY_INVITATION' | translate }} <span
class="badge badge_info">{{vm.my_invitations.length}}</span>
</div>
<div class="panel-body">
<p class="text-danger"><strong>{{ 'NOTE_TIP' | translate }}</strong>
<span translate="INVITATION.INVITE_NOTE" translate-values="{hours: vm.inviteConfig.expires/(60*60*1000)}"></span>
</p>
</div>
<div class="table-responsive margin-bottom-50 padding-top-40 padding-bottom-50 text-center" ng-if="vm.my_invitations.length<=0">
<h4>{{ 'INVITATION_IS_EMPTY' | translate }}</h4>
</div>
<div class="table-responsive" ng-if="vm.my_invitations.length>0">
<table class="table table-hover table-valign-middle">
<thead>
<tr>
<th></th>
<th class="text-center">{{'INVITATION.TITLE_TOKEN' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_CREATEDAT' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_EXPIRESAT' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_OPERATION' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="r in vm.my_invitations">
<td class="text-center">{{$index+1}}</th>
<td class="text-center">{{r.token}}</td>
<td class="text-center width-120">{{r.createdat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center width-120">{{r.expiresat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center">
<button class="btn btn-default btn-xs" js-popover
uib-popover-template="vm.invitePopover.templateUrl"
popover-title="{{vm.invitePopover.title | translate}}"
popover-trigger="'outsideClick'"
popover-placement="top-right"
popover-is-open="vm.invitePopover.items[$index].isOpen"
popover-class="invite-popover"
ng-click="vm.sendClicked($index);">
{{'INVITATION.TITLE_SEND' | translate}}
</button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12">
<div class="panel panel-default">
<div class="panel-heading text-center mt-title">
{{ 'INVITATION.USED_INVITATION' | translate }} <span
class="badge badge_info">{{vm.used_invitations.length}}</span>
</div>
<div class="panel-body">
<p class="text-danger"><strong>{{ 'NOTE_TIP' | translate }}</strong>
<span translate="INVITATION.SIGN_NOTE" translate-values="{hours: vm.inviteConfig.expires/(60*60*1000)}"></span>
</p>
</div>
<div class="table-responsive margin-bottom-50 padding-top-40 padding-bottom-50 text-center" ng-if="vm.used_invitations.length<=0">
<h4>{{ 'INVITATION_USED_IS_EMPTY' | translate }}</h4>
</div>
<div class="table-responsive" ng-if="vm.used_invitations.length>0">
<table class="table table-hover table-valign-middle">
<thead>
<tr>
<th></th>
<th class="text-center">{{'INVITATION.TITLE_TOKEN' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_EMAIL' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_INVITEDAT' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_SIGNUPAT' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_SIGNUPID' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_STATUS' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="r in vm.used_invitations">
<td class="text-center">{{$index+1}}</td>
<td class="text-center">{{r.token}}</td>
<td class="text-center">{{r.to_email}}</td>
<td class="text-center width-120">{{r.invitedat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center width-120">{{r.registeredat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center" ng-if="r.to_user"
uib-popover-template="vm.subuserPopover.templateUrl"
popover-append-to-body="true"
popover-trigger="'mouseenter'"
popover-placement="top-right"
ng-mouseenter="vm.selectedUser=r.to_user">
<abbr title="user detail">
<span user-info="r.to_user" info-uname></span>
<!--<span message-to="r.to_user" to-class="message-to-icon"></span>-->
</abbr>
</td>
<td class="text-center" ng-if="!r.to_user">
</td>
<td class="col-sm-1 text-center">
<span class="badge" ng-class="r.status == 2 ? 'badge_success' : 'badge_danger'">{{vm.getInvitationStatus(r);}}</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/ng-template" id="invite.html">
<div class="small margin-bottom-15 text-muted">
<div translate="INVITATION.EMAIL_ALLOWABLE"></div>
<ul>
<li class="text-danger" ng-repeat="ea in vm.signConfig.emailAllowable">
{{ea}}
</li>
</ul>
</div>
<form class="form-inline invite-popover-form">
<div class="form-group">
<input type="email" ng-disabled="vm.invitePopover.sending" ng-model="vm.invitePopover.email" class="form-control"
placeholder="{{ 'INPUT_EMAIL' | translate }}" autofocus>
</div>
<button class="btn btn-default" ng-disabled="vm.invitePopover.sending"
ng-click="vm.invite(vm.invitePopover.selected);">{{ 'BUTTON_INVITE' | translate }}
</button>
</form>
</script>
<script type="text/ng-template" id="userinfo.html">
<div>
<ul class="list-unstyled margin-left-10 margin-right-10">
<li>{{ 'STATUS_FIELD.UPLOADED' | translate}}
<span class="glyphicon glyphicon-arrow-up torrent-up"></span>{{ vm.selectedUser.uploaded | bytes:2 }}
</li>
<li>{{ 'STATUS_FIELD.DOWNLOADED' | translate}}
<span class="glyphicon glyphicon-arrow-down torrent-down"></span>{{ vm.selectedUser.downloaded | bytes:2 }}
</li>
<li>{{ 'STATUS_FIELD.RATIO' | translate}}
<span ng-class="vm.selectedUser.ratio > 1 ? 'ratio-normal' : 'ratio-warning' ">{{ vm.selectedUser.ratio | ratio}}</span>
</li>
<li class="status-divider"></li>
<li>{{ 'STATUS_FIELD.UPTOTAL' | translate}}{{ vm.selectedUser.uptotal }}</li>
<li>{{ 'STATUS_FIELD.SEEDED' | translate}}{{ vm.selectedUser.seeded }}</li>
<li>{{ 'STATUS_FIELD.LEECHED' | translate}}{{ vm.selectedUser.leeched }}</li>
<li>{{ 'STATUS_FIELD.FINISHED' | translate}}{{ vm.selectedUser.finished }}</li>
<li ng-if="vm.selectedUser.hnr_warning>0 && vm.hnrConfig.enable">
{{ 'STATUS_FIELD.HNR_WARNING' | translate}}<span class="badge badge_danger">{{vm.selectedUser.hnr_warning}}</span>
</li>
<li class="status-divider"></li>
<li>{{ 'STATUS_FIELD.FORUM_TOPICS' | translate}}{{ vm.selectedUser.topics }}</li>
<li>{{ 'STATUS_FIELD.FORUM_REPLIES' | translate}}{{ vm.selectedUser.replies }}</li>
</ul>
</div>
</script>
</section>