Changeset 3770

Show
Ignore:
Timestamp:
05/10/06 20:35:10 (3 years ago)
Author:
matt
Message:

Lots of style and admin tweaks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/admin-functions.php

    r3759 r3770  
    737737        <td><a href='mailto:$email' title='" . sprintf(__('e-mail: %s'), $email) . "'>$email</a></td> 
    738738        <td><a href='$url' title='website: $url'>$short_url</a></td>"; 
    739     $r .= "\n\t\t<td align='right'>$numposts</td>"; 
     739    $r .= "\n\t\t<td align='center'>$numposts</td>"; 
    740740    $r .= "\n\t\t<td>"; 
    741741    if (current_user_can('edit_users')) 
     
    15601560        return $wp_file_descriptions[basename($file)]; 
    15611561    } 
    1562     elseif (file_exists(ABSPATH.$file)) { 
    1563         $template_data = implode('', file(ABSPATH.$file)); 
     1562    elseif ( file_exists( ABSPATH . $file ) && is_file( ABSPATH . $file ) ) { 
     1563        $template_data = implode('', file( ABSPATH . $file )); 
    15641564        if (preg_match("|Template Name:(.*)|i", $template_data, $name)) 
    15651565            return $name[1]; 
     
    19121912function wp_import_upload_form($action) { 
    19131913?> 
    1914 <script type="text/javascript"> 
    1915 function cancelUpload() { 
    1916 o = document.getElementById('uploadForm'); 
    1917 o.method = 'GET'; 
    1918 o.action.value = 'view'; 
    1919 o.submit(); 
    1920 
    1921 </script> 
    1922 <form enctype="multipart/form-data" id="uploadForm" method="POST" action="<?php echo $action ?>"> 
    1923 <label for="upload"><?php _e('File:'); ?></label><input type="file" id="upload" name="import" /> 
     1914<form enctype="multipart/form-data" id="import-upload-form" method="POST" action="<?php echo $action ?>"> 
     1915<p> 
     1916<label for="upload"><?php _e('Choose a file from your computer:'); ?></label> <input type="file" id="upload" name="import" size="25" /> 
    19241917<input type="hidden" name="action" value="save" /> 
    1925 <div id="buttons"
    1926 <input type="submit" value="<?php _e('Import'); ?>" /
    1927 <input type="button" value="<?php _e('Cancel'); ?>" onclick="cancelUpload()" /> 
    1928 </div
     1918</p
     1919<p class="submit"
     1920<input type="submit" value="<?php _e('Upload file and import'); ?> &raquo;" /> 
     1921</p
    19291922</form> 
    19301923<?php 
     
    19391932 
    19401933    $url = $file['url']; 
    1941     $file = $file['file']
     1934    $file = addslashes( $file['file'] )
    19421935    $filename = basename($file); 
    19431936 
  • trunk/wp-admin/categories.php

    r3759 r3770  
    131131    <h2><?php _e('Categories') ?> </h2> 
    132132<?php endif; ?> 
    133 <table width="100%" cellpadding="3" cellspacing="3"> 
     133<table class="widefat"> 
    134134    <thead> 
    135135    <tr> 
    136136        <th scope="col"><?php _e('ID') ?></th> 
    137         <th scope="col"><?php _e('Name') ?></th> 
    138         <th scope="col"><?php _e('Description') ?></th> 
     137        <th scope="col" style="text-align: left"><?php _e('Name') ?></th> 
     138        <th scope="col" style="text-align: left"><?php _e('Description') ?></th> 
    139139        <th scope="col" width="90"><?php _e('Posts') ?></th> 
    140140        <th scope="col" width="90"><?php _e('Bookmarks') ?></th> 
  • trunk/wp-admin/edit-comments.php

    r3763 r3770  
    4040<div class="wrap"> 
    4141<h2><?php _e('Comments'); ?></h2> 
    42 <form name="searchform" action="" method="get">  
     42<form name="searchform" action="" method="get" id="editcomments">  
    4343  <fieldset>  
    4444  <legend><?php _e('Show Comments That Contain...') ?></legend>  
     
    153153        echo '<form name="deletecomments" id="deletecomments" action="" method="post"> '; 
    154154        wp_nonce_field('bulk-comments'); 
    155         echo '<table width="100%" cellpadding="3" cellspacing="3"> 
     155        echo '<table class="widefat"> 
     156<thead> 
    156157  <tr> 
    157     <th scope="col">*</th> 
    158     <th scope="col">' .  __('Name') . '</th> 
    159     <th scope="col">' .  __('E-mail') . '</th> 
    160     <th scope="col">' . __('IP') . '</th> 
    161     <th scope="col">' . __('Comment Excerpt') . '</th> 
     158    <th scope="col"><input type="checkbox" onclick="checkAll(document.getElementById(\'deletecomments\'));" /></th> 
     159    <th scope="col" style="text-align: left">' .  __('Name') . '</th> 
     160    <th scope="col" style="text-align: left">' .  __('E-mail') . '</th> 
     161    <th scope="col" style="text-align: left">' . __('IP') . '</th> 
     162    <th scope="col" style="text-align: left">' . __('Comment Excerpt') . '</th> 
    162163    <th scope="col" colspan="3">' .  __('Actions') . '</th> 
    163   </tr>'; 
     164  </tr> 
     165</thead>'; 
    164166        foreach ($comments as $comment) { 
    165167        $authordata = get_userdata($wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $comment->comment_post_ID")); 
     
    184186    echo "<a href='comment.php?action=editcomment&amp;comment=$comment->comment_ID' class='edit'>" .  __('Edit') . "</a>"; } ?></td> 
    185187    <td><?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) { 
    186         echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape( $comment->comment_author ))  . "' );\" class='edit'>" . __('Delete') . "</a> "; 
     188        echo "<a href=\"comment.php?action=deletecomment&amp;p=".$comment->comment_post_ID."&amp;comment=".$comment->comment_ID."\" onclick=\"return deleteSomething( 'comment', $comment->comment_ID, '" . sprintf(__("You are about to delete this comment by &quot;%s&quot;.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), js_escape( $comment->comment_author ))  . "' );\" class='delete'>" . __('Delete') . "</a> "; 
    187189        } ?></td> 
    188190  </tr> 
     
    190192        } // end foreach 
    191193    ?></table> 
    192     <p><a href="javascript:;" onclick="checkAll(document.getElementById('deletecomments')); return false; "><?php _e('Invert Checkbox Selection') ?></a></p> 
    193             <p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n  \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 
     194<p class="submit"><input type="submit" name="delete_button" value="<?php _e('Delete Checked Comments &raquo;') ?>" onclick="var numchecked = getNumChecked(document.getElementById('deletecomments')); if(numchecked < 1) { alert('<?php _e("Please select some comments to delete"); ?>'); return false } return confirm('<?php printf(__("You are about to delete %s comments permanently \\n  \'Cancel\' to stop, \'OK\' to delete."), "' + numchecked + '"); ?>')" /> 
    194195            <input type="submit" name="spam_button" value="<?php _e('Mark Checked Comments as Spam &raquo;') ?>" onclick="return confirm('<?php _e("You are about to mark these comments as spam \\n  \'Cancel\' to stop, \'OK\' to mark as spam.") ?>')" /></p> 
    195196  </form> 
  • trunk/wp-admin/edit-pages.php

    r3727 r3770  
    2929if ($posts) { 
    3030?> 
    31 <table width="100%" cellpadding="3" cellspacing="3">  
     31<table class="widefat">  
    3232  <thead> 
    3333  <tr> 
    3434    <th scope="col"><?php _e('ID') ?></th> 
    35     <th scope="col"><?php _e('Title') ?></th> 
    36     <th scope="col"><?php _e('Owner') ?></th> 
    37     <th scope="col"><?php _e('Updated') ?></th> 
    38     <th scope="col"></th> 
    39     <th scope="col"></th> 
    40     <th scope="col"></th> 
     35    <th scope="col" style="text-align: left"><?php _e('Title') ?></th> 
     36    <th scope="col" style="text-align: left"><?php _e('Owner') ?></th> 
     37    <th scope="col" style="text-align: left"><?php _e('Updated') ?></th> 
     38    <th scope="col" colspan="3"><?php _e('Action'); ?></th> 
    4139  </tr> 
    4240  </thead> 
  • trunk/wp-admin/edit.php

    r3763 r3770  
    134134?> 
    135135 
    136 <table width="100%" cellpadding="3" cellspacing="3">  
     136<table class="widefat">  
    137137    <thead> 
    138138    <tr> 
     
    186186    case 'comments': 
    187187        ?> 
    188         <td><a href="edit.php?p=<?php echo $id ?>&amp;c=1">  
     188        <td style="text-align: center"><a href="edit.php?p=<?php echo $id ?>&amp;c=1">  
    189189      <?php comments_number(__('0'), __('1'), __('%')) ?>  
    190190      </a></td> 
  • trunk/wp-admin/link-manager.php

    r3759 r3770  
    116116<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" /> 
    117117<input type="hidden" name="cat_id" value="<?php echo (int) $cat_id ?>" /> 
    118 <table width="100%" cellpadding="3" cellspacing="3"> 
     118<table class="widefat"> 
    119119    <thead> 
    120120    <tr> 
    121         <th width="15%"><?php _e('Name') ?></th> 
    122         <th><?php _e('URI') ?></th> 
    123         <th><?php _e('Categories') ?></th> 
     121        <th width="15%" style="text-align: left"><?php _e('Name') ?></th> 
     122        <th style="text-align: left"><?php _e('URI') ?></th> 
     123        <th style="text-align: left"><?php _e('Categories') ?></th> 
    124124        <th><?php _e('rel') ?></th> 
    125125        <th><?php _e('Visible') ?></th> 
  • trunk/wp-admin/plugins.php

    r3759 r3770  
    7979} else { 
    8080?> 
    81 <table width="100%" cellpadding="3" cellspacing="3"> 
     81<table class="widefat"> 
     82    <thead> 
    8283    <tr> 
    83         <th><?php _e('Plugin'); ?></th> 
     84        <th style="text-align: left"><?php _e('Plugin'); ?></th> 
    8485        <th><?php _e('Version'); ?></th> 
    85         <th><?php _e('Description'); ?></th> 
     86        <th style="text-align: left"><?php _e('Description'); ?></th> 
    8687        <th><?php _e('Action'); ?></th> 
    8788    </tr> 
     89    </thead> 
    8890<?php 
    8991    $style = ''; 
  • trunk/wp-admin/users.php

    r3759 r3770  
    210210<div class="wrap"> 
    211211    <h2><?php _e('User List by Role'); ?></h2> 
    212   <table cellpadding="3" cellspacing="3" width="100%"> 
    213     <?php 
    214     foreach($roleclasses as $role => $roleclass) { 
    215         ksort($roleclass); 
    216         ?> 
    217  
    218     <tr> 
    219         <th colspan="8" align="left"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th> 
    220     </tr> 
    221     <tr> 
    222         <th><?php _e('ID') ?></th> 
    223         <th><?php _e('Username') ?></th> 
    224         <th><?php _e('Name') ?></th> 
    225         <th><?php _e('E-mail') ?></th> 
    226         <th><?php _e('Website') ?></th> 
    227         <th><?php _e('Posts') ?></th> 
    228         <th>&nbsp;</th> 
    229     </tr> 
    230     <tbody id="role-<?php echo $role; ?>"><?php 
    231     $style = ''; 
    232     foreach ($roleclass as $user_object) { 
    233         $style = (' class="alternate"' == $style) ? '' : ' class="alternate"'; 
    234         echo "\n\t" . user_row( $user_object, $style ); 
    235     } 
    236  
    237     ?> 
    238  
    239     </tbody> 
    240 <?php 
    241     } 
    242 ?> 
    243   </table> 
     212<table class="widefat"> 
     213<?php 
     214foreach($roleclasses as $role => $roleclass) { 
     215    ksort($roleclass); 
     216?> 
     217 
     218<tr> 
     219    <th colspan="8" align="left"><h3><?php echo $wp_roles->role_names[$role]; ?></h3></th> 
     220</tr> 
     221<thead> 
     222<tr> 
     223    <th style="text-align: left"><?php _e('ID') ?></th> 
     224    <th style="text-align: left"><?php _e('Username') ?></th> 
     225    <th style="text-align: left"><?php _e('Name') ?></th> 
     226    <th style="text-align: left"><?php _e('E-mail') ?></th> 
     227    <th style="text-align: left"><?php _e('Website') ?></th> 
     228    <th><?php _e('Posts') ?></th> 
     229    <th>&nbsp;</th> 
     230</tr> 
     231</thead> 
     232<tbody id="role-<?php echo $role; ?>"><?php 
     233$style = ''; 
     234foreach ($roleclass as $user_object) { 
     235    $style = (' class="alternate"' == $style) ? '' : ' class="alternate"'; 
     236    echo "\n\t" . user_row( $user_object, $style ); 
     237
     238 
     239?> 
     240 
     241</tbody> 
     242<?php 
     243
     244?> 
     245</table> 
    244246 
    245247 
  • trunk/wp-admin/wp-admin.css

    r3725 r3770  
    3939    height: 6em; 
    4040    overflow: hidden; 
     41} 
     42 
     43.widefat { 
     44    width: 100%; 
     45} 
     46 
     47.widefat td, .widefat th { 
     48    padding: 5px 6px; 
     49} 
     50 
     51.import-system { 
     52    font-size: 16px; 
     53} 
     54 
     55thead { 
     56    background: #dfdfdf 
     57} 
     58 
     59#import-upload-form { 
     60    width: 300px; 
     61    margin: auto; 
     62    text-align: center; 
    4163} 
    4264 
     
    367389} 
    368390 
    369 table .vers, table .name
     391table .vers
    370392    text-align: center; 
    371393} 
  • trunk/wp-includes/functions-post.php

    r3768 r3770  
    349349 
    350350    if ( $file ) 
    351         add_post_meta($post_ID, '_wp_attached_file', $file); 
     351        add_post_meta($post_ID, '_wp_attached_file', $file ); 
    352352 
    353353    clean_post_cache($post_ID);