diff --git a/core/modules/config/config.admin.inc b/core/modules/config/config.admin.inc index 040cf3d..e3f456c 100644 --- a/core/modules/config/config.admin.inc +++ b/core/modules/config/config.admin.inc @@ -32,17 +32,31 @@ function config_admin_sync_form(array &$form, array &$form_state, StorageInterfa if (empty($config_files)) { continue; } - $form[$config_change_type] = array( - '#type' => 'fieldset', - '#title' => $config_change_type . ' (' . count($config_files) . ')', - '#collapsible' => TRUE, + // @todo A table caption would be more appropriate, but does not have the + // visual importance of a heading. + $form[$config_change_type]['heading'] = array( + '#theme' => 'html_tag__h3', + '#tag' => 'h3', ); - $form[$config_change_type]['config_files'] = array( + switch ($config_change_type) { + case 'create': + $form[$config_change_type]['heading']['#value'] = format_plural(count($config_files), '@count new', '@count new'); + break; + + case 'change': + $form[$config_change_type]['heading']['#value'] = format_plural(count($config_files), '@count changed', '@count changed'); + break; + + case 'delete': + $form[$config_change_type]['heading']['#value'] = format_plural(count($config_files), '@count removed', '@count removed'); + break; + } + $form[$config_change_type]['list'] = array( '#theme' => 'table', '#header' => array('Name'), ); foreach ($config_files as $config_file) { - $form[$config_change_type]['config_files']['#rows'][] = array($config_file); + $form[$config_change_type]['list']['#rows'][] = array($config_file); } } } @@ -78,7 +92,7 @@ function config_admin_import_form($form, &$form_state) { $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', - '#value' => t('Import'), + '#value' => t('Import all'), ); return $form; } @@ -117,7 +131,7 @@ function config_admin_export_form($form, &$form_state) { $form['actions'] = array('#type' => 'actions'); $form['actions']['submit'] = array( '#type' => 'submit', - '#value' => t('Export'), + '#value' => t('Export all'), ); return $form; } diff --git a/core/modules/config/config.module b/core/modules/config/config.module index fd38fd2..deb847d 100644 --- a/core/modules/config/config.module +++ b/core/modules/config/config.module @@ -6,6 +6,28 @@ */ /** + * Implements hook_help(). + */ +function config_help($path, $arg) { + switch ($path) { + case 'admin/help#config': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Configuration manager module provides a user interface for importing and exporting configuration changes; i.e., for staging configuration data between multiple instances of this web site. For more information, see the online handbook entry for Configuration manager module', array( + '!url' => 'http://drupal.org/documentation/modules/config', + )) . '

'; + return $output; + + case 'admin/config/development/sync': + $output = ''; + $output .= '

' . t('Import configuration that is placed in @staging-filepath. All changes, deletions, renames, and additions are listed below.', array( + '@staging-filepath' => config_get_config_directory(CONFIG_STAGING_DIRECTORY), + )) . '

'; + return $output; + } +} + +/** * Implements hook_permission(). */ function config_permission() { diff --git a/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php index c4df762..f3fd97f 100644 --- a/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigImportUITest.php @@ -50,7 +50,7 @@ function testExport() { $this->assertText($dynamic_name); // Export and verify that both do not appear anymore. - $this->drupalPost(NULL, array(), t('Export')); + $this->drupalPost(NULL, array(), t('Export all')); $this->assertUrl('admin/config/development/sync/export'); $this->assertNoText($name); $this->assertNoText($dynamic_name); @@ -85,7 +85,7 @@ function testImport() { // Verify that the Export link yields to the export UI page, and export. $this->clickLink('Export'); - $this->drupalPost(NULL, array(), t('Export')); + $this->drupalPost(NULL, array(), t('Export all')); // Create new configuration objects. $original_name_data = array( @@ -109,7 +109,7 @@ function testImport() { $this->assertText($dynamic_name); // Import and verify that both do not appear anymore. - $this->drupalPost(NULL, array(), t('Import')); + $this->drupalPost(NULL, array(), t('Import all')); $this->assertUrl('admin/config/development/sync'); $this->assertNoText($name); $this->assertNoText($dynamic_name); @@ -143,7 +143,7 @@ function testImportLock() { lock_acquire($lock_name); // Attempt to import configuration and verify that an error message appears. - $this->drupalPost(NULL, array(), t('Import')); + $this->drupalPost(NULL, array(), t('Import all')); $this->assertUrl('admin/config/development/sync'); $this->assertText(t('The import failed due to an error. Any errors have been logged.'));