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

Fix260b #262

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Fix260b #262

wants to merge 9 commits into from

Conversation

BillHeaton
Copy link
Contributor

Scope

This pull request includes a

  • Bug fix
  • New feature
  • Translation

Changes

The following changes were made (this change is also documented in the change log):

Separates the isAdmin view from the !isAdmin (i.e. user detail). When in isAdmin mode a button is present in the detail screen to flip to the other mode.

  • Added NodeUser to set the view to use when not in isAdmin mode defaults to @kvtree/views/_users. Will need to be added to the docs.
  • Added actionFlip AJAX and NodeController processing.
  • Removed Management buttons when not isAdmin mode.
  • Added parameter to renderForm javascript function to set the url with a default of actions.manage.
  • Added actionFlip to NodeController.php
  • Added flipview button to _file
  • Added _user view
  • Split out view selection to new function selectView($out)

TODO

  • Remove yii:debug lines when no longer needed.
  • Fix flipview button issue. (I'll put a detailed description in comments)
  • Test that NodeUser can be overridden.

Related Issues

#260

Add composer.lock and vendor to .gitignore
Restore backups.
nodeView has a corresponting nodeUser for displaying in user mode.  Default nodeView and nodeUser to @kvtree/views/xxx.  Simplify _user.
flip view button
flip display mode button, fa-user in admin mode, and fa-user-tie in user mode.  Seperate out view mode selection.
Add ehn 260 comment line
@BillHeaton
Copy link
Contributor Author

BillHeaton commented Dec 8, 2019

This enhancement is mostly working. !isAdmin mode (i.e. user view) is complete and the a new read-only detail view displays.

isAdmin mode has a weird bug. The first detail screen displays correctly. Pressing the flip view button doesn't apparently work but the session variable is updated. Refreshing the screen will show the new mode.

I suspect it's a session problem. May need to move the view mode into the parameters.

@kartik-v
Copy link
Owner

kartik-v commented Dec 9, 2019

Thanks - went quickly through. Let me know when you have the tested/corrected/updated version.

@BillHeaton
Copy link
Contributor Author

Will do. I plan on moving the view mode into parameters as it'll be simpler than than the session variable.

modeView implementation.  javascript implementation.  actionFlip in NodeController.
@BillHeaton
Copy link
Contributor Author

BillHeaton commented Dec 29, 2019

@kartik-v Code Complete. I'm testing now.

I would like to write up a how-to on adding buttons to the detail screen. How do I get it to you and what format would you like?

@BillHeaton
Copy link
Contributor Author

@kartik-v Testing complete. I was able to override both the Admin detail and the User detail.

@kartik-v
Copy link
Owner

kartik-v commented Jan 7, 2020

Thanks @BillHeaton - I will take this and add some updates over this PR.

@BillHeaton
Copy link
Contributor Author

BillHeaton commented Jan 9, 2020 via email

@stale
Copy link

stale bot commented Mar 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Mar 9, 2020
@BillHeaton
Copy link
Contributor Author

@kartik-v You was going to do some updates over this PR?

@stale stale bot removed the wontfix label Mar 9, 2020
@kartik-v
Copy link
Owner

kartik-v commented Mar 9, 2020

Hi @BillHeaton -- I had tested this PR initially - but found some tests were failing and then did not get time to dig into that. Have you managed to test the functionality you included?

@kartik-v
Copy link
Owner

kartik-v commented Mar 9, 2020

I have marking this issue with an enhancement label - so that we have this issue active and do not have the stale bot marking it stale.

@BillHeaton
Copy link
Contributor Author

BillHeaton commented Mar 9, 2020

Tested mostly with only the one issue to track down. What was the problems you were having with testing? Was off working on rebasing a project to pure bootstrap 4 and just finished so can spend some more time on it soon.

@kartik-v
Copy link
Owner

kartik-v commented Mar 9, 2020

The rendering of node detail was not happening (something broken I suppose on the JS initialization). As I said did not get time to dig in as well.

@BillHeaton
Copy link
Contributor Author

BillHeaton commented Mar 9, 2020 via email

@kartik-v kartik-v force-pushed the master branch 3 times, most recently from 7aedc3f to c7896b5 Compare March 4, 2022 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants