123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- @extends('layouts.admin')
- @section('content')
- <!--左侧菜单栏-->
- @include('admin.left-sidebar')
- <!-- 内容 -->
- <div class="content-wrapper">
- <!-- Content Header (Page header) -->
- <section class="content-header">
- <h1>
- 系统设置
- <small> </small>
- </h1>
- <ol class="breadcrumb">
- <li><a href="{{ url('/')}}"><i class="fa fa-dashboard"></i> 主页</a></li>
- <li><a href="#">系统设置</a></li>
- <li><a href="{{ url('/job') }}">职位管理</a></li>
- </ol>
- </section>
- <!-- Main content -->
- <section class="content">
- <!-- Default box -->
- <div class="box">
- <div class="box-header">
- <h3 class="box-title">职位管理</h3>
- </div>
- <!-- /.box-header -->
- <div class="box-body">
- <div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
- <div class="row">
- <div class="col-sm-11"></div>
- <div class="col-sm-1">
- @if($user->role>1)
- <a href="{{ url('/job/create') }}" class="btn btn-primary tooltips">
- <i class="fa fa-plus"></i>新增</a>
- @endif
- </div>
- </div>
- <div class="row">
- <div class="col-sm-12">
- <table class="table mb30">
- <thead>
- <tr>
- <th>权限</th>
- <th>职位名称</th>
- <th>职位详述</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach($data as $list)
- <tr>
- <td>{{ $list -> role }}</td>
- <td>{{ $list -> display_name }}</td>
- <td>{{ $list -> description}}</td>
- <td>
- @if($user->role>1)
- <a href="{{ url('/job/'.$list->id.'/edit') }}" class="btn btn-primary btn-sm">
- <i class="fa fa-pencil"></i> 编辑</a>
- @if($list->display == 1)
- <a href="javascript:;" onclick="ting({{ $list->id }})" class="btn btn-danger btn-sm article-delete">
- <i class="fa fa-eye-slash"></i> 隐藏</a>
- @else
- <a href="javascript:;" onclick="start({{ $list->id }})" class="btn btn-success btn-sm article-delete">
- <i class="fa fa-eye"></i> 启用</a>
- @endif
- @else
- 您的权限不足
- @endif
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-5">
- <div class="dataTables_info" id="example2_info" role="status" aria-live="polite"></div>
- </div>
- <div class="col-sm-7">
- <div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
- <ul class="pagination">
- </ul>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- </section>
- <!-- /.content -->
- </div>
- <!-- /.content-wrapper -->
- <script>
- function del_user(job_id){
- layer.confirm('确定要删除这个职位吗?',{
- btn:['确定','取消']
- },function(){
- $.post('{{ url('/job/') }}/'+job_id,{
- '_method':'delete',
- '_token' :'{{ csrf_token() }}'
- },function(data){
- if(data.status == 1){
- location.href = location.href;
- layer.alert(data.msg, {icon: 6});
- }else {
- layer.alert(data.msg, {icon: 5});
- }
- });
- },function(){
- });
- }
- function ting(job_id){
- layer.confirm('确定要隐藏这个职位吗?',{
- btn:['确定','取消']
- },function(){
- $.post('{{ url('/job/ting') }}/'+job_id,{
- '_token' :'{{ csrf_token() }}'
- },function(data){
- if(data.status == 1){
- location.href = location.href;
- layer.alert(data.msg, {icon: 6});
- }else {
- layer.alert(data.msg, {icon: 5});
- }
- });
- },function(){
- });
- }
- function start(job_id){
- layer.confirm('确定要显示这个职位吗?',{
- btn:['确定','取消']
- },function(){
- $.post('{{ url('/job/start') }}/'+job_id,{
- '_token' :'{{ csrf_token() }}'
- },function(data){
- if(data.status == 1){
- location.href = location.href;
- layer.alert(data.msg, {icon: 6});
- }else {
- layer.alert(data.msg, {icon: 5});
- }
- });
- },function(){
- });
- }
- </script>
- @endsection
|