-
-
Notifications
You must be signed in to change notification settings - Fork 92
[WIP] Improve TreeBrowserBundle experience #340
Conversation
|
||
<div class="form-inline"> | ||
<input class="form-control" name="{{ full_name }}" id="{{ id }}-tree-selector-output" value="{{ value ?: (select_root_node ? root_node : '') }}"> | ||
<span class="btn btn-default btn-mini" data-toggle="dropdown">Select</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Select" should be a translation. i suggest we could label this "Pick" instead wdyt?
this is really cool! great work again @wouterj , thanks a lot! in what regard is this PR still WIP? or could we merge it already? one thing i wonder is whether we should (in addition?) show the string representation of the selected tree node in addition to the path. we might also do that in the tree, show the nodename very small and the title bigger. but this would mean that the ResourceBundle would expose a technical id as well as the human id... anyways, we should not block this PR by that idea. |
I need to do some more testing, it's not bug free at the moment.
As for the tree, it already shows the string representation (by default, using |
👍 , is there a way to only allow sub-tree of content only for example showing the whole tree when edition content doesn't make sense IMO. |
Yes, there is a |
👍 Awesome! |
does the new browser also allow to say whether the root node should be selectable or not? lets say i want to select a route. i currently need to specify /cms so that /cms/routes (the root route) is selectable. i would want to specify /cms/routes and have an option to control whether the root is selectable or not. |
} | ||
|
||
jQuery.ajax({ | ||
url: '{{ path('_cmf_resource', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_cmf_resource
-> _cmf_get_resource
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @wouterj
Closing as the form type is moved to the TreeBrowserBundle: symfony-cmf/tree-browser-bundle#116 |
This is probably one of the last big PRs regarding the TreeBrowserbundle 2.0. It changes the way the tree is used to something that's familair to all computer users.
When opening the form, the tree view is hidden and only the input box is shown:
When the admin want to select a node, they can do 2 things:
Both the tree view and the input field are keep in sync: Changing the input value changes the selected node in the tree and selecting a node in the tree changes the input value.
I'm not sure yet if it's very obvious what to do here for the admin, but I believe it is a step in the good direction as it'll hide those very long trees on a page.
This PR doesn't change admin for the manager (or admin) trees.
Fixes symfony-cmf/tree-browser-bundle#76