Skip to content

Commit

Permalink
fix: Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nattfarinn committed Aug 31, 2021
1 parent 26d4c41 commit ddb5812
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
5 changes: 1 addition & 4 deletions src/bundle/Controller/ContentEditController.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ public function cancelEditVersionDraftAction(
)
)->getResponse();

return $response ?? $this->redirectToRoute('_ez_content_view', [
'contentId' => $referrerlocation->contentId,
'locationId' => $referrerlocation->id,
]);
return $response ?? $this->redirectToLocation($referrerlocation);
}
}
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ ezplatform.content.draft.edit:
options:
expose: true

ezplatform.content.draft.edit.cancel:
ibexa.content.draft.edit.cancel:
path: /content/edit/draft/{contentId}/{versionNo}/{languageCode}/{referrerLocationId}/cancel
defaults:
_controller: 'EzSystems\EzPlatformAdminUiBundle\Controller\ContentEditController::cancelEditVersionDraftAction'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
{% block close_button %}
{% if without_close_button is not defined or without_close_button != true %}
{% set referrer_location = is_published ? location : parent_location %}
{% set cancel_path = path('ezplatform.content.draft.edit.cancel', {
{% set cancel_path = path('ibexa.content.draft.edit.cancel', {
'contentId': content.id,
'referrerLocationId': referrer_location.id,
'versionNo': content.versionInfo.versionNo,
Expand Down

0 comments on commit ddb5812

Please sign in to comment.