Manage Users styling updates

git-svn-id: http://svn.automattic.com/wordpress/trunk@6852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-02-14 20:15:36 +00:00
parent 5ed843d6d8
commit ab3dab56b0
2 changed files with 16 additions and 19 deletions

View File

@ -519,23 +519,25 @@ function user_row( $user_object, $style = '', $role = '' ) {
if ( strlen( $short_url ) > 35 )
$short_url = substr( $short_url, 0, 32 ).'...';
$numposts = get_usernumposts( $user_object->ID );
if ( current_user_can( 'edit_user', $user_object->ID ) ) {
$edit = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
$edit = "<a href=\"$edit\">$user_object->user_login</a>";
} else {
$edit = $user_object->user_login;
}
$r = "<tr id='user-$user_object->ID'$style>
<td><input type='checkbox' name='users[]' id='user_{$user_object->ID}' class='$role' value='{$user_object->ID}' /></td>
<td><label for='user_{$user_object->ID}'>{$user_object->ID}</label></td>
<td><label for='user_{$user_object->ID}'><strong>$user_object->user_login</strong></label></td>
<td><label for='user_{$user_object->ID}'>$user_object->first_name $user_object->last_name</label></td>
<td><strong>$edit</strong></td>
<td>$user_object->first_name $user_object->last_name</td>
<td><a href='mailto:$email' title='" . sprintf( __('e-mail: %s' ), $email ) . "'>$email</a></td>
<td><a href='$url' title='website: $url'>$short_url</a></td>";
$r .= "\n\t\t<td align='center'>";
$r .= "\n\t\t<td>";
if ( $numposts > 0 ) {
$r .= "<a href='edit.php?author=$user_object->ID' title='" . __( 'View posts by this author' ) . "' class='edit'>";
$r .= sprintf(__ngettext( 'View %s post', 'View %s posts', $numposts ), $numposts);
$r .= $numposts;
$r .= '</a>';
}
$r .= "</td>\n\t\t<td>";
if ( current_user_can( 'edit_user', $user_object->ID ) ) {
$edit_link = add_query_arg( 'wp_http_referer', urlencode( clean_url( stripslashes( $_SERVER['REQUEST_URI'] ) ) ), "user-edit.php?user_id=$user_object->ID" );
$r .= "<a href='$edit_link' class='edit'>".__( 'Edit' )."</a>";
} else {
$r .= 0;
}
$r .= "</td>\n\t</tr>";
return $r;

View File

@ -292,13 +292,11 @@ foreach($roleclasses as $role => $roleclass) {
</tr>
<tr class="thead">
<th><input type="checkbox" onclick="checkAllUsers('<?php echo $role; ?>')"/> </th>
<th><?php _e('ID') ?></th>
<th><?php _e('Username') ?></th>
<th><?php _e('Name') ?></th>
<th><?php _e('E-mail') ?></th>
<th><?php _e('Website') ?></th>
<th><?php _e('Posts created') ?></th>
<th colspan="2" style="text-align: center"><?php _e('Actions') ?></th>
<th><?php _e('Posts') ?></th>
</tr>
</tbody>
<tbody id="role-<?php echo $role; ?>" class="list:user user-list"><?php
@ -356,8 +354,6 @@ foreach ( (array) $roleclass as $user_object ) {
<?php endif; ?>
<div id="ajax-response"></div>
<div class="narrow">
<?php
if ( get_option('users_can_register') )
echo '<p>' . sprintf(__('Users can <a href="%1$s">register themselves</a> or you can manually create users here.'), get_option('siteurl').'/wp-register.php') . '</p>';
@ -366,10 +362,10 @@ foreach ( (array) $roleclass as $user_object ) {
?>
<form action="#add-new-user" method="post" name="adduser" id="adduser" class="add:user-list:">
<?php wp_nonce_field('add-user') ?>
<table class="editform" width="100%" cellspacing="2" cellpadding="5">
<table class="niceblue">
<tr class="form-field form-required">
<th scope="row" width="33%"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th>
<td width="66%"><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>
<th scope="row"><?php _e('Username (required)') ?><input name="action" type="hidden" id="action" value="adduser" /></th>
<td ><input name="user_login" type="text" id="user_login" value="<?php echo $new_user_login; ?>" /></td>
</tr>
<tr class="form-field">
<th scope="row"><?php _e('First Name') ?> </th>
@ -420,7 +416,6 @@ foreach ( (array) $roleclass as $user_object ) {
</tbody>
</table>
</div>
</div>
<?php