-
Notifications
You must be signed in to change notification settings - Fork 33
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
limit fields that are shown when embedding editing #81
Comments
What if one of the extension form fields is required in the model? |
Maybe the best would be to provide a specific form builder for the embeded form that will be used in preference if it exists.
|
this could be a problem when creating new items, indeed. editing |
that would add yet another method to admin and admin extensions, not |
$adminAttributes = $formMapper->getFormBuilder()->getAttribute('sonata_admin');
$editInline = isset($adminAttributes['edit']) && $adminAttributes['edit'] == 'inline'; That's a way to check if inline editing is enabled maybe not entirely relevant for this issue though. |
@sjopet the problem is that if you enable pwf by interface, it will |
@dbu but you could still differentiate between when an admin is embedded or not and adjust the number of fields that are displayed. |
I don't get the issue here, can you be more specific ? @dbu is right about the workflow. The extension has to figure if the current admin is embed or not. |
@rande when editing embedded menu items with https://github.com/symfony-cmf/MenuBundle/blob/master/Admin/Extension/MenuNodeReferrersExtension.php (edit inline, table) and having other extensions activated on the MenuAdmin, the table rows get awfully squeezed together. you can look at http://cmf.liip.ch/de/admin/bundle/content/multilangstaticcontent/cms/content/demo/edit (login is admin/admin) to see what happens. we try to figure out what would be the right thing to do |
@rande is there a way to control the layout of an embedded admin? can it be multiline? or have some sort of horizontal tabs? |
this looks pretty bad (the current sandbox is still the same):
http://cmf.liip.ch/de/admin/bundle/content/multilangstaticcontent/cms/content/demo/edit
is there a way we can not have the admin extension trigger when embedding? i guess that is up to the extension itself to figure it out - should we adjust it? i guess we should also hide the name as its not editable anyways.
according to thomas rabaix, the proper way to know if an admin is embedded is to check getParentFieldDescription for null. if i add this to the publish workflow extensions, it gets a lot better:
shall we do that? do we have to make this configurable?
Another option is to have a less compact view ith
sonata_type_collection
disable the two lineswhich makes the items show as in the stand alone editing with one row per field. that is more usable then what we end up here. however, the layout then still could use a lot of tweaking.
The text was updated successfully, but these errors were encountered: