<?php if ( post_password_required() ) : ?>
<p class="nocomments"><?php _e( 'This post is password protected. Enter the password to view comments.', 'vigilance' ); ?></p>
<?php
return;
endif; ?>
<div id="comments">
<?php if ( have_comments() ) : ?>
<div class="comment-number clear">
<span><?php comments_number( __( 'No Responses', 'vigilance' ), __( 'One Response', 'vigilance' ), __( '% Responses', 'vigilance' )); ?></span>
<?php if ( comments_open() ) : ?>
<a id="leavecomment" href="#respond" title="<?php esc_attr_e( 'Post a comment', 'vigilance' ); ?>"> <?php _e( 'Post a comment', 'vigilance' ); ?></a>
<?php endif; ?>
</div><!--end comment-number-->
<ol class="commentlist">
<?php wp_list_comments( 'type=comment&callback=vigilance_custom_comment' ); ?>
</ol>
<div class="navigation clear">
<div class="alignleft"><?php next_comments_link(__( '« Older Comments', 'vigilance' )); ?></div>
<div class="alignright"><?php previous_comments_link(__( 'Newer Comments »', 'vigilance' )); ?></div>
</div>
<?php if ( ! empty($comments_by_type['pings']) ) : ?>
<h3 class="pinghead"><?php _e( 'Trackbacks & Pingbacks', 'vigilance' ); ?></h3>
<ol class="pinglist">
<?php wp_list_comments( 'type=pings&callback=vigilance_list_pings' ); ?>
</ol>
<div class="navigation clear">
<div class="alignleft"><?php next_comments_link(__( '« Older Pingbacks', 'vigilance' )); ?></div>
<div class="alignright"><?php previous_comments_link(__( 'Newer Pingbacks »', 'vigilance' )); ?></div>
</div>
<?php endif; ?>
<?php if ( ! comments_open() ) : ?>
<p class="note"><?php _e( 'Comments are closed.', 'vigilance' ); ?></p>
<?php endif; ?>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ( ! comments_open() ) : ?>
<?php if ( ! is_page()) : ?>
<!-- If comments are open, but there are no comments. -->
<div class="comment-number">
<span><?php _e( 'No comments yet', 'vigilance' ); ?></span>
</div>
<p class="note"><?php _e( 'Comments are closed.', 'vigilance' ); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div><!--end comments-->
<?php comment_form(); ?>