mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 09:07:59 +01:00
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']) ?>" />
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($posts) { ?>
|
||||
|
||||
<div class="tablenav">
|
||||
|
||||
<?php
|
||||
@ -208,10 +210,6 @@ if ( $page_links ) : ?>
|
||||
|
||||
<div class="clear"></div>
|
||||
|
||||
<?php
|
||||
|
||||
if ($posts) {
|
||||
?>
|
||||
<table class="widefat page fixed" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
@ -248,21 +246,19 @@ if ( $page_links )
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<?php } else { ?>
|
||||
<div class="clear"></div>
|
||||
<p><?php _e('No pages found.') ?></p>
|
||||
<?php
|
||||
} // end if ($posts)
|
||||
?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php inline_edit_row( 'page' ) ?>
|
||||
|
||||
<div id="ajax-response"></div>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
</form>
|
||||
<p><?php _e('No pages found.') ?></p>
|
||||
<?php
|
||||
} // end if ($posts)
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
|
@ -22,16 +22,6 @@ if ( ! defined('ABSPATH') ) die();
|
||||
</tfoot>
|
||||
|
||||
<tbody>
|
||||
<?php
|
||||
if ( have_posts() ) {
|
||||
post_rows();
|
||||
} else {
|
||||
?>
|
||||
<tr>
|
||||
<td colspan="8"><?php _e('No posts found.') ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
} // end if ( have_posts() )
|
||||
?>
|
||||
<?php post_rows(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
@ -119,6 +119,7 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated'
|
||||
<?php } ?>
|
||||
|
||||
<form id="posts-filter" action="" method="get">
|
||||
|
||||
<ul class="subsubsub">
|
||||
<?php
|
||||
if ( empty($locked_post_status) ) :
|
||||
@ -159,6 +160,8 @@ endif;
|
||||
<?php endif; ?>
|
||||
<input type="hidden" name="mode" value="<?php echo $mode; ?>" />
|
||||
|
||||
<?php if ( have_posts() ) { ?>
|
||||
|
||||
<div class="tablenav">
|
||||
<?php
|
||||
$page_links = paginate_links( array(
|
||||
@ -264,6 +267,11 @@ if ( $page_links )
|
||||
<br class="clear" />
|
||||
</div>
|
||||
|
||||
<?php } else { // have_posts() ?>
|
||||
<div class="clear"></div>
|
||||
<p><?php _e('No posts found') ?></p>
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
|
||||
<?php inline_edit_row( 'post' ); ?>
|
||||
|
Loading…
Reference in New Issue
Block a user