Skip to content

Commit

Permalink
BUGFIX: Reload review correctly after discard or publish workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebobo committed Dec 17, 2024
1 parent d138d52 commit b22d0c7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ Neos.Workspace.Ui.WorkspaceController.review = Neos.Fusion:Component {
selectedWorkspaceName={props.selectedWorkspaceName}
selectedWorkspaceLabel={props.selectedWorkspaceLabel}
canPublishToBaseWorkspace={props.canPublishToBaseWorkspace}
canPublishToWorkspace={props.canPublishToWorkspace}/>
canPublishToWorkspace={props.canPublishToWorkspace}
/>
<div @if.hasNoSiteChange={!props.siteChanges} class="no-unpublished-changes">
{props.i18n.id('workspaces.reviewWorkspace.disabled').arguments([selectedWorkspaceLabel]).translate()}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,24 @@ prototype(Neos.Workspace.Ui:Component.Modal.ConfirmDiscardAllChanges) < prototyp
{private.i18n.id('workspaces.discardAllChangesInWorkspaceConfirmation').arguments([props.workspaceTitle])}
</div>
</header>
<section>
<footer>
<Neos.Workspace.Ui:Component.Button
label={private.i18n.id('cancel')}
attributes.popovertarget={private.popoverId}
attributes.popovertargetaction="close"
/>

<div class="neos-pull-right">
<Neos.Workspace.Ui:Component.Button
isDanger
label={private.i18n.id('workspaces.discardAllChanges')}
icon="trash-alt icon-white"
autofocus
attributes.hx-get={private.discardWorkspaceUri}
attributes.hx-target='body'
attributes.hx-swap='innerHTML'
/>
</div>
</section>
<Neos.Workspace.Ui:Component.Button
isDanger
label={private.i18n.id('workspaces.discardAllChanges')}
icon="trash-alt icon-white"
autofocus
attributes.hx-get={private.discardWorkspaceUri}
attributes.hx-select="#workspace-module-content"
attributes.hx-target="#workspace-module-content"
attributes.hx-swap="outerHTML"
attributes.hx-on--after-request={'document.getElementById("' + private.popoverId + '").hidePopover()'}
/>
</footer>
</div>
`
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,25 +29,24 @@ prototype(Neos.Workspace.Ui:Component.Modal.ConfirmPublishAllChanges) < prototyp
{private.i18n.id('workspaces.publishAllChangesInWorkspaceConfirmation').arguments([props.workspaceTitle])}
</div>
</header>
<section>
<footer>
<Neos.Workspace.Ui:Component.Button
label={private.i18n.id('cancel')}
attributes.popovertarget={private.popoverId}
attributes.popovertargetaction="close"
/>

<div class="neos-pull-right">
<Neos.Workspace.Ui:Component.Button
isSuccess
autofocus
label={private.i18n.id('workspaces.publishAllChanges')}
icon="fas fa-check-double icon-white"
attributes.hx-target='body'
attributes.hx-swap='innerHTML'
attributes.hx-get={private.publishWorkspaceUri}
/>
</div>
</section>
<Neos.Workspace.Ui:Component.Button
isSuccess
autofocus
label={private.i18n.id('workspaces.publishAllChanges')}
icon="fas fa-check-double icon-white"
attributes.hx-get={private.publishWorkspaceUri}
attributes.hx-select="#workspace-module-content"
attributes.hx-target="#workspace-module-content"
attributes.hx-swap="outerHTML"
attributes.hx-on--after-request={'document.getElementById("' + private.popoverId + '").hidePopover()'}
/>
</footer>
</div>
`
}
4 changes: 4 additions & 0 deletions Neos.Workspace.Ui/Resources/Public/Styles/Module.css
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,7 @@ tr.neos-change + tr.neos-change td.neos-content-change {
#workspaceReview #publishOrDiscardNodesForm {
min-width: 100%;
}

#workspaceReview .no-unpublished-changes {
margin-top: 1em;
}

0 comments on commit b22d0c7

Please sign in to comment.