Bug #28
Links in the left navigation goes to backend/(controller) instead of admin/(controller)
| Status : | Closed | Start : | 07/30/2008 | |
| Priority : | Normal | Due date : | ||
| Assigned to : | Davide D'Agostino | % Done : | 0% |
|
| Category : | - | Spent time : | - | |
| Target version : | - | |||
Description
Links in the left navigation ('Accounts / List', 'Accounts / New' etc.) goes to 'backend/accounts/index' by default. I think it should go to 'admin/accounts/index' instead.
To work around the problem, I made the following changes:
[app/views/backend/base/index.html.haml]
...
=link_to_function menu.human_name, "Lipsiadmin.app.loadMenu('#{menu.url[:controller]}/#{menu.url[:action]}')"
...
to
...
=link_to_function menu.human_name, "Lipsiadmin.app.loadMenu('#{url_for :controller => menu.url[:controller], :action => menu.url[:action]}')"
...
And also needed to add an explicit mapping in routes.rb:
map.refresh_project_modules '/admin/accounts/refresh_project_modules', :controller => 'backend/accounts', :action=>'refresh_project_modules'
History
07/30/2008 10:06 AM - Davide D'Agostino
- Status changed from New to Closed
Hello!
Thanks I fixed the problem, the only thing that I change is this:
=link_to_function menu.human_name, "Lipsiadmin.app.loadMenu('#{url_for :controller => menu.url[:controller], :action => menu.url[:action]}')"
in this:
=link_to_function menu.human_name, "Lipsiadmin.app.loadMenu('#{url_for(menu.url}')"
Because menu.url is already an hash.
Thanks for your feedback. I pushed the changes on git
