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.

125 lines
5.5 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
7 years ago
  1. <div class="container">
  2. <div class="ax-button-group">
  3. <div class="left">
  4. <h2><?=$board['brd_title']?></h2>
  5. </div>
  6. </div>
  7. <div data-ax-tbl>
  8. <div data-ax-tr>
  9. <div data-ax-td class="width-100">
  10. <div data-ax-td-label>제목</div>
  11. <div data-ax-td-wrap><p class="form-control-static"><?=$view['post_title']?></p></div>
  12. </div>
  13. </div>
  14. <div data-ax-tr>
  15. <div data-ax-td>
  16. <div data-ax-td-label>작성자</div>
  17. <div data-ax-td-wrap><p class="form-control-static"><?=$view['post_nickname']?></p></div>
  18. </div>
  19. <div data-ax-td>
  20. <div data-ax-td-label>작성시간</div>
  21. <div data-ax-td-wrap><p class="form-control-static"><?=$view['reg_datetime']?></p></div>
  22. </div>
  23. <div data-ax-td>
  24. <div data-ax-td-label>최종수정</div>
  25. <div data-ax-td-wrap><p class="form-control-static"><?=$view['upd_datetime']?></p></div>
  26. </div>
  27. <div data-ax-td>
  28. <div data-ax-td-label>조회수</div>
  29. <div data-ax-td-wrap><p class="form-control-static"><?=number_format($view['post_hit'])?></p></div>
  30. </div>
  31. </div>
  32. <div data-ax-tr>
  33. <div data-ax-td>
  34. <div data-ax-td-label>작성IP</div>
  35. <div data-ax-td-wrap><p class="form-control-static"><?=long2ip((int)$view['post_ip'])?></p></div>
  36. </div>
  37. <div data-ax-td>
  38. <div data-ax-td-label>모바일</div>
  39. <div data-ax-td-wrap><p class="form-control-static"><?=$view['post_mobile']?></p></div>
  40. </div>
  41. </div>
  42. <div data-ax-tr>
  43. <div data-ax-td class="width-100">
  44. <div data-ax-td-label>게시글 링크</div>
  45. <div data-ax-td-wrap><p class="form-control-static"><a target="_blank" href="<?=base_url('board/'.$board['brd_key'].'/'.$view['post_idx'])?>"><?=base_url('board/'.$board['brd_key'].'/'.$view['post_idx'])?></a></p></div>
  46. </div>
  47. </div>
  48. <?php for($i=1; $i<=10; $i++):?>
  49. <?php if(element('post_ext'.$i, $view)) :?>
  50. <div data-ax-tr>
  51. <div data-ax-td class="width-100">
  52. <div data-ax-td-label>필드 <?=$i?></div>
  53. <div data-ax-td-wrap>
  54. <p class="form-control-static"><?=$view["post_ext{$i}"]?></p>
  55. </div>
  56. </div>
  57. </div>
  58. <?php endif;?>
  59. <?php endfor;?>
  60. <?php if( count($view['file']) > 0 ) :?>
  61. <div data-ax-tr>
  62. <div data-ax-td class="width-100">
  63. <div data-ax-td-label>첨부파일</div>
  64. <div data-ax-td-wrap>
  65. <?php foreach($view['file'] as $f) :?>
  66. <a class="btn btn-xs btn-default" href="<?=$f['link']?>"><i class="fal fa-download"></i> <?=$f['att_origin']?> (<?=format_size($f['att_filesize'])?>)</a>
  67. <?php endforeach;?>
  68. </div>
  69. </div>
  70. </div>
  71. <?php endif;?>
  72. <div data-ax-tr>
  73. <div data-ax-td class="width-100">
  74. <div data-ax-td-label>내용</div>
  75. <div data-ax-td-wrap>
  76. <div style="min-height:300px;line-height:1.4em">
  77. <!-- S:첨부파일중 이미지 표시 -->
  78. <?php foreach($view['file'] as $f) : if($f['att_is_image']!='Y') continue;?>
  79. <figure style="margin-bottom:10px;">
  80. <img src="<?=base_url($f['att_filepath'])?>" alt="<?=$f['att_origin']?>">
  81. <figcaption class="sr-only"><?=$f['att_origin']?></figcaption>
  82. </figure>
  83. <?php endforeach;?>
  84. <!-- E:첨부파일중 이미지 표시 -->
  85. <?=display_html_content($view['post_content'])?>
  86. </div>
  87. </div>
  88. </div>
  89. </div>
  90. </div>
  91. <div class="text-center MT10">
  92. <a href="<?=base_url("admin/board/posts/{$board['brd_key']}/?".http_build_query($this->input->get()))?>" class="btn btn-default MR5">목록</a>
  93. <?php if( $board['brd_use_reply'] == 'Y' ):?>
  94. <a href="<?=base_url("admin/board/write/{$board['brd_key']}/?post_parent={$view['post_idx']}")?>" class="btn btn-default MR5">답글</a>
  95. <?php endif;?>
  96. <a href="<?=base_url("admin/board/write/{$board['brd_key']}/{$view['post_idx']}")?>" class="btn btn-default MR5"><i class="fal fa-pencil"></i> 수정</a>
  97. <button type="button" class="btn btn-danger" data-button="btn-remove-posts"><i class="fal fa-trash"></i> 삭제</button>
  98. </div>
  99. </div>
  100. <script>
  101. $(function(){
  102. $('[data-button="btn-remove-posts"]').click(function(e){
  103. var arr = ['<?=$view['post_idx']?>'];
  104. if(! confirm( '현재글을 삭제하시겠습니까?' ))
  105. return;
  106. $.ajax({
  107. url : '/ajax/board/posts',
  108. type : 'DELETE',
  109. data : {
  110. post_idx :arr
  111. },
  112. success:function(){
  113. location.href = "<?=base_url("admin/board/posts/{$board['brd_key']}/?".http_build_query($this->input->get()))?>";
  114. }
  115. })
  116. });
  117. });
  118. </script>