Make WordPress Core


Ignore:
Timestamp:
01/15/2011 12:35:29 AM (14 years ago)
Author:
ryan
Message:

Improve presentation when there are no available themes. Props solarissmoke, garyc40. fixes #16196

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-themes-list-table.php

    r17262 r17303  
    6262
    6363    function no_items() {
     64        if ( $this->search || $this->features ) {
     65            _e( 'No items found.' );
     66            return;
     67        }
     68       
    6469        if ( is_multisite() ) {
    6570            if ( current_user_can( 'install_themes' ) && current_user_can( 'manage_network_themes' ) ) {
     
    8388        printf( __( 'Only the current theme is available to you. Contact the %s administrator for information about accessing additional themes.' ), get_site_option( 'site_name' ) );
    8489    }
     90   
     91    function tablenav( $which = 'top' ) {
     92        if ( $this->get_pagination_arg( 'total_pages' ) <= 1 )
     93            return;
     94        ?>
     95        <div class="tablenav <?php echo $which; ?>">
     96            <?php $this->pagination( $which ); ?>
     97           <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
     98          <br class="clear" />
     99        </div>
     100        <?php
     101    }
    85102
    86103    function display() {
    87 
    88104        wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    89105?>
    90         <div class="tablenav top">
    91             <?php $this->pagination( 'top' ); ?>
    92             <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
    93             <br class="clear" />
    94         </div>
     106        <?php $this->tablenav( 'top' ); ?>
    95107
    96108        <table id="availablethemes" cellspacing="0" cellpadding="0">
    97109            <tbody id="the-list" class="list:themes">
    98                 <?php $this->display_rows(); ?>
     110                <?php $this->display_rows_or_placeholder(); ?>
    99111            </tbody>
    100112        </table>
    101113
    102         <div class="tablenav bottom">
    103             <?php $this->pagination( 'bottom' ); ?>
    104             <img src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" class="ajax-loading list-ajax-loading" alt="" />
    105             <br class="clear" />
    106         </div>
     114        <?php $this->tablenav( 'bottom' ); ?>
    107115<?php
    108116    }
Note: See TracChangeset for help on using the changeset viewer.