Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IBX-1812: Added labels in table buttons #171

Merged
merged 2 commits into from
Jan 12, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/bookmark.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</header>
<body>
<trans-unit id="5cc4d552faa942983e3eb8ec85c053aeb1e42ae4" resname="bookmark.button.remove">
<source>Remove from bookmarks</source>
<target state="new">Remove from bookmarks</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: bookmark.button.remove</note>
</trans-unit>
<trans-unit id="c2c1dc512033aabc10e0c6a46cf5e99355f5c750" resname="bookmark.headline">
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/drafts.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
<note>key: drafts.list.action.remove.confirmation.text</note>
</trans-unit>
<trans-unit id="61be4cf21a9d454b832543ae2ecb5b2b10f94583" resname="drafts.list.action.remove.confirmation.title">
<source>Delete selected draft(s)</source>
<target state="new">Delete selected draft(s)</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: drafts.list.action.remove.confirmation.title</note>
</trans-unit>
<trans-unit id="b62c11ec52c71a7923851340a98932ed8ac8704b" resname="drafts.list.content_type">
Expand Down
28 changes: 14 additions & 14 deletions src/bundle/Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@
<note>key: content_type.view.edit.global_properties</note>
</trans-unit>
<trans-unit id="803a61fc8cf4e7bdfcf27432bb35e379a4971134" resname="content_type.view.list.action.add">
<source>Create a Content Type</source>
<target state="new">Create a Content Type</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: content_type.view.list.action.add</note>
</trans-unit>
<trans-unit id="c3287b9fccc0b54216e50ba02e3d72e17cc1c92e" resname="content_type.view.list.action.delete">
<source>Delete Content Type</source>
<target state="new">Delete Content Type</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: content_type.view.list.action.delete</note>
</trans-unit>
<trans-unit id="09f63694559a9149fb1297e33be843cf54788b95" resname="content_type_group.modal.message">
Expand Down Expand Up @@ -504,8 +504,8 @@
<note>key: language.delete</note>
</trans-unit>
<trans-unit id="71ec7cf0f6cecec112438059bf15066f4ccb5ba1" resname="language.delete_language">
<source>Delete language</source>
<target state="new">Delete language</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: language.delete_language</note>
</trans-unit>
<trans-unit id="2a52961302ce7dfa4a21c5e0bcc239f5a9a36cfe" resname="language.modal.message">
Expand Down Expand Up @@ -569,8 +569,8 @@
<note>key: notification.title</note>
</trans-unit>
<trans-unit id="0480844e257807b48dbf75fa7a374ceb7649ec5c" resname="object_state.delete.bulk_delete.submit">
<source>Delete Object state</source>
<target state="new">Delete Object state</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: object_state.delete.bulk_delete.submit</note>
</trans-unit>
<trans-unit id="2331731a1072a77f20ceef81614545768fc1d446" resname="object_state.modal.message">
Expand All @@ -579,8 +579,8 @@
<note>key: object_state.modal.message</note>
</trans-unit>
<trans-unit id="85cbd870cb6255f3d3d481ece6c23e6e2117e91e" resname="object_state.new">
<source>Create</source>
<target state="new">Create</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: object_state.new</note>
</trans-unit>
<trans-unit id="0f857d4dff9c8232ede300a39010d289d31c2937" resname="object_state_group.delete.bulk_delete.submit">
Expand All @@ -604,13 +604,13 @@
<note>key: policy.modal.message</note>
</trans-unit>
<trans-unit id="84d0c2844a996fbfdc23872405533f92b6e6e2f6" resname="policy.view.list.action.add">
<source>Add a new Policy</source>
<target state="new">Add a new Policy</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: policy.view.list.action.add</note>
</trans-unit>
<trans-unit id="abf42b328e259dc5ec851e70dad234636d0134fe" resname="policy.view.list.action.delete">
<source>Delete Policy</source>
<target state="new">Delete Policy</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: policy.view.list.action.delete</note>
</trans-unit>
<trans-unit id="b8faa90fed74479d8cdb01dc2c0e1af8a79cf9b1" resname="role.modal.message">
Expand Down
4 changes: 2 additions & 2 deletions src/bundle/Resources/translations/section.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<note>key: dashboard.tab.my_drafts.empty</note>
</trans-unit>
<trans-unit id="128df491a522e7af4916cd002d9e11a3d2bc4078" resname="section.action.delete">
<source>Delete Section</source>
<target state="new">Delete Section</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: section.action.delete</note>
</trans-unit>
<trans-unit id="84413bc1ae3385c0aac1af7ea5665cb0c1eaf3ba" resname="section.assign_content">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,17 @@
<button
id="confirm-{{ form.remove.vars.id }}"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost"
disabled
data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}"
title="{{ 'drafts.list.action.remove.confirmation.title'|trans|desc('Delete selected draft(s)') }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'drafts.list.action.remove.confirmation.title'|trans|desc('Delete') }}
</span>
</button>

{% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,28 +88,32 @@
{% if can_create %}
<a
href="{{ path('ezplatform.content_type.add', {contentTypeGroupId: content_type_group.id}) }}"
title="{{ 'content_type.view.list.action.add'|trans|desc('Create a Content Type') }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'content_type.view.list.action.add'|trans|desc('Add new') }}
</span>
</a>
{% endif %}
{% if can_delete %}
{% set modal_data_target = 'delete-content-types-modal' %}
<button
id="delete-content-types"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
disabled
data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}"
title="{{ 'content_type.view.list.action.delete'|trans|desc('Delete Content Type') }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'content_type.view.list.action.delete'|trans|desc('Delete') }}
</span>
</button>
{% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with {
'id': modal_data_target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,16 @@
{{ form_widget(deleteForm.language) }}
<button
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
data-bs-toggle="modal"
data-bs-target="#delete-language-modal"
title="{{ 'language.delete_language'|trans|desc('Delete language') }}"
>
<svg class="ibexa-icon ibexa-icon--small">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'language.delete_language'|trans|desc('Delete') }}
</span>
</button>

{% include '@ibexadesign/language/modal/delete_confirmation.html.twig' with {'deleteForm': deleteForm} %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,28 +75,32 @@
{% block actions %}
{% if can_administrate %}
<a
title="{{ 'object_state.new'|trans|desc('Create a new Object state') }}"
href="{{ path('ezplatform.object_state.state.add', {'objectStateGroupId': object_state_group.id}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'object_state.new'|trans|desc('Add new') }}
</span>
</a>

{% set modal_data_target = 'delete-object-state-modal' %}
<button
id="delete-object-state"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
disabled
data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}"
title="{{ 'object_state.delete.bulk_delete.submit'|trans|desc('Delete Object state') }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'object_state.delete.bulk_delete.submit'|trans|desc('Delete') }}
</span>
</button>
{% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with {
'id': modal_data_target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
}}
) }}
Expand Down
12 changes: 8 additions & 4 deletions src/bundle/Resources/views/themes/admin/section/view.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@
{% set modalDataAttributes = deletable ? 'data-bs-toggle=modal data-bs-target=#delete-section-modal' : '' %}
<button
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text {% if not deletable %}disabled{% endif %}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small {% if not deletable %}disabled{% endif %}"
{{ modalDataAttributes }}
title="{{ 'section.action.delete'|trans|desc('Delete Section') }}"
>
<svg class="ibexa-icon ibexa-icon--small">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'section.action.delete'|trans|desc('Delete') }}
</span>
</button>
{% if deletable %}
{% include '@ibexadesign/section/modal/delete_confirmation.html.twig' with {'form': form_section_delete} %}
Expand All @@ -53,12 +55,14 @@
{% if can_edit %}
<a
href="{{ path('ezplatform.section.update', {'sectionId': section.id}) }}"
title="{{ 'section.edit'|trans|desc('Edit') }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--edit">
<use xlink:href="{{ ibexa_icon_path('edit') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'section.edit'|trans|desc('Edit') }}
</span>
</a>
{% endif %}
{% endset %}
Expand Down
15 changes: 10 additions & 5 deletions src/bundle/Resources/views/themes/admin/trash/list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand All @@ -253,15 +256,17 @@
<button
id="delete-trash-items"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
disabled
data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}"
title="{{ 'trash.delete'|trans|desc('Delete') }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'trash.delete'|trans|desc('Delete') }}
</span>
</button>
{% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with {
'id': modal_data_target,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
{% set label = name|humanize %}
{%- endif -%}
{%- endif -%}
<button title="{{ 'section.assign,content'|trans|desc('Assign Content') }}" type="{{ type|default('button') }}" {{ block('button_attributes') }}>
<button type="{{ type|default('button') }}" {{ block('button_attributes') }}>
<svg class="ibexa-icon ibexa-icon--small">
<use xlink:href="{{ ibexa_icon_path('assign-section') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'section.assign,content'|trans|desc('Assign Content') }}
</span>
</button>
{%- endblock -%}
Loading