diff --git a/src/bundle/Resources/translations/bookmark.en.xliff b/src/bundle/Resources/translations/bookmark.en.xliff index 376e0279d3..da942a91db 100644 --- a/src/bundle/Resources/translations/bookmark.en.xliff +++ b/src/bundle/Resources/translations/bookmark.en.xliff @@ -7,8 +7,8 @@ - Remove from bookmarks - Remove from bookmarks + Delete + Delete key: bookmark.button.remove diff --git a/src/bundle/Resources/translations/drafts.en.xliff b/src/bundle/Resources/translations/drafts.en.xliff index cccc85a3e8..e664d7e1d5 100644 --- a/src/bundle/Resources/translations/drafts.en.xliff +++ b/src/bundle/Resources/translations/drafts.en.xliff @@ -32,8 +32,8 @@ key: drafts.list.action.remove.confirmation.text - Delete selected draft(s) - Delete selected draft(s) + Delete + Delete key: drafts.list.action.remove.confirmation.title diff --git a/src/bundle/Resources/translations/messages.en.xliff b/src/bundle/Resources/translations/messages.en.xliff index 310d5ee99f..ad72bf07f3 100644 --- a/src/bundle/Resources/translations/messages.en.xliff +++ b/src/bundle/Resources/translations/messages.en.xliff @@ -232,13 +232,13 @@ key: content_type.view.edit.global_properties - Create a Content Type - Create a Content Type + Add new + Add new key: content_type.view.list.action.add - Delete Content Type - Delete Content Type + Delete + Delete key: content_type.view.list.action.delete @@ -504,8 +504,8 @@ key: language.delete - Delete language - Delete language + Delete + Delete key: language.delete_language @@ -569,8 +569,8 @@ key: notification.title - Delete Object state - Delete Object state + Delete + Delete key: object_state.delete.bulk_delete.submit @@ -579,8 +579,8 @@ key: object_state.modal.message - Create - Create + Add new + Add new key: object_state.new @@ -604,13 +604,13 @@ key: policy.modal.message - Add a new Policy - Add a new Policy + Add new + Add new key: policy.view.list.action.add - Delete Policy - Delete Policy + Delete + Delete key: policy.view.list.action.delete diff --git a/src/bundle/Resources/translations/section.en.xliff b/src/bundle/Resources/translations/section.en.xliff index 6e9124b6fb..db14ac7fdc 100644 --- a/src/bundle/Resources/translations/section.en.xliff +++ b/src/bundle/Resources/translations/section.en.xliff @@ -12,8 +12,8 @@ key: dashboard.tab.my_drafts.empty - Delete Section - Delete Section + Delete + Delete key: section.action.delete diff --git a/src/bundle/Resources/views/themes/admin/account/bookmarks/list.html.twig b/src/bundle/Resources/views/themes/admin/account/bookmarks/list.html.twig index de95566f02..b1fb32c8f7 100644 --- a/src/bundle/Resources/views/themes/admin/account/bookmarks/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/account/bookmarks/list.html.twig @@ -91,7 +91,7 @@ { }, ], body_rows, - actions: form_widget(form_remove.remove, {'attr': {'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text', 'disabled': true}}), + actions: form_widget(form_remove.remove, {'attr': {'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--small', 'disabled': true}}), empty_table_info_text: 'bookmark.list.empty'|trans|desc('You have no bookmarks yet. Your bookmarks will show up here.'), } %} {{ form_end(form_remove) }} diff --git a/src/bundle/Resources/views/themes/admin/content/draft/draft_list.html.twig b/src/bundle/Resources/views/themes/admin/content/draft/draft_list.html.twig index e156a2dbde..e9082ad900 100644 --- a/src/bundle/Resources/views/themes/admin/content/draft/draft_list.html.twig +++ b/src/bundle/Resources/views/themes/admin/content/draft/draft_list.html.twig @@ -163,15 +163,17 @@ {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { diff --git a/src/bundle/Resources/views/themes/admin/content_type/list.html.twig b/src/bundle/Resources/views/themes/admin/content_type/list.html.twig index 84438aab74..98de2618ba 100644 --- a/src/bundle/Resources/views/themes/admin/content_type/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/content_type/list.html.twig @@ -88,12 +88,14 @@ {% if can_create %} + + {{ 'content_type.view.list.action.add'|trans|desc('Add new') }} + {% endif %} {% if can_delete %} @@ -101,15 +103,17 @@ {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, diff --git a/src/bundle/Resources/views/themes/admin/language/index.html.twig b/src/bundle/Resources/views/themes/admin/language/index.html.twig index 2a4cb7eca6..efdd5a1209 100644 --- a/src/bundle/Resources/views/themes/admin/language/index.html.twig +++ b/src/bundle/Resources/views/themes/admin/language/index.html.twig @@ -84,14 +84,16 @@ {{ form_widget(deleteForm.language) }} {% include '@ibexadesign/language/modal/delete_confirmation.html.twig' with {'deleteForm': deleteForm} %} diff --git a/src/bundle/Resources/views/themes/admin/object_state/list.html.twig b/src/bundle/Resources/views/themes/admin/object_state/list.html.twig index b8ecc469f4..2cc773a68e 100644 --- a/src/bundle/Resources/views/themes/admin/object_state/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/object_state/list.html.twig @@ -75,28 +75,32 @@ {% block actions %} {% if can_administrate %} + + {{ 'object_state.new'|trans|desc('Add new') }} + {% set modal_data_target = 'delete-object-state-modal' %} {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, diff --git a/src/bundle/Resources/views/themes/admin/section/assigned_content.html.twig b/src/bundle/Resources/views/themes/admin/section/assigned_content.html.twig index 51987487b5..23efb3222e 100644 --- a/src/bundle/Resources/views/themes/admin/section/assigned_content.html.twig +++ b/src/bundle/Resources/views/themes/admin/section/assigned_content.html.twig @@ -67,7 +67,7 @@ {{ form_widget(form_section_content_assign.locations.location) }} {{ form_widget(form_section_content_assign.locations.select_content, {'attr': { - 'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--open-udw', + 'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--small ibexa-btn--open-udw', 'data-udw-config': ibexa_udw_config('multiple', {'type': 'section_assign'}) }} ) }} diff --git a/src/bundle/Resources/views/themes/admin/section/view.html.twig b/src/bundle/Resources/views/themes/admin/section/view.html.twig index 4e49cb41b0..8865338630 100644 --- a/src/bundle/Resources/views/themes/admin/section/view.html.twig +++ b/src/bundle/Resources/views/themes/admin/section/view.html.twig @@ -38,13 +38,15 @@ {% set modalDataAttributes = deletable ? 'data-bs-toggle=modal data-bs-target=#delete-section-modal' : '' %} {% if deletable %} {% include '@ibexadesign/section/modal/delete_confirmation.html.twig' with {'form': form_section_delete} %} @@ -53,12 +55,14 @@ {% if can_edit %} + + {{ 'section.edit'|trans|desc('Edit') }} + {% endif %} {% endset %} diff --git a/src/bundle/Resources/views/themes/admin/trash/list.html.twig b/src/bundle/Resources/views/themes/admin/trash/list.html.twig index 98b38bc59a..0b0581b519 100644 --- a/src/bundle/Resources/views/themes/admin/trash/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/trash/list.html.twig @@ -236,14 +236,17 @@ {% set restore_under_new_parent_button_attr = form_trash_item_restore.location.select_content.vars.attr|merge({ 'attr': { 'data-udw-config': ibexa_udw_config('single_container', {}), - 'class': (form_trash_item_restore.location.select_content.vars.attr.class|default('') ~ ' btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text')|trim, + 'class': (form_trash_item_restore.location.select_content.vars.attr.class|default('') ~ ' btn ibexa-btn ibexa-btn--ghost ibexa-btn--small')|trim, 'disabled': true - } + }, 'label': 'trash.button.restore_new_location'|trans({},'trash')|desc("Restore in a new Location") }) %} {{ form_widget(form_trash_item_restore.location.select_content, restore_under_new_parent_button_attr) }} {{ form_widget(form_trash_item_restore.location.location) }} {% do form_trash_item_restore.location.setRendered %} - {{ form_widget(form_trash_item_restore.restore, {'attr': {'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text', 'disabled': true}}) }} + {{ form_widget(form_trash_item_restore.restore, { + 'attr': {'class': 'btn ibexa-btn ibexa-btn--ghost ibexa-btn--small', 'disabled': true}, + 'label': 'trash.button.restore'|trans({},'trash')|desc('Restore') + }) }} {% else %} {% do form_trash_item_restore.location.setRendered %} {% do form_trash_item_restore.restore.setRendered %} @@ -253,15 +256,17 @@ {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, diff --git a/src/bundle/Resources/views/themes/admin/ui/form/assign_section_widget.html.twig b/src/bundle/Resources/views/themes/admin/ui/form/assign_section_widget.html.twig index 5c0cc13cbe..0d4faa1310 100644 --- a/src/bundle/Resources/views/themes/admin/ui/form/assign_section_widget.html.twig +++ b/src/bundle/Resources/views/themes/admin/ui/form/assign_section_widget.html.twig @@ -9,9 +9,12 @@ {% set label = name|humanize %} {%- endif -%} {%- endif -%} - {%- 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 c4c94323b2..32d5e1470a 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 @@ -129,11 +129,13 @@ {% set label = name|humanize %} {%- endif -%} {%- endif -%} - {%- endblock -%} @@ -149,11 +151,13 @@ {% set label = name|humanize %} {%- endif -%} {%- endif -%} - {%- endblock -%} @@ -186,15 +190,18 @@ {% set label = name|humanize %} {%- endif -%} {%- endif -%} - {%- endblock table_header_tool_btn -%} {%- block _bookmark_remove_remove_widget -%} - {%- set title = 'bookmark.button.remove'|trans({},'bookmark')|desc('Remove from bookmarks') -%} + {%- set title = 'bookmark.button.remove'|trans({},'bookmark')|desc('Delete') -%} {%- set icon = 'trash' -%} {{ block('table_header_tool_btn') }} {%- endblock -%} diff --git a/src/bundle/Resources/views/themes/admin/user/policy/list.html.twig b/src/bundle/Resources/views/themes/admin/user/policy/list.html.twig index 6c1d3984c2..be706d5963 100644 --- a/src/bundle/Resources/views/themes/admin/user/policy/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/user/policy/list.html.twig @@ -2,7 +2,7 @@ {% form_theme form_policies_delete '@ibexadesign/ui/form_fields.html.twig' %} -
+
{% set body_rows = [] %} {% for policy in pager.currentPageResults %} {% set body_row_cols = [] %} @@ -87,27 +87,31 @@ {% block actions %} {% if can_update %} + + {{ 'policy.view.list.action.add'|trans|desc('Add new') }} + {% set modal_data_target = 'delete-policies-modal' %} {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, diff --git a/src/bundle/Resources/views/themes/admin/user/role_assignment/list.html.twig b/src/bundle/Resources/views/themes/admin/user/role_assignment/list.html.twig index 6ba9dc4dba..33a5354ea8 100644 --- a/src/bundle/Resources/views/themes/admin/user/role_assignment/list.html.twig +++ b/src/bundle/Resources/views/themes/admin/user/role_assignment/list.html.twig @@ -62,25 +62,29 @@ {% if can_assign %} + class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"> - + + {{ 'role_assignment.view.list.action.add'|trans|desc('Assign to Users/Groups') }} + {% set modal_data_target = 'delete-role-assignments-modal' %} {% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with { 'id': modal_data_target, diff --git a/src/lib/Behat/Page/RolePage.php b/src/lib/Behat/Page/RolePage.php index 43a65874df..cc41fd42e3 100644 --- a/src/lib/Behat/Page/RolePage.php +++ b/src/lib/Behat/Page/RolePage.php @@ -12,6 +12,7 @@ use Ibexa\AdminUi\Behat\Component\Dialog; use Ibexa\AdminUi\Behat\Component\Table\TableBuilder; use Ibexa\AdminUi\Behat\Component\TableNavigationTab; +use Ibexa\Behat\Browser\Element\Criterion\ElementTextCriterion; use Ibexa\Behat\Browser\Locator\VisibleCSSLocator; use Ibexa\Behat\Browser\Page\Page; use Ibexa\Behat\Browser\Routing\Router; @@ -151,10 +152,9 @@ public function getName(): string public function specifyLocators(): array { return [ - new VisibleCSSLocator('assignUsersButton', '[data-bs-original-title="Assign to Users/Groups"]'), + new VisibleCSSLocator('button', '.ibexa-btn'), new VisibleCSSLocator('deleteAssignmentButton', '#delete-role-assignments'), new VisibleCSSLocator('deletePoliciesButton', '#delete-policies'), - new VisibleCSSLocator('createPolicyButton', '[data-bs-original-title="Add a new Policy"]'), new VisibleCSSLocator('assignmentTable', '[name="role_assignments_delete"]'), new VisibleCSSLocator('policiesTable', '[name="policies_delete"]'), new VisibleCSSLocator('pageTitle', '.ibexa-page-title h1'), @@ -199,7 +199,10 @@ public function verifyAssignments(array $expectedAssignments) public function startAssigningUsers() { $this->goToTab('Assignments'); - $this->getHTMLPage()->find($this->getLocator('assignUsersButton'))->click(); + $this->getHTMLPage() + ->findAll($this->getLocator('button')) + ->getByCriterion(new ElementTextCriterion('Assign to Users/Groups')) + ->click(); } public function deleteAssignments(array $itemNames) @@ -236,7 +239,10 @@ public function deletePolicies(array $itemNames) public function createPolicy(): void { - $this->getHTMLPage()->find($this->getLocator('createPolicyButton'))->click(); + $this->getHTMLPage() + ->findAll($this->getLocator('button')) + ->getByCriterion(new ElementTextCriterion('Add new')) + ->click(); } public function editPolicy(string $moduleName, string $functionName): void diff --git a/src/lib/Behat/Page/SectionPage.php b/src/lib/Behat/Page/SectionPage.php index e3bc38ff57..ecf0a249ed 100644 --- a/src/lib/Behat/Page/SectionPage.php +++ b/src/lib/Behat/Page/SectionPage.php @@ -13,6 +13,7 @@ use Ibexa\AdminUi\Behat\Component\Table\TableBuilder; use Ibexa\Behat\Browser\Element\Condition\ElementExistsCondition; use Ibexa\Behat\Browser\Element\Criterion\ChildElementTextCriterion; +use Ibexa\Behat\Browser\Element\Criterion\ElementTextCriterion; use Ibexa\Behat\Browser\Locator\VisibleCSSLocator; use Ibexa\Behat\Browser\Page\Page; use Ibexa\Behat\Browser\Routing\Router; @@ -77,7 +78,10 @@ public function hasAssignedItem(array $elementData): bool public function edit() { - $this->getHTMLPage()->find($this->getLocator('editButton'))->click(); + $this->getHTMLPage() + ->findAll($this->getLocator('button')) + ->getByCriterion(new ElementTextCriterion('Edit')) + ->click(); } public function assignContentItems() @@ -92,7 +96,10 @@ public function hasAssignedItems(): bool public function delete() { - $this->getHTMLPage()->find($this->getLocator('deleteButton'))->click(); + $this->getHTMLPage() + ->findAll($this->getLocator('button')) + ->getByCriterion(new ElementTextCriterion('Delete')) + ->click(); $this->dialog->verifyIsLoaded(); $this->dialog->confirm(); } @@ -143,8 +150,7 @@ protected function specifyLocators(): array new VisibleCSSLocator('contentItemsTable', '.ibexa-main-container__content-column .ibexa-table'), new VisibleCSSLocator('assignButton', '#section_content_assign_locations_select_content'), new VisibleCSSLocator('sectionInfoTable', '.ibexa-container .ibexa-table'), - new VisibleCSSLocator('deleteButton', 'button[data-bs-original-title="Delete Section"]'), - new VisibleCSSLocator('editButton', 'a[data-bs-original-title="Edit"]'), + new VisibleCSSLocator('button', '.ibexa-btn'), new VisibleCSSLocator('sectionPropertiesItem', '.ibexa-details__item'), new VisibleCSSLocator('sectionPropertiesLabel', '.ibexa-details__item-label'), new VisibleCSSLocator('sectionPropertiesValue', '.ibexa-details__item-content'),