Keine Beschreibung
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index_draft.htm 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500
  1. {include file="public/layout" /}
  2. <body class="bodystyle" id="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. <div class="page min-hg-c-10">
  6. <div class="flexigrid" style="margin-top: 0px;min-height: 600px;">
  7. <div class="fixed-bar">
  8. <div class="item-title">
  9. <a class="back_xin" href="{notempty name='$menu'}{:url('Index/switch_map')}{else /}{:url('Archives/index')}{/notempty}" title="返回"><i class="iconfont e-fanhui"></i></a>
  10. <div class="subject">
  11. <h3>待审核文档</h3>
  12. <h5></h5>
  13. </div>
  14. </div>
  15. </div>
  16. <div class="mDiv pt0">
  17. <div class="ftitle_nav">
  18. <div class="fbutton">
  19. <a href="{:url('Archives/index_draft')}">
  20. <div class="{empty name='$draft_type'}cur{/empty}" title="全部">
  21. 全部<span>{$allCount|default=0}</span>
  22. </div>
  23. </a>
  24. </div>
  25. <div class="fbutton">
  26. <a href="{:url('Archives/index_draft', ['draft_type'=>'user'])}">
  27. <div class="{eq name='$draft_type' value='user'}cur{/eq}" title="会员投稿">
  28. 前台投稿<span>{$userCount|default=0}</span>
  29. </div>
  30. </a>
  31. </div>
  32. <div class="fbutton">
  33. <a href="{:url('Archives/index_draft', ['draft_type'=>'admin'])}">
  34. <div class="{eq name='$draft_type' value='admin'}cur{/eq}" title="后台发布">
  35. 后台发布<span>{$adminCount|default=0}</span>
  36. </div>
  37. </a>
  38. </div>
  39. </div>
  40. <form id="searchForm" class="navbar-form form-inline" action="{:url('Archives/index_draft')}" method="get" onSubmit="layer_loading('正在处理');">
  41. {$searchform.hidden|default=''}
  42. <div class="sDiv">
  43. <div class="sDiv2">
  44. <input type="text" size="30" name="keywords" value="{$Request.param.keywords}" class="qsbox" placeholder="标题搜索...">
  45. <input type="hidden" name="menu" value="{$menu|default=0}">
  46. <input type="submit" class="btn" value="搜索">
  47. <i class="iconfont e-sousuo"></i>
  48. </div>
  49. </div>
  50. </form>
  51. </div>
  52. <div class="hDiv">
  53. <div class="hDivBox">
  54. <table cellspacing="0" cellpadding="0" style="width: 100%">
  55. <thead>
  56. <tr>
  57. <th class="sign w40" axis="col0">
  58. <div class="tc"><input type="checkbox" class="checkAll" autocomplete="off"></div>
  59. </th>
  60. <th abbr="article_title" axis="col3" class="w70">
  61. <div class="tc">ID</div>
  62. </th>
  63. <th abbr="article_title" axis="col3" class="">
  64. <div style="text-align: left;" class="text-l10">标题</div>
  65. </th>
  66. <th abbr="article_time" axis="col6" class="w110">
  67. <div class="tl text-l10">发布人</div>
  68. </th>
  69. <th abbr="article_time" axis="col6" class="w120">
  70. <div class="tc">栏目</div>
  71. </th>
  72. <th abbr="article_time" axis="col6" class="w60">
  73. <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>
  74. </th>
  75. <th abbr="article_time" axis="col6" class="w60">
  76. <div class="tc">点击</div>
  77. </th>
  78. {if !empty($arctype_info) && $arctype_info['current_channel'] == 4}
  79. <th abbr="download_time" axis="col6" class="w60">
  80. <div class="tc">下载</div>
  81. </th>
  82. {/if}
  83. <th abbr="article_time" axis="col6" class="w100">
  84. <div class="tc">发布时间</div>
  85. </th>
  86. <th axis="col1" class="w160">
  87. <div class="tc">操作</div>
  88. </th>
  89. <th abbr="article_time" axis="col6" class="w60">
  90. <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>
  91. </th>
  92. </tr>
  93. </thead>
  94. </table>
  95. </div>
  96. </div>
  97. <div class="bDiv" style="height: auto;">
  98. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  99. <table style="width: 100%;">
  100. <tbody>
  101. {empty name="list"}
  102. <tr>
  103. <td class="no-data" align="center" axis="col0" colspan="50">
  104. <div class="no_row">
  105. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  106. </div>
  107. </td>
  108. </tr>
  109. {else/}
  110. {foreach name="list" item="vo" key="k" }
  111. <tr>
  112. <td class="sign">
  113. <div id="aid_{$vo.aid}" data-typeid="{$vo.typeid}" class="tc w40"><input type="checkbox" name="ids[]" value="{$vo.aid}" autocomplete="off"></div>
  114. </td>
  115. <td class="sort">
  116. <div class="tc w70">
  117. {$vo.aid}
  118. </div>
  119. </td>
  120. <td class="" style="width: 100%;">
  121. <div class="tl pdl10" >
  122. {notempty name="$vo.is_litpic"}
  123. <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>
  124. {/notempty}
  125. {eq name="'Archives@edit'|is_check_access" value="1"}
  126. {if condition="empty($channelRow[$vo['channel']]['ifsystem'])"}
  127. <a href="{:url('Custom/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid, 'channel'=>$vo.channel, 'referurl'=>$pageurl))}" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
  128. {else /}
  129. <a href="{:url($channelRow[$vo['channel']]['ctl_name'].'/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid, 'referurl'=>$pageurl))}" style="{eq name="vo.is_b" value="1"} font-weight: bold;{/eq}">{$vo.title}</a>
  130. {/if}
  131. {else /}
  132. {$vo.title}
  133. {/eq}
  134. {assign name='showArcFlagData' value='$vo|showArchivesFlagStr'}
  135. {volist name='$showArcFlagData' id="vo1"}
  136. {eq name='$i' value='1'}<span style="color: red;">[{/eq}
  137. <i style="font-size: 12px;">{$vo1['small_name']}</i>
  138. {eq name='$i' value='$showArcFlagData|count'}]</span>{/eq}
  139. {/volist}
  140. </div>
  141. </td>
  142. <td>
  143. <div class="tl text-l10 w110 ellipsis">
  144. {$vo.username|default='匿名'}
  145. </div>
  146. </td>
  147. <td class="">
  148. <div class="w120 tc ellipsis"><a href="{:url('Archives/index_draft', array('typeid'=>$vo['typeid']))}" title="{$vo.typename}">{$vo.typename|default='<i class="red">数据出错!</i>'}</a></div>
  149. </td>
  150. <td>
  151. <div class="tc w60">
  152. {if condition="$vo['arcrank'] <= -1"}
  153. <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>
  154. {else /}
  155. <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>
  156. {/if}
  157. </div>
  158. </td>
  159. <td>
  160. <div class="tc w60">
  161. {$vo.click}
  162. </div>
  163. </td>
  164. {if !empty($arctype_info) && $arctype_info['current_channel'] == 4}
  165. <td>
  166. <div class="tc w60">
  167. {$vo.downcount}
  168. </div>
  169. </td>
  170. {/if}
  171. <td>
  172. <div class="w100 tc">
  173. {$vo.add_time|date='Y-m-d',###}
  174. </div>
  175. </td>
  176. <td class="operation">
  177. <div class="w160 tc">
  178. {eq name="'Archives@edit'|is_check_access" value="1"}
  179. {if condition="empty($channelRow[$vo['channel']]['ifsystem'])"}
  180. <a href="{:url('Custom/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid, 'channel'=>$vo.channel, 'referurl'=>$pageurl))}" class="btn blue">编辑</a>
  181. {else /}
  182. <a href="{:url($channelRow[$vo['channel']]['ctl_name'].'/edit',array('id'=>$vo['aid'],'typeid'=>$Request.param.typeid, 'referurl'=>$pageurl))}" class="btn blue">编辑</a>
  183. {/if}
  184. <i></i>
  185. {/eq}
  186. {eq name="'Archives@del'|is_check_access" value="1"}
  187. <a class="btn red" href="javascript:void(0);" data-url="{:url('Archives/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>
  188. <i></i>
  189. {/eq}
  190. <a href="{$vo.arcurl}" target="_blank" class="btn blue">浏览</a>
  191. <!-- {if condition="-1 == $admin_info['role_id'] || in_array('rebackdraft', $auth_role_info['cud'])"}
  192. <i></i>
  193. {if condition="in_array($vo['channel'], [1])"}
  194. <a href="javascript:void(0);" onclick="reback_arc(this);" data-url="{:url('Archives/rebackdraft',['aid'=>$vo.aid])}" class="btn blue">退回</a>
  195. {else /}
  196. <a class="btn grey" href="javascript:void(0);" title="仅限于文章模型">退回</a>
  197. {/if}
  198. {/if} -->
  199. </div>
  200. </td>
  201. <td class="sort">
  202. <div class="w60 tc">
  203. {eq name="'Archives@edit'|is_check_access" value="1"}
  204. <input type="text" onChange="changeTableVal('archives','aid','{$vo.aid}','sort_order',this);" size="4" value="{$vo.sort_order}" />
  205. {else /}
  206. {$vo.sort_order}
  207. {/eq}
  208. </div>
  209. </td>
  210. </tr>
  211. {/foreach}
  212. {/empty}
  213. </tbody>
  214. </table>
  215. </div>
  216. <div class="iDiv" style="display: none;"></div>
  217. </div>
  218. {notempty name="list"}
  219. <div class="footer-oper">
  220. <span class="ml15">
  221. <input type="checkbox" class="checkAll" autocomplete="off">
  222. </span>
  223. <div class="nav-dropup">
  224. <button class="layui-btn layui-btn-primary dropdown-bt">批量操作<i class="layui-icon layui-icon-up"></i></button>
  225. <div class="dropdown-menus" style="display:none; {if condition='0 < $pager->totalRows && ($pager->totalRows < 4 || $pager->listRows < 4)'}top:28px;bottom:unset;border-bottom:1px solid rgba(0,0,0,.15);border-top:none;min-height: 170px;{/if}">
  226. {eq name="'Archives@batch_attr'|is_check_access" value="1"}
  227. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量新增属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'add'])}">新增属性</a>
  228. <a href="javascript:void(0);" onclick="batch_attr(this, 'ids', '批量删除属性');" data-url="{:url('Archives/batch_attr', ['opt'=>'del'])}">删除属性</a>
  229. <hr class="layui-bg-gray">
  230. {/eq}
  231. {eq name="'Archives@batch_copy'|is_check_access" value="1"}
  232. <a href="javascript:void(0);" onclick="func_batch_copy(this, 'ids');" data-url="{:url('Archives/batch_copy', array('typeid'=>$Request.param.typeid))}">复制文档</a>
  233. {/eq}
  234. {eq name="'Archives@move'|is_check_access" value="1"}
  235. <a href="javascript:void(0);" onclick="func_move(this, 'ids');" data-url="{:url('Archives/move', array('typeid'=>$Request.param.typeid))}">移动文档</a>
  236. {/eq}
  237. {eq name="'Archives@del'|is_check_access" value="1"}
  238. <a href="javascript:void(0);" onclick="batch_del(this, 'ids');" data-url="{:url('Archives/del')}" {eq name="$global['web_recycle_switch']" value='1'} data-deltype="del" {else /} data-deltype="pseudo" {/eq}>删除文档</a>
  239. {/eq}
  240. </div>
  241. </div>
  242. {eq name="'Archives@check'|is_check_access" value="1"}
  243. <a href="javascript:void(0);" onclick="batch_check(this, 'ids');" data-type="check" data-url="{:url('Archives/check')}" class="layui-btn layui-btn-primary">审核文档</a>
  244. {/eq}
  245. {eq name="'RecycleBin@archives_index'|is_check_access" value="1"}
  246. {neq name="$global['web_recycle_switch']" value='1'} <a href="{:url('RecycleBin/archives_index')}" class="layui-btn layui-btn-primary" title="回收站">回收站</a> {/neq}
  247. {/eq}
  248. {include file="public/page" /}
  249. </div>
  250. {/notempty}
  251. </div>
  252. </div>
  253. <script type="text/javascript">
  254. $(function(){
  255. $('input[name*=ids]').click(function(){
  256. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  257. $('.checkAll').prop('checked','checked');
  258. } else {
  259. $('.checkAll').prop('checked', false);
  260. }
  261. });
  262. $('input[type=checkbox].checkAll').click(function(){
  263. $('input[type=checkbox]').prop('checked',this.checked);
  264. });
  265. });
  266. $(document).ready(function(){
  267. // 表格行点击选中切换
  268. $('#flexigrid > table>tbody >tr').click(function(){
  269. $(this).toggleClass('trSelected');
  270. });
  271. // 点击刷新数据
  272. $('.fa-refresh').click(function(){
  273. location.href = location.href;
  274. });
  275. // 选择栏目检索出相应文档列表
  276. $('#typeid').change(function(){
  277. $('#searchForm').submit();
  278. });
  279. // 批量操作
  280. $(".dropdown-bt").click(function(){
  281. $(".dropdown-menus").slideToggle(200);
  282. event.stopPropagation();
  283. })
  284. $(document).click(function(){
  285. $(".dropdown-menus").slideUp(200);
  286. event.stopPropagation();
  287. })
  288. });
  289. var aids = '';
  290. function func_move(obj, name)
  291. {
  292. var a = [];
  293. var k = 0;
  294. aids = '';
  295. $('input[name^='+name+']').each(function(i,o){
  296. if($(o).is(':checked')){
  297. a.push($(o).val());
  298. if (k > 0) {
  299. aids += ',';
  300. }
  301. aids += $(o).val();
  302. k++;
  303. }
  304. })
  305. if(a.length == 0){
  306. layer.alert('请至少选择一项', {
  307. shade: layer_shade,
  308. area: ['480px', '190px'],
  309. move: false,
  310. title: '提示',
  311. btnAlign:'r',
  312. closeBtn: 3,
  313. success: function () {
  314. $(".layui-layer-content").css('text-align', 'left');
  315. }
  316. });
  317. return;
  318. }
  319. var url = $(obj).attr('data-url');
  320. //iframe窗
  321. layer.open({
  322. type: 2,
  323. title: '移动文档',
  324. fixed: true, //不固定
  325. shadeClose: false,
  326. shade: layer_shade,
  327. maxmin: false, //开启最大化最小化按钮
  328. area: ['480px', '360px'],
  329. content: url
  330. });
  331. }
  332. /**
  333. * 获取修改之前的内容
  334. */
  335. function get_aids()
  336. {
  337. return aids;
  338. }
  339. var typeid_arr = []; //已经生成过静态的typeid
  340. var build_finish = false; //是否已经全部生成静态
  341. //检查是否已经生成静态,刷新页面
  342. function build_finish_polling(){
  343. if(build_finish === true){
  344. layer.closeAll();
  345. layer.msg('操作成功', {icon: 1});
  346. window.location.reload();
  347. }
  348. }
  349. /**
  350. * 批量审核
  351. */
  352. function batch_check(obj, name) {
  353. var url = $(obj).attr('data-url');
  354. var data_type = $(obj).attr('data-type');//uncheck
  355. var a = [];
  356. $('input[name^='+name+']').each(function(i,o){
  357. if($(o).is(':checked')){
  358. a.push($(o).val());
  359. }
  360. })
  361. if(a.length == 0){
  362. layer.alert('请至少选择一项', {
  363. shade: layer_shade,
  364. area: ['480px', '190px'],
  365. move: false,
  366. title: '提示',
  367. btnAlign:'r',
  368. closeBtn: 3,
  369. success: function () {
  370. $(".layui-layer-content").css('text-align', 'left');
  371. }
  372. });
  373. return;
  374. }
  375. layer_loading('正在处理');
  376. var seo_pseudo = {$seo_pseudo|default=1};
  377. $.ajax({
  378. type: "POST",
  379. url: url,
  380. data: {ids:a, _ajax:1},
  381. dataType: 'json',
  382. success: function (data) {
  383. if(data.code == 1){
  384. var last = false;
  385. if (data_type === 'check') {
  386. if (2 == seo_pseudo) {
  387. for(var i=0;i<a.length;i++){
  388. var id_value = a[i];
  389. var typeid =$("#aid_"+id_value).data('typeid');
  390. if ((i+1) == a.length){
  391. last = true;
  392. }
  393. up_html(id_value,typeid,last);
  394. }
  395. window.setTimeout(build_finish_polling, 3000);
  396. } else {
  397. layer.closeAll();
  398. layer.msg('操作成功', {icon: 1});
  399. window.location.reload();
  400. }
  401. }else{
  402. layer.closeAll();
  403. layer.msg(data.msg, {icon: 1});
  404. window.location.reload();
  405. }
  406. }else{
  407. layer.closeAll();
  408. layer.alert(data.msg, {icon: 2, title:false});
  409. }
  410. },
  411. error:function(e){
  412. layer.closeAll();
  413. layer.alert(e.responseText, {icon: 2, title:false});
  414. }
  415. });
  416. }
  417. //生成静态页面
  418. function up_html(id_value,typeid,last){
  419. $.ajax({
  420. url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=upHtml&lang="+__lang__+"&id="+id_value+"&t_id="+typeid+"&type=view&ctl_name=Archives&_ajax=1",
  421. type:'GET',
  422. dataType:'json',
  423. data:{},
  424. success:function(res1){
  425. // layer.closeAll();
  426. // layer.msg('生成完成', {icon: 1, time: 1500});
  427. if (typeid_arr.indexOf(typeid) === -1){
  428. typeid_arr.push(typeid);
  429. $.ajax({
  430. url:__root_dir__+"/index.php?m=home&c=Buildhtml&a=upHtml&lang="+__lang__+"&id="+id_value+"&t_id="+typeid+"&type=lists&ctl_name=Archives&_ajax=1",
  431. type:'GET',
  432. dataType:'json',
  433. data:{},
  434. success:function(res2){
  435. if (last === true){
  436. build_finish = true;
  437. }
  438. // layer.closeAll();
  439. // layer.msg('生成完成', {icon: 1, time: 1500});
  440. },
  441. error: function(e){
  442. layer.closeAll();
  443. layer.alert('生成当前栏目HTML失败,请手工生成栏目静态!', {icon: 5, title: false});
  444. }
  445. });
  446. }else{
  447. if (last === true){
  448. build_finish = true;
  449. }
  450. }
  451. },
  452. error: function(e){
  453. layer.closeAll();
  454. layer.alert('生成HTML失败,请手工生成静态HTML!', {icon: 5, title: false});
  455. }
  456. });
  457. }
  458. function reback_arc(obj) {
  459. layer.prompt({
  460. formType: 2,
  461. title: '退回原因',
  462. shade: layer_shade,
  463. }, function(value, index, elem){
  464. $.ajax({
  465. type: 'POST',
  466. url : $(obj).data('url'),
  467. data : {_ajax:1,reason:value},
  468. success:function(res){
  469. if (1 == res.code){
  470. layer.close(index); // 关闭层
  471. layer.msg(res.msg, {time: 1000},function(){
  472. window.location.reload();
  473. });
  474. } else{
  475. showErrorMsg(res.msg);
  476. }
  477. }
  478. });
  479. });
  480. }
  481. </script>
  482. {include file="public/footer" /}