1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- ##tlayout("admin/layout.htm"){
- <div class="breadcrumbs" style="padding-top:10px;height: 50px;">
- <div class="col-xs-12">
- <a class="btn btn-info btn-sm" style="margin-top: -12px;margin-left: 10px;" href="/admin/carousel/add">+添加轮播图</a>
- </div>
- </div>
- <div class="page-content">
- <div class="row" style="margin-top:10px;">
- <div class="col-xs-12">
- <div class="table-responsive">
- <table class="table table-striped table-bordered table-hover">
- <thead>
- <tr>
- <th>标题</th>
- <th>图片</th>
- <th>链接</th>
- <th>顺序</th>
- <th>状态</th>
- <th>操作</th>
- </tr>
- </thead>
- <tbody>
- ##for(_item in carousel_list!){
- <tr>
- <td>${_item.title!}</td>
- <td>
- <a href="${_item.img_url!}" target="_blank">
- <img src="${_item.img_url!}" style="height: 100px;" />
- </a>
- </td>
- <td>
- <a href="${_item.url!}" target="_blank">${_item.url!}</a>
- </td>
- <td>${_item.idx!}</td>
- <td>
- ##if(_item.status==1){
- 启用
- ##}else{
- 禁用
- ##}
- </td>
- <td style="width:100px;">
- <div class="btn-group">
- <button class="btn btn-info btn-sm dropdown-toggle" data-toggle="dropdown">
- 操作<span class="icon-caret-down icon-on-right"></span>
- </button>
- <ul class="dropdown-menu dropdown-info pull-right">
- <li><a href="/admin/carousel/edit?id=${_item.id}">编辑</a></li>
- ##if(_item.status==1){
- <li><a href="javascript:changeStatus(${_item.id!}, 0, '禁用')">禁用</a></li>
- ##}else{
- <li><a href="javascript:changeStatus(${_item.id!}, 1, '启用')">启用</a></li>
- ##}
- <li><a href="javascript:changeStatus(${_item.id!}, 9, '删除')">删除</a></li>
- </ul>
- </div>
- </td>
- </tr>
- ##}
- </tbody>
- </table>
- </div>
- </div>
- </div>
- </div>
- <script>
- function changeStatus(id, status, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/carousel/changeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|