|
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 |
| - {% 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 %} |
| 58 | + {% set content_sidebar_right = knp_menu_get('ezplatform_admin_ui.menu.content.sidebar_right', [], { |
| 59 | + 'location': location, |
| 60 | + 'content': content, |
| 61 | + 'content_type': content_type |
| 62 | + }) %} |
| 63 | + {{ knp_menu_render(content_sidebar_right, {'template': '@ibexadesign/ui/menu/context_menu.html.twig'}) }} |
66 | 64 |
|
67 | 65 | <div class="ibexa-extra-actions-container">
|
68 | 66 | {% if form_content_create is defined %}
|
|
84 | 82 | {% if form_user_delete is defined %}
|
85 | 83 | {% include '@ibexadesign/content/modal/user_delete.html.twig' with {'form': form_user_delete} only %}
|
86 | 84 | {% endif %}
|
87 |
| - {% if form_location_copy is defined %} |
88 | 85 | {{ form(form_location_copy, {'action': path('ibexa.location.copy')}) }}
|
89 |
| - {% endif %} |
90 |
| - {% if form_location_move is defined %} |
91 | 86 | {{ form(form_location_move, {'action': path('ibexa.location.move')}) }}
|
92 |
| - {% endif %} |
93 |
| - {% if form_location_copy_subtree is defined %} |
94 | 87 | {{ form(form_location_copy_subtree, {'action': path('ibexa.location.copy_subtree')}) }}
|
95 |
| - {% endif %} |
96 |
| - {% if form_content_visibility_update is defined %} |
97 | 88 | {{ form(form_content_visibility_update, {'action': path('ibexa.content.update_visibility')}) }}
|
98 |
| - {% endif %} |
99 | 89 | {% endblock %}
|
100 | 90 |
|
101 | 91 | {% block header %}
|
|
123 | 113 | {% endblock %}
|
124 | 114 | {% endembed %}
|
125 | 115 |
|
126 |
| - {% if location is defined and location is not null %} |
127 |
| - {% if location.hidden or location.invisible %} |
128 |
| - <div class="pb-4"> |
129 |
| - {% include '@ibexadesign/ui/component/alert/alert.html.twig' with { |
130 |
| - type: 'info', |
131 |
| - title: 'content.hidden.message'|trans()|desc('This Content item or its Location is hidden.'), |
132 |
| - icon_path: ibexa_icon_path('hide'), |
133 |
| - class: 'mb-4', |
134 |
| - } only %} |
135 |
| - </div> |
136 |
| - {% endif %} |
137 |
| - {{ ibexa_render_component_group( |
138 |
| - 'admin-ui-location-view-content-alerts', |
139 |
| - { |
140 |
| - 'versionInfo': content.versionInfo, |
141 |
| - 'location': location, |
142 |
| - } |
143 |
| - ) }} |
| 116 | + {% if location.hidden or location.invisible %} |
| 117 | + <div class="pb-4"> |
| 118 | + {% include '@ibexadesign/ui/component/alert/alert.html.twig' with { |
| 119 | + type: 'info', |
| 120 | + title: 'content.hidden.message'|trans()|desc('This Content item or its Location is hidden.'), |
| 121 | + icon_path: ibexa_icon_path('hide'), |
| 122 | + class: 'mb-4', |
| 123 | + } only %} |
| 124 | + </div> |
144 | 125 | {% endif %}
|
| 126 | + {{ ibexa_render_component_group( |
| 127 | + 'admin-ui-location-view-content-alerts', |
| 128 | + { |
| 129 | + 'versionInfo': content.versionInfo, |
| 130 | + 'location': location, |
| 131 | + } |
| 132 | + ) }} |
145 | 133 | {% endblock %}
|
146 | 134 |
|
147 | 135 | {% block content %}
|
148 | 136 | <div class="align-items-stretch ibexa-main-row">
|
149 | 137 | <div class="ibexa-content-container">
|
150 | 138 | <div class="panel panel-primary">
|
151 | 139 | <div class="panel-body">
|
152 |
| - {% if location is defined and location is not null %} |
153 |
| - {{ ibexa_render_component_group('admin-ui-location-view-tab-groups', { |
154 |
| - 'content': content, |
155 |
| - 'location': location, |
156 |
| - 'contentType': content_type, |
157 |
| - 'draft_pagination_params': draft_pagination_params, |
158 |
| - 'reverse_relation_pagination_params': reverse_relation_pagination_params, |
159 |
| - 'relation_pagination_params': relation_pagination_params, |
160 |
| - 'custom_urls_pagination_params': custom_urls_pagination_params, |
161 |
| - 'system_urls_pagination_params': system_urls_pagination_params, |
162 |
| - 'roles_pagination_params': roles_pagination_params, |
163 |
| - 'policies_pagination_params': policies_pagination_params, |
164 |
| - 'is_location_visible': not location.invisible, |
165 |
| - 'subitems_module': subitems_module, |
166 |
| - }) }} |
167 |
| - {% endif %} |
| 140 | + {{ ibexa_render_component_group('admin-ui-location-view-tab-groups', { |
| 141 | + 'content': content, |
| 142 | + 'location': location, |
| 143 | + 'contentType': content_type, |
| 144 | + 'draft_pagination_params': draft_pagination_params, |
| 145 | + 'reverse_relation_pagination_params': reverse_relation_pagination_params, |
| 146 | + 'relation_pagination_params': relation_pagination_params, |
| 147 | + 'custom_urls_pagination_params': custom_urls_pagination_params, |
| 148 | + 'system_urls_pagination_params': system_urls_pagination_params, |
| 149 | + 'roles_pagination_params': roles_pagination_params, |
| 150 | + 'policies_pagination_params': policies_pagination_params, |
| 151 | + 'is_location_visible': not location.invisible, |
| 152 | + 'subitems_module': subitems_module, |
| 153 | + }) }} |
168 | 154 |
|
169 | 155 | {% if content_type.isContainer %}
|
170 | 156 | {{ form_start(form_subitems_content_edit, { 'action': path('ibexa.content.edit'), 'attr': { 'hidden': 'hidden' }}) }}
|
|
182 | 168 | </div>
|
183 | 169 | </div>
|
184 | 170 | </div>
|
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 %} |
| 171 | + {% if content_has_reverse_relations and not location.contentInfo.isHidden %} |
186 | 172 | {% include '@ibexadesign/content/modal/hide_confirmation.html.twig' %}
|
187 | 173 | {% endif %}
|
188 | 174 | </div>
|
|
0 commit comments