diff --git a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php index d0aeeae4dc3..b348c160394 100644 --- a/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php +++ b/Neos.Neos/Classes/Controller/Module/Management/WorkspacesController.php @@ -470,16 +470,18 @@ protected function computeChangesCount(Workspace $selectedWorkspace) { $changesCount = ['new' => 0, 'changed' => 0, 'removed' => 0, 'total' => 0]; foreach ($this->computeSiteChanges($selectedWorkspace) as $siteChanges) { - foreach ($siteChanges['documents'] as $documentChanges) { - foreach ($documentChanges['changes'] as $change) { - if ($change['node']->isRemoved()) { - $changesCount['removed']++; - } elseif ($change['isNew']) { - $changesCount['new']++; - } else { - $changesCount['changed']++; - }; - $changesCount['total']++; + foreach ($siteChanges['documents'] as $dimensions) { + foreach ($dimensions as $documentChanges) { + foreach ($documentChanges['changes'] as $change) { + if ($change['node']->isRemoved()) { + $changesCount['removed']++; + } elseif ($change['isNew']) { + $changesCount['new']++; + } else { + $changesCount['changed']++; + }; + $changesCount['total']++; + } } } } @@ -509,11 +511,15 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) // $document will be null if we have a broken root line for this node. This actually should never happen, but currently can in some scenarios. if ($document !== null) { $documentPath = implode('/', array_slice(explode('/', $document->getPath()), 3)); + + $dimensionValues = $document->getDimensions(); + $documentDimension = Utility::sortDimensionValueArrayAndReturnDimensionsHash($dimensionValues); + $relativePath = str_replace(sprintf(SiteService::SITES_ROOT_PATH . '/%s/%s', $siteNodeName, $documentPath), '', $node->getPath()); if (!isset($siteChanges[$siteNodeName]['siteNode'])) { $siteChanges[$siteNodeName]['siteNode'] = $this->siteRepository->findOneByNodeName($siteNodeName); } - $siteChanges[$siteNodeName]['documents'][$documentPath]['documentNode'] = $document; + $siteChanges[$siteNodeName]['documents'][$documentDimension][$documentPath]['documentNode'] = $document; $change = [ 'node' => $node, @@ -522,7 +528,7 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) if ($node->getNodeType()->isOfType('Neos.Neos:Node')) { $change['configuration'] = $node->getNodeType()->getFullConfiguration(); } - $siteChanges[$siteNodeName]['documents'][$documentPath]['changes'][$relativePath] = $change; + $siteChanges[$siteNodeName]['documents'][$documentDimension][$documentPath]['changes'][$relativePath] = $change; } } } @@ -534,17 +540,21 @@ protected function computeSiteChanges(Workspace $selectedWorkspace) ksort($siteChanges); foreach ($siteChanges as $siteKey => $site) { - foreach ($site['documents'] as $documentKey => $document) { - $liveDocumentNode = $liveContext->getNodeByIdentifier($document['documentNode']->getIdentifier()); - $siteChanges[$siteKey]['documents'][$documentKey]['isMoved'] = $liveDocumentNode && $document['documentNode']->getPath() !== $liveDocumentNode->getPath(); - $siteChanges[$siteKey]['documents'][$documentKey]['isNew'] = $liveDocumentNode === null; - foreach ($document['changes'] as $changeKey => $change) { - $liveNode = $liveContext->getNodeByIdentifier($change['node']->getIdentifier()); - $siteChanges[$siteKey]['documents'][$documentKey]['changes'][$changeKey]['isNew'] = is_null($liveNode); - $siteChanges[$siteKey]['documents'][$documentKey]['changes'][$changeKey]['isMoved'] = $liveNode && $change['node']->getPath() !== $liveNode->getPath(); + foreach ($site['documents'] as $documentDimension => $documentsPerDimension) { + foreach ($documentsPerDimension as $documentKey => $document) { + $liveDocumentNode = $liveContext->getNodeByIdentifier($document['documentNode']->getIdentifier()); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['isMoved'] = $liveDocumentNode && $document['documentNode']->getPath() !== $liveDocumentNode->getPath(); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['isNew'] = $liveDocumentNode === null; + foreach ($document['changes'] as $changeKey => $change) { + $liveNode = $liveContext->getNodeByIdentifier($change['node']->getIdentifier()); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['changes'][$changeKey]['isNew'] = is_null($liveNode); + $siteChanges[$siteKey]['documents'][$documentDimension][$documentKey]['changes'][$changeKey]['isMoved'] = $liveNode && $change['node']->getPath() !== $liveNode->getPath(); + } } } - ksort($siteChanges[$siteKey]['documents']); + foreach ($siteChanges[$siteKey]['documents'] as $key => $document) { + ksort($siteChanges[$siteKey]['documents'][$key]); + } } return $siteChanges; } diff --git a/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html b/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html index 7dd9032d8b5..9dd10c151b7 100644 --- a/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html +++ b/Neos.Neos/Resources/Private/Templates/Module/Management/Workspaces/Show.html @@ -5,7 +5,7 @@ - + @@ -15,37 +15,38 @@
- - - - - + + + + + - - - - - - + + + + - - - - - - - + + + - + + + + @@ -96,7 +98,7 @@ - +
@@ -115,60 +117,60 @@
- + - + - + {neos:backend.translate(id: 'workspaces.unpublishedChanges', source: 'Modules', package: 'Neos.Neos', arguments: {0: selectedWorkspaceLabel})}
- -
+ +
- - - - - - - + + +
+ + + + + + +
{neos:backend.translate(id: 'pathCaption', source: 'Main', package: 'Neos.Neos')}:
- +
@@ -54,40 +55,41 @@
-
- -
- - + + - - - -
+ +
+ + + + + + + +
- -
-
- - - + + + + + + +
- - -