-
-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TASK: Refactor controller to not use static fusion path
The fusion path is now dynamically determined by controller / action This enables additional actions with separate templates for that controller.
- Loading branch information
1 parent
28b69b2
commit b146826
Showing
4 changed files
with
261 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
260 changes: 260 additions & 0 deletions
260
Resources/Private/Fusion/Backend/Controller/BackendController/index.fusion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,260 @@ | ||
Neos.Neos.Ui.BackendController.index = Neos.Fusion:Template { | ||
templatePath = 'resource://Neos.Neos.Ui/Private/Templates/Backend/Index.html' | ||
|
||
headScripts = ${headScripts} | ||
headStylesheets = ${headStylesheets} | ||
splashScreenPartial = ${splashScreenPartial} | ||
|
||
headIcons = Neos.Fusion:Join { | ||
appleTouchIcon = Neos.Fusion:Tag { | ||
tagName = 'link' | ||
attributes { | ||
href = Neos.Fusion:ResourceUri { | ||
path = 'resource://Neos.Neos.Ui/Public/Images/apple-touch-icon.png' | ||
} | ||
sizes = '180x180' | ||
rel = 'apple-touch-icon' | ||
} | ||
} | ||
favicon16 = Neos.Fusion:Tag { | ||
tagName = 'link' | ||
attributes { | ||
href = Neos.Fusion:ResourceUri { | ||
path = 'resource://Neos.Neos.Ui/Public/Images/favicon-16x16.png' | ||
} | ||
sizes = '16x16' | ||
rel = 'icon' | ||
type = 'image/png' | ||
} | ||
} | ||
favicon32 = Neos.Fusion:Tag { | ||
tagName = 'link' | ||
attributes { | ||
href = Neos.Fusion:ResourceUri { | ||
path = 'resource://Neos.Neos.Ui/Public/Images/favicon-32x32.png' | ||
} | ||
sizes = '32x32' | ||
rel = 'icon' | ||
type = 'image/png' | ||
} | ||
} | ||
safariPinnedTab = Neos.Fusion:Tag { | ||
tagName = 'link' | ||
attributes { | ||
href = Neos.Fusion:ResourceUri { | ||
path = 'resource://Neos.Neos.Ui/Public/Images/safari-pinned-tab.svg' | ||
} | ||
rel = 'mask-icon' | ||
color = '#00adee' | ||
} | ||
} | ||
} | ||
|
||
configuration = Neos.Fusion:DataStructure { | ||
nodeTree = ${Configuration.setting('Neos.Neos.userInterface.navigateComponent.nodeTree')} | ||
structureTree = ${Configuration.setting('Neos.Neos.userInterface.navigateComponent.structureTree')} | ||
allowedTargetWorkspaces = ${Neos.Ui.Workspace.getAllowedTargetWorkspaces()} | ||
endpoints = Neos.Fusion:DataStructure { | ||
nodeTypeSchema = Neos.Fusion:UriBuilder { | ||
package = 'Neos.Neos' | ||
controller = 'Backend\\Schema' | ||
action = 'nodeTypeSchema' | ||
absolute = true | ||
arguments = Neos.Fusion:DataStructure { | ||
# TODO: dirty hack to not have to re-implement neos:backend.configurationCacheVersion VH | ||
version = Neos.Fusion:Template { | ||
templatePath = 'resource://Neos.Neos.Ui/Private/Templates/Backend/ConfigurationVersion.html' | ||
@process.trim = ${String.trim(value)} | ||
} | ||
} | ||
} | ||
translations = Neos.Fusion:UriBuilder { | ||
package = 'Neos.Neos' | ||
controller = 'Backend\\Backend' | ||
action = 'xliffAsJson' | ||
absolute = true | ||
arguments = Neos.Fusion:DataStructure { | ||
locale = ${interfaceLanguage} | ||
|
||
# TODO: dirty hack to not have to re-implement neos:backend.configurationCacheVersion VH | ||
version = Neos.Fusion:Template { | ||
templatePath = 'resource://Neos.Neos.Ui/Private/Templates/Backend/ConfigurationVersion.html' | ||
@process.trim = ${String.trim(value)} | ||
} | ||
} | ||
} | ||
} | ||
@process.json = ${Json.stringify(value)} | ||
} | ||
|
||
routes = Neos.Fusion:DataStructure { | ||
prototype(Neos.Fusion:UriBuilder) { | ||
absolute = true | ||
} | ||
|
||
ui = Neos.Fusion:DataStructure { | ||
service = Neos.Fusion:DataStructure { | ||
prototype(Neos.Fusion:UriBuilder) { | ||
package = 'Neos.Neos.Ui' | ||
controller = 'BackendService' | ||
} | ||
|
||
change = Neos.Fusion:UriBuilder { | ||
action = 'change' | ||
} | ||
publish = Neos.Fusion:UriBuilder { | ||
action = 'publish' | ||
} | ||
discard = Neos.Fusion:UriBuilder { | ||
action = 'discard' | ||
} | ||
changeBaseWorkspace = Neos.Fusion:UriBuilder { | ||
action = 'changeBaseWorkspace' | ||
} | ||
copyNodes = Neos.Fusion:UriBuilder { | ||
action = 'copyNodes' | ||
} | ||
cutNodes = Neos.Fusion:UriBuilder { | ||
action = 'cutNodes' | ||
} | ||
clearClipboard = Neos.Fusion:UriBuilder { | ||
action = 'clearClipboard' | ||
} | ||
loadTree = Neos.Fusion:UriBuilder { | ||
action = 'loadTree' | ||
} | ||
flowQuery = Neos.Fusion:UriBuilder { | ||
action = 'flowQuery' | ||
} | ||
getWorkspaceInfo = Neos.Fusion:UriBuilder { | ||
action = 'getWorkspaceInfo' | ||
} | ||
getAdditionalNodeMetadata = Neos.Fusion:UriBuilder { | ||
action = 'getAdditionalNodeMetadata' | ||
} | ||
} | ||
} | ||
core = Neos.Fusion:DataStructure { | ||
prototype(Neos.Fusion:UriBuilder) { | ||
package = 'Neos.Neos' | ||
} | ||
|
||
content = Neos.Fusion:DataStructure { | ||
prototype(Neos.Fusion:UriBuilder) { | ||
controller = 'Backend\\Content' | ||
} | ||
|
||
imageWithMetadata = Neos.Fusion:UriBuilder { | ||
action = 'imageWithMetaData' | ||
} | ||
createImageVariant = Neos.Fusion:UriBuilder { | ||
action = 'createImageVariant' | ||
} | ||
loadMasterPlugins = Neos.Fusion:UriBuilder { | ||
action = 'masterPlugins' | ||
} | ||
loadPluginViews = Neos.Fusion:UriBuilder { | ||
action = 'pluginViews' | ||
} | ||
uploadAsset = Neos.Fusion:UriBuilder { | ||
action = 'uploadAsset' | ||
} | ||
} | ||
service = Neos.Fusion:DataStructure { | ||
assetProxies = Neos.Fusion:UriBuilder { | ||
controller = 'Service\\AssetProxies' | ||
action = 'index' | ||
} | ||
assets = Neos.Fusion:UriBuilder { | ||
controller = 'Service\\Assets' | ||
action = 'index' | ||
} | ||
nodes = Neos.Fusion:UriBuilder { | ||
controller = 'Service\\Nodes' | ||
action = 'index' | ||
} | ||
userPreferences = Neos.Fusion:UriBuilder { | ||
subpackage = 'Service' | ||
controller = 'UserPreference' | ||
action = 'index' | ||
format = 'json' | ||
} | ||
dataSource = Neos.Fusion:UriBuilder { | ||
subpackage = 'Service' | ||
controller = 'DataSource' | ||
action = 'index' | ||
format = 'json' | ||
} | ||
contentDimensions = Neos.Fusion:UriBuilder { | ||
package = 'Neos.Neos' | ||
controller = 'Service\\ContentDimensions' | ||
action = 'index' | ||
} | ||
} | ||
modules = Neos.Fusion:DataStructure { | ||
prototype(Neos.Fusion:UriBuilder) { | ||
controller = 'Backend\\Module' | ||
} | ||
workspaces = Neos.Fusion:UriBuilder { | ||
action = 'index' | ||
arguments { | ||
module = 'management/workspaces' | ||
} | ||
} | ||
userSettings = Neos.Fusion:UriBuilder { | ||
controller = 'Backend\\Module' | ||
action = 'index' | ||
arguments { | ||
module = 'user/usersettings' | ||
} | ||
} | ||
mediaBrowser = Neos.Fusion:UriBuilder { | ||
controller = 'Backend\\Module' | ||
action = 'index' | ||
arguments { | ||
module = 'media/browser' | ||
} | ||
} | ||
} | ||
login = Neos.Fusion:UriBuilder { | ||
controller = 'Login' | ||
action = 'index' | ||
format = 'json' | ||
} | ||
logout = Neos.Fusion:UriBuilder { | ||
controller = 'Login' | ||
action = 'logout' | ||
} | ||
} | ||
@process.json = ${Json.stringify(value)} | ||
} | ||
|
||
frontendConfiguration = Neos.Neos.Ui:RenderConfiguration { | ||
path = 'frontendConfiguration' | ||
@process.json = ${Json.stringify(value)} | ||
} | ||
|
||
nodeTypes = Neos.Fusion:DataStructure { | ||
roles = ${Configuration.setting('Neos.Neos.Ui.nodeTypeRoles')} | ||
groups = ${Neos.Ui.PositionalArraySorter.sort(Configuration.setting('Neos.Neos.nodeTypes.groups'))} | ||
|
||
@process.json = ${Json.stringify(value)} | ||
} | ||
|
||
menu = Neos.Neos.Ui:Component.ModuleMenu | ||
|
||
initialState = Neos.Neos.Ui:RenderConfiguration { | ||
path = 'initialState' | ||
context { | ||
documentNode = ${documentNode} | ||
site = ${site} | ||
user = ${user} | ||
clipboardNodes = ${clipboardNodes} | ||
clipboardMode = ${clipboardMode} | ||
} | ||
|
||
@process.json = ${Json.stringify(value)} | ||
} | ||
|
||
env = ${Configuration.setting('Neos.Flow.core.context')} | ||
} |
File renamed without changes.
Oops, something went wrong.