Bez popisu
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.

index.htm 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. {include file="public/layout" /}
  2. <body style="background-color: rgb(255, 255, 255); overflow: auto; cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page" style="box-shadow:none;">
  6. {include file="special/bar" /}
  7. <div class="flexigrid" style="min-height: 600px;">
  8. <div class="mDiv">
  9. <div class="ftitle">
  10. {include file="archives/tags_btn" /}
  11. </div>
  12. <form class="navbar-form form-inline" id="searchForm" action="{:url('Special/index')}" method="get" onsubmit="layer_loading('正在处理');">
  13. {$searchform.hidden|default=''}
  14. <div class="sDiv">
  15. <div class="sDiv2">
  16. <input type="hidden" name="typeid" id="typeid" value="{$Request.param.typeid|default=''}">
  17. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  18. <input type="submit" class="btn" value="搜索">
  19. <i class="iconfont e-sousuo"></i>
  20. </div>
  21. </div>
  22. </form>
  23. </div>
  24. <div class="hDiv">
  25. <div class="hDivBox">
  26. <table cellspacing="0" cellpadding="0" style="width: 100%">
  27. <thead>
  28. <tr>
  29. <th class="sign w40" axis="col0">
  30. <div class="tc"><input type="checkbox" autocomplete="off" class="checkAll"></div>
  31. </th>
  32. <th abbr="article_title" axis="col3" class="w70">
  33. <div class="tc">ID</div>
  34. </th>
  35. <th abbr="article_title" axis="col3" class="">
  36. <div style="text-align: left; padding-left: 10px;" class="">标题</div>
  37. </th>
  38. <th abbr="article_time" axis="col6" class="w120">
  39. <div class="tc">所属栏目</div>
  40. </th>
  41. <th abbr="article_time" axis="col6" class="w50">
  42. <div class="tc sort_style"><a href="{:getArchivesSortUrl('arcrank')}">审核&nbsp;<i {eq name='$Request.param.orderby' value='arcrank'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  43. </th>
  44. <th abbr="article_time" axis="col6" class="w60">
  45. <div class="tc">浏览量</div>
  46. </th>
  47. <th abbr="article_time" axis="col6" class="w100">
  48. <div class="tc">发布时间</div>
  49. </th>
  50. <th axis="col1" class="w160">
  51. <div class="tc">操作</div>
  52. </th>
  53. <th abbr="article_time" axis="col6" class="w60">
  54. <div class="tc sort_style"><a href="{:getArchivesSortUrl('sort_order')}">排序&nbsp;<i {eq name='$Request.param.orderby' value='sort_order'}{eq name='$Request.param.orderway' value='asc'}class="asc"{else /}class="desc"{/eq}{/eq}></i></a></div>
  55. </th>
  56. </tr>
  57. </thead>
  58. </table>
  59. </div>
  60. </div>
  61. <div class="bDiv" style="height: auto;">
  62. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  63. <table style="width: 100%;">
  64. <tbody>
  65. {empty name="list"}
  66. <tr>
  67. <td class="no-data" align="center" axis="col0" colspan="50">
  68. <div class="no_row">
  69. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  70. </div>
  71. </td>
  72. </tr>
  73. {else/}
  74. {foreach name="list" item="vo" key="k" }
  75. <tr>
  76. <td class="sign">
  77. <div class="tc w40"><input type="checkbox" autocomplete="off" name="ids[]" value="{$vo.aid}"></div>
  78. </td>
  79. <td class="sort">
  80. <div class="tc w70">
  81. {$vo.aid}
  82. </div>
  83. </td>
  84. <td class="" style="width: 100%;">
  85. <div class="tl" style="padding-left: 10px;">
  86. {notempty name="$vo.is_litpic"}
  87. <i class="fa fa-picture-o color_z" onmouseover="layer_tips=layer.tips('<img src={$vo.litpic} class=\'layer_tips_img\'>',this,{tips: [3, '#fff'],skin:'layer-yourskin-mt0'});" onmouseout="layer.close(layer_tips);"></i>
  88. {/notempty}
  89. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  90. <a href="{:url('Special/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
  91. {else /}
  92. {$vo.title}
  93. {/eq}
  94. {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
  95. {volist name='$showArcFlagData' id="vo1"}
  96. {eq name='$i' value='1'}<span style="color: red;">[{/eq}
  97. <i style="font-size: 12px;">{$vo1['small_name']}</i>
  98. {eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
  99. {/volist}
  100. </div>
  101. </td>
  102. <td class="">
  103. <div class="w120 tc ellipsis"><a href="{:url('Special/index', array('typeid'=>$vo['typeid'], 'tab'=>3))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  104. </td>
  105. <td>
  106. <div class="tc w50">
  107. {if condition="$vo['arcrank'] eq -1"}
  108. <span class="no" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-ban"></i>否</span>
  109. {else /}
  110. <span class="yes" {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"} data-typeid="{$vo.typeid}" data-seo_pseudo="{$seo_pseudo|default='1'}" onclick="changeTableVal('archives','aid','{$vo.aid}','arcrank',this);" {/eq} ><i class="fa fa-check-circle"></i>是</span>
  111. {/if}
  112. </div>
  113. </td>
  114. <td>
  115. <div class="tc w60">
  116. {$vo.click}
  117. </div>
  118. </td>
  119. <td>
  120. <div class="w100 tc">
  121. {$vo.add_time|date='Y-m-d',###}
  122. </div>
  123. </td>
  124. <td class="operation">
  125. <div class="w160 tc">
  126. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  127. <a href="{:url('Special/edit',array('id'=>$vo['aid'], 'callback_url'=>$callback_url))}" class="btn blue">编辑</a>
  128. <i></i>
  129. {/eq}
  130. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  131. <a class="btn red" href="javascript:void(0);" data-url="{:url('Special/del')}" data-id="{$vo.aid}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq} onClick="delfun(this);">删除</a>
  132. <i></i>
  133. {/eq}
  134. <a href="{$vo.arcurl}" target="_blank" class="btn blue">浏览</a>
  135. </div>
  136. </td>
  137. <td class="sort">
  138. <div class="w60 tc">
  139. {eq name="$Think.const.CONTROLLER_NAME.'@edit'|is_check_access" value="1"}
  140. <input type="text" onkeyup="this.value=this.value.replace(/[^\d]/g,'');" onpaste="this.value=this.value.replace(/[^\d]/g,'')" onchange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  141. {else /}
  142. {$vo.sort_order}
  143. {/eq}
  144. </div>
  145. </td>
  146. </tr>
  147. {/foreach}
  148. {/empty}
  149. </tbody>
  150. </table>
  151. </div>
  152. <div class="iDiv" style="display: none;"></div>
  153. </div>
  154. {notempty name="list"}
  155. <div class="footer-oper">
  156. <span class="ml15">
  157. <input type="checkbox" autocomplete="off" class="checkAll">
  158. </span>
  159. <div class="nav-dropup">
  160. <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i></button>
  161. <div class="dropdown-menus" style="display:none; {if condition='0 < $pager->totalRows && ($pager->totalRows < 3 || $pager->listRows < 3)'}top:28px;bottom:unset;border-bottom:1px solid rgba(0,0,0,.15);border-top:none;min-height: 250px;{/if}">
  162. {eq name="'Archives@batch_attr'|is_check_access" value="1"}
  163. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'add'])}">新增属性</a>
  164. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'del'])}">删除属性</a>
  165. <hr class="layui-bg-gray">
  166. {/eq}
  167. {eq name="'Archives@batch_copy'|is_check_access" value="1"}
  168. <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}">复制专题</a>
  169. {/eq}
  170. {eq name="'Archives@move'|is_check_access" value="1"}
  171. <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">移动专题</a>
  172. {/eq}
  173. {eq name="$Think.const.CONTROLLER_NAME.'@del'|is_check_access" value="1"}
  174. <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="{:url('Special/del')}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq}>删除专题</a>
  175. {/eq}
  176. {eq name="'Archives@check'|is_check_access" value="1"}
  177. <hr class="layui-bg-gray">
  178. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/check')}">审核专题</a>
  179. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-url="{:url('Archives/uncheck')}">取消审核</a>
  180. {/eq}
  181. </div>
  182. </div>
  183. {eq name="'RecycleBin@archives_index'|is_check_access" value="1"}
  184. {neq name="$global['web_recycle_switch']" value='1'} <a href="{:url('RecycleBin/archives_index')}" class="layui-btn layui-btn-primary" title="回收站">回收站</a> {/neq}
  185. {/eq}
  186. {include file="public/page" /}
  187. </div>
  188. {/notempty}
  189. </div>
  190. </div>
  191. <script type="text/javascript">
  192. $(function(){
  193. $('input[name*=ids]').click(function(){
  194. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  195. $('.checkAll').prop('checked','checked');
  196. } else {
  197. $('.checkAll').prop('checked', false);
  198. }
  199. });
  200. $('input[type=checkbox].checkAll').click(function(){
  201. $('input[type=checkbox]').prop('checked',this.checked);
  202. });
  203. });
  204. $(document).ready(function(){
  205. // 表格行点击选中切换
  206. $('#flexigrid > table>tbody >tr').click(function(){
  207. $(this).toggleClass('trSelected');
  208. });
  209. // 点击刷新数据
  210. $('.fa-refresh').click(function(){
  211. location.href = location.href;
  212. });
  213. // 批量操作
  214. $(".dropdown-bt").click(function(){
  215. $(".dropdown-menus").slideToggle(200);
  216. event.stopPropagation();
  217. })
  218. $(document).click(function(){
  219. $(".dropdown-menus").slideUp(200);
  220. event.stopPropagation();
  221. })
  222. });
  223. var aids = '';
  224. function func_move(obj, name)
  225. {
  226. var a = [];
  227. var k = 0;
  228. aids = '';
  229. $('input[name^='+name+']').each(function(i,o){
  230. if($(o).is(':checked')){
  231. a.push($(o).val());
  232. if (k > 0) {
  233. aids += ',';
  234. }
  235. aids += $(o).val();
  236. k++;
  237. }
  238. })
  239. if(a.length == 0){
  240. layer.alert('请至少选择一项', {
  241. shade: layer_shade,
  242. area: ['480px', '190px'],
  243. move: false,
  244. title: '提示',
  245. btnAlign:'r',
  246. closeBtn: 3,
  247. success: function () {
  248. $(".layui-layer-content").css('text-align', 'left');
  249. }
  250. });
  251. return;
  252. }
  253. var url = $(obj).attr('data-url');
  254. //iframe窗
  255. layer.open({
  256. type: 2,
  257. title: '移动专题',
  258. fixed: true, //不固定
  259. shadeClose: false,
  260. shade: layer_shade,
  261. maxmin: false, //开启最大化最小化按钮
  262. area: ['480px', '360px'],
  263. content: url
  264. });
  265. }
  266. /**
  267. * 批量审核
  268. */
  269. function batch_check(obj, name) {
  270. var url = $(obj).attr('data-url');
  271. var a = [];
  272. $('input[name^='+name+']').each(function(i,o){
  273. if($(o).is(':checked')){
  274. a.push($(o).val());
  275. }
  276. })
  277. if(a.length == 0){
  278. layer.alert('请至少选择一项', {
  279. shade: layer_shade,
  280. area: ['480px', '190px'],
  281. move: false,
  282. title: '提示',
  283. btnAlign:'r',
  284. closeBtn: 3,
  285. success: function () {
  286. $(".layui-layer-content").css('text-align', 'left');
  287. }
  288. });
  289. return;
  290. }
  291. // title = '批量审核';
  292. // btn = ['确定', '取消']; //按钮
  293. // // 删除按钮
  294. // layer.confirm(title, {
  295. // title: false,
  296. // btn: btn //按钮
  297. // }, function () {
  298. layer_loading('正在处理');
  299. $.ajax({
  300. type: "POST",
  301. url: url,
  302. data: {ids:a, _ajax:1},
  303. dataType: 'json',
  304. success: function (data) {
  305. layer.closeAll();
  306. if(data.code == 1){
  307. layer.msg(data.msg, {icon: 1});
  308. window.location.reload();
  309. }else{
  310. layer.alert(data.msg, {icon: 2, title:false});
  311. }
  312. },
  313. error:function(e){
  314. layer.closeAll();
  315. layer.alert(e.responseText, {icon: 2, title:false});
  316. }
  317. });
  318. // }, function (index) {
  319. // layer.closeAll(index);
  320. // });
  321. }
  322. /**
  323. * 获取修改之前的内容
  324. */
  325. function get_aids()
  326. {
  327. return aids;
  328. }
  329. </script>
  330. {include file="public/footer" /}