Files
meanTorrent/modules/invitations/client/views/admin/official.client.view.html
2018-06-18 20:32:11 +08:00

147 lines
8.2 KiB
HTML
Raw Permalink 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="AdminInvitationController as vm" ng-init="vm.getOfficialInvitations();">
<div class="margin-top-20 alert alert-success" role="alert">
<div class="row">
<div class="col-sm-12 text-center">
<div class="margin-top-20 margin-bottom-20">
<h4>{{'ADMIN_SEND_OFFICIAL_INVITATION' | translate}} - {{vm.appConfig.name}}</h4>
<li class="status-divider"></li>
</div>
</div>
</div>
<div class="row">
<div class="col-sm-12 text-center">
<div class="margin-bottom-10">
<form class="form-inline">
<div class="form-group">
<input type="email" class="form-control min-width-300" id="title" name="title"
ng-model="vm.invitationFields.email" placeholder="{{ 'INPUT_EMAIL' | translate }}" autofocus>
</div>
<button type="submit" class="btn btn-success btn-min-width-100"
ng-disabled="!vm.invitationFields.email"
ng-click="vm.sendOfficialInvitation();">
{{ 'BUTTON_INVITE' | translate }}
</button>
</form>
</div>
<div class="small margin-bottom-20">
<span translate="INVITATION.EMAIL_ALLOWABLE"></span> <span>{{vm.signConfig.emailAllowable}}</span>
</div>
<div class="margin-bottom-20">
<a href="#" ng-click="vm.deleteExpiredOfficialInvitation();">{{ 'BUTTON_DELETE_EXPIRED' | translate }}</a>
</div>
</div>
</div>
</div>
<div class="invitations-list" id="top_of_invitations_list">
<div class="pagination-div-top">
<div class="row">
<div class="col-sm-12 col-md-9">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
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>
<div class="col-sm-12 col-md-3">
<input class="form-control margin-top-20 margin-bottom-20" type="text" ng-model="vm.search" placeholder="Search"
ng-change="vm.buildPager()"/>
</div>
</div>
</div>
<div>
<div class="table-responsive">
<table class="table table-hover tb-v-middle">
<thead>
<tr>
<!--<th></th>-->
<th class="text-center">{{'INVITATION.TITLE_SENDER' | translate}}</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.pagedItems">
<!--<td class="text-center">{{$index+1}}</td>-->
<td class="col-sm-2 text-center">
<span user-info="r.user" info-name></span>
<span vip-flag="r.user"></span>
<!--<span message-to="r.user" to-class="message-to-icon"></span>-->
</td>
<td class="col-sm-1 text-center">{{r.token}}</td>
<td class="col-sm-3 text-center">{{r.to_email}}</td>
<td class="col-sm-2 text-center min-width-120">{{r.invitedat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="col-sm-2 text-center min-width-120">{{r.registeredat | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td class="col-sm-1 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 vip-flag="r.to_user"></span>
<!--<span message-to="r.to_user" to-class="message-to-icon"></span>-->
</abbr>
</td>
<td class="col-sm-1 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 class="pagination-div-bottom">
<ul uib-pagination boundary-links="true" max-size="8" items-per-page="vm.itemsPerPage" total-items="vm.filterLength"
ng-model="vm.currentPage"
ng-change="vm.pageChanged()"
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>
</div>
<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>