diff --git a/Build/Sources/Sass/component/_recordlist.scss b/Build/Sources/Sass/component/_recordlist.scss index c758abc1e677a563ecbe6d48bcbee2e6362faba8..74ab9c5b0a7c1a41bc6df3e7e5fc02a3b75ceb6b 100644 --- a/Build/Sources/Sass/component/_recordlist.scss +++ b/Build/Sources/Sass/component/_recordlist.scss @@ -15,6 +15,7 @@ } } + .alert, .table-fit { box-shadow: none; border-radius: 0; @@ -24,6 +25,10 @@ margin-bottom: 0; } + .alert { + padding: var(--panel-header-padding-y) var(--typo3-component-padding-x); + } + .pagination { display: inline-flex; } diff --git a/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php b/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php index d22f2ee66cc610981def01df9046e1c6f2c21d40..171d2b21825083167ea1fccfee202e16b6858da1 100644 --- a/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php +++ b/typo3/sysext/backend/Classes/RecordList/DatabaseRecordList.php @@ -778,18 +778,29 @@ class DatabaseRecordList '; } - if (!(BackendUtility::isTableWorkspaceEnabled($table))) { + $recordListMessages = ''; + $recordlistMessageEntries = []; + if ($backendUser->workspace > 0 && ExtensionManagementUtility::isLoaded('workspaces') && !BackendUtility::isTableWorkspaceEnabled($table)) { // In case the table is not editable in workspace inform the user about the missing actions if ($backendUser->workspaceAllowsLiveEditingInTable($table)) { - $message = $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editingLiveRecordsWarning'); + $recordlistMessageEntries[] = [ + 'message' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.editingLiveRecordsWarning'), + 'severity' => ContextualFeedbackSeverity::WARNING, + ]; } else { - $message = $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.notEditableInWorkspace'); + $recordlistMessageEntries[] = [ + 'message' => $lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.notEditableInWorkspace'), + 'severity' => ContextualFeedbackSeverity::INFO, + ]; } - $tableActions .= ' - <span class="badge badge-warning"> - ' . htmlspecialchars($message, ENT_QUOTES | ENT_HTML5) . ' - </span> - '; + } + + foreach ($recordlistMessageEntries as $messageEntry) { + $recordListMessages .= '<div class="alert alert-' . $messageEntry['severity']->getCssClass() . '">'; + $recordListMessages .= $this->iconFactory->getIcon($messageEntry['severity']->getIconIdentifier(), Icon::SIZE_SMALL)->render(); + $recordListMessages .= ' '; + $recordListMessages .= htmlspecialchars($messageEntry['message'], ENT_QUOTES | ENT_HTML5); + $recordListMessages .= '</div>'; } $collapseClass = $tableCollapsed && !$this->table ? 'collapse' : 'collapse show'; @@ -800,12 +811,13 @@ class DatabaseRecordList <input type="hidden" name="cmd_table" value="' . htmlspecialchars($tableIdentifier) . '" /> <input type="hidden" name="cmd" /> <div class="recordlist-heading ' . ($multiRecordSelectionActions !== '' ? 'multi-record-selection-panel' : '') . '"> - <div class="recordlist-heading-row"> - <div class="recordlist-heading-title">' . $tableHeader . '</div> - <div class="recordlist-heading-actions">' . $tableActions . '</div> - </div> - ' . $multiRecordSelectionActions . ' + <div class="recordlist-heading-row"> + <div class="recordlist-heading-title">' . $tableHeader . '</div> + <div class="recordlist-heading-actions">' . $tableActions . '</div> + </div> + ' . $multiRecordSelectionActions . ' </div> + ' . $recordListMessages . ' <div class="' . $collapseClass . '" data-state="' . $dataState . '" id="recordlist-' . htmlspecialchars($tableIdentifier) . '"> <div class="table-fit"> <table data-table="' . htmlspecialchars($tableIdentifier) . '" class="table table-striped table-hover"> diff --git a/typo3/sysext/backend/Resources/Public/Css/backend.css b/typo3/sysext/backend/Resources/Public/Css/backend.css index c37950d5f159509ba666bdbc02b548ba93ae3152..f86e71c0afe02130856aab0d5e5fdf046d672990 100644 --- a/typo3/sysext/backend/Resources/Public/Css/backend.css +++ b/typo3/sysext/backend/Resources/Public/Css/backend.css @@ -3762,7 +3762,8 @@ typo3-backend-live-search-result-item-action>* .livesearch-result-item-title,typ typo3-backend-live-search-result-item-action>* .livesearch-result-item-title .small,typo3-backend-live-search-result-item-action>* .livesearch-result-item-title small,typo3-backend-live-search-result-item>* .livesearch-result-item-title .small,typo3-backend-live-search-result-item>* .livesearch-result-item-title small{opacity:var(--livesearch-item-opacity)} .recordlist{overflow:hidden;background:var(--panel-bg);box-shadow:var(--panel-box-shadow);border-radius:var(--panel-border-radius);border:var(--panel-border-width) solid var(--panel-default-border-color);margin-bottom:var(--typo3-spacing)} .recordlist table tr td.deletePlaceholder{text-decoration:line-through} -.recordlist .table-fit{box-shadow:none;border-radius:0;border-left:0;border-right:0;border-bottom:0;margin-bottom:0} +.recordlist .alert,.recordlist .table-fit{box-shadow:none;border-radius:0;border-left:0;border-right:0;border-bottom:0;margin-bottom:0} +.recordlist .alert{padding:var(--panel-header-padding-y) var(--typo3-component-padding-x)} .recordlist .pagination{display:inline-flex} .recordlist+.recordlist{margin-top:calc(var(--typo3-spacing) * 1.5)} .recordlist-heading{display:flex;align-items:center;flex-wrap:wrap;color:var(--panel-default-heading-color);background:var(--panel-default-heading-bg);padding:var(--panel-header-padding-y) var(--panel-header-padding-x);gap:var(--panel-header-padding-y) var(--panel-header-padding-x)}