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

[AdminExtension] Add link to page in frontend if possible #273

Merged
merged 3 commits into from
Nov 13, 2014

Conversation

frne
Copy link
Contributor

@frne frne commented Nov 6, 2014

SonataAdmin extension which adds a link to the frontend page on documents with a route.

Default configuration for the extension here: symfony-cmf/cmf-sandbox#276

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets sonata-project/SonataDoctrinePhpcrAdminBundle#116
License MIT
Doc PR TODO

);
}

$uri = $this->router->generate($subject);
Copy link
Member

Choose a reason for hiding this comment

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

i think we should wrap a try-catch around this. for example when the $subject does implement the interface but has no route pointing to it yet. when there is an exception, simply return.

@dbu
Copy link
Member

dbu commented Nov 7, 2014

thanks a lot! coming good. i added a few comments.

for the doc, i think we have to document this in http://symfony.com/doc/master/cmf/bundles/routing/dynamic.html#routereferrersinterface-sonata-admin-extension and could start to use this in http://symfony.com/doc/master/cmf/tutorial/sonata-admin.html

- Added translation
- Shortened caption and added title
- Routes can now also be linked to the frontend
- Improved exception handling
@frne
Copy link
Contributor Author

frne commented Nov 12, 2014

Thanks for the input @dbu

I've made some improvements in 67fa724. Unfortunately, my French is a bit rusty. Therefore, I could only add translation strings for german and english.

BTW: Documentation PR is on it's way. Will link it, once proposed...

@frne
Copy link
Contributor Author

frne commented Nov 12, 2014

Added XLIFF translations for the new strings, but it should seriously be reviewed by someone who fluently speaks those languages (fr, it, nl, pl).

@dbu
Copy link
Member

dbu commented Nov 12, 2014

thanks a lot. translations look good enough to me.

where did you want to add the css to show this in a more interesting way? in the sandbox?

@frne
Copy link
Contributor Author

frne commented Nov 13, 2014

I would have placed it into the sandbox, or is there a more common place for such things?

@dbu dbu changed the title [WIP] Adds link to the frontend page in SonataAdmin [AdminExtension] Add link to page in frontend if possible Nov 13, 2014
dbu added a commit that referenced this pull request Nov 13, 2014
[AdminExtension] Add link to page in frontend if possible
@dbu dbu merged commit 77f233a into symfony-cmf:master Nov 13, 2014
@dbu
Copy link
Member

dbu commented Nov 13, 2014

thanks! can you add the css in the sandbox and also provide a sample in the documentation? i created an issue for the documentation symfony-cmf/symfony-cmf-docs#609

@frne
Copy link
Contributor Author

frne commented Nov 13, 2014

Cool. I'll add the css to symfony-cmf/cmf-sandbox/pull/276

@frne frne deleted the frontend-link-sonata-admin branch November 13, 2014 07:36
frne added a commit to frne/cmf-sandbox that referenced this pull request Nov 22, 2014
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