Skip to content
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

User Mode Node Display #260

Open
2 tasks
BillHeaton opened this issue Oct 14, 2019 · 5 comments
Open
2 tasks

User Mode Node Display #260

BillHeaton opened this issue Oct 14, 2019 · 5 comments

Comments

@BillHeaton
Copy link
Contributor

BillHeaton commented Oct 14, 2019

Prerequisites

  • [x ] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • [x ] The issue still exists against the latest master branch of yii2-tree-manager.
  • [x ] This is not an usage question. I confirm having gone through and read the documentation and demos.
  • [x ] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • I have attempted to find the simplest possible steps to reproduce the issue.
  • I have included a failing test as a pull request (Optional).

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.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@BillHeaton
Copy link
Contributor Author

@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?

@kartik-v
Copy link
Owner

kartik-v commented Dec 8, 2019

@BillHeaton - thanks for the effort ... it would be good if you can share a PULL REQUEST --

@BillHeaton
Copy link
Contributor Author

@kartik-v will do, working on the last little bit now.

@kartik-v
Copy link
Owner

kartik-v commented Dec 8, 2019

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.

@BillHeaton
Copy link
Contributor Author

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.

@BillHeaton BillHeaton mentioned this issue Dec 8, 2019
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants