Skip to content

Commit

Permalink
fix: Do not display children-nodes-quick-creation if no linked types
Browse files Browse the repository at this point in the history
  • Loading branch information
ambroisemaupate committed Sep 12, 2023
1 parent 10f772b commit a826ec9
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions lib/Rozier/src/Resources/views/forms.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -371,23 +371,25 @@
<div class="drawer-widget-nav__title label">{{ label|trans }}</div>
</div>
<div class="drawer-widget-nav__content">
<ul class="uk-navbar-nav">
<li class="children-nodes-quick-creation"
data-uk-dropdown="{mode:'click'}">
<div class="uk-button"><i class="uk-icon-rz-plus-simple"></i></div>
<div class="uk-dropdown uk-dropdown-navbar">
{% for linkedType in linkedTypes %}
<a class="uk-button uk-button-small"
href="#"
data-children-node-type="{{ linkedType.getId }}"
data-children-parent-node="{{ nodeTree.rootNode.getId }}"
data-translation-id="{{ nodeTree.translation.getId }}">
<i class="uk-icon-rz-plus-simple"></i>{{ linkedType.getDisplayName }}
</a>
{% endfor %}
</div>
</li>
</ul>
{% if linkedTypes|length %}
<ul class="uk-navbar-nav">
<li class="children-nodes-quick-creation"
data-uk-dropdown="{mode:'click'}">
<div class="uk-button"><i class="uk-icon-rz-plus-simple"></i></div>
<div class="uk-dropdown uk-dropdown-navbar">
{% for linkedType in linkedTypes %}
<a class="uk-button uk-button-small"
href="#"
data-children-node-type="{{ linkedType.getId }}"
data-children-parent-node="{{ nodeTree.rootNode.getId }}"
data-translation-id="{{ nodeTree.translation.getId }}">
<i class="uk-icon-rz-plus-simple"></i>{{ linkedType.getDisplayName }}
</a>
{% endfor %}
</div>
</li>
</ul>
{% endif %}
</div>
</nav>
<div class="children-nodes-tree">
Expand Down

0 comments on commit a826ec9

Please sign in to comment.