| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- @extends('layouts.base')
- @section('content')
- @section('title', trans('轮播图管理'))
- <div class="right-titpos">
- <ul class="add-snav">
- <li class="active"><a href="#">轮播图管理</a></li>
- <a class="btn btn-primary" href="{!! yzWebUrl('plugin.auction.admin.rotation.detail') !!}"><i class="fa fa-plus"></i> 添加轮播图</a>
- </ul>
- </div>
- <div class='panel panel-default'>
- <form action="" method="post" class="form-horizontal" id="form1">
- <div class="panel panel-info">
- <div class="panel-body">
- <div class="form-group col-xs-12 col-sm-2">
- <input class="form-control" name="title" id="" type="text"
- value="{{$title}}" placeholder="标题">
- </div>
- <div class="form-group col-xs-12 col-sm-2">
- <label class="col-xs-12 col-sm-2 col-md-2 col-lg-2 control-label"></label>
- <div class="col-sm-8 col-lg-9 col-xs-12">
- <button class="btn btn-success" style="border-radius: 5px;"><i class="fa fa-search"></i> 搜索</button>
- </div>
- </div>
- </div>
- </div>
- </form>
- </div>
- <div class='panel panel-default'>
- <div class='panel-body'>
- <table class="table table-hover">
- <thead>
- <tr>
- <th style='width:10%;text-align: center;'>ID</th>
- <th style='width:20%;text-align: center;'>标题</th>
- <th style='width:40%;text-align: center;'>跳转链接</th>
- <th style='width:10%;text-align: center;'>状态</th>
- <th style='width:20%;text-align: center;'>操作</th>
- </tr>
- </thead>
- <tbody>
- @foreach($list['data'] as $key=>$row)
- <tr style="height: 10em;">
- <td style='width:10%;text-align: center;'>{{$row['id']}}</td>
- <td style='width:10%;text-align: center;'>{{$row['title']}}</td>
- <td style='width:10%;text-align: center;'>{{yz_tomedia($row['url'])}}</td>
- <td style='width:10%;text-align: center;'><div class="col-sm-2 col-xs-6">
- <input class="mui-switch mui-switch-animbg" id="cate_is_show_{{$key}}" type="checkbox"
- @if($row['is_show'] == 1)
- checked
- @endif
- onclick="message_default({{$row['id']}},this.id)"/>
- </div></td>
- <td style='width:10%;text-align: center;'>
- <a class='btn btn-default' href="{{yzWebUrl("plugin.auction.admin.rotation.detail", ['id'=>$row['id']])}}">详情</a>
- <a class='btn btn-default' href="{{yzWebUrl("plugin.auction.admin.rotation.delete", ['id'=>$row['id']])}}"
- onclick="return confirm('确认删除该轮播图吗?');return false;">删除</a>
- </td>
- </tr>
- @endforeach
- </tbody>
- </table>
- {!! $pager !!}
- </div>
- </div>
- <div style="width:100%;height:150px;"></div>
- <script language='javascript'>
- $(function () {
- $('#search').click(function () {
- $('#form1').attr('action', '{!! yzWebUrl('plugin.auction.admin.rotation.index') !!}');
- $('#form1').submit();
- });
- });
- function message_default(cid,name) {
- var id = "#" + name;
- var url = "<?php echo yzWebUrl('plugin.auction.admin.rotation.changeShow'); ?>"
- if ($(id).is(':checked')) {
- //开
- $.post(url,{'status':1,'id':cid},function(data){
- if (data.status == 1) {
- showPopover($(id),"开启成功");
- $(id).attr("checked",true);
- } else {
- showPopover($(id),"开启失败");
- $(id).attr("checked",false);
- }
- }, "json");
- } else {
- //关
- $.post(url,{'status':0,'id':cid},function(data){
- if (data.status == 1) {
- showPopover($(id),"关闭成功");
- $(id).attr("checked",false);
- } else {
- showPopover($(id),"关闭失败");
- $(id).attr("checked",true);
- }
- }, "json");
- }
- }
- function showPopover(target, msg) {
- target.attr("data-original-title", msg);
- $('[data-toggle="tooltip"]').tooltip();
- target.tooltip('show');
- target.focus();
- //2秒后消失提示框
- setTimeout(function () {
- target.attr("data-original-title", "");
- target.tooltip('hide');
- }, 2000
- );
- }
- </script>
- @endsection
|