bztang-admin/plugins/article/views/admin/manager/list.blade.php

128 lines
6.2 KiB
PHP

@extends('layouts.base')
@section('content')
@section('title', trans('管理员'))
<div class="w1200 ">
<div class=" rightlist ">
<div class="right-titpos">
<ul class="add-snav">
<li class="active"><a href="#">管理员</a></li>
<a class="btn btn-primary" href="{!! yzWebUrl('plugin.article.admin.manager.add') !!}"><i class="fa fa-plus"></i> 添加管理员</a>
</ul>
</div>
<form action="" method="post" class="form-horizontal" id="form1">
<div class="right-addbox">
<div class="panel panel-info">
<div class="panel-body">
<div class="form-group col-xs-12 col-sm-3">
<input class="form-control" name="search[member]" id="" type="text"
value="{{$search['member']}}" placeholder="会员ID/昵称/姓名/手机">
</div>
<div class="form-group col-xs-12 col-sm-3">
<input class="form-control" name="search[username]" id="" type="text"
value="{{$search['username']}}" placeholder="登录账号">
</div>
<div class="form-group col-xs-12 col-sm-7 col-lg-4">
<div class="">
<button type="button" id="search" class="btn btn-success "><i class="fa fa-search"></i>搜索</button>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="clearfix">
<div class='panel panel-default'>
<div class="panel-heading">总数:{{$total}}</div>
<div class='panel-body table-responsive'>
<table class="table table-hover" style="overflow:visible;">
<thead>
<tr>
<th style='width:6%;text-align: center;'>会员id</th>
<th style='width:6%;text-align: center;'>管理员</th>
<th style='width:6%;text-align: center;'>姓名</th>
<th style='width:6%;text-align: center;'>手机号</th>
<th style='width:6%;text-align: center;'>管理员名称</th>
<th style='width:5%;text-align: center;'>登录账号</th>
<th style='width:5%;text-align: center;'>禁用</th>
<th style='width:10%;text-align: center;'>操作</th>
</tr>
</thead>
<tbody>
@if (!empty($list['data']))
@foreach($list['data'] as $row)
<tr>
<td style='text-align: center;'>{{$row['member']['uid']}}</td>
<td style='text-align: center;'>
<a href="{!! yzWebUrl('member.member.detail', ['id'=>$row['member']['uid']]) !!}"><img src="{{tomedia($row['member']['avatar'])}}" style="width:30px;height:30px;padding:1px;border:1px solid #ccc"><BR>{{$row['member']['nickname']}}</a>
</td>
<td style='text-align: center;'>
{{$row['member']['realname']}}
</td>
<td style='text-align: center;'>
{{$row['member']['mobile']}}
</td>
<td style='text-align: center;'>
{{$row['nickname']}}
</td>
<td style='text-align: center;'>
{{$row['username']}}
</td>
<td>
<div class="col-sm-2 col-xs-6">
<input class="mui-switch mui-switch-animbg" id="insurance_status_{!! $row['id'] !!}" type="checkbox"
@if(!$row['status'])
checked
@endif
onclick="message_default({{$row['id']}})"/>
</div>
</td>
<td style="text-align: center;position:relative; overflow:visible;">
<a class='btn btn-default' title="账户信息" href="{{ yzWebUrl('plugin.article.admin.manager.edit',['id' => $row['id']]) }}"><i class="fa fa-bars"></i></a>
<a class='btn btn-default' title="修改密码" href="{{ yzWebUrl('plugin.article.admin.manager.edit-pwd',['id' => $row['id']]) }}"><i class="fa fa-edit"></i></a>
</td>
</tr>
@endforeach
@else
<td colspan="7" style="color: red">没有更多数据了!</td>
@endif
</tbody>
</table>
{!! $pager !!}
</div>
</div>
</div>
</div>
</div>
<script language="javascript">
$(function () {
$('#search').click(function () {
$('#form1').attr('action', '{!! yzWebUrl('plugin.article.admin.manager.index') !!}');
$('#form1').submit();
});
});
function message_default(s_id) {
var url_change = "{!! yzWebUrl('plugin.article.admin.manager.change-status') !!}"
var postdata = {
id: s_id,
};
$.post(url_change, postdata, function(data){
if (data.result == 1) {
alert(data.msg)
} else {
alert(data.msg)
}
}, "json");
}
</script>
@endsection