From 9e130618f5085ea114d2ba3d533dbd447e774581 Mon Sep 17 00:00:00 2001 From: azaozz Date: Tue, 5 May 2009 04:59:19 +0000 Subject: [PATCH] Add column "Rating" in Link Manager, props hakre, fixes #9443 git-svn-id: http://svn.automattic.com/wordpress/trunk@11191 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 3 ++- wp-admin/link-manager.php | 7 +++++-- wp-admin/wp-admin.css | 19 +++++++++++++------ 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9133bed9bb..5e64f57ddf 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -853,7 +853,8 @@ function get_column_headers($page) { 'url' => __('URL'), 'categories' => __('Categories'), 'rel' => __('Relationship'), - 'visible' => __('Visible') + 'visible' => __('Visible'), + 'rating' => __('Rating') ); break; diff --git a/wp-admin/link-manager.php b/wp-admin/link-manager.php index 8dff2b6a18..c867440017 100644 --- a/wp-admin/link-manager.php +++ b/wp-admin/link-manager.php @@ -174,6 +174,7 @@ if ( $links ) { if (strlen($short_url) > 35) $short_url = substr($short_url, 0, 32).'...'; $visible = ($link->link_visible == 'Y') ? __('Yes') : __('No'); + $rating = $link->link_rating; $style = ($alt % 2) ? '' : ' class="alternate"'; ++ $alt; $edit_link = get_edit_bookmark_link(); @@ -184,8 +185,7 @@ if ( $links ) { $style = ''; if ( in_array($column_name, $hidden) ) $style = ' style="display:none;"'; - if ( 'visible' == $column_name ) - $style = empty($style) ? ' style="text-align: center;"' : ' style="text-align: center; display: none;"'; + $attributes = "$class$style"; switch($column_name) { @@ -233,6 +233,9 @@ if ( $links ) { case 'visible': ?>>> link_id); ?> diff --git a/wp-admin/wp-admin.css b/wp-admin/wp-admin.css index b5672ee742..58de509969 100644 --- a/wp-admin/wp-admin.css +++ b/wp-admin/wp-admin.css @@ -414,10 +414,6 @@ a.button-secondary { line-height: 150%; } -table .vers { - text-align: center; -} - textarea.all-options, input.all-options { width: 250px; } @@ -2134,7 +2130,8 @@ body.wp-admin { margin-right: 20px; } -td.action-links, th.action-links { +td.action-links, +th.action-links { text-align: right; } @@ -3018,9 +3015,13 @@ table.fixed { table-layout: fixed; } +.fixed .column-rating, +.fixed .column-visible { + width: 8%; +} + .fixed .column-date, .fixed .column-parent, -.fixed .column-visible, .fixed .column-links { width: 10%; } @@ -3062,6 +3063,12 @@ table.fixed { overflow: hidden; } +table .vers, +table .column-visible, +table .column-rating { + text-align: center; +} + .icon32 { float: left; height: 36px;