index.html 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. {include file="public/header" /}
  2. <div class="page">
  3. <div class="fixed-bar">
  4. <div class="item-title">
  5. <div class="subject">
  6. <h3>{$Think.lang.vrgroupbuy_cate_manage}</h3>
  7. <h5></h5>
  8. </div>
  9. {include file="public/admin_items" /}
  10. </div>
  11. </div>
  12. <div class="explanation" id="explanation">
  13. <div class="title" id="checkZoom">
  14. <h4 title="{$Think.lang.ds_explanation_tip}">{$Think.lang.ds_explanation}</h4>
  15. <span id="explanationZoom" title="{$Think.lang.ds_explanation_close}" class="arrow"></span>
  16. </div>
  17. <ul>
  18. <li>{$Think.lang.vrgroupbuy_index_help1}</li>
  19. <li>{$Think.lang.vrgroupbuy_index_help2}</li>
  20. <li>{$Think.lang.vrgroupbuy_index_help3}</li>
  21. <li>{$Think.lang.vrgroupbuy_index_help4}</li>
  22. <li>{$Think.lang.vrgroupbuy_index_help5}</li>
  23. </ul>
  24. </div>
  25. <table class="ds-default-table">
  26. <thead>
  27. <tr class="thead">
  28. <th></th>
  29. <th>{$Think.lang.ds_sort}</th>
  30. <th>{$Think.lang.vrgroupbuy_cate_name}</th>
  31. <th>{$Think.lang.ds_handle}</th>
  32. </tr>
  33. </thead>
  34. <tbody>
  35. {notempty name="vrgroupbuyclass_list"}
  36. {foreach name="vrgroupbuyclass_list" item="val"}
  37. {eq name="val.vrgclass_parent_id" value="0"}
  38. <tr class="hover edit" id="ds_row_{$val.vrgclass_id}">
  39. <td class="w48">
  40. <input type="checkbox" value="{$val.vrgclass_id}" class="checkitem">
  41. <img class="class_parent" class_id="class_id{$val.vrgclass_id}" status="open" src="{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-expandable.gif">
  42. </td>
  43. <td class="w48 sort">
  44. <span ds_type="inline_edit" ajax_branch="class" column_id="{$val.vrgclass_id}" title="{$Think.lang.ds_editable}" class="editable tooltip" fieldid="{$val.vrgclass_id}" fieldname="vrgclass_sort" >{$val.vrgclass_sort}</span>
  45. </td>
  46. <td class="name">
  47. <span ds_type="inline_edit" ajax_branch="class" column_id="{$val.vrgclass_id}" title="{$Think.lang.ds_editable}" class="editable tooltip" fieldname="vrgclass_name" fieldid="{$val.vrgclass_id}">{$val.vrgclass_name}</span>
  48. <a class="btn-add-nofloat marginleft" href="javascript:dsLayerOpen('{:url('Vrgroupbuy/class_add',['vrgclass_parent_id'=>$val.vrgclass_id])}','{$Think.lang.ds_add_sub_class}')"><span>{$Think.lang.ds_add_sub_class}</span></a>
  49. </td>
  50. <td>
  51. <a href="javascript:dsLayerOpen('{:url('Vrgroupbuy/class_edit',['vrgclass_id'=>$val.vrgclass_id])}','{$Think.lang.ds_edit}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
  52. <a href="javascript:dsLayerConfirm('{:url('Vrgroupbuy/class_del',['vrgclass_id'=>$val.vrgclass_id])}','{$Think.lang.ds_ensure_del}',{$val.vrgclass_id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
  53. </td>
  54. </tr>
  55. {foreach name="vrgroupbuyclass_list" item="vall"}
  56. {eq name="vall.vrgclass_parent_id" value="$val.vrgclass_id"}
  57. <tr class="hover edit class_id{$val.vrgclass_id}" style="display:none;" id="ds_row_{$vall.vrgclass_id}">
  58. <td class="w48"><input type="checkbox" value="{$vall.vrgclass_id}" class="checkitem"></td>
  59. <td class="w48 sort"><span ds_type="inline_edit" ajax_branch="class" column_id="{$vall.vrgclass_id}" title="{$Think.lang.ds_editable}" class="editable tooltip" fieldid="{$vall.vrgclass_id}" fieldname="vrgclass_sort" >{$vall.vrgclass_sort}</span></td>
  60. <td class="name"><span ds_type="inline_edit" ajax_branch="class" column_id="{$vall.vrgclass_id}" title="{$Think.lang.ds_editable}" class="editable tooltip" fieldname="vrgclass_name" fieldid="{$vall.vrgclass_id}">{$vall.vrgclass_name}</span></td>
  61. <td>
  62. <a href="javascript:dsLayerOpen('{:url('Vrgroupbuy/class_edit',['vrgclass_id'=>$vall.vrgclass_id])}','{$Think.lang.ds_edit}')" class="dsui-btn-edit"><i class="iconfont"></i>{$Think.lang.ds_edit}</a>
  63. <a href="javascript:dsLayerConfirm('{:url('Vrgroupbuy/class_del',['vrgclass_id'=>$vall.vrgclass_id])}','{$Think.lang.ds_ensure_del}',{$vall.vrgclass_id})" class="dsui-btn-del"><i class="iconfont"></i>{$Think.lang.ds_del}</a>
  64. </td>
  65. </tr>
  66. {/eq}
  67. {/foreach}
  68. {/eq}
  69. {/foreach}
  70. {else /}
  71. <tr class="no_data">
  72. <td colspan="10">{$Think.lang.ds_no_record}</td>
  73. </tr>
  74. {/notempty}
  75. </tbody>
  76. {notempty name="vrgroupbuyclass_list"}
  77. <tfoot>
  78. <tr class="tfoot">
  79. <td><input type="checkbox" class="checkall" id="checkall_1"></td>
  80. <td id="batchAction" colspan="15">
  81. <span class="all_checkbox"><label for="checkall_1">{$Think.lang.ds_select_all}</label></span>&nbsp;&nbsp;
  82. <a href="javascript:void(0)" class="btn btn-small" onclick="submit_delete_batch();"><span>{$Think.lang.ds_del}</span></a>
  83. </td>
  84. </tr>
  85. </tfoot>
  86. {/notempty}
  87. </table>
  88. </div>
  89. <script type="text/javascript" src="{$Think.ADMIN_SITE_ROOT}/js/jquery.edit.js" charset="utf-8"></script>
  90. <script type="text/javascript">
  91. $(function(){
  92. $(".class_parent").click(function() {
  93. if ($(this).attr("status") == "open") {
  94. $(this).attr("status","close");
  95. $(this).attr("src","{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-collapsable.gif");
  96. $("."+$(this).attr("class_id")).show();
  97. } else {
  98. $(this).attr("status","open");
  99. $(this).attr("src","{$Think.ADMIN_SITE_ROOT}/images/treetable/tv-expandable.gif");
  100. $("."+$(this).attr("class_id")).hide();
  101. }
  102. });
  103. //行内ajax编辑
  104. $('span[ds_type="vrgclass_sort"]').inline_edit();
  105. $('span[ds_type="vrgclass_name"]').inline_edit();
  106. });
  107. function submit_delete(ids_str){
  108. _uri = ADMINSITEURL + "/Vrgroupbuy/class_del.html?vrgclass_id=" + ids_str;
  109. dsLayerConfirm(_uri, '{$Think.lang.ds_ensure_del}');
  110. }
  111. </script>