Split Right Now widget into Content | Discussion. Props matveb. Fixes #12202

git-svn-id: http://svn.automattic.com/wordpress/trunk@13531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-03-01 12:32:00 +00:00
parent bc84ed40cb
commit b56ae0e0cb
6 changed files with 68 additions and 48 deletions

File diff suppressed because one or more lines are too long

View File

@ -91,6 +91,7 @@ div.postbox div.inside {
#dashboard_right_now .inside {
font-size: 12px;
padding-top: 20px;
}
#dashboard_right_now p.sub {
@ -99,18 +100,30 @@ div.postbox div.inside {
padding: 5px 10px 15px;
color: #777;
font-size: 13px;
position: absolute;
top: -17px;
left: 15px;
}
#dashboard_right_now .table {
margin: 0 -9px;
padding: 0 10px;
background: #f9f9f9;
border-top: #ececec 1px solid;
border-bottom: #ececec 1px solid;
margin: 0 -9px 10px;
padding: 0 10px;
position: relative;
}
#dashboard_right_now table {
width: 100%;
#dashboard_right_now .table_content {
float: left;
border-right: #ececec 1px solid;
width: 45%;
}
#dashboard_right_now .table_discussion {
float: right;
border-left: #ececec 1px solid;
width: 45%;
}
#dashboard_right_now table td {
@ -128,6 +141,7 @@ div.postbox div.inside {
text-align: right;
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
font-size: 14px;
width: 1%;
}
#dashboard_right_now td.b a {
@ -149,11 +163,6 @@ div.postbox div.inside {
white-space: nowrap;
}
#dashboard_right_now td.first,
#dashboard_right_now td.last {
width: 1%;
}
#dashboard_right_now .spam {
color: red;
}
@ -168,6 +177,7 @@ div.postbox div.inside {
#dashboard_right_now .versions {
padding: 6px 10px 12px;
clear: left;
}
#dashboard_right_now .versions .b {
@ -397,4 +407,3 @@ a.rsswidget {
overflow: hidden;
word-wrap: break-word;
}

View File

@ -1 +1 @@
#all-my-blogs-tab a.current{position:relative;padding-bottom:10px;}#all-my-blogs{position:absolute;top:30px;left:0;right:0;_width:100%;margin:4px 7px;padding:6px 10px;font-size:12px;}#all-my-blogs *{margin:0;}form#all-my-blogs p,form#all-my-blogs p *{vertical-align:middle;}#all-my-blogs a{font-size:10px;text-decoration:underline;margin:0 14px;}#all-my-blogs a:hover,#all-my-blogs a:active{text-decoration:none;}form#wpmu-search{position:absolute;right:0;top:0;}#adminmenu #menu-site div.wp-menu-image{background:transparent url("../images/site-admin.png") no-repeat scroll 0 -33px;}#adminmenu #menu-site:hover div.wp-menu-image{background:transparent url("../images/site-admin.png") no-repeat scroll 0 -1px;}#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;}#dashboard_right_now td.b a.musublink{font-size:16px;}tr.site-deleted{background:#f55;}tr.site-spammed{background:#faa;}tr.site-archived{background:#fee;}
#all-my-blogs-tab a.current{position:relative;padding-bottom:10px;}#all-my-blogs{position:absolute;top:30px;left:0;right:0;_width:100%;margin:4px 7px;padding:6px 10px;font-size:12px;}#all-my-blogs *{margin:0;}form#all-my-blogs p,form#all-my-blogs p *{vertical-align:middle;}#all-my-blogs a{font-size:10px;text-decoration:underline;margin:0 14px;}#all-my-blogs a:hover,#all-my-blogs a:active{text-decoration:none;}form#wpmu-search{position:absolute;right:0;top:0;}#adminmenu #menu-site div.wp-menu-image{background:transparent url("../images/site-admin.png") no-repeat scroll 0 -33px;}#adminmenu #menu-site:hover div.wp-menu-image{background:transparent url("../images/site-admin.png") no-repeat scroll 0 -1px;}#dashboard_right_now p.musub{margin-top:12px;border-top:1px solid #ececec;position:static;}#dashboard_right_now td.b a.musublink{font-size:16px;}tr.site-deleted{background:#f55;}tr.site-spammed{background:#faa;}tr.site-archived{background:#fee;}

View File

@ -53,6 +53,7 @@ form#wpmu-search {
#dashboard_right_now p.musub {
margin-top: 12px;
border-top: 1px solid #ececec;
position: static;
}
#dashboard_right_now td.b a.musublink {

View File

@ -212,8 +212,8 @@ function wp_dashboard_right_now() {
$num_comm = wp_count_comments( );
echo "\n\t".'<p class="sub">' . __('At a Glance') . '</p>';
echo "\n\t".'<div class="table">'."\n\t".'<table>';
echo "\n\t".'<div class="table table_content">'."\n\t".'<table>';
echo "\n\t".'<p class="sub">' . __('Content') . '</p>';
echo "\n\t".'<tr class="first">';
// Posts
@ -225,6 +225,8 @@ function wp_dashboard_right_now() {
}
echo '<td class="first b b-posts">' . $num . '</td>';
echo '<td class="t posts">' . $text . '</td>';
echo '</tr><tr>';
/* TODO: Show status breakdown on hover
if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can
$post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>';
@ -242,18 +244,6 @@ function wp_dashboard_right_now() {
}
*/
// Total Comments
$num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
$text = _n( 'Comment', 'Comments', $num_comm->total_comments );
if ( current_user_can( 'moderate_comments' ) ) {
$num = "<a href='edit-comments.php'>$num</a>";
$text = "<a href='edit-comments.php'>$text</a>";
}
echo '<td class="b b-comments">' . $num . '</td>';
echo '<td class="last t comments">' . $text . '</td>';
echo '</tr><tr>';
// Pages
$num = number_format_i18n( $num_pages->publish );
$text = _n( 'Page', 'Pages', $num_pages->publish );
@ -264,6 +254,46 @@ function wp_dashboard_right_now() {
echo '<td class="first b b_pages">' . $num . '</td>';
echo '<td class="t pages">' . $text . '</td>';
echo '</tr><tr>';
// Categories
$num = number_format_i18n( $num_cats );
$text = _n( 'Category', 'Categories', $num_cats );
if ( current_user_can( 'manage_categories' ) ) {
$num = "<a href='edit-tags.php?taxonomy=category'>$num</a>";
$text = "<a href='edit-tags.php?taxonomy=category'>$text</a>";
}
echo '<td class="first b b-cats">' . $num . '</td>';
echo '<td class="t cats">' . $text . '</td>';
echo '</tr><tr>';
// Tags
$num = number_format_i18n( $num_tags );
$text = _n( 'Tag', 'Tags', $num_tags );
if ( current_user_can( 'manage_categories' ) ) {
$num = "<a href='edit-tags.php'>$num</a>";
$text = "<a href='edit-tags.php'>$text</a>";
}
echo '<td class="first b b-tags">' . $num . '</td>';
echo '<td class="t tags">' . $text . '</td>';
echo "</tr>";
echo "\n\t</table>\n\t</div>";
echo "\n\t".'<div class="table table_discussion">'."\n\t".'<table>';
echo "\n\t".'<p class="sub">' . __('Discussion') . '</p>';
echo "\n\t".'<tr class="first">';
// Total Comments
$num = '<span class="total-count">' . number_format_i18n($num_comm->total_comments) . '</span>';
$text = _n( 'Comment', 'Comments', $num_comm->total_comments );
echo '<td class="b b-comments"><a href="edit-comments.php">' . $num . '</a></td>';
echo '<td class="last t comments"><a href="edit-comments.php">' . $text . '</a></td>';
echo '</tr><tr>';
// Approved Comments
$num = '<span class="approved-count">' . number_format_i18n($num_comm->approved) . '</span>';
$text = _nx( 'Approved', 'Approved', $num_comm->approved, 'Right Now' );
@ -276,16 +306,6 @@ function wp_dashboard_right_now() {
echo "</tr>\n\t<tr>";
// Categories
$num = number_format_i18n( $num_cats );
$text = _n( 'Category', 'Categories', $num_cats );
if ( current_user_can( 'manage_categories' ) ) {
$num = "<a href='edit-tags.php?taxonomy=category'>$num</a>";
$text = "<a href='edit-tags.php?taxonomy=category'>$text</a>";
}
echo '<td class="first b b-cats">' . $num . '</td>';
echo '<td class="t cats">' . $text . '</td>';
// Pending Comments
$num = '<span class="pending-count">' . number_format_i18n($num_comm->moderated) . '</span>';
$text = _n( 'Pending', 'Pending', $num_comm->moderated );
@ -298,16 +318,6 @@ function wp_dashboard_right_now() {
echo "</tr>\n\t<tr>";
// Tags
$num = number_format_i18n( $num_tags );
$text = _n( 'Tag', 'Tags', $num_tags );
if ( current_user_can( 'manage_categories' ) ) {
$num = "<a href='edit-tags.php'>$num</a>";
$text = "<a href='edit-tags.php'>$text</a>";
}
echo '<td class="first b b-tags">' . $num . '</td>';
echo '<td class="t tags">' . $text . '</td>';
// Spam Comments
$num = number_format_i18n($num_comm->spam);
$text = _n( 'Spam', 'Spam', $num_comm->spam );

View File

@ -461,11 +461,11 @@ function wp_default_styles( &$styles ) {
$styles->add( 'colors-classic', "/wp-admin/css/colors-classic$suffix.css", array(), $colors_version);
$styles->add_data( 'colors-classic', 'rtl', true );
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100219' );
$styles->add( 'ms', "/wp-admin/css/ms$suffix.css", array(), '20100301' );
$styles->add( 'global', "/wp-admin/css/global$suffix.css", array(), '20100108' );
$styles->add( 'media', "/wp-admin/css/media$suffix.css", array(), '20091029' );
$styles->add( 'widgets', "/wp-admin/css/widgets$suffix.css", array(), '20091118' );
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20100213' );
$styles->add( 'dashboard', "/wp-admin/css/dashboard$suffix.css", array(), '20100301' );
$styles->add( 'install', "/wp-admin/css/install$suffix.css", array(), '20100228' ); // Readme as well
$styles->add( 'theme-editor', "/wp-admin/css/theme-editor$suffix.css", array(), '20090625' );
$styles->add( 'press-this', "/wp-admin/css/press-this$suffix.css", array(), '20091022' );