{% extends '@OroNavigation/menuUpdate/update.html.twig' %} {% set deletedMessage = 'oro.commercemenu.menuupdate.deleted_message' %} {% set hiddenMessage = 'oro.commercemenu.menuupdate.hide_success_message' %} {% set showedMessage = 'oro.commercemenu.menuupdate.show_success_message' %} {% set movedMessage = 'oro.commercemenu.menuupdate.moved_success_message' %} {% set dividerCreatedMessage = 'oro.commercemenu.menuupdate.divider_created' %} {% block navButtons %} {% import '@OroUI/macros.html.twig' as UI %} {% if entity.isDivider == false %} {% set html = UI.saveAndStayButton({ 'route': routePrefix ~ 'update', 'params': {menuName: entity.menu, key: entity.key != menu.name ? '$key' : '', context: context} }) %} {% set html = html ~ UI.saveAndNewButton({ 'route': routePrefix ~ 'create', 'params': {menuName: entity.menu, parentKey: entity.key != menu.name ? '$key' : '', context: context} }) %} {{ UI.dropdownSaveButton({'html': html}) }} {% endif %} {% if not entity.isCustom or entity.id is not null %} {% if entity.key %} {% if entity.isCustom and entity.id is not null %} {{ UI.deleteButton({ 'label': 'oro.navigation.menuupdate.delete'|trans(), 'successMessage': deletedMessage|default('oro.navigation.menuupdate.deleted_message')|trans({'%reload_link%': reloadLink}), 'dataUrl': path(routePrefix ~ 'ajax_delete', {context: context, menuName: menuName, key: entity.key}), 'dataRedirect': path(routePrefix ~ 'update', {menuName: entity.menu, context: context}), 'aCss': 'no-hash remove-button', 'id': 'btn-remove-attribute', 'entity_label': 'oro.navigation.menuupdate.entity_label'|trans, }) }} {% else %} {% if menuItem.isRoot|default(false) %} {% import '@OroNavigation/menuUpdate/view.html.twig' as menuUpdateView %} {{ menuUpdateView.resetButton({ 'dataUrl': path(routePrefix ~ 'ajax_reset', {menuName: menu.name, context: context}), 'dataRedirect': path(routePrefix ~ 'update', {menuName: menu.name, context: context}), 'menuKey': menu.name, 'data': { 'success-message': resetedMessage|default('oro.navigation.menuupdate.reset_message')|trans({ '%menuKey%' : menu.name, '%reload_link%': reloadLink}), } }) }} {% endif %} {% if entity.active %} {# Hide button #}