mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-04 12:18:22 +02:00
feat(messages): init messages module list page
This commit is contained in:
@@ -468,6 +468,7 @@
|
||||
|
||||
//user message box
|
||||
MESSAGES_BOX: 'Messages Box',
|
||||
MESSAGES_IS_EMPTY: 'Messages Box is empty!',
|
||||
|
||||
//chat view
|
||||
CHAT_USERS_LIST: 'Users List',
|
||||
|
||||
@@ -468,6 +468,7 @@
|
||||
|
||||
//user message box
|
||||
MESSAGES_BOX: '站内消息',
|
||||
MESSAGES_IS_EMPTY: '消息盒子为空!',
|
||||
|
||||
//chat view
|
||||
CHAT_USERS_LIST: '用户列表',
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
* getInvitationsCount
|
||||
*/
|
||||
vm.getInvitationsCount = function () {
|
||||
console.log(Authentication.user);
|
||||
|
||||
if (Authentication.user) {
|
||||
InvitationsService.countInvitations({}, function (res) {
|
||||
if (res.countMyInvitations > 0) {
|
||||
|
||||
@@ -1,2 +1,10 @@
|
||||
@import (reference) "../../../core/client/less/mt-var.less";
|
||||
|
||||
.messages-list {
|
||||
.pagination-div-bottom {
|
||||
border-top: 2px solid lighten(@gray-base, 85%)
|
||||
}
|
||||
.pagination-div-top {
|
||||
border-bottom: 2px solid lighten(@gray-base, 85%)
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,61 @@
|
||||
<section>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="page-header">
|
||||
<h3>{{'MESSAGES_BOX' | translate}}</h3>
|
||||
<div class="row margin-top-20">
|
||||
<div class="col-md-12 messages-list" id="top_of_messages_list">
|
||||
|
||||
<div class="row margin-bottom-20">
|
||||
<div class="col-xs-12 col-md-3">
|
||||
<h4>{{'MESSAGES_BOX' | translate}}</h4>
|
||||
</div>
|
||||
<div class="col-xs-7 col-md-3 col-md-offset-4">
|
||||
<input class="form-control" type="text" ng-model="vm.search" placeholder="Search"
|
||||
ng-change="vm.figureOutItemsToDisplay()"/>
|
||||
</div>
|
||||
<div class="col-xs-5 col-md-2">
|
||||
<button class="btn btn-success btn-block">New Message</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagination-div-top">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-7">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive margin-top-50 margin-bottom-50 text-center" ng-if="!vm.pagedItems.length">
|
||||
<h3>{{ 'MESSAGES_IS_EMPTY' | translate }}</h3>
|
||||
</div>
|
||||
<div class="table-responsive" ng-if="vm.pagedItems.length">
|
||||
<table class="table table-hover tb-v-middle">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ 'TABLE_FIELDS.INFO' | translate}}</th>
|
||||
<th class="text-center">{{ 'TABLE_FIELDS.VOTES' | 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>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
@@ -15,7 +15,7 @@ module.exports = function (app) {
|
||||
.get(messages.listReply)
|
||||
.put(messages.update)
|
||||
.delete(messages.delete)
|
||||
.post(message.createReply);
|
||||
.post(messages.createReply);
|
||||
|
||||
app.route('/api/messages/:messageId/:replyId').all(messagesPolicy.isAllowed)
|
||||
.delete(messages.deleteReply);
|
||||
|
||||
Reference in New Issue
Block a user