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.

58 lines
3.0 KiB

7 years ago
  1. <article class="panel panel-default">
  2. <div class="panel-heading">
  3. <h1 class="panel-title">댓글</h1>
  4. </div>
  5. <div class="panel-body">
  6. <ul class="media-list comment-list">
  7. <?php foreach($comment_list['list'] as $cmt) :?>
  8. <li class="media comment-depth-<?=strlen($cmt['cmt_reply'])?>" id="comment-<?=$cmt['cmt_idx']?>">
  9. <!-- START :: 대댓글일 경우-->
  10. <?php if(strlen($cmt['cmt_reply']) > 0) : ?>
  11. <div class="media-left">
  12. <div class="W<?=strlen($cmt['cmt_reply'])*50?> text-center">
  13. <i class="fa fa-reply"></i>
  14. </div>
  15. </div>
  16. <?php endif;?>
  17. <!-- END :: 대댓글일 경우-->
  18. <div class="media-body" style="padding-left:<?=strlen($cmt['cmt_reply'])*50?>px">
  19. <h4><?=$cmt['mem_nickname']?> <small><?=$cmt['cmt_datetime']?></small></h4>
  20. <div data-container="container-comment-content">
  21. <?php
  22. if( $cmt['cmt_status'] == 'Y' ) :
  23. echo display_html_content($cmt['cmt_content'],600);
  24. elseif ( $cmt['cmt_status'] == 'B' ):
  25. echo '<p class="alert alert-danger">관리자에 의해서 블라인드 된 댓글입니다.</p>';
  26. else :
  27. echo '<p class="alert alert-danger">삭제된 댓글입니다.</p>';
  28. endif;
  29. ?>
  30. </div>
  31. <div class="text-right">
  32. <?php if($board['auth']['comment']) : ?>
  33. <button type="button" class="btn btn-default btn-xs" onclick="APP.BOARD.COMMENT.reply('<?=$cmt['cmt_idx']?>','<?= $cmt['cmt_num']?>')">대댓글</button>
  34. <?php endif;?>
  35. <?php if($cmt['auth']) :?>
  36. <button type="button" class="btn btn-default btn-xs" onclick="APP.BOARD.COMMENT.modify('<?=$cmt['cmt_idx']?>')">수정</button>
  37. <a class="btn btn-danger btn-xs" onclick="return confirm('댓글을 삭제하시겠습니까?');" href="<?=$cmt['link']['delete']?>">삭제</a>
  38. <?php endif;?>
  39. </div>
  40. </div>
  41. <div class="comment-reply-form">
  42. <?=$cmt['comment_form']?>
  43. </div>
  44. </li>
  45. <?php endforeach;?>
  46. </ul>
  47. <?php if( count($comment_list['list']) <= 0 ) :?>
  48. <!-- START:: 등록된 댓글이 없을경우-->
  49. <p class="well">작성된 댓글이 없습니다</p>
  50. <!-- END:: 등록된 댓글이 없을경우-->
  51. <?php endif;?>
  52. </div>
  53. </article>