-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue #3298846 - Local actions #821
Merged
grzegorz-pietrzak-droptica
merged 1 commit into
develop
from
ISSUE-3298846-local-actions
Aug 9, 2022
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
themes/custom/droopler_theme/config/install/block.block.primaryadminactions.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
langcode: en | ||
status: true | ||
dependencies: | ||
theme: | ||
- droopler_theme | ||
id: primaryadminactions | ||
theme: droopler_theme | ||
region: admin_tabs | ||
weight: 0 | ||
provider: null | ||
plugin: local_actions_block | ||
settings: | ||
id: local_actions_block | ||
label: 'Primary admin actions' | ||
label_display: '0' | ||
provider: core | ||
visibility: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @file | ||
* Theme styling for actions | ||
*/ | ||
|
||
nav.action-links li { | ||
list-style: none; | ||
margin-bottom: 20px; | ||
margin-right: 10px; | ||
display: inline-block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 41 additions & 7 deletions
48
themes/custom/droopler_theme/templates/block/block--local-actions-block.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,46 @@ | ||
{% extends "@droopler_theme/block/block.html.twig" %} | ||
{# | ||
/** | ||
* @file | ||
* Theme override for local actions (primary admin actions.) | ||
* Default theme implementation to display a block. | ||
* | ||
* Available variables: | ||
* - plugin_id: The ID of the block implementation. | ||
* - label: The configured label of the block if visible. | ||
* - configuration: A list of the block's configuration values. | ||
* - label: The configured label for the block. | ||
* - label_display: The display settings for the label. | ||
* - provider: The module or other provider that provided this block plugin. | ||
* - Block plugin specific settings will also be stored here. | ||
* - content: The content of this block. | ||
* - attributes: array of HTML attributes populated by modules, intended to | ||
* be added to the main container tag of this template. | ||
* - id: A valid HTML ID and guaranteed unique. | ||
* - title_attributes: Same as attributes, except applied to the main title | ||
* tag that appears in the template. | ||
* - content_attributes: Same as attributes, except applied to the main content | ||
* tag that appears in the template. | ||
* - title_prefix: Additional output populated by modules, intended to be | ||
* displayed in front of the main title tag that appears in the template. | ||
* - title_suffix: Additional output populated by modules, intended to be | ||
* displayed after the main title tag that appears in the template. | ||
* | ||
* @see template_preprocess_block() | ||
* | ||
* @ingroup themeable | ||
*/ | ||
#} | ||
{% block content %} | ||
{% if content %} | ||
<nav class="action-links">{{ content }}</nav> | ||
{% endif %} | ||
{% endblock %} | ||
{% | ||
set classes = [ | ||
'block', | ||
'block-' ~ configuration.provider|clean_class, | ||
'block-' ~ plugin_id|clean_class, | ||
] | ||
%} | ||
|
||
{% if content|render|trim %} | ||
<div{{ attributes.addClass(classes) }}> | ||
<div{{ content_attributes.addClass('content') }}> | ||
<nav class="action-links">{{ content }}</nav> | ||
</div> | ||
</div> | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am overriding the entire block, otherwise empty link list will appear for anonymous, together with
admin-tabs
region.