Don't show tables when no posts or pages are found. fixes #8346
git-svn-id: http://svn.automattic.com/wordpress/trunk@9891 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ab9ce8cf02
commit
dc09b4efa6
|
@ -165,6 +165,8 @@ endif;
|
||||||
<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" />
|
<input type="hidden" name="post_status" value="<?php echo attribute_escape($_GET['post_status']) ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php if ($posts) { ?>
|
||||||
|
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -208,10 +210,6 @@ if ( $page_links ) : ?>
|
||||||
|
|
||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
if ($posts) {
|
|
||||||
?>
|
|
||||||
<table class="widefat page fixed" cellspacing="0">
|
<table class="widefat page fixed" cellspacing="0">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -248,21 +246,19 @@ if ( $page_links )
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php } else { ?>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<p><?php _e('No pages found.') ?></p>
|
||||||
|
<?php
|
||||||
|
} // end if ($posts)
|
||||||
|
?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php inline_edit_row( 'page' ) ?>
|
<?php inline_edit_row( 'page' ) ?>
|
||||||
|
|
||||||
<div id="ajax-response"></div>
|
<div id="ajax-response"></div>
|
||||||
|
|
||||||
<?php
|
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
</form>
|
|
||||||
<p><?php _e('No pages found.') ?></p>
|
|
||||||
<?php
|
|
||||||
} // end if ($posts)
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,6 @@ if ( ! defined('ABSPATH') ) die();
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php post_rows(); ?>
|
||||||
if ( have_posts() ) {
|
|
||||||
post_rows();
|
|
||||||
} else {
|
|
||||||
?>
|
|
||||||
<tr>
|
|
||||||
<td colspan="8"><?php _e('No posts found.') ?></td>
|
|
||||||
</tr>
|
|
||||||
<?php
|
|
||||||
} // end if ( have_posts() )
|
|
||||||
?>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
|
@ -119,6 +119,7 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated'
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
<form id="posts-filter" action="" method="get">
|
<form id="posts-filter" action="" method="get">
|
||||||
|
|
||||||
<ul class="subsubsub">
|
<ul class="subsubsub">
|
||||||
<?php
|
<?php
|
||||||
if ( empty($locked_post_status) ) :
|
if ( empty($locked_post_status) ) :
|
||||||
|
@ -159,6 +160,8 @@ endif;
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
|
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
|
||||||
|
|
||||||
|
<?php if ( have_posts() ) { ?>
|
||||||
|
|
||||||
<div class="tablenav">
|
<div class="tablenav">
|
||||||
<?php
|
<?php
|
||||||
$page_links = paginate_links( array(
|
$page_links = paginate_links( array(
|
||||||
|
@ -264,6 +267,11 @@ if ( $page_links )
|
||||||
<br class="clear" />
|
<br class="clear" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<?php } else { // have_posts() ?>
|
||||||
|
<div class="clear"></div>
|
||||||
|
<p><?php _e('No posts found') ?></p>
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php inline_edit_row( 'post' ); ?>
|
<?php inline_edit_row( 'post' ); ?>
|
||||||
|
|
Loading…
Reference in New Issue