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
Create footer for regulatory links #1973
Conversation
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.
Thanks for the PR, that's exactly what I needed for my bookstack site.
Just a minor change below:
@@ -0,0 +1,10 @@ | |||
@if(setting('app-privacy-policy') | setting('app-terms-of-service')) |
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.
@if(setting('app-privacy-policy') | setting('app-terms-of-service')) | |
@if(setting('app-privacy-policy') or setting('app-terms-of-service')) |
I am not too familiar with blade templates, but without this change, I only get a lot of errors (I only entered a privacy policy link, but not a terms of service)
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.
What version of PHP are you running, out of curiosity?
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.
PHP 7.3
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.
Thinking about it, I guess || would also be possible, but doesn't | do a bitwise or?
Made so footer link ordering, names and urls can be set. Cleaned up some of the setting-service and added support for array setting types, which are cleaned on entry and stored as json with a new type indicator column on the settings table for auto-decode. Also added testing to cover this feature. Related to #1973 and #854
Thank you for this PR @james-geiger and sorry for my late response. This all looked great, but I knew that people would probably want to change the wording and links so I built upon your work and made further changes in 44c41e9 to make this a configurable, order-able list. Will be part of the next feature release. |
Per #854 and feedback from @ApertureDevelopment, provides a mechanism to add links to a privacy policy and terms of service from the settings page.
Currently would not display on the page editor pages, but am open to and welcome feedback. It just didn't seem to me to fit the flow very well with the full-page editor, but this could also be added as a setting as well.
@ssddanbrown, not sure what your thoughts are on limits to the number of "app settings" but this seemed like it would be a good fit for that section. Also purposely limited this to two different kinds of links. Could likely be abstracted into a feature where you could add any number of "custom footer links" each with a label and href, but this seemed like a good place to start.