Skip to content

Commit

Permalink
IBX-6751: [Smart mode] As the User I want to display Subitems list in…
Browse files Browse the repository at this point in the history
… simpler view
  • Loading branch information
GrabowskiM committed Oct 23, 2023
1 parent b5704e2 commit 2abd94e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ const { Translator } = window;

const COLUMNS_VISIBILITY_LOCAL_STORAGE_DATA_KEY = 'sub-items_columns-visibility';
const DEFAULT_COLUMNS_VISIBILITY = {
modified: true,
'content-type': true,
priority: true,
translations: true,
visibility: true,
creator: true,
contributor: true,
modified: true,
creator: true,
published: true,
section: true,
'location-id': true,
'location-remote-id': true,
'object-id': true,
'object-remote-id': true,
section: false,
'location-id': false,
'location-remote-id': false,
'object-id': false,
'object-remote-id': false,
};
const SORTKEY_MAP = {
name: 'ContentName',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,20 @@ export default class TableViewItemComponent extends PureComponent {
const { invisible, hidden } = this.props.item;
const visibleLabel = Translator.trans(/*@Desc("Visible")*/ 'items_table.row.visible.label', {}, 'ibexa_sub_items');
const notVisibleLabel = Translator.trans(/*@Desc("Not Visible")*/ 'items_table.row.not_visible.label', {}, 'ibexa_sub_items');
const label = !invisible && !hidden ? visibleLabel : notVisibleLabel;
const isVisible = !invisible && !hidden;
const label = isVisible ? visibleLabel : notVisibleLabel;
const badgeClasses = createCssClassNames({
'ibexa-badge': true,
'ibexa-badge--success': isVisible,
})

return <div className="c-table-view-item__text-wrapper">{label}</div>;
return (
<div className="c-table-view-item__text-wrapper">
<span className={badgeClasses}>
{label}
</span>
</div>
);
}

renderCreatorCell() {
Expand Down

0 comments on commit 2abd94e

Please sign in to comment.