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 #162

Merged
merged 2 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions src/bundle/Resources/translations/content_url.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</header>
<body>
<trans-unit id="5c48ac36c2a46c2dc2a89fd4c91a2a3d684eb5d8" resname="tab.urls.action.add">
<source>Add a custom URL alias</source>
<target state="new">Add a custom URL alias</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: tab.urls.action.add</note>
</trans-unit>
<trans-unit id="9b4504fd2e75dffb2c22283be3e9816e8142538a" resname="tab.urls.action.delete">
<source>Delete custom URL alias</source>
<target state="new">Delete custom URL alias</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: tab.urls.action.delete</note>
</trans-unit>
<trans-unit id="2398a15c604fd353b25fc8f558e2d099a6afeb33" resname="tab.urls.add.cancel">
Expand Down
16 changes: 8 additions & 8 deletions src/bundle/Resources/translations/locationview.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@
<note>key: tab.details.translations</note>
</trans-unit>
<trans-unit id="8eb3feb6461dacdbd425ef30fc4848a94ab3db0d" resname="tab.locations.action.add">
<source>Add Location</source>
<target state="new">Add Location</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: tab.locations.action.add</note>
</trans-unit>
<trans-unit id="80808d78f600e925ec3e2dd4b2a0e7570169fd83" resname="tab.locations.action.delete">
<source>Delete Location</source>
<target state="new">Delete Location</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: tab.locations.action.delete</note>
</trans-unit>
<trans-unit id="7ac57e88d1f970747986392b6689075ba64cf270" resname="tab.locations.content_locations">
Expand Down Expand Up @@ -332,13 +332,13 @@
<note>key: tab.relations.table.relation_type.link</note>
</trans-unit>
<trans-unit id="492cea0fd67c4af8e41d21710668239c9db66cfc" resname="tab.translations.action.add">
<source>Add translation</source>
<target state="new">Add translation</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: tab.translations.action.add</note>
</trans-unit>
<trans-unit id="8c29b038407b67badc381aca362d4770d299df8b" resname="tab.translations.action.delete">
<source>Delete Translation</source>
<target state="new">Delete Translation</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: tab.translations.action.delete</note>
</trans-unit>
<trans-unit id="c22e9f75640384f917cc76e6736b3a6e91d70f1d" resname="tab.translations.add.cancel">
Expand Down
48 changes: 24 additions & 24 deletions src/bundle/Resources/translations/messages.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@
<note>key: content_type_group.modal.message</note>
</trans-unit>
<trans-unit id="8eb8668549f90436db605805680144f4b87c7fc0" resname="content_type_group.view.list.action.add">
<source>Create a Content Type group</source>
<target state="new">Create a Content Type group</target>
<source>Create</source>
<target state="new">Create</target>
<note>key: content_type_group.view.list.action.add</note>
</trans-unit>
<trans-unit id="ceb2e962eccd99d66a600df886fb1ff3253c2f16" resname="content_type_group.view.list.action.delete">
<source>Delete Content Type group(s)</source>
<target state="new">Delete Content Type group(s)</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: content_type_group.view.list.action.delete</note>
</trans-unit>
<trans-unit id="4bbd55638dc95b087b2c020f64f29ffed12b0688" resname="content_type_selector.list.show_more">
Expand Down Expand Up @@ -504,8 +504,8 @@
<note>key: ibexa.forgot_user_password.success.alert</note>
</trans-unit>
<trans-unit id="8390c7c1adbff8a264583f6f060256c993023787" resname="language.delete">
<source>Delete language</source>
<target state="new">Delete language</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: language.delete</note>
</trans-unit>
<trans-unit id="2a52961302ce7dfa4a21c5e0bcc239f5a9a36cfe" resname="language.modal.message">
Expand All @@ -514,8 +514,8 @@
<note>key: language.modal.message</note>
</trans-unit>
<trans-unit id="8e4642a0c879921e8bf31752abc577c4bf8d098b" resname="language.new">
<source>Create a new language</source>
<target state="new">Create a new language</target>
<source>Create</source>
<target state="new">Create </target>
<note>key: language.new</note>
</trans-unit>
<trans-unit id="fb1d64fdeabb5f2fe1671d4f3fb72ccca7722ed3" resname="list.action.edit">
Expand Down Expand Up @@ -579,13 +579,13 @@
<note>key: object_state.modal.message</note>
</trans-unit>
<trans-unit id="85cbd870cb6255f3d3d481ece6c23e6e2117e91e" resname="object_state.new">
<source>Create a new Object state</source>
<target state="new">Create a new Object state</target>
<source>Create</source>
<target state="new">Create</target>
<note>key: object_state.new</note>
</trans-unit>
<trans-unit id="0f857d4dff9c8232ede300a39010d289d31c2937" resname="object_state_group.delete.bulk_delete.submit">
<source>Delete Object state group</source>
<target state="new">Delete Object state group</target>
<source>Delete Object</source>
<target state="new">Delete</target>
<note>key: object_state_group.delete.bulk_delete.submit</note>
</trans-unit>
<trans-unit id="5696f8cad271e56ef0e2661b314fa31b70a81bb3" resname="object_state_group.modal.message">
Expand All @@ -594,8 +594,8 @@
<note>key: object_state_group.modal.message</note>
</trans-unit>
<trans-unit id="1cbfb4528f41be4d8de98fa4f81c26b41f8ffad9" resname="object_state_group.new">
<source>Create a new Object state group</source>
<target state="new">Create a new Object state group</target>
<source>Create</source>
<target state="new">Create</target>
<note>key: object_state_group.new</note>
</trans-unit>
<trans-unit id="fda44832f6a675807e1bcd01460231f7117d9e1e" resname="policy.modal.message">
Expand All @@ -619,13 +619,13 @@
<note>key: role.modal.message</note>
</trans-unit>
<trans-unit id="88d7426f344cc9d85b90903dad013d5806b82faa" resname="role.view.list.action.add">
<source>Create a Role</source>
<target state="new">Create a Role</target>
<source>Create</source>
<target state="new">Create</target>
<note>key: role.view.list.action.add</note>
</trans-unit>
<trans-unit id="e0b49df6c6b235f7eb4d03019d1f9505dd77a135" resname="role.view.list.action.delete">
<source>Delete Role</source>
<target state="new">Delete Role</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: role.view.list.action.delete</note>
</trans-unit>
<trans-unit id="a21a7a13956cadf2256095fbdd062f1b33dd05a8" resname="role_assignment.view.list.action.add">
Expand Down Expand Up @@ -654,8 +654,8 @@
<note>key: section.assign,content</note>
</trans-unit>
<trans-unit id="48a0071d3b889cbfef3ff4ee5af8cf83b1e8b7f6" resname="section.delete">
<source>Delete Section</source>
<target state="new">Delete Section</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: section.delete</note>
</trans-unit>
<trans-unit id="6a17e9f4ed416563fc8c3e188509b8eec8a6f7c0" resname="section.modal.message">
Expand Down Expand Up @@ -804,13 +804,13 @@
<note>key: ui.component.tab.tabs_toggler.show</note>
</trans-unit>
<trans-unit id="316f9f0d65ecd76792e8b79bccb094ffd281e7a2" resname="url_wildcard.list.action.create">
<source>Create a URL wildcard</source>
<target state="new">Create a URL wildcard</target>
<source>Add new</source>
<target state="new">Add new</target>
<note>key: url_wildcard.list.action.create</note>
</trans-unit>
<trans-unit id="3f12e58e0ba64a84239826e8fec1ebe129595cc3" resname="url_wildcard.list.action.delete">
<source>Delete URL wildcards</source>
<target state="new">Delete URL wildcards</target>
<source>Delete</source>
<target state="new">Delete</target>
<note>key: url_wildcard.list.action.delete</note>
</trans-unit>
<trans-unit id="b33b3b1380dda4782c33124620ac87c596acb020" resname="url_wildcard.modal.message">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,28 +151,32 @@
{% macro table_header_tools(form_add, form_remove, can_add) %}
<button
data-udw-config="{{ ibexa_udw_config('add_location', {}) }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small ibexa-btn--no-text ibexa-btn--udw-add"
title="{{ 'tab.locations.action.add'|trans|desc('Add Location') }}"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small ibexa-btn--udw-add"
{{ not can_add ? 'disabled' }}
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.locations.action.add'|trans|desc('Add new') }}
</span>
</button>

{% set modal_data_target = 'delete-content-types-modal' %}
<button
id="delete-locations"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small 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="{{ 'tab.locations.action.delete'|trans|desc('Delete Location') }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.locations.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,19 +84,36 @@

{% macro table_header_tools(form_translation_remove, can_translate) %}
{% if can_translate %}
<button type="button" class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small ibexa-btn--no-text ibexa-btn--prevented ibexa-btn--add-translation" data-bs-toggle="modal" data-bs-target="#add-translation-modal"
title="{{ 'tab.translations.action.add'|trans|desc('Add translation') }}">
<button
type="button"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small ibexa-btn--prevented ibexa-btn--add-translation"
data-bs-toggle="modal"
data-bs-target="#add-translation-modal"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.translations.action.add'|trans|desc('Add new') }}
</span>
</button>

{% set modal_data_target = 'delete-translations-modal' %}
<button type="button" id="delete-translations" type="button" class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small ibexa-btn--no-text" disabled data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}" title="{{ 'tab.translations.action.delete'|trans|desc('Delete Translation') }}">
<button
type="button"
id="delete-translations"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small"
disabled
data-bs-toggle="modal"
data-bs-target="#{{ modal_data_target }}"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.translations.action.delete'|trans|desc('Delete') }}
</span>
</button>
{% include '@ibexadesign/ui/modal/bulk_delete_confirmation.html.twig' with {
'id': modal_data_target,
Expand Down
14 changes: 10 additions & 4 deletions src/bundle/Resources/views/themes/admin/content/tab/urls.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,33 @@
{% macro table_header_tools(form_custom_url_remove, can_edit_custom_url) %}
{% if can_edit_custom_url %}
<button
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small ibexa-btn--no-text ibexa-btn--prevented"
class="btn ibexa-btn ibexa-btn--tertiary ibexa-btn--small ibexa-btn--prevented"
data-bs-toggle="modal"
data-bs-target="#ibexa-modal--custom-url-alias"
title="{{ 'tab.urls.action.add'|trans|desc('Add a custom URL alias') }}">
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.urls.action.add'|trans|desc('Add new') }}
</span>
</button>

{% set modal_data_target = 'delete-custom-url-modal' %}
<button
id="delete-custom-urls"
type="button"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--small 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="{{ 'tab.urls.action.delete'|trans|desc('Delete custom URL alias') }}">
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--trash">
<use xlink:href="{{ ibexa_icon_path('trash') }}"></use>
</svg>
<span class="ibexa-btn__label">
{{ 'tab.urls.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 @@ -19,6 +19,30 @@
} %}
{% endblock %}

{% block context_menu %}
{% set menu_items %}
{% if can_create %}
<li class="ibexa-context-menu__item ibexa-adaptive-items__item">
<a
href="{{ path('ezplatform.content_type_group.create') }}"
class="btn ibexa-btn ibexa-btn--primary"
>
<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_group.view.list.action.add'|trans|desc('Create') }}
</span>
</a>
</li>
{% endif %}
{% endset %}

{{ include('@ibexadesign/ui/component/context_menu/context_menu.html.twig', {
menu_items: menu_items,
}) }}
{% endblock %}

{% block content %}
<section class="container ibexa-container">
{% set body_rows = [] %}
Expand Down Expand Up @@ -97,31 +121,22 @@
{% block header %}
{% embed '@ibexadesign/ui/component/table/table_header.html.twig' %}
{% block actions %}
{% if can_create %}
<a
title="{{ 'content_type_group.view.list.action.add'|trans|desc('Create a Content Type group') }}"
href="{{ path('ezplatform.content_type_group.create') }}"
class="btn ibexa-btn ibexa-btn--ghost ibexa-btn--no-text"
>
<svg class="ibexa-icon ibexa-icon--small ibexa-icon--create">
<use xlink:href="{{ ibexa_icon_path('create') }}"></use>
</svg>
</a>
{% endif %}
{% if can_delete %}
{% set modal_data_target = 'delete-content-type-groups-modal' %}
<button
id="delete-content-type-groups"
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_group.view.list.action.delete'|trans|desc('Delete Content Type group(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">
{{ 'content_type_group.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
Loading