Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Admin
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Admin
Commits
57c45d30
Commit
57c45d30
authored
1 year ago
by
Arnaud Levy
Browse files
Options
Downloads
Patches
Plain Diff
Revenir au bon item
parent
090f2a36
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/controllers/admin/communication/websites/menus/items_controller.rb
+7
-2
7 additions, 2 deletions
...rs/admin/communication/websites/menus/items_controller.rb
with
7 additions
and
2 deletions
app/controllers/admin/communication/websites/menus/items_controller.rb
+
7
−
2
View file @
57c45d30
...
...
@@ -53,7 +53,7 @@ class Admin::Communication::Websites::Menus::ItemsController < Admin::Communicat
@item
.
menu
=
@menu
@item
.
website
=
@website
if
@item
.
save
redirect_to
admin_communication_website_menu
_path
(
@
menu
),
redirect_to
redirect
_path
(
@
item
),
notice:
t
(
'admin.successfully_created_html'
,
model:
@item
.
to_s
)
else
breadcrumb
...
...
@@ -63,7 +63,7 @@ class Admin::Communication::Websites::Menus::ItemsController < Admin::Communicat
def
update
if
@item
.
update
(
item_params
)
redirect_to
admin_communication_website_menu
_path
(
@
menu
),
redirect_to
redirect
_path
(
@
item
),
notice:
t
(
'admin.successfully_updated_html'
,
model:
@item
.
to_s
)
else
breadcrumb
...
...
@@ -80,6 +80,11 @@ class Admin::Communication::Websites::Menus::ItemsController < Admin::Communicat
protected
def
redirect_path
(
item
)
item
.
parent
.
nil?
?
admin_communication_website_menu_path
(
item
.
menu
)
:
admin_communication_website_menu_item_path
(
id:
item
.
parent
)
end
def
breadcrumb
super
add_breadcrumb
Communication
::
Website
::
Menu
.
model_name
.
human
(
count:
2
),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment