123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117 |
- ##tlayout("admin/layout.htm"){
- <div class="breadcrumbs" style="padding-top:10px;height: 50px;">
- <div class="col-xs-4">
- <a href="/admin/diy/add" class="btn btn-info btn-sm"style="margin-top: -12px;margin-left: 10px;">+添加模板</a>
- </div>
- <div class="col-xs-8" style="text-align: right;">
- <a class="btn btn-sm" style="margin-top: -12px;margin-left: 10px;" href="/admin/diyType?type=1">用途</a>
- <a class="btn btn-sm" style="margin-top: -12px;margin-left: 10px;" href="/admin/diyType?type=2">行业</a>
- <a class="btn btn-sm" style="margin-top: -12px;margin-left: 10px;" href="/admin/diyType?type=3">节日</a>
- <a class="btn btn-sm" style="margin-top: -12px;margin-left: 10px;" href="/admin/diyType?type=4">风格</a>
- </div>
- </div>
- <div class="page-content">
- <div class="row">
- <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>
- </tr>
- </thead>
- <tbody>
- ##if(results!=null && results.list.~size!=0){
- ##for(_item in results.list!){
- <tr>
- <td>
- <a href="${_item.img_url!}" target="_blank"><img src="${_item.img_url!}" style="height: 400px;" /></a>
- </td>
- <td>
- <div style="border-bottom: 1px dashed #ccc;padding-bottom: 10px;">${_item.title!}</div>
- <div style="margin-top: 10px;">用途:${_item.purpose_title!}</div>
- <div style="margin-top: 10px;">行业:${_item.industry_title!}</div>
- <div style="margin-top: 10px;">节日:${_item.festival_title!}</div>
- <div style="margin-top: 10px;">风格:${_item.style_title!}</div>
- <div style="margin-top: 10px;">专题:${_item.subject_title!}</div>
- </td>
- <td>
- ##if(_item.status==1){
- <div>启用</div>
- ##}else if(_item.status==0){
- <div>禁用</div>
- ##}else{
- <div>信息不完整</div>
- ##}
- ##if(_item.top==1){
- <div style="margin-top: 10px;">置顶</div>
- ##}
- </td>
- <td>${_item.create_date!,dateFormat='yyyy-MM-dd HH:mm'}</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/diy/edit?id=${_item.id!}">编辑</a></li>
- ##if(_item.status==1){
- <li><a href="javascript:changeStatus(${_item.id!}, 0, '禁用')">禁用</a></li>
- ##}else if(_item.status==0){
- <li><a href="javascript:changeStatus(${_item.id!}, 1, '启用')">启用</a></li>
- ##}
- ##if(_item.top==1){
- <li><a href="javascript:changeTop(${_item.id!}, 0, '取消置顶')">取消置顶</a></li>
- ##}else{
- <li><a href="javascript:changeTop(${_item.id!}, 1, '置顶')">置顶</a></li>
- ##}
- <li><a href="javascript:changeStatus(${_item.id!}, 9, '删除')">删除</a></li>
- </ul>
- </div>
- </td>
- </tr>
- ##}
- ##}
- </tbody>
- </table>
- ##if(totalPage>1){
- <div class="fenye">
- <#_pagination page="${results!}">
- <ul id="Pagination"></ul>
- </#_pagination>
- </div>
- ##}
- </div>
- </div>
- </div>
- </div>
- <script>
- function changeStatus(id, status, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/diy/changeStatus",{id:id,status:status},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- function changeTop(id, top, msg){
-
- if(confirm("确定要" + msg + "该记录吗?")){
- $.post("/admin/diy/changeTop",{id:id,top:top},function(data){
- alert(data.msg);
- if(data.success){
- location.reload();
- }
- });
- }
- }
- </script>
- ##}
|