Skip to content

Commit

Permalink
[TASK] Replace warning-in-use icon with @typo3/icons overlay
Browse files Browse the repository at this point in the history
The icon identified by `warning-in-use` is rendered when a record is
currently edited by another backend user. As one of the last remaining
bitmap icons, this should be replaced with an overlay from
`@typo3/icons` instead.

Resolves: #98128
Releases: main
Change-Id: Ifb9a37b835a97bccc7dfcc34a278d3c73e563817
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75424
Tested-by: core-ci <typo3@b13.com>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Stefan Bürk <stefan@buerk.tech>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
  • Loading branch information
andreaskienast authored and sbuerk committed Aug 12, 2022
1 parent cb49b7b commit 0a3a6fb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Expand Up @@ -633,7 +633,7 @@ protected function renderForeignRecordHeaderControl(array $data)
if ($lockInfo = BackendUtility::isRecordLocked($foreignTable, $rec['uid'])) {
$cells['locked'] = '
<button type="button" class="btn btn-default" data-bs-toggle="tooltip" title="' . htmlspecialchars($lockInfo['msg']) . '">
' . $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '
' . $this->iconFactory->getIcon('status-user-backend', Icon::SIZE_SMALL, 'overlay-edit')->render() . '
</button>';
}

Expand Down
Expand Up @@ -187,7 +187,7 @@ public function getIcons(): string

if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$icons[] = '<a href="#" data-bs-toggle="tooltip" title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
. $this->iconFactory->getIcon('status-user-backend', Icon::SIZE_SMALL, 'overlay-edit')->render() . '</a>';
}

$_params = ['tt_content', $row['uid'], &$row];
Expand Down
2 changes: 1 addition & 1 deletion typo3/sysext/backend/Classes/View/PageLayoutView.php
Expand Up @@ -1028,7 +1028,7 @@ public function tt_content_drawHeader($row, $space = 0, $disableMoveAndNewButton
// Get record locking status:
if ($lockInfo = BackendUtility::isRecordLocked('tt_content', $row['uid'])) {
$additionalIcons[] = '<a href="#" data-bs-toggle="tooltip" title="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render() . '</a>';
. $this->iconFactory->getIcon('status-user-backend', Icon::SIZE_SMALL, 'overlay-edit')->render() . '</a>';
}
// Call stats information hook
$_params = ['tt_content', $row['uid'], &$row];
Expand Down
Expand Up @@ -1054,7 +1054,7 @@ public function renderListRow($table, array $row, int $indent, array $translatio
$warning = '<span tabindex="0" data-bs-toggle="tooltip" data-bs-placement="right"'
. ' title="' . htmlspecialchars($lockInfo['msg']) . '"'
. ' aria-label="' . htmlspecialchars($lockInfo['msg']) . '">'
. $this->iconFactory->getIcon('warning-in-use', Icon::SIZE_SMALL)->render()
. $this->iconFactory->getIcon('status-user-backend', Icon::SIZE_SMALL, 'overlay-edit')->render()
. '</span>';
}
if ($this->isRecordDeletePlaceholder($row)) {
Expand Down

0 comments on commit 0a3a6fb

Please sign in to comment.