From 610b2966579c800571c2766dff164270df3dd270 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Grabowski?= Date: Mon, 23 Oct 2023 12:08:21 +0200 Subject: [PATCH] IBX-6751: [Smart mode] As the User I want to display Subitems list in simpler view --- .../components/table-view/table.view.component.js | 14 +++++++------- .../table-view/table.view.item.component.js | 13 +++++++++++-- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.component.js b/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.component.js index c475fa02af..37dd095e59 100644 --- a/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.component.js +++ b/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.component.js @@ -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', diff --git a/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.item.component.js b/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.item.component.js index f4aef24edc..2bebedcc18 100644 --- a/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.item.component.js +++ b/src/bundle/ui-dev/src/modules/sub-items/components/table-view/table.view.item.component.js @@ -263,9 +263,18 @@ 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
{label}
; + return ( +
+ {label} +
+ ); } renderCreatorCell() {