Skip to content

Commit

Permalink
Merge pull request neos#5126 from neos/feature/link-branding-icon
Browse files Browse the repository at this point in the history
  • Loading branch information
ahaeslich authored Jun 4, 2024
2 parents 0c2509e + 5492143 commit be359e7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 17 deletions.
10 changes: 9 additions & 1 deletion Neos.Neos/Classes/Controller/Backend/ModuleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Neos\Flow\Mvc\Controller\ActionController;
use Neos\Flow\Mvc\Dispatcher;
use Neos\Flow\Security\Context;
use Neos\Neos\Service\BackendRedirectionService;
use Neos\Utility\Arrays;
use Neos\Utility\MediaTypes;
use Neos\Neos\Controller\BackendUserTranslationTrait;
Expand Down Expand Up @@ -53,6 +54,12 @@ class ModuleController extends ActionController
*/
protected $partyService;

/**
* @Flow\Inject
* @var BackendRedirectionService
*/
protected $backendRedirectionService;

/**
* @param array $module
* @return mixed
Expand Down Expand Up @@ -120,7 +127,8 @@ public function indexAction(array $module)
'moduleBreadcrumb' => $moduleBreadcrumb,
'user' => $user,
'modules' => $this->menuHelper->buildModuleList($this->controllerContext),
'sites' => $sites
'sites' => $sites,
'primaryModuleUri' => $this->backendRedirectionService->getAfterLoginRedirectionUri($this->controllerContext),
]);
}
}
Expand Down
23 changes: 8 additions & 15 deletions Neos.Neos/Resources/Private/Partials/Backend/Branding.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
{namespace neos=Neos\Neos\ViewHelpers}
<div class="neos-branding">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 453.54 124.45" class="neos-branding-logo">
<defs>
<style>
.cls-1{fill:#fff}.cls-2{fill:#009fe3}
</style>
</defs>
<g id="Ebene_2" data-name="Ebene 2">
<g id="Layer_1" data-name="Layer 1">
<path class="cls-1" d="M410.69 86l4.95-5.54c5.5 4.94 10.61 7.54 18.11 7.54 6.7 0 11.49-3.4 11.49-8.47 0-4.51-2.55-6.89-13.49-9.66-12.69-3.25-19.07-7.6-19.07-16.47 0-9.19 8.46-15.52 19.31-15.52 8.06 0 14 2.62 19.71 7.13l-4.63 5.94c-5.27-4.12-9.74-5.86-15.16-5.86-6.15 0-10.86 3-10.86 7.76 0 4.59 3 7.13 14.29 9.9 12.21 2.93 18.2 7.76 18.2 16.31 0 10-8.62 16.16-19.87 16.16-8.94 0-16.36-3.22-22.98-9.22zM327.77 66.55c0-15.68 12.13-28.67 29-28.67s29 13 29 28.67-12.13 28.67-29 28.67-29-12.99-29-28.67zm49.72 0c0-12.12-8.54-21.3-20.67-21.3s-20.67 9.19-20.67 21.3 8.54 21.3 20.67 21.3 20.67-9.19 20.67-21.3zM302.55 38.83V46h-32.72v16.67H299V70h-29.17v17.06h33.12v7.21h-41.18V38.83zM191.07 38.83l32.48 40.94V38.83h7.9v55.44h-6.62l-33.37-42.06v42.06h-7.9V38.83z"/>
<path class="cls-2" d="M88.83 0L68.12 15.1v31.57l20.71 29.28V0zM88.83 112.57L9.22 0 0 6.74v117.71l20.71-15.1V51.06l51.78 73.39h22.65l16.34-11.88H88.83z"/>
<path class="cls-1" d="M20.71 51.06v58.29L0 124.45h22.65l20.71-15.1V83.17L20.71 51.06zM88.83 75.95V0h22.65v112.57H88.83L9.22 0h25.89l53.72 75.95z"/>
</g>
</g>
</svg>
</div>
<a href="{primaryModuleUri}" title="{neos:backend.translate(id: 'branding.link.title', source: 'Modules')}">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 453.54 124.45" class="neos-branding-logo">
<path fill="#fff" d="M410.69 86l4.95-5.54c5.5 4.94 10.61 7.54 18.11 7.54 6.7 0 11.49-3.4 11.49-8.47 0-4.51-2.55-6.89-13.49-9.66-12.69-3.25-19.07-7.6-19.07-16.47 0-9.19 8.46-15.52 19.31-15.52 8.06 0 14 2.62 19.71 7.13l-4.63 5.94c-5.27-4.12-9.74-5.86-15.16-5.86-6.15 0-10.86 3-10.86 7.76 0 4.59 3 7.13 14.29 9.9 12.21 2.93 18.2 7.76 18.2 16.31 0 10-8.62 16.16-19.87 16.16-8.94 0-16.36-3.22-22.98-9.22zM327.77 66.55c0-15.68 12.13-28.67 29-28.67s29 13 29 28.67-12.13 28.67-29 28.67-29-12.99-29-28.67zm49.72 0c0-12.12-8.54-21.3-20.67-21.3s-20.67 9.19-20.67 21.3 8.54 21.3 20.67 21.3 20.67-9.19 20.67-21.3zM302.55 38.83V46h-32.72v16.67H299V70h-29.17v17.06h33.12v7.21h-41.18V38.83zM191.07 38.83l32.48 40.94V38.83h7.9v55.44h-6.62l-33.37-42.06v42.06h-7.9V38.83z"/>
<path fill="#009fe3" d="M88.83 0L68.12 15.1v31.57l20.71 29.28V0zM88.83 112.57L9.22 0 0 6.74v117.71l20.71-15.1V51.06l51.78 73.39h22.65l16.34-11.88H88.83z"/>
<path fill="#fff" d="M20.71 51.06v58.29L0 124.45h22.65l20.71-15.1V83.17L20.71 51.06zM88.83 75.95V0h22.65v112.57H88.83L9.22 0h25.89l53.72 75.95z"/>
</svg>
</a>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
<div id="neos-top-bar">
<div class="neos-top-bar-left">
<f:render partial="Backend/Menu" arguments="{_all}" />
<f:render partial="Backend/Branding" />
<f:render partial="Backend/Branding" arguments="{primaryModuleUri: primaryModuleUri}" />
</div>
<div class="neos-top-bar-right">
<div id="neos-user-actions">
Expand Down
4 changes: 4 additions & 0 deletions Neos.Neos/Resources/Private/Translations/en/Modules.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,10 @@
<source>The Configuration module provides you with an overview of all configuration types.</source>
</trans-unit>

<trans-unit id="branding.link.title" xml:space="preserve">
<source>Go back to your starting module</source>
</trans-unit>

<trans-unit id="dimensions.label" xml:space="preserve">
<source>Dimensions</source>
</trans-unit>
Expand Down

0 comments on commit be359e7

Please sign in to comment.