123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- <include file="public@header"/>
- </head>
- <body>
- <div class="wrap js-check-wrap">
- <ul class="nav nav-tabs">
- <li class="active"><a href="javascript:;">茶室列表</a></li>
- <li><a href="{:url('add')}">添加茶室</a></li>
- </ul>
- <form class="well form-inline margin-top-20" method="post" action="{:url('AdminLock/index')}">
- 状态:
- <select class="form-control" name="is_show" style="width: 140px;">
- <option value=''>全部</option>
- <option value='1' <eq name="is_show" value="1">selected</eq>>显示</option>
- <option value='2' <eq name="is_show" value="2">selected</eq>>隐藏</option>
- </select>
- 关键字:
- <input type="text" class="form-control" name="keyword" style="width: 200px;"
- value="{$keyword|default=''}" placeholder="请输入关键字...">
- <input type="submit" class="btn btn-primary" value="搜索"/>
- <a class="btn btn-danger" href="{:url('AdminLock/index')}">清空</a>
- </form>
- <form class="js-ajax-form" action="" method="post">
- <table class="table table-hover table-bordered table-list">
- <thead>
- <tr>
- <th width="15">
- <label>
- <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
- </label>
- </th>
- <th width="50">ID</th>
- <th width="200">茶室名称</th>
- <th width="80">主图</th>
- <th width="50">锁ID</th>
- <th width="200">地址</th>
- <th width="120">状态</th>
- <th width="95">操作</th>
- </tr>
- </thead>
- <foreach name="list" item="vo">
- <tr>
- <td>
- <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids"
- value="{$vo.id}" title="ID:{$vo.id}">
- </td>
- <td><b>{$vo.id}</b></td>
- <td>{$vo.name}</td>
- <td>
- <notempty name="vo.image">
- <a href="javascript:parent.imagePreviewDialog('{:cmf_get_image_preview_url($vo.image)}');">
- <i class="fa fa-photo fa-fw"></i>
- </a>
- <else/>
- <i class="fa fa-close fa-fw"></i>
- </notempty>
- </td>
- <td>{$vo.lock_id}</td>
- <td>{$vo.address}</td>
- <td>{$vo.is_show_text}</td>
- <td>
- <a class="btn btn-xs btn-primary" href="{:url('AdminLock/edit',array('id'=>$vo['id']))}">编辑</a>
- <a class="btn btn-xs btn-danger js-ajax-delete"
- href="{:url('AdminLock/delete',array('id'=>$vo['id']))}">删除</a>
- </td>
- </tr>
- </foreach>
- </table>
- <ul class="pagination">{$page|default=''}</ul>
- </form>
- </div>
- <script src="__STATIC__/js/admin.js"></script>
- <script>
- function reloadPage(win) {
- win.location.reload();
- }
- $('.set_status').click(function () {
- var status = $(this).data('status');
- var arr = [];
- $('input[name="ids"]:checked').each(function(i){
- arr[i] = $(this).val();
- });
- Wind.css('layer');
- Wind.use("layer", function () {
- if (arr.length === 0) {
- layer.msg('请选择一条记录');
- return false;
- }
- $.post('{:url("setStatus")}',{ids:arr,status:status},function(data){
- reloadPage(window);
- },'json')
- });
- return false;
- });
- </script>
- </body>
- </html>
|