Light12306/ChatRoomServer.Www/Views/Msgs/LogList.cshtml
2015-07-30 19:16:06 +08:00

84 lines
2.6 KiB
Plaintext

@{
ViewBag.Title = "聊天记录列表";
}
<div class="container" ng-app="chat12306" ng-controller="ChatMessageListController">
<div class="row">
<div class="col-sm-3">
<form class="form-inline">
<div class="form-group">
<div class="input-group">
<div class="input-group-addon">搜索</div>
<input type="text" ng-change="filter.pageIndex=1" class="form-control" ng-model="filter.searchUser" id="" placeholder="按用户名搜索..." />
<span class="input-group-btn">
<button class="btn btn-default" ng-click="filter.searchUser=''" ng-disabled="!filter.searchUser">
<i class="fa fa-times"></i>
</button>
</span>
</div>
</div>
</form>
</div>
</div>
<table class="table table-topspace table-bordered table-striped table-hover">
<tr>
<th>ID</th>
<th>房间</th>
<th>发送人</th>
<th>发送时间</th>
<th>发送IP</th>
<th>发送给</th>
</tr>
<tr ng-repeat-start="item in items">
<th>{{item.msg.id}}</th>
<th>{{item.room.name}}</th>
<th><a href="javascript:;" ng-click="filter.searchUser=item.msg.userName;">{{item.msg.userName}}</a></th>
<th>{{item.msg.sendTime|jsonDate}}</th>
<th>{{item.msg.ip}}</th>
<th>{{item.msg.atUser}}</th>
</tr>
<tr ng-repeat-end>
<td colspan="6">
<p>{{item.msg.content}}</p>
<p>
<img ng-src="{{item.msg.image}}" ng-if="item.msg.image" />
</p>
</td>
</tr>
</table>
<nav>
<ul class="pagination">
<li>
<span>共 {{itemsCount}} 条记录,每页 {{filter.pagesize}} 条,共 {{ pages }} 页</span>
</li>
<li>
<span>
每页记录数
<select ng-model="filter.pagesize" class="form-control">
<option ng-repeat="ps in [10,20,30,40,50,100]" ng-value="ps">{{ps}}</option>
</select>
</span>
</li>
<li ng-class="filter.pageIndex>1?'':'disabled'">
<a href="javascript:;" ng-click="go(-1)" ng-disabled="filter.pageIndex<=1" aria-label="Previous">
<span aria-hidden="true">&laquo;</span>
</a>
</li>
<li ng-repeat="index in filter.pageIndex | pagelist:pages" ng-class="[index===filter.pageIndex?'active':'', index<0?'disabled':'']"><a href="javascript:;" ng-click="goPage(index)" ng-bind="index<0?'...':index"></a></li>
<li ng-class="filter.pageIndex<pages?'':'disabled'">
<a href="javascript:;" ng-click="go(1)" ng-disabled="filter.pageIndex<pages" aria-label="Next">
<span aria-hidden="true">&raquo;</span>
</a>
</li>
<li>
<a href="javascript:;" ng-click="reload();">
<i class="glyphicon glyphicon-refresh"></i>
刷新数据
</a>
</li>
</ul>
</nav>
</div>