Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Match path fix for tabs in Solidus < 2.8 #40

Merged
merged 1 commit into from
Aug 9, 2019

Conversation

pelargir
Copy link
Contributor

@pelargir pelargir commented Jul 15, 2019

This fixes the "CMS" menu item in Solidus so that it doesn't appear open/selected when the "Users" page in the admin backend is active (see screenshot below).

This is accomplished by patching Solidus to enable the match_path option to be passed into the CMS MenuItem instance.

Because Solidus 2.8 already supports the match_path option, the MenuItem initializer patch and tab partial are conditionally loaded for versions of Solidus less than 2.8.

I've manually tested these changes against the CS app (Solidus 2.4) and it works as expected.

Before

Users

After

Users

@pelargir pelargir force-pushed the add-match-path branch 2 times, most recently from 0952909 to 26e806c Compare July 17, 2019 13:14
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is nice, thank you for this contribution. Would you mind to move the file into the lib/views folder?

lib/alchemy/solidus/engine.rb Outdated Show resolved Hide resolved
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much.

@tvdeyen tvdeyen merged commit 4fe2fac into AlchemyCMS:master Aug 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants