Improve presentation when there are no available themes. Props solarissmoke, garyc40. fixes #16196
git-svn-id: http://svn.automattic.com/wordpress/trunk@17303 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
e4ea521ff6
commit
d0e923486b
File diff suppressed because one or more lines are too long
|
@ -3580,6 +3580,10 @@ span.imgedit-scale-warn {
|
|||
16.0 - Themes
|
||||
------------------------------------------------------------------------------*/
|
||||
|
||||
.theme-install-php .tablenav {
|
||||
height:auto;
|
||||
}
|
||||
|
||||
table#availablethemes {
|
||||
border-spacing: 0;
|
||||
border-width: 1px 0;
|
||||
|
@ -3588,6 +3592,11 @@ table#availablethemes {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
table#availablethemes .no-items td{
|
||||
border-width:0;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
td.available-theme {
|
||||
vertical-align: top;
|
||||
width: 240px;
|
||||
|
|
|
@ -140,7 +140,7 @@ class WP_Theme_Install_List_Table extends WP_List_Table {
|
|||
|
||||
<table id="availablethemes" cellspacing="0" cellpadding="0">
|
||||
<tbody id="the-list" class="list:themes">
|
||||
<?php $this->display_rows(); ?>
|
||||
<?php $this->display_rows_or_placeholder(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -61,6 +61,11 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
}
|
||||
|
||||
function no_items() {
|
||||
if ( $this->search || $this->features ) {
|
||||
_e( 'No items found.' );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( is_multisite() ) {
|
||||
if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
|
||||
printf( __( 'You only have one theme enabled for this site right now. Visit the Network Admin to <a href="%1$s">enable</a> or <a href="%2$s">install</a> more themes.' ), network_admin_url( 'site-themes.php?id=' . $GLOBALS['blog_id'] ), network_admin_url( 'theme-install.php' ) );
|
||||
|
@ -82,28 +87,31 @@ class WP_Themes_List_Table extends WP_List_Table {
|
|||
// Fallthrough.
|
||||
printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
|
||||
}
|
||||
|
||||
function tablenav( $which = 'top' ) {
|
||||
if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
|
||||
return;
|
||||
?>
|
||||
<div class="tablenav <?php echo $which; ?>">
|
||||
<?php $this->pagination( $which ); ?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
function display() {
|
||||
|
||||
wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
|
||||
?>
|
||||
<div class="tablenav top">
|
||||
<?php $this->pagination( 'top' ); ?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php $this->tablenav( 'top' ); ?>
|
||||
|
||||
<table id="availablethemes" cellspacing="0" cellpadding="0">
|
||||
<tbody id="the-list" class="list:themes">
|
||||
<?php $this->display_rows(); ?>
|
||||
<?php $this->display_rows_or_placeholder(); ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="tablenav bottom">
|
||||
<?php $this->pagination( 'bottom' ); ?>
|
||||
<img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
|
||||
<br class="clear" />
|
||||
</div>
|
||||
<?php $this->tablenav( 'bottom' ); ?>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue