WordPress.org

Make WordPress Core

Changeset 9556


Ignore:
Timestamp:
11/06/2008 09:56:29 PM (10 years ago)
Author:
azaozz
Message:

Implementing new design for Edit Posts, Comments, etc. lists, props mdawaffe, see #8083

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9547 r9556  
    339339
    340340.tablenav .dots {
    341     background-color: #e4f2fd;
    342     border-color: #e4f2fd;
     341    border-color: transparent;
    343342}
    344343
    345344.tablenav .next,
    346345.tablenav .prev {
    347     background-color: #e4f2fd;
    348     border-bottom-color: #2583ad;
    349     border-color: #e4f2fd;
     346    border-color: transparent;
    350347    color: #2583ad;
    351348}
     
    353350.tablenav .next:hover,
    354351.tablenav .prev:hover {
    355     border-bottom-color: #d54e21;
    356     border-color: #e4f2fd;
     352    border-color: transparent;
    357353    color: #d54e21;
    358354}
  • trunk/wp-admin/css/global.css

    r9538 r9556  
    257257
    258258.subsubsub a {
    259     line-height: 200%;
    260     padding: 3px;
     259    line-height: 2;
     260    padding: .2em;
    261261    text-decoration: none;
     262}
     263
     264.subsubsub a .count, .subsubsub a.current .count {
     265    color: #999;
     266    font-weight: normal;
    262267}
    263268
  • trunk/wp-admin/edit-comments.php

    r9545 r9556  
    121121$status_links = array();
    122122$num_comments = wp_count_comments();
     123//, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
     124//, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
    123125$stati = array(
    124         'moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"),
    125         'approved' => _c('Approved|plural'),
    126         'spam' => sprintf(__ngettext('Spam (%s)', 'Spam (%s)', number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
     126        'moderated' => __ngettext_noop('Awaiting Moderation <span class="count">(%s)</span>', 'Awaiting Moderation <span class="count">(%s)</span>'),
     127        'approved' => __ngettext_noop('Approved', 'Approved'), // singular not used
     128        'spam' => __ngettext_noop('Spam <span class="count">(%s)</span>', 'Spam <span class="count">(%s)</span>')
    127129    );
    128130$class = ( '' === $comment_status ) ? ' class="current"' : '';
    129 $status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>";
     131$status_links[] = "<li><a href='edit-comments.php'$class>" . __( 'All' ) . '</a>';
    130132$type = ( !$comment_type && 'all' != $comment_type ) ? '' : "&amp;comment_type=$comment_type";
    131133foreach ( $stati as $status => $label ) {
     
    134136    if ( $status == $comment_status )
    135137        $class = ' class="current"';
    136 
    137     $status_links[] = "<li class='$status'><a href=\"edit-comments.php?comment_status=$status$type\"$class>$label</a>";
     138    if ( !isset( $num_comments->$status ) )
     139        $num_comments->$status = 10;
     140
     141    $status_links[] = "<li class='$status'><a href='edit-comments.php?comment_status=$status$type'$class>" . sprintf(
     142        __ngettext( $label[0], $label[1], $num_comments->$status ),
     143        number_format_i18n( $num_comments->$status )
     144    ) . '</a>';
    138145}
    139146
    140147$status_links = apply_filters( 'comment_status_links', $status_links );
    141148
    142 echo implode(' | </li>', $status_links) . '</li>';
     149echo implode( " |</li>\n", $status_links) . '</li>';
    143150unset($status_links);
    144151?>
     
    183190<div class="tablenav">
    184191
    185 <?php
    186 if ( $page_links )
    187     echo "<div class='tablenav-pages'>$page_links</div>";
    188 ?>
     192<?php if ( $page_links ) : ?>
     193<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     194    number_format_i18n( $start + 1 ),
     195    number_format_i18n( min( $page * $comments_per_page, $total ) ),
     196    number_format_i18n( $total ),
     197    $page_links
     198); echo $page_links_text; ?></div>
     199<?php endif; ?>
    189200
    190201<div class="alignleft actions">
     
    271282<?php
    272283if ( $page_links )
    273     echo "<div class='tablenav-pages'>$page_links</div>";
     284    echo "<div class='tablenav-pages'>$page_links_text</div>";
    274285?>
    275286
  • trunk/wp-admin/edit-pages.php

    r9545 r9556  
    7474
    7575$post_stati  = array(   //  array( adj, noun )
    76         'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published (%s)', 'Published (%s)')),
    77         'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')),
    78         'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')),
    79         'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')),
    80         'private' => array(__('Private'), __('Private pages'), __ngettext_noop('Private (%s)', 'Private (%s)'))
     76        'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),
     77        'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')),
     78        'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')),
     79        'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts</a> <span class="count">(%s)</span>')),
     80        'private' => array(__('Private'), __('Private pages'), __ngettext_noop('<a %s>Private</a> <span class="count">(%s)</span>', '<a %s>Private</a> <span class="count">(%s)</span>'))
    8181    );
    8282
     
    138138$status_links = array();
    139139$num_posts = wp_count_posts('page', 'readable');
     140$total_posts = array_sum( (array) $num_posts );
    140141$class = empty($_GET['post_status']) ? ' class="current"' : '';
    141 $status_links[] = "<li><a href=\"edit-pages.php\"$class>".__('All Pages')."</a>";
     142$status_links[] = "<li><a href='edit-pages.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';
    142143foreach ( $post_stati as $status => $label ) {
    143144    $class = '';
     
    149150        $class = ' class="current"';
    150151
    151     $status_links[] = "<li><a href=\"edit-pages.php?post_status=$status\"$class>" .
    152     sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->$status), number_format_i18n( $num_posts->$status ) ) . '</a>';
    153 }
    154 echo implode(' |</li>', $status_links) . '</li>';
     152    $status_links[] = "<li><a href='edit-pages.php?post_status=$status'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
     153}
     154echo implode( " |</li>\n", $status_links ) . '</li>';
    155155unset($status_links);
    156156endif;
     
    187187));
    188188
    189 if ( $page_links )
    190     echo "<div class='tablenav-pages'>$page_links</div>";
    191 ?>
     189if ( $page_links ) : ?>
     190<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     191    number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
     192    number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
     193    number_format_i18n( $wp_query->found_posts ),
     194    $page_links
     195); echo $page_links_text; ?></div>
     196<?php endif; ?>
    192197
    193198<div class="alignleft actions">
     
    231236<?php
    232237if ( $page_links )
    233     echo "<div class='tablenav-pages'>$page_links</div>";
     238    echo "<div class='tablenav-pages'>$page_links_text</div>";
    234239?>
    235240
  • trunk/wp-admin/edit.php

    r9545 r9556  
    125125$status_links = array();
    126126$num_posts = wp_count_posts( 'post', 'readable' );
     127$total_posts = array_sum( (array) $num_posts );
    127128$class = empty( $_GET['post_status'] ) ? ' class="current"' : '';
    128 $status_links[] = "<li><a href='edit.php' $class>" . __('All Posts') . '</a>';
     129$status_links[] = "<li><a href='edit.php' $class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';
     130
     131
    129132foreach ( $post_stati as $status => $label ) {
    130133    $class = '';
     
    138141        $class = ' class="current"';
    139142
    140     $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" .
    141     sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
    142 }
    143 echo implode( ' | </li>', $status_links ) . '</li>';
     143    $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';
     144}
     145echo implode( " |</li>\n", $status_links ) . '</li>';
    144146unset( $status_links );
    145147endif;
     
    224226
    225227<?php if ( $page_links ) { ?>
    226 <div class="tablenav-pages"><?php echo $page_links; ?></div>
     228<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     229    number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
     230    number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
     231    number_format_i18n( $wp_query->found_posts ),
     232    $page_links
     233); echo $page_links_text; ?></div>
    227234<?php } ?>
    228235
     
    243250<?php
    244251if ( $page_links )
    245     echo "<div class='tablenav-pages'>$page_links</div>";
     252    echo "<div class='tablenav-pages'>$page_links_text</div>";
    246253?>
    247254
  • trunk/wp-admin/includes/dashboard.php

    r9536 r9556  
    332332            <input type="submit" name="save" id="save-post" class="button" value="<?php _e('Save Draft'); ?>" />
    333333            <input type="reset" value="<?php _e( 'Cancel' ); ?>" class="cancel" />
    334             <input type="submit" name="publish" id="publish" accesskey="p" class="button button-highlighted" value="<?php _e('Publish'); ?>" />
     334            <input type="submit" name="publish" id="publish" accesskey="p" class="button button-primary" value="<?php _e('Publish'); ?>" />
    335335            <br class="clear" />
    336336        </p>
  • trunk/wp-admin/includes/post.php

    r9509 r9556  
    728728    $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
    729729    $post_stati  = array(   //  array( adj, noun )
    730                 'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published (%s)', 'Published (%s)')),
    731                 'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')),
    732                 'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')),
    733                 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')),
    734                 'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private (%s)', 'Private (%s)')),
     730                'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),
     731                'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')),
     732                'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')),
     733                'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')),
     734                'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')),
    735735            );
    736736
     
    795795    $q['posts_per_page'] = 15;
    796796    $post_mime_types = array(   //  array( adj, noun )
    797                 'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')),
    798                 'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')),
    799                 'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')),
     797                'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),
     798                'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),
     799                'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),
    800800            );
    801801    $post_mime_types = apply_filters('post_mime_types', $post_mime_types);
  • trunk/wp-admin/includes/template.php

    r9547 r9556  
    688688    $posts_columns = array();
    689689    $posts_columns['cb'] = '<input type="checkbox" />';
    690     $posts_columns['title'] = __('Title');
     690    $posts_columns['title'] = __('Post');
    691691    $posts_columns['author'] = __('Author');
    692692    $posts_columns['categories'] = __('Categories');
  • trunk/wp-admin/includes/user.php

    r9217 r9556  
    666666                'add_args' => $args
    667667            ) );
     668            if ( $this->paging_text ) {
     669                $this->paging_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     670                    number_format_i18n( ( $this->page - 1 ) * $this->users_per_page + 1 ),
     671                    number_format_i18n( min( $this->page * $this->users_per_page, $this->total_users_for_query ) ),
     672                    number_format_i18n( $this->total_users_for_query ),
     673                    $this->paging_text
     674                );
     675            }
    668676        }
    669677    }
  • trunk/wp-admin/themes.php

    r9328 r9556  
    126126
    127127<?php if ( $page_links ) : ?>
    128 <div class="tablenav">
    129 <?php echo "<div class='tablenav-pages'>$page_links</div>"; ?>
    130 <br class="clear" />
    131 </div>
    132 <br class="clear" />
     128<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     129    number_format_i18n( $start + 1 ),
     130    number_format_i18n( min( $page * $per_page, $theme_total ) ),
     131    number_format_i18n( $theme_total ),
     132    $page_links
     133); echo $page_links_text; ?></div>
    133134<?php endif; ?>
    134135
     
    200201<?php if ( $page_links ) : ?>
    201202<div class="tablenav">
    202 <?php echo "<div class='tablenav-pages'>$page_links</div>"; ?>
     203<?php echo "<div class='tablenav-pages'>$page_links_text</div>"; ?>
    203204<br class="clear" />
    204205</div>
  • trunk/wp-admin/upload.php

    r9545 r9556  
    186186$type_links = array();
    187187$_num_posts = (array) wp_count_attachments();
     188$_total_posts = array_sum( $_num_posts );
    188189$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
    189190foreach ( $matches as $type => $reals )
     
    192193
    193194$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : '';
    194 $type_links[] = "<li><a href=\"upload.php\"$class>".__('All Types')."</a>";
     195$type_links[] = "<li><a href='upload.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>';
    195196foreach ( $post_mime_types as $mime_type => $label ) {
    196197    $class = '';
     
    202203        $class = ' class="current"';
    203204
    204     $type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" .
    205     sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
     205    $type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
    206206}
    207207$class = isset($_GET['detached']) ? ' class="current"' : '';
    208208$type_links[] = '<li><a href="upload.php?detached=1"' . $class . '>' . __('Unattached') . '</a>';
    209209
    210 echo implode(' | </li>', $type_links) . '</li>';
     210echo implode( " |</li>\n", $type_links) . '</li>';
    211211unset($type_links);
    212212?>
     
    236236));
    237237
    238 if ( $page_links )
    239     echo "<div class='tablenav-pages'>$page_links</div>";
    240 ?>
     238if ( $page_links ) : ?>
     239<div class="tablenav-pages"><?php $page_links_text = sprintf( '<span class="displaying-num">' . __( 'Displaying %s-%s of %s' ) . '</span>' . __( '%s' ),
     240    number_format_i18n( ( $_GET['paged'] - 1 ) * $wp_query->query_vars['posts_per_page'] + 1 ),
     241    number_format_i18n( min( $_GET['paged'] * $wp_query->query_vars['posts_per_page'], $wp_query->found_posts ) ),
     242    number_format_i18n( $wp_query->found_posts ),
     243    $page_links
     244); echo $page_links_text; ?></div>
     245<?php endif; ?>
    241246
    242247<div class="alignleft actions">
     
    387392<?php
    388393if ( $page_links )
    389     echo "<div class='tablenav-pages'>$page_links</div>";
     394    echo "<div class='tablenav-pages'>$page_links_text</div>";
    390395?>
    391396
  • trunk/wp-admin/users.php

    r9545 r9556  
    266266$avail_roles = array();
    267267$users_of_blog = get_users_of_blog();
     268$total_users = count( $users_of_blog );
    268269foreach ( (array) $users_of_blog as $b_user ) {
    269270    $b_roles = unserialize($b_user->meta_value);
     
    278279$current_role = false;
    279280$class = empty($role) ? ' class="current"' : '';
    280 $role_links[] = "<li><a href=\"users.php\"$class>" . __('All Users') . "</a>";
     281$role_links[] = "<li><a href='users.php'$class>" . sprintf( __ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>';
    281282foreach ( $wp_roles->get_names() as $this_role => $name ) {
    282283    if ( !isset($avail_roles[$this_role]) )
     
    291292
    292293    $name = translate_with_context($name);
    293     $name = sprintf(_c('%1$s (%2$s)|user role with count'), $name, $avail_roles[$this_role]);
    294     $role_links[] = "<li><a href=\"users.php?role=$this_role\"$class>" . $name . '</a>';
    295 }
    296 echo implode(' |</li>', $role_links) . '</li>';
     294    $name = sprintf( _c('%1$s <span class="count">(%2$s)</span>|user role with count'), $name, $avail_roles[$this_role] );
     295    $role_links[] = "<li><a href='users.php?role=$this_role'$class>$name</a>";
     296}
     297echo implode( " |</li>\n", $role_links) . '</li>';
    297298unset($role_links);
    298299?>
  • trunk/wp-admin/wp-admin.css

    r9545 r9556  
    1 
    2 
    3 
    41#wpbody {
    52    clear: both;
     
    627624
    628625.page-numbers {
    629     margin-right: 5px;
     626    border-bottom-style: solid;
    630627    border-bottom-width: 2px;
    631     border-bottom-style: solid;
     628    font-weight: bold;
     629    margin-right: 1px;
     630    padding: 0 2px;
    632631}
    633632
     
    675674.tablenav .tablenav-pages {
    676675    float: right;
     676    display: block;
     677    cursor: default;
     678    height: 40px;
     679    line-height: 40px;
    677680    font-size: 11px;
    678     height: 22px;
    679     line-height: 22px;
    680     padding: 7px 8px 0;
     681    margin: 0 8px 0 0;
     682    color: #555;
    681683}
    682684
    683685.tablenav .tablenav-pages a {
    684686    text-decoration: none;
     687}
     688
     689.tablenav .displaying-num {
     690    margin-right: 10px;
    685691}
    686692
  • trunk/wp-includes/script-loader.php

    r9546 r9556  
    329329    $rtl_styles = array( 'global', 'colors', 'dashboard', 'ie', 'install', 'login', 'media', 'theme-editor', 'upload', 'widgets', 'press-this', 'press-this-ie' );
    330330
    331     $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081105' );
     331    $styles->add( 'wp-admin', '/wp-admin/wp-admin.css', array(), '20081106' );
    332332    $styles->add_data( 'wp-admin', 'rtl', '/wp-admin/rtl.css' );
    333333
     
    339339    $styles->add_data( 'colors-fresh', 'rtl', true );
    340340
    341     $styles->add( 'global', '/wp-admin/css/global.css', array(), '20081030' );
     341    $styles->add( 'global', '/wp-admin/css/global.css', array(), '20081106' );
    342342    $styles->add( 'media', '/wp-admin/css/media.css', array(), '20080709' );
    343343    $styles->add( 'widgets', '/wp-admin/css/widgets.css' );
Note: See TracChangeset for help on using the changeset viewer.