<?php
/**
 * Template for formatting a single form element
 *
 * Note that the li element has no closing element. This is
 * done this way accordingly to WordPress comment standard.
 *
 * @author jason.xie@victheme.com
 */
?>
<?php $class = "without-child"; ?>
<?php if (!empty($args['has_children'])) : $class = "with-child"; endif; ?>
<?php $class .= ' media'; ?>
<li <?php comment_class($class) ?> id="comment-<?php comment_ID() ?>">

  <div class="comment-wrapper clearfix">
    <?php $avatar = get_avatar($comment, $args['avatar_size']); ?>

    <?php if (!empty($avatar)) : ?>
      <div class="post-thumbnail pull-left media-object">
        <?php echo wp_kses_post($avatar); ?>
      </div>
    <?php endif; ?>

    <div class="media-body">
      <h4 class="media-heading">
        <?php print wp_kses_post(get_comment_author_link()); ?> -
        <small><?php echo wp_kses_post(get_comment_date()); ?></small>
      </h4>

      <div class="reply-link pull-right">
        <?php comment_reply_link(array_merge($args, array(
              'add_below' => 'comment',
              'depth' => $depth,
              'max_depth' => $args['max_depth']
            ))) ?>
      </div>

      <?php if ($comment->comment_approved == FALSE) : ?>
        <div
          class="alert alert-info"><?php echo __('Your comment is awaiting moderation.', BASE_THEME) ?></div>
      <?php endif; ?>

      <?php comment_text() ?>
    </div>
  </div>

