@model IList<XCode.Membership.UserX>
@using NewLife;
@using NewLife.Web;
@using XCode;
@using XCode.Configuration;
@using System.Web.Mvc;
@using System.Web.Mvc.Ajax;
@using System.Web.Mvc.Html;
@using System.Web.Routing;
@{
var fact = ViewBag.Factory as IEntityOperate;
var page = ViewBag.Page as Pager;
var fields = ViewBag.Fields as IList<FieldItem>;
var enableSelect = this.EnableSelect();
//var provider = ManageProvider.Provider;
}
<table class="table table-bordered table-hover table-striped table-condensed">
<thead>
<tr>
@if (enableSelect)
{
<th class="text-center" style="width:10px;"><input type="checkbox" id="chkAll" title="全选" /></th>
}
<th class="text-center hidden-md hidden-sm hidden-xs"><a href="@Html.Raw(page.GetSortUrl("ID"))">编号</a></th>
<th class="text-center" title="名称。登录用户名"><a href="@Html.Raw(page.GetSortUrl("Name"))">名称</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("DisplayName"))">昵称</a></th>
<th class="text-center" title="性别。未知、男、女"><a href="@Html.Raw(page.GetSortUrl("Sex"))">性别</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Mail"))">邮件</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Mobile"))">手机</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("RoleID"))">角色</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Online"))">在线</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Enable"))">启用</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("Logins"))">登录次数</a></th>
<th class="text-center" style="min-width:134px;"><a href="@Html.Raw(page.GetSortUrl("LastLogin"))">最后登录</a></th>
<th class="text-center"><a href="@Html.Raw(page.GetSortUrl("LastLoginIP"))">最后IP</a></th>
<th class="text-center">日志</th>
<th class="text-center">令牌</th>
@if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
{
<th class="text-center" style="min-width:100px;">操作</th>
}
</tr>
</thead>
<tbody>
@foreach (var entity in Model)
{
<tr>
@if (enableSelect)
{
<td class="text-center"><input type="checkbox" name="keys" value="@entity.ID" /></td>
}
<td class="text-center hidden-md hidden-sm hidden-xs">@entity.ID</td>
<td>@entity.Name</td>
<td>@entity.DisplayName</td>
<td class="text-center">@entity.Sex</td>
<td>@entity.Mail</td>
<td>@entity.Mobile</td>
<td><a href="Role?ID=@entity.RoleID">@entity.RoleName</a></td>
<td class="text-center">
<i class="glyphicon glyphicon-@(entity.Online ? "ok" : "remove")" style="color: @(entity.Online ? "green" : "red");"></i>
</td>
<td class="text-center">
<i class="glyphicon glyphicon-@(entity.Enable ? "ok" : "remove")" style="color: @(entity.Enable ? "green" : "red");"></i>
</td>
<td class="text-right">@entity.Logins.ToString("n0")</td>
<td>@entity.LastLogin.ToFullString("")</td>
<td title="@entity.LastLoginAddress">@entity.LastLoginIP</td>
<td>@Html.ActionLink("日志", "Index", "Log", new { UserID = entity.ID }, null)</td>
<td>@Html.ActionLink("令牌", "Index", "UserToken", new { UserID = entity.ID }, null)</td>
@if (this.Has(PermissionFlags.Detail, PermissionFlags.Update, PermissionFlags.Delete))
{
<td class="text-center">
@Html.Partial("_List_Data_Action", (Object)entity)
</td>
}
</tr>
}
</tbody>
</table>
|