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

EZP-28127: Create extendable left sidebar #28

Merged
merged 4 commits into from
Oct 26, 2017

Conversation

webhdx
Copy link
Contributor

@webhdx webhdx commented Oct 25, 2017

JIRA: https://jira.ez.no/browse/EZP-28127
Requires: #26

Description

This PR reimplements left sidebar (which is visible in Location View and Trash) using knplabs/knp-menu-bundle package. I also created extensibility point based on events.
Developers can take advantage of ConfigureMenuEvent::CONTENT_SIDEBAR_LEFT event to make customization to the sidebar i.e. reorder, add or remove items. Code snippets on how to customize sidebar are available at #26 as managing sidebar items uses the same approach.

All items are styled by default, more advanced buttons can use custom attributes as shown below:

$this->createMenuItem('sidebar_left__browse', [
    'extras' => ['icon' => 'browse'],
    'attributes' => [
        'class' => 'btn--udw-browse',
        'data-starting-location-id' => 1,
    ],
])

@webhdx
Copy link
Contributor Author

webhdx commented Oct 25, 2017

Notice: This requires #26 so 2 commits are not a part of this PR. I will rebase as soon as #26 gets merged. For the time being please do code review on 9314604 commit.

@ezsystems ezsystems deleted a comment from ezrobot Oct 25, 2017
Copy link
Member

@alongosz alongosz left a comment

Choose a reason for hiding this comment

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

9314604 looks good. Note that I'm not familiar with KnpMenu, so commenting "code-wise" only ;)

@bdunogier
Copy link
Member

As for the PR about the top menu, having howtos for the feature would be very helpful. Could you add that, even if it is just a draft in the PR's description for the time being ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

5 participants