-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature: Adjust rendering of backend module from fluid to fusion
- Loading branch information
Showing
11 changed files
with
520 additions
and
43 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
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,6 @@ | ||
- | ||
requestFilter: 'isPackage("Sitegeist.Taxonomy") && isController("Module")' | ||
viewObjectName: 'Neos\Fusion\View\FusionView' | ||
options: | ||
fusionPathPatterns: | ||
- 'resource://Sitegeist.Taxonomy/Private/Fusion/Backend' |
32 changes: 32 additions & 0 deletions
32
Resources/Private/Fusion/Backend/Fragments/LanguageSelector.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,32 @@ | ||
prototype(Sitegeist.Taxonomy:Views.Fragments.LanguageSelector) < prototype(Neos.Fusion:Component) { | ||
|
||
targetAction = null | ||
targetProperty = null | ||
contentDimensionOptions = null | ||
contextNode = null | ||
|
||
renderer = afx` | ||
<Neos.Fusion.Form:Form @if={props.contextNode} | ||
form.target.action="changeContext" | ||
form.data.dimensions={props.contextNode.context.targetDimensions} | ||
attributes.class="neos-inline" | ||
form.method="get" | ||
> | ||
<Neos.Fusion.Form:Hidden field.name="contextNode" field.value={props.contextNode.contextPath} /> | ||
<Neos.Fusion.Form:Hidden field.name="targetAction" field.value={props.targetAction} /> | ||
<Neos.Fusion.Form:Hidden field.name="targetProperty" field.value={props.targetProperty} /> | ||
|
||
<Neos.Fusion:Loop items={props.contentDimensionOptions} itemName="dimensionConfiguration" itemKey="dimensionKey"> | ||
<Neos.Fusion.Form:Select | ||
field.name={"dimensions[" + dimensionKey + "]"} | ||
attributes.onchange="this.form.submit()" | ||
> | ||
<Neos.Fusion:Loop items={dimensionConfiguration.presets} itemName="presetName" itemKey="presetIdentifier"> | ||
<Neos.Fusion.Form:Select.Option option.value={presetIdentifier}>{presetName}</Neos.Fusion.Form:Select.Option> | ||
</Neos.Fusion:Loop> | ||
</Neos.Fusion.Form:Select> | ||
</Neos.Fusion:Loop> | ||
|
||
</Neos.Fusion.Form:Form> | ||
` | ||
} |
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,12 @@ | ||
include: resource://Neos.Fusion/Private/Fusion/Root.fusion | ||
include: resource://Neos.Fusion.Form/Private/Fusion/Root.fusion | ||
include: **/*.fusion | ||
|
||
|
||
Sitegeist.Taxonomy.ModuleController.index = Sitegeist.Taxonomy:Views.Module.Vocabulary.List | ||
Sitegeist.Taxonomy.ModuleController.newVocabulary = Sitegeist.Taxonomy:Views.Module.Vocabulary.New | ||
Sitegeist.Taxonomy.ModuleController.editVocabulary = Sitegeist.Taxonomy:Views.Module.Vocabulary.Edit | ||
|
||
Sitegeist.Taxonomy.ModuleController.vocabulary = Sitegeist.Taxonomy:Views.Module.Taxonomy.List | ||
Sitegeist.Taxonomy.ModuleController.newTaxonomy = Sitegeist.Taxonomy:Views.Module.Taxonomy.New | ||
Sitegeist.Taxonomy.ModuleController.editTaxonomy = Sitegeist.Taxonomy:Views.Module.Taxonomy.Edit |
45 changes: 45 additions & 0 deletions
45
Resources/Private/Fusion/Backend/Views/Taxonomy.Edit.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,45 @@ | ||
prototype(Sitegeist.Taxonomy:Views.Module.Taxonomy.Edit) < prototype(Neos.Fusion:Component) { | ||
|
||
i18nMain = ${Translation.value('').package("Sitegeist.Taxonomy").source('Main')} | ||
i18nVocabulary = ${Translation.value('').package("Sitegeist.Taxonomy").source('NodeTypes/Vocabulary')} | ||
i18nTaxonomy = ${Translation.value('').package("Sitegeist.Taxonomy").source('NodeTypes/Taxonomy')} | ||
|
||
renderer = afx` | ||
<legend>{props.i18nMain.id('taxon')}: {taxonomy.properties.title}</legend> | ||
<legend @if={defaultTaxonomy}>{props.i18nMain.id('generic.default')}: {defaultTaxonomy.properties.title}</legend> | ||
|
||
<Neos.Fusion.Form:Form form.target.action="updateTaxonomy" form.data.properties={taxonomy.properties}> | ||
<Neos.Fusion.Form:Hidden field.name="taxonomy" field.value={taxonomy.contextPath} /> | ||
|
||
<fieldset> | ||
<div class="neos-control-group"> | ||
<label class="neos-control-label" for="title"> | ||
{props.i18nTaxonomy.id('properties.title')} | ||
<span @if={defaultTaxonomy}>: {defaultTaxonomy.properties.title}</span> | ||
</label> | ||
<Neos.Fusion.Form:Textarea attributes.class="neos-span6" field.name="properties[title]" /> | ||
</div> | ||
|
||
<div class="neos-control-group"> | ||
<label class="neos-control-label" for="description"> | ||
{props.i18nTaxonomy.id('properties.description')} | ||
<span @if={defaultTaxonomy}>: {defaultTaxonomy.properties.description}</span> | ||
</label> | ||
<Neos.Fusion.Form:Textarea attributes.class="neos-span6 form-inline" field.name="properties[description]"/> | ||
</div> | ||
|
||
<div class="neos-control-group"> | ||
<Neos.Fusion:Link.Action | ||
class="neos-button" | ||
href.action="vocabulary" | ||
href.arguments.vocabulary={vocabulary} | ||
> | ||
{props.i18nMain.id('generic.cancel')} | ||
</Neos.Fusion:Link.Action> | ||
<Neos.Fusion.Form:Button attributes.class="neos-button neos-button-primary">{props.i18nMain.id('generic.save') + ''}</Neos.Fusion.Form:Button> | ||
</div> | ||
</fieldset> | ||
</Neos.Fusion.Form:Form> | ||
` | ||
|
||
} |
Oops, something went wrong.