diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-19 11:27:35 +0300 |
commit | 7e9c479f7de77702622631cff2628a9c8dcbc627 (patch) | |
tree | c8f718a08e110ad7e1894510980d2155a6549197 /app/controllers/concerns/wiki_actions.rb | |
parent | e852b0ae16db4052c1c567d9efa4facc81146e88 (diff) |
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/controllers/concerns/wiki_actions.rb')
-rw-r--r-- | app/controllers/concerns/wiki_actions.rb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/concerns/wiki_actions.rb b/app/controllers/concerns/wiki_actions.rb index aed109309e3..6abb2e16226 100644 --- a/app/controllers/concerns/wiki_actions.rb +++ b/app/controllers/concerns/wiki_actions.rb @@ -103,9 +103,10 @@ module WikiActions @page = response.payload[:page] if response.success? + flash[:toast] = _('Wiki page was successfully updated.') + redirect_to( - wiki_page_path(wiki, page), - notice: _('Wiki was successfully updated.') + wiki_page_path(wiki, page) ) else render 'shared/wikis/edit' @@ -122,9 +123,10 @@ module WikiActions @page = response.payload[:page] if response.success? + flash[:toast] = _('Wiki page was successfully created.') + redirect_to( - wiki_page_path(wiki, page), - notice: _('Wiki was successfully updated.') + wiki_page_path(wiki, page) ) else render 'shared/wikis/edit' @@ -169,9 +171,10 @@ module WikiActions response = WikiPages::DestroyService.new(container: container, current_user: current_user).execute(page) if response.success? + flash[:toast] = _("Wiki page was successfully deleted.") + redirect_to wiki_path(wiki), - status: :found, - notice: _("Page was successfully deleted") + status: :found else @error = response render 'shared/wikis/edit' |