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

[WIP] Adds default configuration and styling for SonataAdmin frontend link #276

Merged
merged 1 commit into from
Nov 22, 2014

Conversation

frne
Copy link
Contributor

@frne frne commented Nov 6, 2014

This is WIP because symfony-cmf/routing-bundle#273 must be merged before.

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no
Fixed tickets
License MIT
Doc PR symfony-cmf/symfony-cmf-docs#610

@@ -164,6 +164,9 @@ sonata_admin:
cmf_routing.admin_extension.route_referrers:
implements:
- Symfony\Cmf\Component\Routing\RouteReferrersInterface
cmf_routing.admin_extension.frontend_link:
implements:
- Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
Copy link
Member

Choose a reason for hiding this comment

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

if you support Route objects too, we could enable the extension for them as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in ac8a942

@dbu
Copy link
Member

dbu commented Nov 13, 2014

i merged the PR on RoutingBundle.

@frne frne changed the title [WIP] Adds default configuration for SonataAdmin frontend link [WIP] Adds default configuration and styling for SonataAdmin frontend link Nov 15, 2014
@frne
Copy link
Contributor Author

frne commented Nov 15, 2014

To get the custom CSS working, I had to make some changes in symfony-cmf/routing-bundle#274 again. Almost impossible to identify (and style) the frontend-link button without a specific CSS class.

I'm not really a Frontend-Ninja, but it works now...

/cc @dbu

@dbu
Copy link
Member

dbu commented Nov 15, 2014

looks good to me. can you composer update symfony-cmf/routing-bundle to get the extension? i just tagged 1.3.1 of the RoutingBundle.

@frne
Copy link
Contributor Author

frne commented Nov 16, 2014

Seems that symfony-cmf/routing-bundle is an indirect dependency by symfony-cmf/routing-auto-bundle. Bumped version in symfony-cmf/routing-auto-bundle#140. Probably needs another tag...

@dbu
Copy link
Member

dbu commented Nov 17, 2014

ah, the sandbox depends on routing-bundle through symfony-cmf/symfony-cmf and also symfony-cmf/routing-auto-bundle. can you try to composer update symfony-cmf/symfony-cmf?

@frne
Copy link
Contributor Author

frne commented Nov 18, 2014

@dbu Changed. Thing to do was composer.phar update symfony-cmf/routing-bundle.

Bot now there is a broken test. I tried to investigate, but i've no idea what this is about:

An exception has been thrown during the rendering of a template ("Can not determine the prefix. 
Either this is a new, unpersisted document or the listener that calls setPrefix is not set up correctly.") 
in SonataAdminBundle:CRUD:base_edit.html.twig at line 34.

EDIT: Just found out, that it is the extends: setting in the config:

        cmf_routing.admin_extension.frontend_link:
            implements:
                - Symfony\Cmf\Component\Routing\RouteReferrersReadInterface
            #extends:
                #- Symfony\Component\Routing\Route

EDIT: Fixed in symfony-cmf/routing-bundle#275

@dbu
Copy link
Member

dbu commented Nov 20, 2014

@frne can you please do the composer update symfony-cmf/routing-bundle one more time to fix things? and then squash your commits into one?

@frne frne force-pushed the sonata-admin-frontend-link-config branch from 3f67832 to 425e713 Compare November 22, 2014 06:49
@frne
Copy link
Contributor Author

frne commented Nov 22, 2014

@dbu done.

dbu added a commit that referenced this pull request Nov 22, 2014
[WIP] Adds default configuration and styling for SonataAdmin frontend link
@dbu dbu merged commit 6767652 into symfony-cmf:master Nov 22, 2014
@dbu
Copy link
Member

dbu commented Nov 22, 2014

awesome, thanks a lot!

@dbu
Copy link
Member

dbu commented Nov 22, 2014

@frne btw, you could write to the symfony-cmf-devs list if you want, to tell you added this feature and say who you are. no requirement but you should get full credit for that one ;-)

@frne frne deleted the sonata-admin-frontend-link-config branch November 22, 2014 09:22
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