-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathudw_limitation_value.html.twig
More file actions
executable file
·47 lines (44 loc) · 2.43 KB
/
udw_limitation_value.html.twig
File metadata and controls
executable file
·47 lines (44 loc) · 2.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<div class="ibexa-limitation-picker">
{{ form_label(form.limitationValues) }}
{{ form_errors(form.limitationValues) }}
{{ form_widget(form.limitationValues) }}
<button type="button" data-universaldiscovery-title="{{ "role.policy.limitation.location.udw_title"
|trans({}, 'ibexa_content_forms_role')
|desc("Select Location(s) to use as Limitation") }}"
class="btn ibexa-btn ibexa-btn--secondary d-block ibexa-pick-location-limitation-button"
data-location-input-selector="#{{ form.limitationValues.vars.id }}"
data-selected-location-list-selector="#{{ form.limitationValues.vars.id }}-selected-location"
data-udw-config="{{ ibexa_udw_config('multiple', {}) }}"
data-value-template="{{ include('@ibexadesign/limitation/udw_limitation_value_list_item.html.twig', {
'content_breadcrumbs': '',
'location_id': '{{ location_id }}',
'is_loading_state': true
})|e('html_attr') }}">
{{ "role.policy.limitation.location.udw_button"|trans({}, 'ibexa_content_forms_role')|desc("Select Locations") }}
</button>
<ul class="list-unstyled" id="{{ form.limitationValues.vars.id }}-selected-location">
{% for limitationValue in form.limitationValues.vars.data %}
{% if limitationValue is not empty %}
{% set path_locations = ibexa_path_to_locations(limitationValue.pathString) %}
{% set content_breadcrumbs = '' %}
{% for location in path_locations %}
{% set content_breadcrumbs = content_breadcrumbs ~ ibexa_content_name(location.contentInfo) %}
{% if not loop.last %}
{% set content_breadcrumbs = content_breadcrumbs ~ ' / ' %}
{% endif %}
{% endfor %}
{{ include('@ibexadesign/limitation/udw_limitation_value_list_item.html.twig', {
'content_breadcrumbs': content_breadcrumbs,
'location_id': limitationValue.id,
'is_loading_state': false
}) }}
{% else %}
<li class="mt-2">
<twig:ibexa:tag type="neutral">
{{ "role.policy.limitation.location_deleted"|trans({}, 'ibexa_content_forms_role')|desc("Location deleted") }}
</twig:ibexa:tag>
</li>
{% endif %}
{% endfor %}
</ul>
</div>