酒店预订平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 regels
3.4 KiB

  1. <div class="panel panel-default panel-intro">
  2. {:build_heading()}
  3. <div class="panel-body">
  4. <div id="myTabContent" class="tab-content">
  5. <div class="tab-pane fade active in" id="one">
  6. <div class="widget-body no-padding">
  7. <div id="toolbar" class="toolbar">
  8. {:build_toolbar('refresh,delete')}
  9. <a class="btn btn-info btn-disabled disabled btn-selected" href="javascript:;"><i class="fa fa-leaf"></i> 获取选中项</a>
  10. <a class="btn btn-success btn-toggle-view" href="javascript:;"><i class="fa fa-leaf"></i> 切换视图</a>
  11. </div>
  12. <table id="table" class="table table-striped table-hover" width="100%">
  13. </table>
  14. </div>
  15. </div>
  16. </div>
  17. </div>
  18. </div>
  19. <style type="text/css">
  20. .example {
  21. height:100%;position: relative;
  22. }
  23. .example > span {
  24. position:absolute;left:15px;top:15px;
  25. }
  26. </style>
  27. <script id="itemtpl" type="text/html">
  28. <!--
  29. 如果启用了templateView,默认调用的是itemtpl这个模板,可以通过设置templateFormatter来修改
  30. 在当前模板中可以使用三个变量(item:行数据,i:当前第几行,data:所有的行数据)
  31. 此模板引擎使用的是art-template的native,可参考官方文档
  32. -->
  33. <div class="col-sm-4 col-md-3">
  34. <!--下面四行是为了展示随机图片和标签,可移除-->
  35. <% var imagearr = ['https://cdn.fastadmin.net/uploads/addons/blog.png', 'https://cdn.fastadmin.net/uploads/addons/cms.png', 'https://cdn.fastadmin.net/uploads/addons/vote.png', 'https://cdn.fastadmin.net/uploads/addons/blog.png', 'https://cdn.fastadmin.net/uploads/addons/alisms.png']; %>
  36. <% var image = imagearr[item.id % 5]; %>
  37. <% var labelarr = ['primary', 'success', 'info', 'danger', 'warning']; %>
  38. <% var label = labelarr[item.id % 5]; %>
  39. <div class="thumbnail example">
  40. <span class="btn btn-<%=label%>">ID:<%=item.id%></span>
  41. <img src="<%=image%>" style="width:100%;" alt="<%=item.title%>">
  42. <div class="caption">
  43. <h4><%=item.title?item.title:'无'%></h4>
  44. <p class="text-muted">操作者IP:<%=item.ip%></p>
  45. <p class="text-muted">操作时间:<%=Moment(item.createtime*1000).format("YYYY-MM-DD HH:mm:ss")%></p>
  46. <p>
  47. <!--详情的事件需要在JS中手动绑定-->
  48. <a href="#" class="btn btn-primary btn-success btn-detail" data-id="<%=item.id%>"><i class="fa fa-camera"></i> 详情</a>
  49. <!--如果需要响应编辑或删除事件,可以给元素添加 btn-edit或btn-del的类和data-id这个属性值-->
  50. <a href="#" class="btn btn-primary btn-edit" data-id="<%=item.id%>"><i class="fa fa-pencil"></i> 编辑</a>
  51. <a href="#" class="btn btn-danger btn-del" data-id="<%=item.id%>"><i class="fa fa-times"></i> 删除</a>
  52. <span class="pull-right" style="margin-top:10px;">
  53. <!--如果需要多选操作,请确保有下面的checkbox元素存在,可移除-->
  54. <input name="checkbox" data-id="<%=item.id%>" type="checkbox" />
  55. </span>
  56. </p>
  57. </div>
  58. </div>
  59. </div>
  60. </script>