|
37 | 37 |
|
38 | 38 | {% block breadcrumbs %}
|
39 | 39 | {% set items = [] %}
|
40 |
| - {% for path_location in path_locations %} |
| 40 | + {% for path_location in path_locations ?? [] %} |
41 | 41 | {% if not loop.last %}
|
42 | 42 | {% set items = items|merge([{
|
43 | 43 | 'value': ibexa_content_name(path_location.contentInfo),
|
|
55 | 55 | {% endblock %}
|
56 | 56 |
|
57 | 57 | {% block context_menu %}
|
58 |
| - {% set content_sidebar_right = location is defined and location is not null |
59 |
| - ? knp_menu_get('ezplatform_admin_ui.menu.content.sidebar_right', [], {'location': location, 'content': content, 'content_type': content_type}) |
60 |
| - : [] %} |
61 |
| - {{ knp_menu_render(content_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }} |
| 58 | + {% if location is defined and location is not null %} |
| 59 | + {% set content_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content.sidebar_right', [], { |
| 60 | + 'location': location, |
| 61 | + 'content': content, |
| 62 | + 'content_type': content_type |
| 63 | + }) %} |
| 64 | + {{ knp_menu_render(content_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }} |
| 65 | + {% endif %} |
62 | 66 |
|
63 | 67 | <div class="ibexa-extra-actions-container">
|
64 |
| - {% include '@ibexadesign/content/widget/content_create.html.twig' with {'form': form_content_create, content } only %} |
| 68 | + {% if form_content_create is defined %} |
| 69 | + {% include '@ibexadesign/content/widget/content_create.html.twig' with {'form': form_content_create, content } only %} |
| 70 | + {% endif %} |
65 | 71 | {% if form_content_edit is defined and form_user_edit is not defined %}
|
66 | 72 | {% include '@ibexadesign/content/widget/content_edit.html.twig' with {'form': form_content_edit} only %}
|
67 | 73 | {% endif %}
|
|
78 | 84 | {% if form_user_delete is defined %}
|
79 | 85 | {% include '@ibexadesign/content/modal/user_delete.html.twig' with {'form': form_user_delete} only %}
|
80 | 86 | {% endif %}
|
81 |
| - {{ form(form_location_copy, {'action': path('ibexa.location.copy')}) }} |
82 |
| - {{ form(form_location_move, {'action': path('ibexa.location.move')}) }} |
83 |
| - {{ form(form_location_copy_subtree, {'action': path('ibexa.location.copy_subtree')}) }} |
84 |
| - {{ form(form_content_visibility_update, {'action': path('ibexa.content.update_visibility')}) }} |
| 87 | + {% if form_location_copy is defined %} |
| 88 | + {{ form(form_location_copy, {'action': path('ibexa.location.copy')}) }} |
| 89 | + {% endif %} |
| 90 | + {% if form_location_move is defined %} |
| 91 | + {{ form(form_location_move, {'action': path('ibexa.location.move')}) }} |
| 92 | + {% endif %} |
| 93 | + {% if form_location_copy_subtree is defined %} |
| 94 | + {{ form(form_location_copy_subtree, {'action': path('ibexa.location.copy_subtree')}) }} |
| 95 | + {% endif %} |
| 96 | + {% if form_content_visibility_update is defined %} |
| 97 | + {{ form(form_content_visibility_update, {'action': path('ibexa.content.update_visibility')}) }} |
| 98 | + {% endif %} |
85 | 99 | {% endblock %}
|
86 | 100 |
|
87 | 101 | {% block header %}
|
|
168 | 182 | </div>
|
169 | 183 | </div>
|
170 | 184 | </div>
|
171 |
| - {% if content_has_reverse_relations and location is defined and location is not null and not location.contentInfo.isHidden %} |
172 |
| - {% include '@ibexadesign/content/modal/hide_confirmation.html.twig' %} |
173 |
| - {% endif %} |
| 185 | + {% if content_has_reverse_relations is defined and content_has_reverse_relations and location is defined and location is not null and not location.contentInfo.isHidden %} |
| 186 | + {% include '@ibexadesign/content/modal/hide_confirmation.html.twig' %} |
| 187 | + {% endif %} |
174 | 188 | </div>
|
175 | 189 | {% endblock %}
|
176 | 190 |
|
|
0 commit comments