Unverified Commit aaa668a1 authored by larowlan's avatar larowlan

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() {
'file' => 'system.admin.inc',
],
'admin_block' => [
'variables' => ['block' => NULL],
'variables' => ['block' => NULL, 'attributes' => []],
'file' => 'system.admin.inc',
],
'admin_block_content' => [
......
......@@ -10,11 +10,17 @@
* - content: (optional) The content of the block.
* - description: (optional) A description of the block.
* (Description should only be output if content is not available).
* - attributes: HTML attributes for the containing div element.
*
* @ingroup themeable
*/
#}
<div class="panel">
{%
set classes = [
'panel',
]
%}
<div{{ attributes.addClass(classes) }}>
{% if block.title %}
<h3 class="panel__title">{{ block.title }}</h3>
{% endif %}
......
......@@ -10,7 +10,6 @@ global-styling:
css/components/content-header.css: {}
css/components/breadcrumb.css: {}
css/components/buttons.css: {}
css/components/colors.css: {}
css/components/messages.css: {}
css/components/dropbutton.component.css: {}
css/components/entity-meta.css: {}
......@@ -33,6 +32,8 @@ global-styling:
css/components/system-status-counter.css: {}
css/components/tabs.css: {}
css/components/views-ui.css: {}
theme:
css/theme/colors.css: {}
layout:
css/layout/layout.css: {}
dependencies:
......
......@@ -10,9 +10,15 @@
* - content: (optional) The content of the block.
* - description: (optional) A description of the block.
* (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 %}
<h3 class="panel__title">{{ block.title }}</h3>
{% 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