Back
diff --git a/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig b/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig
new file mode 100644
index 0000000000..5ff74f5585
--- /dev/null
+++ b/src/bundle/Resources/views/themes/admin/ui/component/embedded_item_actions/embedded_item_actions.html.twig
@@ -0,0 +1,46 @@
+
+ {% block loader %}
+
+ {% endblock %}
+
+ {% block embedded_item_menu_trigger %}
+
+ {% endblock %}
+
+ {% block embedded_item_menu %}
+ {% include '@ibexadesign/ui/component/multilevel_popup_menu/multilevel_popup_menu.html.twig' with {
+ is_custom_init: is_custom_init|default(true),
+ attr: {
+ 'data-content-id': content_id|default(''),
+ 'data-location-id': location_id|default(''),
+ 'data-version-no': version_no|default(''),
+ 'data-product-code': product_code|default(''),
+ 'data-language-codes': language_codes|default([])|json_encode,
+ class: attr.class|default('ibexa-embedded-item-actions__menu')
+ },
+ items_container_attr: {
+ 'data-item-template-link': include('@ibexadesign/ui/component/multilevel_popup_menu/multilevel_popup_menu_item.html.twig', {
+ is_button: false,
+ label: '{{ label }}',
+ action_attr: {
+ target: '_blank'
+ }
+ })
+ }
+ } only %}
+ {% endblock %}
+
diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezrichtext.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezrichtext.html.twig
index 15d8965bd9..103cdf4361 100644
--- a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezrichtext.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/ezrichtext.html.twig
@@ -16,4 +16,7 @@
{% endif %}
+ {% embed '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' only %}
+ {% block embedded_item_menu_trigger %}{% endblock %}
+ {% endembed %}
{%- endblock -%}
diff --git a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig
index 7e8525742f..bfc50e196d 100644
--- a/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/field_type/edit/relation_base.html.twig
@@ -7,7 +7,18 @@
{% set allowed_content_types = form.parent.vars.value.fieldDefinition.fieldSettings.selectionContentTypes %}
{% set helper = helper|default('') %}
{% set readonly = attr.readonly|default(false) %}
-
+ {% set remove_item_btn %}
+
+ {% endset %}
{% set col_raw_checkbox_template %}
{% endset %}
- {% set col_raw_actions %}
-
+ {% set col_raw_actions_template %}
+ {{ remove_item_btn }}
+
+ {% include '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' only %}
{% endset %}
{% set body_row_cols_template = [] %}
@@ -54,7 +58,7 @@
{% set body_row_cols_template = body_row_cols_template|merge([
{
content: '{{ content_name }}',
- attr: { class: 'ibexa-relations__item-name' },
+ class: 'ibexa-relations__item-name',
},
{ content: '{{ content_type_name }}' },
{ content: '{{ published_date }}' },
@@ -72,9 +76,9 @@
{% set body_row_cols_template = body_row_cols_template|merge([
{
- content: col_raw_actions,
+ content: col_raw_actions_template,
raw: true,
- has_icon: true,
+ class: 'ibexa-relations__actions-cell'
},
]) %}
@@ -84,13 +88,25 @@
class: 'ibexa-relations__item',
}) }}
{% endset %}
+
{% set body_rows = [] %}
+
{% for relation in relations %}
{% set body_row_cols = [] %}
+ {% set col_raw_actions %}
+ {{ remove_item_btn }}
+
+ {% include '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' with {
+ content_id: relation.contentId,
+ location_id: relation.contentInfo.mainLocationId,
+ version_no: relation.contentInfo.currentVersionNo,
+ } only %}
+ {% endset %}
+
{% if relation.contentInfo is not null and relation.contentType is not null %}
{% set col_raw_checkbox %}
{% set attr = attr|merge({'hidden': 'hidden'}) %}
{{ block('form_widget') }}
-
{% endblock %}
diff --git a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
index 673ef67f61..5628f23763 100644
--- a/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/form_fields.html.twig
@@ -274,6 +274,9 @@
{% endif %}
+ {% embed '@ibexadesign/ui/component/embedded_item_actions/embedded_item_actions.html.twig' only %}
+ {% block embedded_item_menu_trigger %}{% endblock %}
+ {% endembed %}
{%- endblock -%}
diff --git a/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig b/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig
index 4e7eec2e56..3e2b800863 100644
--- a/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig
+++ b/src/bundle/Resources/views/themes/admin/ui/html_body.html.twig
@@ -1,7 +1,9 @@
-
+
{% set form = ibexa_render_embedded_item_edit_form() %}
- {{ form_start(form) }}
+ {{ form_start(form, {
+ attr: { target: '_blank' }
+ }) }}
{{ form_widget(form.content_info, { 'attr': {
'hidden': 'hidden',
'class': 'ibexa-embedded-item-edit__form-field ibexa-embedded-item-edit__form-field--content-info'