Unverified Commit aaa668a1 authored by larowlan's avatar larowlan
Browse files

Issue #2887860 by drumm, Cottser: Allow attributes to be passed to admin...

Issue #2887860 by drumm, Cottser: Allow attributes to be passed to admin blocks (admin_block theme hook)
parent 4c7d0d17
...@@ -250,7 +250,7 @@ function system_theme() { ...@@ -250,7 +250,7 @@ function system_theme() {
'file' => 'system.admin.inc', 'file' => 'system.admin.inc',
], ],
'admin_block' => [ 'admin_block' => [
'variables' => ['block' => NULL], 'variables' => ['block' => NULL, 'attributes' => []],
'file' => 'system.admin.inc', 'file' => 'system.admin.inc',
], ],
'admin_block_content' => [ 'admin_block_content' => [
......
...@@ -10,11 +10,17 @@ ...@@ -10,11 +10,17 @@
* - content: (optional) The content of the block. * - content: (optional) The content of the block.
* - description: (optional) A description of the block. * - description: (optional) A description of the block.
* (Description should only be output if content is not available). * (Description should only be output if content is not available).
* - attributes: HTML attributes for the containing div element.
* *
* @ingroup themeable * @ingroup themeable
*/ */
#} #}
<div class="panel"> {%
set classes = [
'panel',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if block.title %} {% if block.title %}
<h3 class="panel__title">{{ block.title }}</h3> <h3 class="panel__title">{{ block.title }}</h3>
{% endif %} {% endif %}
......
...@@ -10,7 +10,6 @@ global-styling: ...@@ -10,7 +10,6 @@ global-styling:
css/components/content-header.css: {} css/components/content-header.css: {}
css/components/breadcrumb.css: {} css/components/breadcrumb.css: {}
css/components/buttons.css: {} css/components/buttons.css: {}
css/components/colors.css: {}
css/components/messages.css: {} css/components/messages.css: {}
css/components/dropbutton.component.css: {} css/components/dropbutton.component.css: {}
css/components/entity-meta.css: {} css/components/entity-meta.css: {}
...@@ -33,6 +32,8 @@ global-styling: ...@@ -33,6 +32,8 @@ global-styling:
css/components/system-status-counter.css: {} css/components/system-status-counter.css: {}
css/components/tabs.css: {} css/components/tabs.css: {}
css/components/views-ui.css: {} css/components/views-ui.css: {}
theme:
css/theme/colors.css: {}
layout: layout:
css/layout/layout.css: {} css/layout/layout.css: {}
dependencies: dependencies:
......
...@@ -10,9 +10,15 @@ ...@@ -10,9 +10,15 @@
* - content: (optional) The content of the block. * - content: (optional) The content of the block.
* - description: (optional) A description of the block. * - description: (optional) A description of the block.
* (Description should only be output if content is not available). * (Description should only be output if content is not available).
* - attributes: HTML attributes for the containing div element.
*/ */
#} #}
<div class="panel"> {%
set classes = [
'panel',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if block.title %} {% if block.title %}
<h3 class="panel__title">{{ block.title }}</h3> <h3 class="panel__title">{{ block.title }}</h3>
{% endif %} {% endif %}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment