1

I am working with Symfony 2 and sonata admin bundle.

I have an entity "affaire", all users (admin, employee, ect) can add "comments" What I want to be able to do is to have a button in the list of affaire (in every row) that says 'comment' for example and when you click on it it direct you to the list of comments related to this affaire with possibility to add a comment for example. How can I do that? any idea or tips?

KawtarHB
  • 179
  • 2
  • 2
  • 6

1 Answers1

1

If you go to Sonata Sandbox project, you will find News Bundle that has this functionality on Posts. You even get a vertical tab to list all comments related to Post while editing it.

TautrimasPajarskas
  • 2,686
  • 1
  • 32
  • 40
  • Thank you for your answer. But let's assume I don't need just the comment. What if I want a button that link me to another entity's list? Do you know what I mean? Let's assume I have this list of affaires and I want a button that direct me to the list of reclamations related to this affaire for example.. then how can I do this? – KawtarHB Jul 09 '13 at 12:32
  • As far as I remember from examples in Sonata Sandbox project, you can create a link with a GET parameter set to Affair Id and read that GET id from within ReclamationAdmin. I have never done this, but will do in very near future. – TautrimasPajarskas Jul 09 '13 at 13:35