Skip to content

Commit

Permalink
IBX-7085: Missing text for empty screens (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrabowskiM committed Mar 11, 2024
1 parent ea4cc46 commit 28a9fb8
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 3 deletions.
20 changes: 20 additions & 0 deletions src/bundle/Resources/translations/ibexa_role.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@
<target state="new">Edit</target>
<note>key: policy.view.limitations.title</note>
</trans-unit>
<trans-unit id="23ea93648ea660ff72d374919fe6df5398ed070f" resname="policy.view.list.no_policies.action">
<source>Select policies to effectively manage users access.</source>
<target state="new">Select policies to effectively manage users access.</target>
<note>key: policy.view.list.no_policies.action</note>
</trans-unit>
<trans-unit id="c298a13835d0e03798c0d658b9828774bae0ef45" resname="policy.view.list.no_policies.info">
<source>Add first policy</source>
<target state="new">Add first policy</target>
<note>key: policy.view.list.no_policies.info</note>
</trans-unit>
<trans-unit id="35aa96a30453aa7b604432885032fd961a7f508a" resname="policy.view.list.panel.policies.action.edit">
<source>Edit</source>
<target state="new">Edit</target>
Expand Down Expand Up @@ -276,6 +286,16 @@
<target state="new">Users and Groups</target>
<note>key: role_assignment.view.list.header</note>
</trans-unit>
<trans-unit id="970ece71cc63ecb5801a372c11086cd9c9ea3f6b" resname="role_assignment.view.list.no_assignments.action">
<source>Select assignments to effectively manage user roles access by adding them to specific groups.</source>
<target state="new">Select assignments to effectively manage user roles access by adding them to specific groups.</target>
<note>key: role_assignment.view.list.no_assignments.action</note>
</trans-unit>
<trans-unit id="60d27e45bb1366da2a24048afbc1ee4f6e53ab1b" resname="role_assignment.view.list.no_assignments.info">
<source>Add users assignment</source>
<target state="new">Add users assignment</target>
<note>key: role_assignment.view.list.no_assignments.info</note>
</trans-unit>
<trans-unit id="f7b9f2997c5eada07c20a0bde7e89cc0c688e1ea" resname="role_assignment.view.list.panel.assignments.column.limitation">
<source>Limitation</source>
<target state="new">Limitation</target>
Expand Down
10 changes: 10 additions & 0 deletions src/bundle/Resources/translations/ibexa_sub_items.en.xliff
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@
<target state="new">Move</target>
<note>key: move_btn.label</note>
</trans-unit>
<trans-unit id="c281023fd6d213d849962bc4a45d59cb7b5c8440" resname="no_items.action">
<source>Add sub-items by uploading or use the ‘Create’ button in the top right corner to populate this section.</source>
<target state="new">Add sub-items by uploading or use the ‘Create’ button in the top right corner to populate this section.</target>
<note>key: no_items.action</note>
</trans-unit>
<trans-unit id="782f084072f3de4010eed417a9c4abcb5404c601" resname="no_items.info">
<source>Add first sub-item</source>
<target state="new">Add first sub-item</target>
<note>key: no_items.info</note>
</trans-unit>
<trans-unit id="11b5de206f496e357ede3c3798b8e113c2946a60" resname="trash_btn.label">
<source>Delete</source>
<target state="new">Delete</target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
{ },
],
body_rows,
empty_table_info_text: 'policy.view.list.no_policies.info'|trans|desc('Add first policy'),
empty_table_action_text: 'policy.view.list.no_policies.action'|trans|desc('Select policies to effectively manage users access.'),
} %}
{% block header %}
{% embed '@ibexadesign/ui/component/table/table_header.html.twig' %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
{ content: 'role_assignment.view.list.panel.assignments.column.limitation'|trans|desc('Limitation') },
],
body_rows,
empty_table_info_text: 'role_assignment.view.list.no_assignments.info'|trans|desc('Add users assignment'),
empty_table_action_text: 'role_assignment.view.list.no_assignments.action'|trans|desc('Select assignments to effectively manage user roles access by adding them to specific groups.'),
} %}
{% block header %}
{% embed '@ibexadesign/ui/component/table/table_header.html.twig' %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
import React from 'react';
import { getTranslator } from '@ibexa-admin-ui/src/bundle/Resources/public/js/scripts/helpers/context.helper';

const NoItemsComponent = () => {
const Translator = getTranslator();

return (
<table className="ibexa-table table">
<tbody className="ibexa-table__body">
<td className="ibexa-table__empty-table-cell">
<img className="ibexa-table__empty-table-image" src="/bundles/ibexaadminui/img/ibexa-empty-table.svg" />
</td>
<tr className="ibexa-table__row">
<td className="ibexa-table__empty-table-cell">
<img className="ibexa-table__empty-table-image" src="/bundles/ibexaadminui/img/ibexa-empty-table.svg" />
<div className="ibexa-table__empty-table-text">
<div className="ibexa-table__empty-table-info-text">
{Translator.trans(/*@Desc("Add first sub-item")*/ 'no_items.info', {}, 'ibexa_sub_items')}
</div>
<div className="ibexa-table__empty-table-action-text">
{Translator.trans(
/*@Desc("Add sub-items by uploading or use the ‘Create’ button in the top right corner to populate this section.")*/ 'no_items.action',
{},
'ibexa_sub_items',
)}
</div>
</div>
</td>
</tr>
</tbody>
</table>
);
Expand Down

0 comments on commit 28a9fb8

Please sign in to comment.