-
Notifications
You must be signed in to change notification settings - Fork 0
Fix: refresh RzAside tree depending on page tree action #396
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
base: develop
Are you sure you want to change the base?
Changes from all commits
d09057f
53817b2
7e11a9b
274dd2a
34f61b9
7d1e734
127767b
690e0c9
4f0b656
42f017e
11129a8
9183db3
c47342b
01a4d69
2ca2954
2892100
f679004
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,10 @@ | ||
| <rz-aside class="rz-aside"> | ||
| {% set default_translation = getAvailableTranslations()|find(t => t.defaultTranslation) %} | ||
| <rz-aside | ||
| class="rz-aside" | ||
| id="rz-aside" | ||
| data-default-translation-id="{{ default_translation.id }}" | ||
| > | ||
| <div class="rz-aside__body"> | ||
| {% include '@RoadizRozier/widgets/tree/rz_tree_wrapper_auto.html.twig' with { | ||
| root_classes: ['rz-aside__body'], | ||
| } %} | ||
| {% include '@RoadizRozier/widgets/rz_tree_wrapper_auto.html.twig' only %} | ||
| </div> | ||
| </rz-aside> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,13 +5,13 @@ | |
|
|
||
| <ul class="{{ classes|join(' ') }}" data-tree-type="{{ type_prefix }}"> | ||
| {%- for translation in translations -%} | ||
| {{ _self.item(translation, tree) }} | ||
| {{ _self.item(translation, tree, btn_attr) }} | ||
| {%- endfor -%} | ||
| </ul> | ||
| {% endif %} | ||
|
|
||
|
|
||
| {% macro item(translation, tree) %} | ||
| {% macro item(translation, tree, btn_attr = {}) %} | ||
| <li class="rz-language-switcher__item"> | ||
| {% set button_data = { | ||
| emphasis: 'tertiary', | ||
|
|
@@ -21,7 +21,11 @@ | |
|
|
||
| {% if tree is defined %} | ||
| {% set button_data = button_data|merge({ selected: translation.id == tree.translation.id }) %} | ||
| {% set button_attr = { 'data-translation-id': translation.id } %} | ||
| {% set button_attr = { | ||
timothejoubert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 'data-translation-id': translation.id, | ||
| 'command': '--update-translation', | ||
| 'type': 'button', | ||
| } %} | ||
|
|
||
| {% if tree.rootNode is defined %} | ||
| {% set button_attr = button_attr|merge({'data-children-parent-node': tree.rootNode.id }) %} | ||
|
|
@@ -31,10 +35,12 @@ | |
| {% set button_attr = button_attr|merge({'data-filter-tag': tree.tag.id}) %} | ||
| {% endif %} | ||
|
|
||
| {% set button_data = button_data|merge({attributes: button_attr}) %} | ||
| {% endif %} | ||
|
|
||
| {% import "@RoadizRozier/macros/rz_button.html.twig" as rz_button %} | ||
| {{ rz_button.root(button_data) }} | ||
| {{ rz_button.root(button_data|merge({ | ||
| attributes: button_attr|merge(btn_attr) | ||
| })) | ||
| }} | ||
|
Comment on lines
14
to
44
|
||
| </li> | ||
| {% endmacro %} | ||
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.