Open BillHeaton opened 4 years ago
@kartik-v I've made good progress on this one. I'm down in the kv-tree.js guts and have this urge to document the code. Would that cause you heart burn?
@BillHeaton - thanks for the effort ... it would be good if you can share a PULL REQUEST --
@kartik-v will do, working on the last little bit now.
Thanks. Just one note though - the extension currently as well allows user to always configure and choose his/her own CUSTOM FORM if needed. Just check in your enhancement if the user can have both options - use the default form (for simple internal admin forms) - OR/AND use the custom form for advanced needs.
The problem I'm solving is that I have many users, and only the admins will be allowed to modify the tree. The plan is to use the widget as a navigation aid using a custom detail that contains the information to display to the user.
That's mostly working and I've created a user detail that a read-only version of the isAdmin detail.
Working on implementing a button that when in isAdmin mode flips it to a "user view." The user detail view (if isAdmin is set) in turn has a button to flip back to the "admin view."
Planning on putting a pull request out because "it's almost" working but has problems with the flipping. I need other eyes to look at it. Currently using a session variable however may need to be moved to parameters.
Prerequisites
master
branch of yii2-tree-manager.Enhancement
Currently isAdmin only controls the checkboxes on the node management form. It can be argued that the rest of the fields are still Management information.
I want to use the control to navigate a node tree and display node information of my choosing when isadmin is false.
I suggest:
1) isAdmin controls the showing of the entire node management form. 2) When isAdmin is false then a user form would be displayed 3) When isAdmin is true then add a button to flip between user form and management form.