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 #32

Merged
merged 1 commit into from
Oct 31, 2017

Conversation

webhdx
Copy link
Contributor

@webhdx webhdx commented Oct 27, 2017

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

!! Reopening this one after it was merged too early !!

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,
    ],
])

TODO

@webhdx
Copy link
Contributor Author

webhdx commented Oct 27, 2017

Please do code reviews on cd5eacd commit only as other commits are from #26. I will rebase once #26 gets merged.

@webhdx webhdx changed the title [WIP] EZP-28127: Create extendable left sidebar EZP-28127: Create extendable left sidebar Oct 31, 2017
@lserwatka lserwatka merged commit 78101dc into ezsystems:master Oct 31, 2017
@webhdx webhdx deleted the left_sidebar branch November 13, 2017 21:46
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.

2 participants