Files
meanTorrent/modules/invitations/client/views/detail.client.view.html

152 lines
9.2 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.open_invite">
<div class="col-sm-8 col-sm-offset-2 text-center">
<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-10 col-sm-offset-1">
<div class="panel panel-default">
<div class="panel-heading text-center mt-title">
{{ 'INVITATION.MY_INVITATION' | translate }} <span
class="color-mt-base">({{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">
<th scope="row">{{$index+1}}</th>
<td class="text-center">{{r.token}}</td>
<td class="text-center">{{r.createdat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center">{{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 margin-top-10">
<div class="col-sm-10 col-sm-offset-1">
<div class="panel panel-default">
<div class="panel-heading text-center mt-title">
{{ 'INVITATION.USED_INVITATION' | translate }} <span
class="color-mt-base">({{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.my_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_SIGNINAT' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_SIGNINID' | translate}}</th>
<th class="text-center">{{'INVITATION.TITLE_STATUS' | translate}}</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="r in vm.used_invitations">
<th scope="row">{{$index+1}}</th>
<td class="text-center">{{r.token}}</td>
<td class="text-center">{{r.to_email}}</td>
<td class="text-center">{{r.invitedat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="text-center">{{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">{{r.to_user.username}}<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="text-center" ng-class="r.status == 2 ? 'text-success' : 'text-danger'">
<strong>{{vm.getInvitationStatus(r);}}</strong>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<script type="text/ng-template" id="invite.html">
<form class="form-inline invite-popover-form text-center">
<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 }}</span></li>
<li class="status-divider"></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>
</ul>
</div>
</script>
</section>