';
- $output .= theme('system_compact_link');
+ $output .= drupal_render($system_compact);
foreach ($container as $id => $data) {
$output .= '
';
$output .= $data;
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 0df34a0..19d8214 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -183,9 +183,6 @@ function system_theme() {
'system_powered_by' => array(
'variables' => array(),
),
- 'system_compact_link' => array(
- 'variables' => array(),
- ),
'system_date_format_localize_form' => array(
'render element' => 'form',
),
@@ -3319,24 +3316,6 @@ function theme_system_powered_by() {
}
/**
- * Returns HTML for a link to show or hide inline help descriptions.
- *
- * @ingroup themeable
- */
-function theme_system_compact_link() {
- $output = '
';
- if (system_admin_compact_mode()) {
- $output .= l(t('Show descriptions'), 'admin/compact/off', array('attributes' => array('title' => t('Expand layout to include descriptions.')), 'query' => drupal_get_destination()));
- }
- else {
- $output .= l(t('Hide descriptions'), 'admin/compact/on', array('attributes' => array('title' => t('Compress layout by hiding descriptions.')), 'query' => drupal_get_destination()));
- }
- $output .= '
';
-
- return $output;
-}
-
-/**
* Attempts to get a file using Guzzle HTTP client and to store it locally.
*
* @param $url
diff --git a/core/modules/user/user.admin.inc b/core/modules/user/user.admin.inc
index a745bfa..e1f96b9 100644
--- a/core/modules/user/user.admin.inc
+++ b/core/modules/user/user.admin.inc
@@ -236,9 +236,29 @@ function theme_user_admin_permissions($variables) {
foreach (element_children($form['role_names']) as $rid) {
$header[] = array('data' => drupal_render($form['role_names'][$rid]), 'class' => array('checkbox'));
}
+
$system_compact_link = array(
- '#theme' => 'system_compact_link',
+ '#type' => 'link',
+ '#href' => 'admin/compact/off',
+ '#title' => t('Show descriptions'),
+ '#attributes' => array(
+ 'title' => t('Expand layout to include descriptions.'),
+ ),
+ '#options' => array('query' => drupal_get_destination()),
+ );
+ if (!system_admin_compact_mode()) {
+ $system_compact_link['#href'] = 'admin/compact/on';
+ $system_compact_link['#title'] = t('Hide descriptions');
+ $system_compact_link['#attributes']['title'] = t('Compress layout by hiding descriptions.');
+ }
+ $system_compact = array(
+ '#theme' => 'container',
+ '#children' => drupal_render($system_compact_link),
+ '#attributes' => array(
+ 'class' => array('compact-link'),
+ ),
);
+
$table = array(
'#theme' => 'table',
'#header' => $header,
@@ -248,7 +268,7 @@ function theme_user_admin_permissions($variables) {
),
'#sticky' => TRUE,
);
- $output = drupal_render($system_compact_link);
+ $output = drupal_render($system_compact);
$output .= drupal_render($table);
$output .= drupal_render_children($form);
return $output;