<?php foreach ($comments as $comment):?>
<div class="list-group-item" id="comment-<?php echo $comment->bc_id;?>">
  <div class="media">
    <div class="media-left" style="font-size: 40px;">
      <?php if ($this->user->is_admin() && $comment->us_id):?>
      <a href="<?php echo site_url('admin/users/profil/'.$comment->us_id);?>"><i class="fa fa-user"></i></a>
      <?php elseif ($comment->us_id):?>
      <i class="fa fa-user"></i>
      <?php else:?>
      <i class="fa fa-user-secret"></i>
      <?php endif;?>
    </div>
    <div class="media-body">
      <div class="media-heading">
        <span class="pull-right text-muted"><?php echo format_tanggal($comment->bc_tanggal);?></span>
        <?php if ($comment->bc_url):?>
        <a href="<?php echo html_escape($comment->bc_url);?>" target="_blank"><strong><?php echo html_escape($comment->bc_nama);?></strong></a>
        <?php else:?>
        <strong><?php echo html_escape($comment->bc_nama);?></strong>
        <?php endif;?>
      </div>
      <p><?php echo nl2br(auto_link(html_escape($comment->bc_komentar),'url', true));?></p>
      <?php if ($this->user->is_admin()):?>
      <ul class="nav nav-pills">
        <?php if ($comment->bc_moderasi):?>
        <li role="presentation"><a href="<?php echo site_url('admin/modules/blog/konfirm-komentar/'.$comment->bc_id.'?redirect='.urlencode(isset($post) ? 'blog/'.$post->bp_slug : 'blog/'.$permalink).'#comment-lists');?>" style="padding: 5px 10px"><i class="fa fa-check"></i> Menyetujui</a></li>
        <?php endif;?>
        <li role="presentation"><a href="<?php echo site_url('admin/modules/blog/hapus-komentar/'.$comment->bc_id.'?redirect='.urlencode(isset($post) ? 'blog/'.$post->bp_slug : 'blog/'.$permalink).'#comment-lists');?>" style="padding: 5px 10px"><span class="text-danger"><i class="fa fa-times"></i> Hapus</span></a></li>
      </ul>
      <?php endif;?>
    </div>
  </div>
</div>
<?php endforeach;?>