Skip to content

Commit

Permalink
Fix: Make menu work on review page
Browse files Browse the repository at this point in the history
  • Loading branch information
pKallert committed Dec 2, 2024
1 parent 081a995 commit a555db8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,16 @@ Neos.Workspace.Ui.WorkspaceController.review = Neos.Fusion:Component {

i18n = ${I18n.id('').source('Main').package('Neos.Workspace.Ui')}

renderer = Neos.Fusion:Match {
@subject = ${request.format}
@default = afx`
renderer = afx`
<section
hx-indicator="#indicator"
hx-boost="true"
id="workspace-module-content"
id='workspaceReview'
>
<Neos.Workspace.Ui:Component.HTMXConfig/>
<Neos.Workspace.Ui:Component.FlashMessages flashMessages={props.flashMessages}/>
<Neos.Workspace.Ui:Component.Indicator/>
<main id='workspaceReview' class="neos-content neos-container-fluid">
<main class="neos-content neos-container-fluid">
<div class="neos-row-fluid">
<legend>
{props.i18n.id('workspaces.unpublishedChanges').arguments([selectedWorkspaceLabel]).translate()}
Expand Down Expand Up @@ -66,13 +64,6 @@ Neos.Workspace.Ui.WorkspaceController.review = Neos.Fusion:Component {
</div>
</main>
</section>
<div id="popover-container"></div>
<div @if.isNotHTMX={request.format != 'htmx'} id="popover-container"></div>
`
htmx = afx`
<Neos.Workspace.Ui:Component.FlashMessages flashMessages={props.flashMessages}/>
<Neos.Workspace.Ui:Component.ReviewTable
@if.hasSiteChanges={props.siteChanges}
siteChanges={props.siteChanges} selectedWorkspaceName={selectedWorkspaceName} selectedWorkspaceLabel={selectedWorkspaceLabel} />
`
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ prototype(Neos.Workspace.Ui:Component.WorkspaceTableRow) < prototype(Neos.Fusion
with-acl = 'user-plus'
}
reviewWorkspaceUri = Neos.Fusion:ActionUri {
action = 'review'
format = 'htmx'
arguments {
workspace = ${props.workspaceListItem.name}
}
}
reviewWorkspaceFullUri = Neos.Fusion:ActionUri {
action = 'review'
arguments {
workspace = ${props.workspaceListItem.name}
Expand Down Expand Up @@ -130,8 +137,9 @@ prototype(Neos.Workspace.Ui:Component.WorkspaceTableRow) < prototype(Neos.Fusion
title={private.i18n.id(props.workspaceListItem.pendingChanges.total ? 'workspaces.reviewWorkspace' : 'workspaces.reviewWorkspace.noChanges').arguments([props.workspaceListItem.title])}
attributes.disabled={props.workspaceListItem.pendingChanges.total == 0}
attributes.hx-get={private.reviewWorkspaceUri}
attributes.hx-replace-url={private.reviewWorkspaceUri}
attributes.hx-target="body"
attributes.hx-replace-url={private.reviewWorkspaceFullUri}
attributes.hx-target="#workspace-module-content"
attributes.hx-swap="outerHTML"
/>
<Neos.Workspace.Ui:Component.Button
title={private.i18n.id('workspaces.editWorkspace').arguments([props.workspaceListItem.title])}
Expand Down

0 comments on commit a555db8

Please sign in to comment.