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

Configure search result link in admin #3682

Closed
wants to merge 1 commit into from

Conversation

core23
Copy link
Member

@core23 core23 commented Mar 25, 2016

This commit allows you to configure the search result link for each admin separately

Fixes (partial) #2581, #3092

It's kind of hard where to configure the default action for the link. Should the **Admin class define the final action or should a global config value override it.

@greg0ire
Copy link
Contributor

"Configurare" 😉

*/
public function getSearchResultLink($object)
{
if ($this->hasRoute($this->searchResultAction) && $this->isGranted(strtoupper($this->searchResultAction), $object)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

linebreak this please

@core23 core23 changed the title Configurare search result link in admin Configure search result link in admin Mar 25, 2016
@core23 core23 force-pushed the search-block branch 2 times, most recently from 0152be5 to 54038e4 Compare March 25, 2016 15:32
@greg0ire
Copy link
Contributor

With your PR, the default action can be changed by overriding the property, right?

@OskarStark
Copy link
Member

👍 can you create a PR for 3.0 after the merge @core23

@core23
Copy link
Member Author

core23 commented Mar 30, 2016

Yes, you can override the property in the specific Admin class @greg0ire

I will do, after merging this @OskarStark

@soullivaneuh
Copy link
Member

@core23 Could you please add some tests?

@core23
Copy link
Member Author

core23 commented Apr 3, 2016

done @soullivaneuh

@greg0ire
Copy link
Contributor

This adds a new method to the API, should probably be tagged as minor. LGTM, ping @OskarStark

@greg0ire
Copy link
Contributor

No answer… let's merge!

@soullivaneuh
Copy link
Member

Any chance to have some updated documentation?

@greg0ire
Copy link
Contributor

Any chance to have some updated documentation?

Almost clicked the button


In general the search result generates a link to the edit action of an item or is using the show action, if the edit
route is disabled or you haven't the required permission. You can change this behaviour by overriding the
``searchResultActions``. The defined actions will we used sequential until a route with the required permissions
Copy link
Contributor

Choose a reason for hiding this comment

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

  • "the searchResultActions method"
  • "will we used sequential" ?!?

@@ -1024,4 +1024,14 @@ public function checkAccess($action, $object = null);
*
*/
// public function configureActionButtons($action, $object = null);

//TODO: uncomment this method for 3.0
Copy link
Member

Choose a reason for hiding this comment

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

for 4.0 @core23

@soullivaneuh
Copy link
Member

According to the new Sonata version management and next major release plan, this project has been refactored regarding branching and versioning.

If you see this message, your PR concerns a patch or a minor release and is not targeting the right branch.

So I'm closing this one, but don't see it as a refusal. If you think your work is still relevant and want to continue, feel free to reopen it on the right branch (e.g. the default one).

Regards.

@core23
Copy link
Member Author

core23 commented May 8, 2016

Refs #3772

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

Successfully merging this pull request may close these issues.

4 participants