<?php
if ( ! defined( 'ABSPATH' ) ) exit;
/**
 * Comments Template
 *
 * This template file handles the display of comments, pingbacks and trackbacks.
 *
 * External functions are used to display the various types of comments.
 *
 * @package ttFramework
 * @subpackage Template
 */

// Do not delete these lines
if ( ! empty( $_SERVER['SCRIPT_FILENAME'] ) && 'comments.php' == basename( $_SERVER['SCRIPT_FILENAME'] ) ) {
	die ( 'Please do not load this page directly. Thanks!' );
} ?>


<div class="comments-box">
        <h2 class="title"><span><?php esc_html_e( 'Comments', 'logiscargo' ); ?> (<?php comments_number( esc_html__( 'No Responses', 'logiscargo' ), esc_html__( 'One Response', 'logiscargo' ), esc_html__( '% Responses', 'logiscargo' ) ); ?> )</span></h2>
<?php if ( post_password_required() ) { ?>
	<p class="nocomments"><?php esc_html_e( 'This post is password protected. Enter the password to view comments.', 'logiscargo' ); ?></p>
</div><!-- ending .comments-box soon, if we return here -->
<?php return; } ?>

<?php $comments_by_type = separate_comments( $comments ); ?>

<!-- You can start editing here. -->

<?php if ( have_comments() ) { ?>

<div id="comments" class="comment-box clearfix">

	<?php if ( ! empty( $comments_by_type['comment'] ) ) { ?>
		<ol class="single-comment-box commentlist">

			<?php wp_list_comments( 'callback=tt_temptt_cust_cmnt&type=comment' ); ?>

		</ol>

		<nav class="navigation fix">
			<div class="fl"><?php previous_comments_link(); ?></div>
			<div class="fr"><?php next_comments_link(); ?></div>
		</nav><!-- /.navigation -->
	<?php } ?>

	<?php if ( ! empty( $comments_by_type['pings'] ) ) { ?>

		<h3 id="pings" class="title"><span><?php esc_html_e( 'Trackbacks/Pingbacks', 'logiscargo' ); ?></span></h3>

        <ol class="pinglist">
            <?php wp_list_comments( 'type=pings&callback=tt_temptt_list_pings' ); ?>
        </ol>

	<?php }; ?>

</div> <!-- /#comments -->

<?php } else { // this is displayed if there are no comments so far ?>


	<?php
		// If there are no comments and comments are closed, let's leave a little note, shall we?
		if ( comments_open() && is_singular() ) { ?>
			<div id="comments">
				<h5 class="nocomments"><?php esc_html_e( 'No comments yet.', 'logiscargo' ); ?></h5>
			</div>
		<?php } ?>

<?php
	} // End IF Statement

	/* The Respond Form. Uses filters in the theme-functions.php file to customise the form HTML. */
	if ( comments_open() )
		comment_form();
?>
<div class="fix"></div>
</div><!-- /.comments-box -->
<!-- Yes there is intentional extra div on this page/ see line 24 -->