-
Théodore Biadala authored
Issue #3484575 by plopesc, kunalkursija, lauriii, finnsky, anjali rathod, roshni upadhyay, ckrina, berdir, m4olivei: Move the Edit button outside the more actions drop down
Théodore Biadala authoredIssue #3484575 by plopesc, kunalkursija, lauriii, finnsky, anjali rathod, roshni upadhyay, ckrina, berdir, m4olivei: Move the Edit button outside the more actions drop down
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
top-bar-page-actions.html.twig 1.12 KiB
{#
/**
* @file
* Default theme implementation for navigation top bar page actions.
*
* Available variables:
* - page_actions: Array of page actions for the current route.
* - featured_page_actions: The page actions to show featured before the dropdown.
*/
#}
{% set dropdown_id = 'top-bar-page-actions'|clean_unique_id %}
{% for featured_page_action in featured_page_actions %}
{% set link = featured_page_action.page_action['#link'] %}
{% include 'navigation:toolbar-button' with {
text: link['#title'],
html_tag: 'a',
attributes: create_attribute().setAttribute('href', link['#url']|render|default(null)),
modifiers: ['primary'],
icon: featured_page_action.icon,
} only %}
{% endfor %}
{% include 'navigation:toolbar-button' with {
icon: 'dots',
attributes: create_attribute(
{
'aria-expanded': 'false',
'aria-controls': dropdown_id,
'data-drupal-dropdown': 'true'
}
),
} only %}
<div class="toolbar-dropdown__menu" id={{ dropdown_id }}>
<ul class="toolbar-dropdown__list">
{% for page_action in page_actions %}
{{ page_action }}
{% endfor %}
</ul>
</div>