Make WordPress Core

Changeset 6778


Ignore:
Timestamp:
02/10/2008 08:10:11 AM (17 years ago)
Author:
matt
Message:

New manage posts almost fully functional, and some admin CSS reorganization. TODO: Delete buttons and checkboxes are currently impotent.

Location:
trunk/wp-admin
Files:
2 added
6 edited

Legend:

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

    r6606 r6778  
    1515<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />
    1616<title><?php bloginfo('name') ?> &rsaquo; <?php echo wp_specialchars( strip_tags( $title ) ); ?> &#8212; WordPress</title>
    17 <?php wp_admin_css(); ?>
     17<?php
     18wp_admin_css( 'css/global' );
     19wp_admin_css();
     20?>
    1821<script type="text/javascript">
    1922//<![CDATA[
  • trunk/wp-admin/edit-post-rows.php

    r6550 r6778  
    2323$post_owner = ( $current_user->ID == $post->post_author ? 'self' : 'other' );
    2424?>
    25     <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>'>
     25    <tr id='post-<?php echo $id; ?>' class='<?php echo trim( $class . ' author-' . $post_owner . ' status-' . $post->post_status ); ?>' valign="top">
    2626
    2727<?php
     
    3131    switch($column_name) {
    3232
    33     case 'id':
     33    case 'cb':
    3434        ?>
    35         <th scope="row" style="text-align: center"><?php echo $id ?></th>
     35        <th scope="row" style="text-align: center"><input type="checkbox" name="delete[]" value="<?php the_ID(); ?>" /></th>
    3636        <?php
    3737        break;
    3838    case 'modified':
    3939        ?>
    40         <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Never'); else the_modified_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?></td>
     40        <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Never'); else the_modified_time(__('Y/m/d \<\b\r \/\> g:i:s a')); ?></td>
    4141        <?php
    4242        break;
    4343    case 'date':
    4444        ?>
    45         <td><?php if ( '0000-00-00 00:00:00' ==$post->post_date) _e('Unpublished'); else the_time(__('Y-m-d \<\b\r \/\> g:i:s a')); ?></td>
     45        <td><a href="<?php the_permalink(); ?>" rel="permalink">
     46        <?php
     47        if ( '0000-00-00 00:00:00' ==$post->post_date ) {
     48            _e('Unpublished');
     49        } else {
     50            if ( ( time() - get_post_time() ) < 86400 )
     51                echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
     52            else
     53                the_time(__('Y/m/d'));
     54        }
     55        ?></a></td>
    4656        <?php
    4757        break;
    4858    case 'title':
    4959        ?>
    50         <td><?php the_title() ?>
    51         <?php if ('private' == $post->post_status) _e(' - <strong>Private</strong>'); ?></td>
     60        <td><strong><a href="post.php?action=edit&post=<?php the_ID(); ?>"><?php the_title() ?></a></strong>
     61        <?php if ('private' == $post->post_status) _e(' &#8212; <strong>Private</strong>'); ?></td>
    5262        <?php
    5363        break;
     
    5565    case 'categories':
    5666        ?>
    57         <td><?php the_category(','); ?></td>
     67        <td><?php
     68        $categories = get_the_category();
     69        if ( !empty( $categories ) ) {
     70            $out = array();
     71            foreach ( $categories as $c )
     72                $out[] = "<a href='edit.php?category_name=$c->slug'> " . wp_specialchars( $c->name) . "</a>";
     73            echo join( ', ', $out );
     74        } else {
     75            _e('Uncategorized');
     76        }
     77        ?></td>
     78        <?php
     79        break;
     80
     81    case 'tags':
     82        ?>
     83        <td><?php
     84        $tags = get_the_tags();
     85        if ( !empty( $tags ) ) {
     86            $out = array();
     87            foreach ( $tags as $c )
     88                $out[] = "<a href='edit.php?tag=$c->slug'> " . wp_specialchars( $c->name) . "</a>";
     89            echo join( ', ', $out );
     90        } else {
     91            _e('No Tags');
     92        }
     93        ?></td>
    5894        <?php
    5995        break;
     
    67103        if ( $left )
    68104            echo '<strong>';
    69         comments_number("<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'>" . __('0') . '</a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'>" . __('1') . '</a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count'>" . __('%') . '</a>');
     105        comments_number("<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('0') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('1') . '</span></a>', "<a href='edit.php?p=$id&amp;c=1' title='$pending_phrase' class='post-com-count comment-count'><span>" . __('%') . '</span></a>');
    70106        if ( $left )
    71107            echo '</strong>';
     
    77113    case 'author':
    78114        ?>
    79         <td><?php the_author() ?></td>
     115        <td><a href="edit.php?author=<?php the_author_ID(); ?>"><?php the_author() ?></a></td>
     116        <?php
     117        break;
     118
     119    case 'status':
     120        ?>
     121        <td>
     122        <?php
     123        switch ( $post->post_status ) {
     124            case 'publish' :
     125            case 'private' :
     126                _e('Published');
     127                break;
     128            case 'future' :
     129                _e('Scheduled');
     130                break;
     131            case 'pending' :
     132                _e('Pending Review');
     133                break;
     134            case 'draft' :
     135                _e('Unpublished');
     136                break;
     137        }
     138        ?>
     139        </td>
    80140        <?php
    81141        break;
  • trunk/wp-admin/edit.php

    r6755 r6778  
    109109
    110110<div style="float: left">
     111<input type="button" value="<?php _e('Delete'); ?>" name="deleteit" />
    111112<?php
    112113
     
    164165    echo "<div class='tablenav-pages'>$page_links</div>";
    165166?>
    166 
    167 </div>
    168 
    169 <div class="navigation">
    170 <div class="alignleft"><?php next_posts_link(__('&laquo; Older Entries')) ?></div>
    171 <div class="alignright"><?php previous_posts_link(__('Newer Entries &raquo;')) ?></div>
     167<br style="clear:both;" />
    172168</div>
    173169
  • trunk/wp-admin/includes/template.php

    r6776 r6778  
    303303function wp_manage_posts_columns() {
    304304    $posts_columns = array();
    305     $posts_columns['id'] = '<div style="text-align: center">' . __('ID') . '</div>';
     305    $posts_columns['cb'] = '<div style="text-align: center"><input type="checkbox" name="TODO" /></div>';
    306306    if ( 'draft' === $_GET['post_status'] )
    307307        $posts_columns['modified'] = __('Modified');
     
    309309        $posts_columns['modified'] = __('Submitted');
    310310    else
    311         $posts_columns['date'] = __('When');
     311        $posts_columns['date'] = __('Date');
    312312    $posts_columns['title'] = __('Title');
     313    $posts_columns['author'] = __('Author');
    313314    $posts_columns['categories'] = __('Categories');
     315    $posts_columns['tags'] = __('Tags');
    314316    if ( !in_array($_GET['post_status'], array('pending', 'draft', 'future')) )
    315         $posts_columns['comments'] = '<div style="text-align: center">' . __('Comments') . '</div>';
    316     $posts_columns['author'] = __('Author');
     317        $posts_columns['comments'] = '<div style="text-align: center"><img alt="" src="images/comment-grey-bubble.png" /></div>';
     318    $posts_columns['status'] = __('Status');
    317319    $posts_columns = apply_filters('manage_posts_columns', $posts_columns);
    318320
    319     // you can not edit these at the moment
    320     $posts_columns['control_view']   = '';
    321     $posts_columns['control_edit']   = '';
    322     $posts_columns['control_delete'] = '';
    323321
    324322    return $posts_columns;
  • trunk/wp-admin/wp-admin.css

    r6755 r6778  
    1 * html #poststuff {
    2     height: 100%; /* kill peekaboo bug in IE */
    3 }
    4 
    5 /* This is the Holly Hack \*/
    6 * html .wrap { height: 1% }
    7 /* For Win IE's eyes only */
    8 
    9 a {
    10     color: #2583ad;
    11     text-decoration: none;
    12 }
     1
     2
    133
    144a.delete:hover {
     
    177}
    188
    19 .wrap {
    20     margin: 0;
    21     padding: 0;
    22     margin-left: 15px;
    23     margin-right: 25%;
    24 }
    25 
    26 .wrap h2 {
    27     font: 24px Georgia, "Times New Roman", Times, serif;
    28     color: #666;
    29     border-bottom: 1px solid #dadada;
    30     padding: 0;
    31     margin: 0 0 0 -5px;
    32     padding-bottom: 5px;
    33     clear: both;
    34 }
    35 
    36 .widefat {
    37     width: 100%;
    38 }
    39 
    40 .widefat td, .widefat th {
    41     padding: 5px 6px;
    42 }
    43 
    44 .widefat th {
    45     text-align: left;
    46 }
     9
    4710
    4811.plugins p {
     
    5720.import-system {
    5821    font-size: 16px;
    59 }
    60 
    61 thead, .thead {
    62     background: #dfdfdf
    6322}
    6423
     
    6928}
    7029
    71 a.view, a.edit, a.delete, a.view:hover, a.edit:hover, a.delete:hover {
    72     border-bottom: none;
    73     display: block;
    74     padding: 5px 0;
    75     text-align: center;
    76 }
    77 
    78 a.view:hover, a.edit:hover {
    79     background: #ccc;
    80     color: #036;
    81 }
    82 
    83 a:visited {
    84     color: #004;
    85 }
    86 
    87 a:hover {
    88     color: #069;
    89 }
    90 
    91 body    {
    92     background: #fff;
    93     color: #333;
    94     margin: 0;
    95     padding: 0;
    96 }
    97 
    98 body, td {
    99     font: 13px "Lucida Grande", "Lucida Sans Unicode", Tahoma, Verdana, sans-serif;
    100 }
    101 
    102 fieldset.options {
    103     padding: 1em;
    104 }
    105 
    106 fieldset.options legend {
    107     font-size: 1.5em;
    108     font-weight: bold;
    109     font-family: Georgia, "Times New Roman", Times, serif;
    110 }
    111 
    112 form, label input {
    113     margin: 0;
    114     padding: 0;
    115 }
    116 
    117 img {
    118     border: 0;
    119 }
    120 
    12130.form-invalid {
    12231    background-color: #FF9999 !important;
    123 }
    124 
    125 label {
    126     cursor: pointer;
    127 }
    128 
    129 li, dd {
    130     margin-bottom: 6px;
    131 }
    132 
    133 p, li, dl, dd, dt {
    134     line-height: 140%;
    135 }
    136 
    137 textarea, input, select {
    138     font: 13px Verdana, Arial, Helvetica, sans-serif;
    139     margin: 1px;
    140     padding: 3px;
    14132}
    14233
     
    16455    width: 1px; /* hug */
    16556    text-align: center;
    166 }
    167 
    168 .alignleft {
    169     float: left
    170 }
    171 
    172 .alignright {
    173     float: right;
    174 }
    175 
    176 .alternate {
    177     background: #f1f1f1;
    17857}
    17958
     
    237116}
    238117
    239 .clear {
    240     clear: both;
    241     height: 2px;
    242 }
    243 
    244 .hidden {
    245     display: none;
    246 }
    247 
    248 .navigation {
    249     display: block;
    250     text-align: center;
    251     margin-top: 10px;
    252     margin-bottom: 30px;
    253 }
    254 
    255118.post-categories {
    256119    display: inline;
     
    314177    padding: 0 15px;
    315178    margin-bottom: 20px;
    316     margin-right: 25%;
     179    margin-right: 15%;
    317180}
    318181
     
    456319}
    457320
    458 #login {
    459     position: relative;
    460     background: url('images/login-bkg-tile.gif') no-repeat top center;
    461     color: #fff;
    462     margin: 5em auto 1em;
    463     padding: 20px 0 0;
    464     width: 425px;
    465     _width: 390px;
    466 }
    467 
    468 #login form {
    469     background: url('images/login-bkg-bottom.gif') no-repeat bottom center;
    470     padding: 0 50px 25px;
    471     _width: 325px;
    472     _margin: 0 auto;
    473     min-height: 200px;
    474     height: auto !important; /* min-height fast hack */
    475     height: 200px;
    476 }
    477 
    478 #login #login_error {
    479     background: #0e3350;
    480     border: 1px solid #2571ab;
    481     color: #ebcd4e;
    482     font-size: 11px;
    483     font-weight: bold;
    484     padding: .6em;
    485     width: 310px;
    486     margin: 0 50px;
    487     text-align: center;
    488 }
    489 
    490 #login p {
    491     font-size: 12px;
    492 }
    493 
    494 #login p.message {
    495     width: 310px;
    496     margin: 0 auto 1em;
    497 }
    498 
    499 #login #login_error a {
    500     color: #ebcd4e;
    501     border-color: #ebcd4e;
    502 }
    503 
    504 #login #send {
    505     color: #fff;
    506     text-align: left;
    507     font-weight: normal;
    508     font-size: 1.1em;
    509     _width: 325px;
    510     _margin: 0 auto 15px;
    511 }
    512 
    513 #login h1 a {
    514     margin: 0 auto;
    515     height: 88px;
    516     width: 320px;
    517     display: block;
    518     border-bottom: none;
    519     text-indent: -9999px;
    520 }
    521 
    522 #login .message {
    523     font-size: 10pt;
    524     text-align: center;
    525 }
    526 
    527 #login .register {
    528     font-size: 20px;
    529 }
    530 
    531 #login input {
    532     padding: 4px;
    533 }
    534 
    535 .login ul, #protected #login .bottom {
    536     list-style: none;
    537     width: 325px;
    538     margin: 0 auto;
    539     padding: 0;
    540     line-height: 1.2;
    541 }
    542 
    543 .login ul li {
    544     font-size: 11px;
    545 }
    546 
    547 .login ul li a {
    548     color: #0d324f;
    549     border: none;
    550 }
    551 
    552 #login ul li a:hover {
    553     color: #fff;
    554 }
    555 
    556 #login .input {
    557     font-size: 1.8em;
    558     margin-top: 3px;
    559     width: 97%;
    560 }
    561 
    562 #login p label {
    563     font-size: 11px;
    564 }
    565 
    566 #login #submit {
    567     margin: 0;
    568     font-size: 15px;
    569 }
    570 
    571321.plugins p {
    572322}
     
    742492
    743493.page-numbers {
    744     padding: 4px 7px;
     494    padding: 2px 4px;
    745495    border: 1px solid #fff;
    746496    margin-right: 3px;
     
    771521    font-weight: bold;
    772522    margin: 0 6px;
     523}
     524
     525.tablenav .dots {
     526    background-color: #e4f2fd;
     527    border-color: #e4f2fd;
     528}
     529
     530.tablenav .next, .tablenav .prev{
     531    border-color: #e4f2fd;
     532    background-color: #e4f2fd;
     533    border-bottom: 1px solid #2583ad;
     534    padding: 0;
     535    color: #2583ad;
     536}
     537
     538.tablenav .next:hover, .tablenav .prev:hover {
     539    color: #d54e21;
     540    border-color: #e4f2fd;
     541    border-bottom: 1px solid #d54e21;
     542}
     543
     544.tablenav {
     545    background-color: #e4f2fd;
     546    padding: 10px;
     547    clear: both;
     548}
     549
     550.tablenav .tablenav-pages {
     551    float: right;
     552    height: 24px;
     553    padding-top: 6px;
    773554}
    774555
     
    827608#user_info {
    828609    position: absolute;
    829     right: 25%;
     610    right: 15%;
    830611    top: 9px;
    831612    color: #ccc;
     
    867648    padding: 15px 170px 18px 15px;
    868649    margin: 0;
    869     margin-right: 25%;
     650    margin-right: 15%;
    870651}
    871652
     
    884665#dashmenu a {
    885666    color: #999;
    886     padding: 4px 6px;
     667    padding: 5px 6px;
    887668    line-height: 220%;
    888669    margin-right: 8px;
     
    902683    border-bottom: 1px solid #c6d9e9;
    903684    padding-left: 10px;
     685}
     686
     687/* Because we don't want visited on these links */
     688#adminmenu a, #submenu a {
     689    color: #2583ad;
    904690}
    905691
     
    932718    list-style: none;
    933719    position: absolute;
    934     right: 25%;
     720    right: 15%;
    935721    top: 55px;
    936722    padding-left: 10px;
     
    966752    height: 0.9em;
    967753    width: 1em;
     754}
     755
     756.post-com-count {
     757    background-image: url(images/comment-stalk.gif);
     758    background-repeat: no-repeat;
     759    background-position: -240px bottom;
     760    height: 0.9em;
     761    margin-top: 7px;
     762    width: 1em;
     763    display: block;
     764    position: absolute;
     765    color: #fff;
     766}
     767
     768.post-com-count span {
     769    color: #fff;
     770    top: -0.7em;
     771    right: 0;
     772    position: absolute;
     773    display: block;
     774    height: 1.3em;
     775    line-height: 1.3em;
     776    padding: 0 0.6em;
     777    background-color: #bbb;
     778    -moz-border-radius: 0.3em;
     779    -khtml-border-radius: 0.3em;
     780    border-radius: 0.3em;
     781}
     782
     783strong .post-com-count {
     784    background-position: -160px bottom;
     785}
     786
     787strong .post-com-count span {
     788    background-color: #2583ad;
     789}
     790
     791.post-com-count:hover {
     792    background-position: 0 bottom;
     793}
     794
     795.post-com-count:hover span {
     796    background-color: #d54e21;
    968797}
    969798
     
    1010839}
    1011840
    1012 .subsubsub {
    1013     margin: 15px 0 10px 0;
    1014     padding: 0;
    1015     color: #999;
    1016     list-style: none;
    1017     white-space: nowrap;
    1018 }
    1019 
    1020 .subsubsub li {
    1021     display: inline;
    1022     margin: 0;
    1023     padding: 0;
    1024 }
    1025 
    1026 .subsubsub a {
    1027     padding: 3px;
    1028     line-height: 200%;
    1029 }
    1030 
    1031 .subsubsub a:hover, .subsubsub a.current:hover {
    1032     color: #d54e21;
    1033 }
    1034 
    1035 .subsubsub a.current {
    1036     color: #000;
    1037     font-weight: bold;
    1038 }
    1039841/* end menu stuff */
    1040842
     
    13221124
    13231125#submitpost {
    1324     position: fixed;
     1126    position: absolute;
    13251127    background-color: #eaf3fa;
    13261128    width: 200px;
    13271129    top: 194px;
    1328     right: 25%;
     1130    right: 15%;
    13291131    -moz-border-radius: 3px;
    13301132}
     
    14641266}
    14651267
    1466 .tablenav {
    1467     background-color: #e4f2fd;
    1468     padding: 10px;
    1469     clear: both;
    1470 }
    1471 
    1472 .tablenav .dots {
    1473     border-color: #e4f2fd;
    1474 }
    1475 
    1476 .tablenav .tablenav-pages {
    1477     float: right;
    1478 }
    1479 
    14801268/* Global classes */
    14811269.wp-hidden-children .wp-hidden-child { display: none; }
Note: See TracChangeset for help on using the changeset viewer.