mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-12 13:44:21 +01:00
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
This commit is contained in:
parent
83f674bf9a
commit
9e130618f5
@ -853,7 +853,8 @@ function get_column_headers($page) {
|
|||||||
'url' => __('URL'),
|
'url' => __('URL'),
|
||||||
'categories' => __('Categories'),
|
'categories' => __('Categories'),
|
||||||
'rel' => __('Relationship'),
|
'rel' => __('Relationship'),
|
||||||
'visible' => __('Visible')
|
'visible' => __('Visible'),
|
||||||
|
'rating' => __('Rating')
|
||||||
);
|
);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -174,6 +174,7 @@ if ( $links ) {
|
|||||||
if (strlen($short_url) > 35)
|
if (strlen($short_url) > 35)
|
||||||
$short_url = substr($short_url, 0, 32).'...';
|
$short_url = substr($short_url, 0, 32).'...';
|
||||||
$visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
|
$visible = ($link->link_visible == 'Y') ? __('Yes') : __('No');
|
||||||
|
$rating = $link->link_rating;
|
||||||
$style = ($alt % 2) ? '' : ' class="alternate"';
|
$style = ($alt % 2) ? '' : ' class="alternate"';
|
||||||
++ $alt;
|
++ $alt;
|
||||||
$edit_link = get_edit_bookmark_link();
|
$edit_link = get_edit_bookmark_link();
|
||||||
@ -184,8 +185,7 @@ if ( $links ) {
|
|||||||
$style = '';
|
$style = '';
|
||||||
if ( in_array($column_name, $hidden) )
|
if ( in_array($column_name, $hidden) )
|
||||||
$style = ' style="display:none;"';
|
$style = ' style="display:none;"';
|
||||||
if ( 'visible' == $column_name )
|
|
||||||
$style = empty($style) ? ' style="text-align: center;"' : ' style="text-align: center; display: none;"';
|
|
||||||
$attributes = "$class$style";
|
$attributes = "$class$style";
|
||||||
|
|
||||||
switch($column_name) {
|
switch($column_name) {
|
||||||
@ -233,6 +233,9 @@ if ( $links ) {
|
|||||||
case 'visible':
|
case 'visible':
|
||||||
?><td <?php echo $attributes ?>><?php echo $visible; ?></td><?php
|
?><td <?php echo $attributes ?>><?php echo $visible; ?></td><?php
|
||||||
break;
|
break;
|
||||||
|
case 'rating':
|
||||||
|
?><td <?php echo $attributes ?>><?php echo $rating; ?></td><?php
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
?>
|
?>
|
||||||
<td><?php do_action('manage_link_custom_column', $column_name, $link->link_id); ?></td>
|
<td><?php do_action('manage_link_custom_column', $column_name, $link->link_id); ?></td>
|
||||||
|
@ -414,10 +414,6 @@ a.button-secondary {
|
|||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
}
|
}
|
||||||
|
|
||||||
table .vers {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
textarea.all-options, input.all-options {
|
textarea.all-options, input.all-options {
|
||||||
width: 250px;
|
width: 250px;
|
||||||
}
|
}
|
||||||
@ -2134,7 +2130,8 @@ body.wp-admin {
|
|||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td.action-links, th.action-links {
|
td.action-links,
|
||||||
|
th.action-links {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3018,9 +3015,13 @@ table.fixed {
|
|||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fixed .column-rating,
|
||||||
|
.fixed .column-visible {
|
||||||
|
width: 8%;
|
||||||
|
}
|
||||||
|
|
||||||
.fixed .column-date,
|
.fixed .column-date,
|
||||||
.fixed .column-parent,
|
.fixed .column-parent,
|
||||||
.fixed .column-visible,
|
|
||||||
.fixed .column-links {
|
.fixed .column-links {
|
||||||
width: 10%;
|
width: 10%;
|
||||||
}
|
}
|
||||||
@ -3062,6 +3063,12 @@ table.fixed {
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
table .vers,
|
||||||
|
table .column-visible,
|
||||||
|
table .column-rating {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
.icon32 {
|
.icon32 {
|
||||||
float: left;
|
float: left;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
|
Loading…
Reference in New Issue
Block a user