WordPress.org

Make WordPress Core


Ignore:
Timestamp:
10/31/08 04:23:17 (9 years ago)
Author:
markjaquith
Message:

Right Now (Dashboard) styling. props Malaiac. fixes #8015

File:
1 edited

Legend:

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

    r9399 r9427  
    164164    $num_comm = get_comment_count( ); 
    165165 
    166     echo '<p>' . __('At a Glance') . '</p>'; 
    167     echo '<table>'; 
    168     echo '<tr>'; 
     166    echo "\n\t".'<p class="sub">' . __('At a Glance') . '</p>'; 
     167    echo "\n\t".'<div class="table">'."\n\t".'<table>'; 
     168    echo "\n\t".'<tr class="first">'; 
    169169 
    170170    // Posts 
     
    172172    if ( current_user_can( 'edit_posts' ) ) 
    173173        $num = "<a href='edit.php'>$num</a>"; 
    174     echo "<td>$num</td>"; 
    175     echo '<td>' . __ngettext( 'Post', 'Posts', $num_posts->publish ) . '</td>'; 
     174    echo '<td class="first b b-posts">'.$num.'</td>'; 
     175    echo '<td class="t posts">' . __ngettext( 'Post', 'Posts', $num_posts->publish ) . '</td>'; 
    176176    /* TODO: Show status breakdown on hover 
    177177    if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds.  Don't show if !current_user_can 
     
    195195    if ( current_user_can( 'moderate_comments' ) ) 
    196196        $num = "<a href='edit-comments.php'>$num</a>"; 
    197     echo "<td>$num</td>"; 
    198     echo '<td>' . __ngettext( 'Comment', 'Comments', $num_comm['total_comments'] ) . '</td>'; 
     197    echo '<td class="b b-comments">'.$num.'</td>'; 
     198    echo '<td class="last t comments">' . __ngettext( 'Comment', 'Comments', $num_comm['total_comments'] ) . '</td>'; 
    199199 
    200200    echo '</tr><tr>'; 
     
    204204    if ( current_user_can( 'edit_pages' ) ) 
    205205        $num = "<a href='edit-pages.php'>$num</a>"; 
    206     echo "<td>$num</td>"; 
    207     echo '<td>' . __ngettext( 'Page', 'Pages', $num_pages->publish ) . '</td>'; 
     206    echo '<td class="first b b_pages">'.$num.'</td>'; 
     207    echo '<td class="t pages">' . __ngettext( 'Page', 'Pages', $num_pages->publish ) . '</td>'; 
    208208 
    209209    // Approved Comments 
     
    211211    if ( current_user_can( 'moderate_comments' ) ) 
    212212        $num = "<a href='edit-comments.php?comment_status=approved'>$num</a>"; 
    213     echo "<td>$num</td>"; 
    214     echo '<td>' . __ngettext( 'Approved', 'Approved', $num_comm['approved'] ) . '</td>'; 
    215  
    216     echo '</tr><tr>'; 
     213    echo '<td class="b b_approved">'.$num.'</td>'; 
     214    echo '<td class="last t approved">' . __ngettext( 'Approved', 'Approved', $num_comm['approved'] ) . '</td>'; 
     215 
     216    echo "</tr>\n\t<tr>"; 
    217217 
    218218    // Categories 
    219219    $num = number_format_i18n( $num_cats ); 
    220220    if ( current_user_can( 'manage_categories' ) ) 
    221         $num = "<a href='categories.php'>$num</a>"; 
    222     echo "<td>$num</td>"; 
    223     echo '<td>' . __ngettext( 'Category', 'Categories', $num_cats ) . '</td>'; 
     221        $num = "<a href='caftegories.php'>$num</a>"; 
     222    echo '<td class="first b b-cats">'.$num.'</td>'; 
     223    echo '<td class="t cats">' . __ngettext( 'Category', 'Categories', $num_cats ) . '</td>'; 
    224224 
    225225    // Spam Comments 
     
    227227    if ( current_user_can( 'moderate_comments' ) ) 
    228228        $num = "<a href='edit-comments.php?comment_status=spam'>$num</a>"; 
    229     echo "<td>$num</td>"; 
    230     echo '<td>' . __ngettext( 'Spam', 'Spam', $num_comm['spam'] ) . '</td>'; 
    231  
    232     echo '</tr><tr>'; 
     229    echo '<td class="b b-spam">'.$num.'</td>'; 
     230    echo '<td class="last t spam">' . __ngettext( 'Spam', 'Spam', $num_comm['spam'] ) . '</td>'; 
     231 
     232    echo "</tr>\n\t<tr>"; 
    233233 
    234234    // Tags 
     
    236236    if ( current_user_can( 'manage_categories' ) ) 
    237237        $num = "<a href='edit-tags.php'>$num</a>"; 
    238     echo "<td>$num</td>"; 
    239     echo '<td>' . __ngettext( 'Tag', 'Tags', $num_tags ) . '</td>'; 
     238    echo '<td class="first b b-tags">'.$num.'</td>'; 
     239    echo '<td class="t tags">' . __ngettext( 'Tag', 'Tags', $num_tags ) . '</td>'; 
    240240 
    241241    // Pending Comments 
     
    243243    if ( current_user_can( 'moderate_comments' ) ) 
    244244        $num = "<a href='edit-comments.php?comment_status=moderated'>$num</a>"; 
    245     echo "<td>$num</td>"; 
    246     echo '<td>' . __ngettext( 'Pending', 'Pending', $num_comm['awaiting_moderation'] ) . '</td>'; 
    247  
    248     echo '</tr></table>';    
    249  
     245    echo '<td class="b b-waiting">'.$num.'</td>'; 
     246    echo '<td class="last t waiting">' . __ngettext( 'Awaiting Moderation', 'Awaiting Moderation', $num_comm['awaiting_moderation'] ) . '</td>'; 
     247 
     248  echo "</tr>\n\t</table>\n\t</div>"; 
     249   
     250  echo "\n\t".'<div class="versions">'; 
    250251    $ct = current_theme_info(); 
    251252    $sidebars_widgets = wp_get_sidebars_widgets(); 
    252253    $num_widgets = array_reduce( $sidebars_widgets, create_function( '$prev, $curr', 'return $prev+count($curr);' ), 0 ); 
    253254    $num = number_format_i18n( $num_widgets ); 
    254     if ( $can_switch_themes = current_user_can( 'switch_themes' ) ) 
    255         $num = "<a href='widgets.php'>$num</a>"; 
    256  
    257     echo '<p>'; 
    258     printf(__ngettext('Theme %1$s with %2$s Widget', 'Theme %1$s with %2$s Widgets', $num_widgets), $ct->title, $num); 
    259     if ( $can_switch_themes ) 
    260         echo ' <a href="themes.php" class="rbutton">' . __('Change Theme') . '</a>'; 
     255 
     256    echo "\n\t<p>"; 
     257    if ( current_user_can( 'switch_themes' ) ) { 
     258        echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; 
     259        printf(__ngettext('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num); 
     260    } else { 
     261        printf(__ngettext('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num); 
     262    } 
     263         
    261264    echo '</p>'; 
    262265 
    263266    update_right_now_message(); 
    264267 
     268  echo "\n\t".'</div>'; 
    265269    do_action( 'rightnow_end' ); 
    266270    do_action( 'activity_box_end' ); 
Note: See TracChangeset for help on using the changeset viewer.