作者 sgj
1 个管道 的构建 通过 耗费 0 秒

圈子人员静态页面

<include file="public@header"/>
</head>
<body>
<div class="wrap">
<ul class="nav nav-tabs">
<li class="active"><a>{$group.name}</a></li>
</ul>
<form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}">
添加用户
<input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true">
<input class="form-control" type="hidden" name="post[author_id]" value="" name="user_id" id="js-users-id-input"/>
<input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/>
<a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
</form>
<form method="post" class="js-ajax-form">
<table class="table table-hover table-bordered">
<thead>
<tr>
<th>ID</th>
<th>{:lang('USERNAME')}</th>
<th>姓名</th>
<th>头像</th>
<th>手机</th>
<th>注册时间</th>
<th>{:lang('LAST_LOGIN_TIME')}</th>
<th>{:lang('LAST_LOGIN_IP')}</th>
<th>{:lang('STATUS')}</th>
<th>{:lang('ACTIONS')}</th>
</tr>
</thead>
<tbody>
<php>
$user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
</php>
<foreach name="list" item="vo">
<tr>
<td>{$vo.gid}</td>
<td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
</td>
<td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
<td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/></td>
<td>{$vo.mobile}</td>
<td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
<td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
<td>{$vo.last_login_ip}</td>
<td>{$user_statuses[$vo['user_status']]}</td>
<td>
<neq name="vo.id" value="1">
<empty name="vo.user_status">
<a href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
class="js-ajax-dialog-btn"
data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
<else/>
<a href="{:url('banUser',array('id'=>$vo['gid']))}" class="js-ajax-dialog-btn"
data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
</empty>
<else/>
<a style="color: #ccc;">{:lang('BLOCK_USER')}</a>
</neq>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script type="application/javascript">
function doSelectUsers() {
var selectedUsersId = $('#js-users-id-input').val();
openIframeLayer("{:url('portal/Common/selectUsersMore')}?ids=" + selectedUsersId, '请选择分类', {
area: ['1200px', '800px'],
btn: ['确定', '取消'],
yes: function (index, layero) {
//do something
var iframeWin = window[layero.find('iframe')[0]['name']];
var selectedUsers = iframeWin.confirm();
if (selectedUsers.selectedUsersId.length == 0) {
layer.msg('请选择分类');
return;
}
$('#js-users-id-input').val(selectedUsers.selectedUsersId.join(','));
$('#js-users-name-input').val(selectedUsers.selectedUsersName.join(' '));
//console.log(layer.getFrameIndex(index));
layer.close(index); //如果设定了yes回调,需进行手工关闭
}
});
}
</script>
</body>
</html>
\ No newline at end of file
... ...