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

圈子人员静态页面

  1 +<include file="public@header"/>
  2 +</head>
  3 +<body>
  4 +<div class="wrap">
  5 + <ul class="nav nav-tabs">
  6 + <li class="active"><a>{$group.name}</a></li>
  7 + </ul>
  8 + <form class="well form-inline margin-top-20 js-ajax-form" method="post" action="{:url('groupPeopleAdd',['group_id'=>$group.id])}">
  9 + 添加用户
  10 + <input class="form-control" type="text" required="" placeholder="请选择用户" onclick="doSelectUsers();" id="js-users-name-input" readonly="" aria-required="true">
  11 + <input class="form-control" type="hidden" name="post[author_id]" value="" name="user_id" id="js-users-id-input"/>
  12 + <input type="submit" class="btn btn-primary js-ajax-submit" value="确定"/>
  13 +
  14 + <a class="btn btn-danger" href="{:url('user/adminIndex/index')}">清空</a>
  15 + </form>
  16 + <form method="post" class="js-ajax-form">
  17 + <table class="table table-hover table-bordered">
  18 + <thead>
  19 + <tr>
  20 + <th>ID</th>
  21 + <th>{:lang('USERNAME')}</th>
  22 + <th>姓名</th>
  23 + <th>头像</th>
  24 + <th>手机</th>
  25 + <th>注册时间</th>
  26 + <th>{:lang('LAST_LOGIN_TIME')}</th>
  27 + <th>{:lang('LAST_LOGIN_IP')}</th>
  28 + <th>{:lang('STATUS')}</th>
  29 + <th>{:lang('ACTIONS')}</th>
  30 + </tr>
  31 + </thead>
  32 + <tbody>
  33 + <php>
  34 + $user_statuses=array("0"=>lang('USER_STATUS_BLOCKED'),"1"=>lang('USER_STATUS_ACTIVATED'),"2"=>lang('USER_STATUS_UNVERIFIED'));
  35 + </php>
  36 + <foreach name="list" item="vo">
  37 + <tr>
  38 + <td>{$vo.gid}</td>
  39 + <td>{$vo['user_login']?$vo['user_login']:($vo['mobile']?$vo['mobile']:lang('THIRD_PARTY_USER'))}
  40 + </td>
  41 + <td>{$vo['user_nickname']?$vo['user_nickname']:lang('NOT_FILLED')}</td>
  42 + <td><img width="25" height="25" src="{:url('user/public/avatar',array('id'=>$vo['id']))}"/></td>
  43 + <td>{$vo.mobile}</td>
  44 + <td>{:date('Y-m-d H:i:s',$vo['create_time'])}</td>
  45 + <td>{:date('Y-m-d H:i:s',$vo['last_login_time'])}</td>
  46 + <td>{$vo.last_login_ip}</td>
  47 + <td>{$user_statuses[$vo['user_status']]}</td>
  48 + <td>
  49 + <neq name="vo.id" value="1">
  50 + <empty name="vo.user_status">
  51 + <a href="{:url('adminIndex/cancelban',array('id'=>$vo['id']))}"
  52 + class="js-ajax-dialog-btn"
  53 + data-msg="{:lang('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:lang('ACTIVATE_USER')}</a>
  54 + <else/>
  55 + <a href="{:url('banUser',array('id'=>$vo['gid']))}" class="js-ajax-dialog-btn"
  56 + data-msg="{:lang('BLOCK_USER_CONFIRM_MESSAGE')}">{:lang('BLOCK_USER')}</a>
  57 + </empty>
  58 + <else/>
  59 + <a style="color: #ccc;">{:lang('BLOCK_USER')}</a>
  60 + </neq>
  61 + </td>
  62 + </tr>
  63 + </foreach>
  64 + </tbody>
  65 + </table>
  66 + <div class="pagination">{$page}</div>
  67 + </form>
  68 +</div>
  69 +<script src="__STATIC__/js/admin.js"></script>
  70 +<script type="application/javascript">
  71 + function doSelectUsers() {
  72 + var selectedUsersId = $('#js-users-id-input').val();
  73 + openIframeLayer("{:url('portal/Common/selectUsersMore')}?ids=" + selectedUsersId, '请选择分类', {
  74 + area: ['1200px', '800px'],
  75 + btn: ['确定', '取消'],
  76 + yes: function (index, layero) {
  77 + //do something
  78 +
  79 + var iframeWin = window[layero.find('iframe')[0]['name']];
  80 + var selectedUsers = iframeWin.confirm();
  81 + if (selectedUsers.selectedUsersId.length == 0) {
  82 + layer.msg('请选择分类');
  83 + return;
  84 + }
  85 + $('#js-users-id-input').val(selectedUsers.selectedUsersId.join(','));
  86 + $('#js-users-name-input').val(selectedUsers.selectedUsersName.join(' '));
  87 + //console.log(layer.getFrameIndex(index));
  88 + layer.close(index); //如果设定了yes回调,需进行手工关闭
  89 + }
  90 + });
  91 + }
  92 +</script>
  93 +</body>
  94 +</html>