Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

hiding sortable field #102

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
4 participants
Contributor

zhil commented May 31, 2012

In order to use sortable field in sonata_type_collection it need to be visible, which is really

annoying.
I have created small patch, so such a code will work

protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('position',null,array('attr'=>array("hidden" => true)))

@zhil zhil In order to use sortable field in sonata_type_collection it need to b…
…e visible, which is really

annoying.
I have created small patch, so such a code will work

protected function configureFormFields(FormMapper $formMapper)
    {
        $formMapper
            ->add('position',null,array('attr'=>array("hidden" => true)))
82cc3e3
Contributor

Romain-Geissler commented Jun 4, 2012

The PR #94 (and the related one for the core SonataAdminBundle) intend to fix the same issue another way. Let @rande choose the best solution.

Contributor

zhil commented Jun 7, 2012

@rande , can you please review this PR ?

Owner

rande commented Jun 8, 2012

@zhil look like the issue has been solved here : #94

@rande rande closed this Jun 8, 2012

butt commented Oct 24, 2013

@rande Looks like this problem still exists. We have tried code like

protected function configureFormFields(FormMapper $formMapper)
{
$formMapper
->add('position','hidden',array('attr'=>array("hidden" => true)))

but position is still showed
bug

We can create PR for DoctrineOrmAdminBundle, if you will accept it

Contributor

zhil commented Oct 30, 2013

@rande ping, problem still exists, let we create new PR?

Owner

rande commented Oct 31, 2013

with the 2.2 branch ? I can't reproduce the issue

butt commented Nov 1, 2013

@rande I have created test build with vendors in https://github.com/butt/testSonata

        "doctrine/orm": ">=2.2.3,<2.4-dev",
        "doctrine/doctrine-bundle": "1.2.*",
        "sonata-project/admin-bundle": "2.2.7",
        "sonata-project/doctrine-orm-admin-bundle": "master-dev"

In order to reproduce bug you will need to create local copy, create a couple entities and open admin edit page for entity /admin/acme/demo/author/1/edit
screenshot attached
position

Contributor

zhil commented Nov 5, 2013

@rande ping. Did you checked demo Sonata build from @butt? Patch is pretty simple - we can create PR.

Contributor

zhil commented Nov 6, 2013

@rande sorry for annoying, did you checked sample build with this bug?

butt commented Nov 19, 2013

@rande Any news regarding this patch? :)

Contributor

zhil commented Dec 4, 2013

@rande Can you please check this bug? Sorry for annoying, but its kind of 5 minutes task - we have created full test environment.

Owner

rande commented Dec 4, 2013

I just try the sandbox, however I don't understand what you want to do. If you don't want to render the position field why are you using it ?

I think I am missing something here.

Contributor

zhil commented Dec 5, 2013

@rande if you remove position field from formMapper - sortable stop working

Owner

rande commented Dec 5, 2013

The field used to render the position icon is the field defined in the
admin class. So the behavior is ok.

You need to have the field to render the columns.

Thomas Rabaix
http://rabaix.net - http://sonata-project.org
On Dec 5, 2013 3:44 PM, "zhil" notifications@github.com wrote:

@rande https://github.com/rande if you remove position field from
formMapper - sortable stop working


Reply to this email directly or view it on GitHubhttps://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/102#issuecomment-29902670
.

Contributor

zhil commented Dec 5, 2013

@rande
Sorry I dont get you. Why cant we just make that rows hidden? (position input already hidden as well)

Owner

rande commented Dec 5, 2013

If you hide the cell then the position handler will not be shown. How can
we move the row without handler?

Thomas Rabaix
http://rabaix.net - http://sonata-project.org
On Dec 5, 2013 3:50 PM, "zhil" notifications@github.com wrote:

@rande https://github.com/rande
Sorry I dont get you. Why cant we just make that rows hidden? (position
input already hidden as well)


Reply to this email directly or view it on GitHubhttps://github.com/sonata-project/SonataDoctrineORMAdminBundle/pull/102#issuecomment-29903307
.

@zhil zhil referenced this pull request Dec 10, 2013

Merged

Hiding position row #308

Contributor

zhil commented Dec 10, 2013

@rande well, thats not true, we can simply put "display:none" on th/td for the position field. All handlers will work ok. I have created related PR. Solution is not very clear, but its works.

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