WordPress.org

Make WordPress Core

Changeset 3861


Ignore:
Timestamp:
06/10/06 21:23:19 (8 years ago)
Author:
ryan
Message:

User UI tweaks from Mark Jaquith. #2793

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/users.php

    r3859 r3861  
    205205        $total_users_for_this_query = $wpdb->get_var('SELECT COUNT(ID) ' . $from_where); // no limit 
    206206    else 
    207         $errors = new WP_Error('no_matching_users_found', __('No matching users were found!')); 
     207        $search_errors = new WP_Error('no_matching_users_found', __('No matching users were found!')); 
    208208 
    209209    // Now for the paging 
     
    283283 
    284284<div class="wrap"> 
    285     <h2><?php _e('Search For Users'); ?></h2> 
     285 
     286    <?php if ( $search_term ) : ?> 
     287        <h2><?php printf(__('Users Matching "%s" by Role'), $search_term); ?></h2> 
     288    <?php else : ?> 
     289        <h2><?php _e('User List by Role'); ?></h2> 
     290    <?php endif; ?> 
     291 
    286292    <form action="" method="get" name="search" id="search"> 
    287         <p><input type="text" name="usersearch" id="usersearch" value="<?php echo wp_specialchars($search_term); ?>" /> <input type="submit" value="Search &raquo;" /></p> 
     293        <p><input type="text" name="usersearch" id="usersearch" value="<?php echo wp_specialchars($search_term); ?>" /> <input type="submit" value="<?php _e('Search for users &raquo;'); ?>" /></p> 
    288294    </form> 
     295 
     296    <?php if ( is_wp_error( $search_errors ) ) : ?> 
     297        <div class="error"> 
     298            <ul> 
     299            <?php 
     300                foreach ( $search_errors->get_error_messages() as $message ) 
     301                    echo "<li>$message</li>"; 
     302            ?> 
     303            </ul> 
     304        </div> 
     305    <?php endif; ?> 
     306 
     307 
     308<?php if ( $userids ) : ?> 
     309 
    289310    <?php if ( $search_term ) : ?> 
    290311        <p><a href="users.php"><?php _e('&laquo; Back to All Users'); ?></a></p> 
    291312    <?php endif; ?> 
    292 </div> 
    293  
    294 <?php if ( $userids ) : ?> 
     313 
     314    <h3><?php printf(__('Results %1$s - %2$s of %3$s shown below'), $starton + 1, min($starton + $users_per_page, $total_users_for_this_query), $total_users_for_this_query); ?></h3> 
     315 
     316    <?php if ( $paging_text ) : ?> 
     317        <div class="user-paging-text"><?php echo $paging_text; ?></p></div> 
     318    <?php endif; ?> 
    295319 
    296320<form action="" method="post" name="updateusers" id="updateusers"> 
    297321<?php wp_nonce_field('bulk-users') ?> 
    298 <div class="wrap"> 
    299     <?php if ( $search_term ) : ?> 
    300         <h2><?php printf(__('Users Matching "%s" by Role'), $search_term); ?></h2> 
    301         <div class="user-paging-text"><?php echo $paging_text; ?></div> 
    302     <?php else : ?> 
    303         <h2><?php _e('User List by Role'); ?></h2> 
    304         <?php if ( $paging_text ) : ?> 
    305             <div class="user-paging-text"><?php echo $paging_text; ?></p></div> 
    306         <?php endif; ?> 
    307     <?php endif; ?> 
    308     <h3><?php printf(__('Results %1$s - %2$s of %3$s shown below'), $starton + 1, min($starton + $users_per_page, $total_users_for_this_query), $total_users_for_this_query); ?></h3> 
    309322<table class="widefat"> 
    310323<?php 
     
    357370        <input type="submit" value="<?php _e('Update &raquo;'); ?>" /> 
    358371    </p> 
     372</form> 
     373<?php endif; ?> 
    359374</div> 
    360 </form> 
    361  
    362 <?php endif; // if users were returned ?> 
    363375 
    364376<?php 
Note: See TracChangeset for help on using the changeset viewer.