Only show one search form for the plugin installer.

The field dropdown now appears in the filter bar only when doing a search.

see #28785.

Built from https://develop.svn.wordpress.org/trunk@29597


git-svn-id: http://core.svn.wordpress.org/trunk@29371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Helen Hou-Sandí 2014-08-25 16:03:16 +00:00
parent 713857625e
commit b1b7d5f3a2
6 changed files with 26 additions and 11 deletions

View File

@ -1383,6 +1383,15 @@ div.action-links,
margin: 0 0 20px 20px;
}
.no-plugin-results {
color: #999;
font-size: 18px;
font-style: normal;
margin: 0;
padding: 100px 0 0;
text-align: center;
}
/* ms */
/* Background Color for Site Status */
.wp-list-table .site-deleted {

View File

@ -1383,6 +1383,15 @@ div.action-links,
margin: 0 20px 20px 0;
}
.no-plugin-results {
color: #999;
font-size: 18px;
font-style: normal;
margin: 0;
padding: 100px 0 0;
text-align: center;
}
/* ms */
/* Background Color for Site Status */
.wp-list-table .site-deleted {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -121,7 +121,6 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
break;
}
add_action( 'install_plugins_table_header', 'install_search_form', 10, 0 );
break;
case 'featured':
@ -195,7 +194,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
} else {
$message = __( 'No plugins match your request.' );
}
echo '<div class="wp-filter-no-results">' . $message . '</div>';
echo '<div class="no-plugin-results">' . $message . '</div>';
}
protected function get_views() {
@ -203,8 +202,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
$display_tabs = array();
foreach ( (array) $tabs as $action => $text ) {
$class = 'wp-filter-link';
$class .= ( $action == $tab ) ? ' current' : '';
$class = ( $action == $tab ) ? ' current' : '';
$href = self_admin_url('plugin-install.php?tab=' . $action);
$display_tabs['plugin-install-'.$action] = "<a href='$href' class='$class'>$text</a>";
}
@ -223,7 +221,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
?>
<div class="wp-filter">
<ul class="wp-filter-links">
<ul class="filter-links">
<?php
if ( ! empty( $views ) ) {
foreach ( $views as $class => $view ) {
@ -234,7 +232,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
?>
</ul>
<?php install_search_form( false ); ?>
<?php install_search_form( isset( $views['plugin-install-search'] ) ); ?>
</div>
<?php
}

View File

@ -164,15 +164,14 @@ function install_search_form( $type_selector = true ) {
$type = isset($_REQUEST['type']) ? wp_unslash( $_REQUEST['type'] ) : 'term';
$term = isset($_REQUEST['s']) ? wp_unslash( $_REQUEST['s'] ) : '';
$input_attrs = '';
$button_type = 'button';
$button_type = 'button screen-reader-text';
// assume no $type_selector means it's a simplified search form
if ( ! $type_selector ) {
$input_attrs = 'class="wp-filter-search" placeholder="' . esc_attr__( 'Search Plugins' ) . '" ';
$button_type .= ' screen-reader-text';
}
?><form class="search-plugins" method="get" action="">
?><form class="search-form search-plugins" method="get" action="">
<input type="hidden" name="tab" value="search" />
<?php if ( $type_selector ) : ?>
<select name="type" id="typeselector">