UNPKG

unserver-unify

Version:

153 lines (152 loc) 6.24 kB
<div class="panel panel-body" ng-controller="MessagesCtrl as ctrl" style="padding-top: 0;"> <div class="tab-v1 margin-bottom-10"> <!-- tabs --> <ul class="nav nav-tabs mobile_tab tab2" ng-init="ctrl.tab = 'inbox'"> <li ng-class="{'active':ctrl.tab=='inbox'}"> <a data-toggle="tab" ng-click="ctrl.tab = 'inbox'"> <i class="fa fa-envelope"> </i> {{ 'Inbox' | translate}} </a> </li> <li ng-class="{'active':ctrl.tab=='notification'}"> <a data-toggle="tab" ng-click="ctrl.tab = 'notification'"> <i class="fa fa-bullhorn"> </i> {{ 'Notification' | translate}} </a> </li> </ul> </div> <div ng-if="ctrl.tab=='inbox'"> <div ng-controller="MySpaceMessagesCtrl as msgCtrl"> <div class="ibox"> <div class="ibox-content"> <table class="table table-hover tbl_aln" st-safe-src="msgCtrl.unreads" st-table="displayedCollection"> <thead> <tr class="info"> <th style="width:20%"> {{ {eng:'From',chn:'发件人'} | trans }} </th> <th style="width:35%" translate=""> Message </th> <th style="width:20%" translate=""> Updated </th> <th style="width:5%" translate=""> Action </th> </tr> </thead> <tbody> <tr ng-if="displayedCollection.length == 0"> <td colspan="4"> <div class="no_record" translate="">No Record</div> </td> </tr> <tr ng-class="{'new_message':item.counter}" ng-repeat="item in displayedCollection"> <td> <a href="javascript:;" ng-click="msgCtrl.readGroupMsg(item)"> <img ng-src="{{ item.avatar }}" style=" width: 35px; height: 35px; border-radius: 35px !important;"/> <span class="badge badge-primary badge-sm message_noti" ng-if="item.counter"> {{item.counter}} </span> {{ item.targetUser.fullname }} </a> </td> <td ng-click="msgCtrl.readGroupMsg(item)" class="cursor-pointer"> <p ng-bind-html="item.message" ng-if="item.counter" style="color: black;"> </p> <p ng-bind-html="item.message" ng-if="!item.counter"> </p> </td> <td> {{item.create_at | date:'mediumDate'}} </td> <td> <a class="color-red cursor-pointer" ng-click="ctrl.deleteTargetMsgs(item.targetUser._id)"> <i class="fa fa-remove expand-list rounded-x"> </i> </a> </td> </tr> </tbody> <tfoot> <tr> <td class="per_page" colspan="4" ng-if="displayedCollection.length != 0"> <bb-pagesize-select class="col-md-3" pagesize="msgCtrl.itemNumber"> </bb-pagesize-select> <div class="pull-right" st-displayed-pages="7" st-items-by-page="msgCtrl.itemNumber" st-pagination="" st-template="components/content/tablePagination.html"> </div> </td> </tr> </tfoot> </table> </div> </div> </div> </div> <div class="panel" ng-if="ctrl.tab=='notification'"> <div ng-controller="MySpaceNotificationCtrl as ctrl"> <div class="ibox"> <div class="ibox-content"> <!--<table class="table table-striped tbl_aln table-hover" st-pipe="ctrl.getUnreadMesages" st-table="ctrl.unreads">--> <table class="table table-hover tbl_aln" st-pipe="ctrl.getUnreadNotP2p" st-table="ctrl.readMsgs"> <thead> <tr class="info"> <th style="width:15%" translate=""> Type </th> <th style="width:20%"> {{ {eng:'From',chn:'发件人'} | trans }} </th> <th style="width:40%" translate=""> Message </th> <th style="width:15%" translate=""> Updated </th> </tr> </thead> <tbody> <tr ng-if="!ctrl.readMsgs||ctrl.readMsgs.length == 0"> <td colspan="4"> <div class="no_record" translate="">No Record</div> </td> </tr> <tr ng-repeat="item in ctrl.readMsgs"> <td> <a ui-sref=".notifithread({target:item.sender_id})" translate=""> {{item.action}} </a> </td> <td class="cursor-pointer" ui-sref=".notifithread({target:item.sender_id})"> {{ item.fullname }} </td> <td class="cursor-pointer" ui-sref=".notifithread({target:item.sender_id})"> <p> {{item.message||item.title}} </p> </td> <td> {{item.time | date:'mediumDate'}} </td> </tr> </tbody> <tfoot> <tr> <td class="per_page" colspan="4" ng-if="ctrl.readMsgs&&ctrl.readMsgs.length != 0"> <bb-pagesize-select class="col-md-3" pagesize="ctrl.itemNumber"> </bb-pagesize-select> <span class="pagination pull-right" st-items-by-page="ctrl.itemNumber" st-pagination="" st-template="components/content/tablePagination.html"> </span> </td> </tr> </tfoot> </table> </div> </div> </div> </div> </div>