Make WordPress Core

Changeset 6852


Ignore:
Timestamp:
02/14/2008 08:15:36 PM (17 years ago)
Author:
ryan
Message:

Manage Users styling updates

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r6849 r6852  
    520520        $short_url =  substr( $short_url, 0, 32 ).'...';
    521521    $numposts = get_usernumposts( $user_object->ID );
     522    if ( current_user_can( 'edit_user', $user_object->ID ) ) {
     523        $edit = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
     524        $edit = "<a href=\"$edit\">$user_object->user_login</a>";
     525    } else {
     526        $edit = $user_object->user_login;
     527    }
    522528    $r = "<tr id='user-$user_object->ID'$style>
    523529        <td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></td>
    524         <td><label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>
    525         <td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td>
    526         <td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
     530        <td><strong>$edit</strong></td>
     531        <td>$user_object->first_name $user_object->last_name</td>
    527532        <td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td>
    528533        <td><a href='$url' title='website: $url'>$short_url</a></td>";
    529     $r .= "\n\t\t<td align='center'>";
     534    $r .= "\n\t\t<td>";
    530535    if ( $numposts > 0 ) {
    531536        $r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>";
    532         $r .= sprintf(__ngettext( 'View %s post', 'View %s posts', $numposts ), $numposts);
     537        $r .= $numposts;
    533538        $r .= '</a>';
    534     }
    535     $r .= "</td>\n\t\t<td>";
    536     if ( current_user_can( 'edit_user', $user_object->ID ) ) {
    537         $edit_link = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
    538         $r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>";
     539    } else {
     540        $r .= 0;
    539541    }
    540542    $r .= "</td>\n\t</tr>";
  • trunk/wp-admin/users.php

    r6776 r6852  
    293293<tr class="thead">
    294294    <th><input type="checkbox" onclick="checkAllUsers('<?php echo $role; ?>')"/> </th>
    295     <th><?php _e('ID') ?></th>
    296295    <th><?php _e('Username') ?></th>
    297296    <th><?php _e('Name') ?></th>
    298297    <th><?php _e('E-mail') ?></th>
    299298    <th><?php _e('Website') ?></th>
    300     <th><?php _e('Posts created') ?></th>
    301     <th colspan="2" style="text-align: center"><?php _e('Actions') ?></th>
     299    <th><?php _e('Posts') ?></th>
    302300</tr>
    303301</tbody>
     
    357355<div id="ajax-response"></div>
    358356
    359 <div class="narrow">
    360 
    361357<?php
    362358    if ( get_option('users_can_register') )
     
    367363<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:user-list:">
    368364<?php wp_nonce_field('add-user') ?>
    369 <table class="editform" width="100%" cellspacing="2" cellpadding="5">
     365<table class="niceblue">
    370366    <tr class="form-field form-required">
    371         <th scope="row" width="33%"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th>
    372         <td width="66%"><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>
     367        <th scope="row"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th>
     368        <td ><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>
    373369    </tr>
    374370    <tr class="form-field">
     
    422418
    423419</div>
    424 </div>
    425420
    426421<?php
Note: See TracChangeset for help on using the changeset viewer.