The Wayback Machine - https://web.archive.org/web/20231002160943/https://github.com/BookStackApp/BookStack/pull/1973
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

Create footer for regulatory links #1973

Merged
merged 1 commit into from Jan 31, 2021

Conversation

james-geiger
Copy link
Contributor

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.

Copy link

@Findus23 Findus23 left a 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'))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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)

Copy link
Contributor Author

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?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PHP 7.3

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?

ssddanbrown added a commit that referenced this pull request Jan 31, 2021
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
@ssddanbrown ssddanbrown merged commit a663364 into BookStackApp:master Jan 31, 2021
@ssddanbrown ssddanbrown added this to the v0.32.0 milestone Jan 31, 2021
@ssddanbrown
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants