Page Options: fix hiding of Modified column when listing drafts, props ShaneF, fixes #7855

git-svn-id: http://svn.automattic.com/wordpress/trunk@9109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-09 05:58:10 +00:00
parent 175611bda0
commit 43a310be13
2 changed files with 14 additions and 21 deletions

View File

@ -742,18 +742,12 @@ function wp_manage_pages_columns() {
$posts_columns['title'] = __('Title');
$post_status = isset( $_GET['post_status'] ) ? $_GET['post_status'] : '';
switch( $post_status ) {
case 'draft':
$posts_columns['modified'] = __('Modified');
break;
case 'pending':
$posts_columns['modified'] = __('Submitted');
break;
default:
$posts_columns['date'] = __('Date');
}
if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] )
$posts_columns['modified'] = __('Modified');
elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] )
$posts_columns['modified'] = __('Submitted');
else
$posts_columns['date'] = __('Date');
$posts_columns['author'] = __('Author');
if ( !in_array($post_status, array('pending', 'draft', 'future')) )
@ -866,9 +860,6 @@ function print_column_headers( $type, $id = true ) {
foreach ( $columns as $column_key => $column_display_name ) {
$class = ' class="manage-column';
if ( 'modified' == $column_key )
$column_key = 'date';
$class .= " column-$column_key";
if ( 'cb' == $column_key )
@ -1268,7 +1259,6 @@ function _post_row($a_post, $pending_comments, $mode) {
case 'modified':
case 'date':
$attributes = 'class="date column-date"' . $style;
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
$t_time = $h_time = __('Unpublished');
} else {
@ -1492,7 +1482,6 @@ foreach ($posts_columns as $column_name=>$column_display_name) {
break;
case 'modified':
case 'date':
$attributes = 'class="date column-date"' . $style;
if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
$t_time = $h_time = __('Unpublished');
} else {

View File

@ -2222,21 +2222,25 @@ a.togbox {
margin: 3px 0 0;
}
.inline-editor .date {
.inline-editor .date,
.inline-editor .modified {
width: 160px;
}
.inline-editor .date input {
.inline-editor .date input,
.inline-editor .modified input {
padding: 2px 1px;
margin: 1px;
width: 18px;
}
.inline-editor .date input[name="aa"] {
.inline-editor .date input[name="aa"],
.inline-editor .modified input[name="aa"] {
width: 30px;
}
#wpbody-content .inline-editor .date select {
#wpbody-content .inline-editor .date select,
#wpbody-content .inline-editor .modified select {
width: 80px;
}