?> </h2> <?php } ?> <ul id="comment_error_list"> </ul> <?php CommentForm::js_validation(); ?> <?php if (osc_count_item_comments() >= 1) { ?> <div class="comments_list"> <?php while (osc_has_item_comments()) { ?> <div class="comment"> <h4><?php echo osc_comment_title(); ?> <em> <?php _e("by", 'osclasswizards'); ?> <?php echo osc_comment_author_name(); ?> :</em></h4> <p><?php echo nl2br(osc_comment_body());
function item_comments() { if (osc_reg_user_post_comments() && osc_is_web_user_logged_in() || !osc_reg_user_post_comments()) { ?> <div id="comments" class="box"> <?php if (osc_count_item_comments() >= 1) { ?> <h2> <?php _e('Comments', 'pop'); ?> (<?php echo osc_count_item_comments(); ?> ) </h2> <?php } ?> <?php CommentForm::js_validation(); ?> <?php if (osc_count_item_comments() >= 1) { ?> <div class="comments_list"> <?php while (osc_has_item_comments()) { ?> <div class="comment"> <div class="user-avatar" style="background-image: url('<?php echo osc_current_web_theme_url('images/seller-default.png'); ?> ')"></div> <?php if (osc_comment_author_name()) { ?> <h4><em><?php echo osc_comment_author_name(); ?> :</em></h4> <?php } else { ?> <h4><em><?php echo osc_comment_author_email(); ?> :</em></h4> <?php } ?> <div class="date"> <?php echo osc_comment_pub_date(); ?> </div> <p class="body"><?php echo nl2br(osc_comment_body()); ?> </p> <?php if (osc_comment_user_id() && osc_comment_user_id() == osc_logged_user_id()) { ?> <a rel="nofollow" href="<?php echo osc_delete_comment_url(); ?> " title="<?php _e('Delete your comment', 'pop'); ?> "> <?php _e('Delete', 'pop'); ?> </a> <?php } ?> </div> <?php } ?> <div class="pagination"> <?php echo osc_comments_pagination(); ?> </div> </div> <?php } ?> <div class="comment_form"> <h2> <?php _e('Leave your comment', 'pop'); ?> </h2> <div class="resp-wrapper"> <ul id="comment_error_list" class="error_list"> </ul> <form action="<?php echo osc_base_url(true); ?> " method="post" name="comment_form" id="comment_form"> <fieldset> <input type="hidden" name="action" value="add_comment" /> <input type="hidden" name="page" value="item" /> <input type="hidden" name="id" value="<?php echo osc_item_id(); ?> " /> <?php if (osc_is_web_user_logged_in()) { ?> <input type="hidden" name="authorName" value="<?php echo osc_esc_html(osc_logged_user_name()); ?> " /> <input type="hidden" name="authorEmail" value="<?php echo osc_logged_user_email(); ?> " /> <?php } else { ?> <div class="form-group col-md-6"> <label class="control-label" for="authorName"> <?php _e('Name', 'pop'); ?> </label> <div class="controls"> <?php CommentForm::author_input_text(); ?> </div> </div> <div class="form-group col-md-6"> <label class="control-label" for="authorEmail"> <?php _e('Email', 'pop'); ?> </label> <div class="controls"> <?php CommentForm::email_input_text(); ?> </div> </div> <?php } ?> <div class="form-group col-md-12"> <label class="control-label" for="body"> <?php _e('Comment', 'pop'); ?> </label> <div class="controls textarea"> <?php CommentForm::body_input_textarea(); ?> </div> </div> <div class="actions col-md-12"> <button type="submit" class="btn btn-primary"> <?php _e('Send', 'pop'); ?> </button> </div> </fieldset> </form> </div> </div> </div> <?php } ?> <?php }