diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index f4dd82b..ea523ad 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -78,7 +78,6 @@ function seven_preprocess_node_add_list(&$variables) { * * Displays the list of available custom block types for creation, adding * separate variables for the label and the path. - * */ function seven_preprocess_custom_block_add_list(&$variables) { if (!empty($variables['content'])) { @@ -98,7 +97,14 @@ function seven_preprocess_custom_block_add_list(&$variables) { */ function seven_preprocess_admin_block_content(&$variables) { if (!empty($variables['content'])) { - $variables['compact'] = system_admin_compact_mode() ? 'compact' : ''; + // @todo Remove once theme_admin_block() is converted to Twig. + // See https://drupal.org/node/1987410 + $compact = system_admin_compact_mode(); + $variables['attributes'] = array('class' => array('admin-list')); + if ($compact) { + $variables['attributes']['class'][] = 'compact'; + } + foreach ($variables['content'] as $key => $item) { $variables['content'][$key]['label'] = Xss::filterAdmin($item['title']); $variables['content'][$key]['path'] = url($item['href']); diff --git a/core/themes/seven/templates/admin-block-content.html.twig b/core/themes/seven/templates/admin-block-content.html.twig index 8960563..f92fa22 100644 --- a/core/themes/seven/templates/admin-block-content.html.twig +++ b/core/themes/seven/templates/admin-block-content.html.twig @@ -8,16 +8,16 @@ * - path: Path to the admin section. * - label: Short name of the section. * - description: Description of the administrative menu item. - * - compact: Class indicator for compact mode (empty if not compact). + * - attributes: HTML attributes to be added to the element. * * @see template_preprocess_admin_block_content() - * @see seven_preprocess_custom_block_add_list() + * @see seven_preprocess_admin_block_content() * * @ingroup themeable */ #} {% if content %} -