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.

155 lines
6.3 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <div class="page-header" data-fit-aside>
  2. <h1 class="page-title"><?=$board['brd_title']?></h1>
  3. </div>
  4. <form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
  5. <div data-ax-tbl>
  6. <div data-ax-tr>
  7. <div data-ax-td>
  8. <div data-ax-td-label>작성 기간 검색</div>
  9. <div data-ax-td-wrap>
  10. <input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
  11. </div>
  12. <div data-ax-td-wrap>
  13. <input class="form-control" name="enddate" data-toggle="datepicker" value="">
  14. </div>
  15. </div>
  16. <div data-ax-td>
  17. <div data-ax-td-label>검색어 입력</div>
  18. <div data-ax-td-wrap>
  19. <select class="form-control form-control-inline" name="sc">
  20. <option value="post_title">질문 제목</option>
  21. <option value="qna_name">작성자</option>
  22. <option value="qna_phone">연락처</option>
  23. <option value="qna_email">이메일</option>
  24. </select>
  25. </div>
  26. </div>
  27. <div data-ax-td>
  28. <div data-ax-td-wrap>
  29. <input class="form-control" name="st" value="">
  30. </div>
  31. <div data-ax-td-wrap>
  32. <button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
  33. </div>
  34. </div>
  35. <div data-ax-td class="right">
  36. <div data-ax-td-wrap>
  37. <button type="button" class="btn btn-default btn-sm" data-button="qna-category"><i class="fal fa-sitemap"></i> Q&amp;A 유형 관리</button>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. </form>
  43. <div class="ax-button-gorup" data-fit-aside>
  44. </div>
  45. <div class="container">
  46. <div class="ax-button-group">
  47. <div class="left">
  48. <h2></h2>
  49. </div>
  50. </div>
  51. <div class="grid">
  52. <table>
  53. <thead>
  54. <tr>
  55. <th><input type="checkbox" data-checkbox="post" data-checkbox-all="true"></th>
  56. <th>#</th>
  57. <th class="col-xs-6">제목</th>
  58. <th>작성자</th>
  59. <th>작성일</th>
  60. <th>조회수</th>
  61. <?php if($board['brd_use_assign'] == 'Y'):?>
  62. <th>승인상태</th>
  63. <?php endif;?>
  64. </tr>
  65. </thead>
  66. <tbody>
  67. <?php foreach($list['list'] as $row):?>
  68. <tr>
  69. <td class="text-center"><input type="checkbox" data-checkbox="post" name="post_idx[]" value="<?=$row['post_idx']?>"></td>
  70. <td class="text-center"><?=number_format($row['nums'])?></td>
  71. <td>
  72. <?php if(strlen($row['post_reply']) >0) :?>
  73. <span style="display:inline-block;width:<?=((strlen($row['post_reply'])-1) * 16)?>px"></span>
  74. <img src="<?=base_url('assets/images/common/icon_reply.gif')?>">
  75. <?php endif;?>
  76. <a href="<?=base_url("admin/board/read/{$board['brd_key']}/{$row['post_idx']}/?").http_build_query($this->input->get()) ?>"><?=$row['post_title']?></a>
  77. <?php if($row['is_new']) :?><label class="label label-warning ML10">NEW</label><?php endif;?>
  78. <?php if($row['is_hot']) :?><label class="label label-danger ML10">HIT</label><?php endif;?>
  79. <?php if($row['post_count_comment']>0) :?><small>(<?=$row['post_count_comment']?>)</small><?php endif;?>
  80. <?php if($row['is_secret']) :?><i class="fal fa-lock"></i><?php endif;?>
  81. </td>
  82. <td class="text-center"><?=$row['mem_nickname']?></td>
  83. <td class="text-center"><?=$row['post_regtime']?></td>
  84. <td class="text-center"><?=number_format($row['post_hit'])?></td>
  85. <?php if($board['brd_use_assign'] == 'Y'):?>
  86. <td class="text-center">
  87. <?php if($row['post_assign'] == 'Y'):?>
  88. <label class="label label-success">승인</label>
  89. <?php else :?>
  90. <label class="label label-default">미승인</label>
  91. <?php endif;?>
  92. </td>
  93. <?php endif;?>
  94. </tr>
  95. <?php endforeach;?>
  96. <?php if(count($list['list']) <= 0) :?>
  97. <tr>
  98. <td colspan="10" class="empty">검색된 글이 없습니다.</td>
  99. </tr>
  100. <?php endif;?>
  101. </tbody>
  102. </table>
  103. </div>
  104. <div class="MT10">
  105. <div class="pull-right">
  106. </div>
  107. <div class="clearfix"></div>
  108. </div>
  109. <div class="MT10">
  110. <button type="button" class="btn btn-danger" data-button="btn-remove-posts"><i class="fal fa-trash"></i> 선택 삭제</button>
  111. <div class="pull-right">
  112. <a class="btn btn-primary" href="<?=base_url("admin/board/write/{$board['brd_key']}")?>"><i class="fal fa-pencil"></i> 작성</a>
  113. </div>
  114. <div class="clearfix"></div>
  115. </div>
  116. </div>
  117. <script>
  118. $('[data-button="btn-remove-posts"]').click(function(e){
  119. e.preventDefault();
  120. if( $('input[name="post_idx[]"]:checked').length <= 0 )
  121. {
  122. alert('삭제할 게시물을 선택해주세요');
  123. return;
  124. }
  125. if(! confirm( '선택한 ' + $('input[name="post_idx[]"]:checked').length + '개의 게시물을 삭제하시겠습니까?' ))
  126. return;
  127. var arr = [];
  128. $('input[name="post_idx[]"]:checked').each(function(){
  129. arr.push( $(this).val() );
  130. });
  131. $.ajax({
  132. url : '/ajax/board/posts',
  133. type : 'DELETE',
  134. data : {
  135. post_idx :arr
  136. },
  137. success:function(){
  138. location.reload();
  139. }
  140. })
  141. });
  142. </script>