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

Allow page visible toggle (4.6) #1838

Merged
merged 7 commits into from
May 25, 2020

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented May 18, 2020

What is this pull request for?

For 4.6-stable branch

Put back the "visible navigation" checkbox into the form of pages that are attached to a menu (node). This is necessary because Alchemy uses this flag on parent pages to build the urlname of a page. This might change in the future, but in 4.x it is still the case.

This changes the current checkbox "visible in navigation" into a button "attach to a menu" for sites having languages with menus available. The checkbox for the visible status changes from "visible in navigation" to "show in url of child pages".

For sites not having any languages with menus this does not change at all. Think of the availability of menus toggle this feature. This is necessary because we still support the deprecated render_navigation helper in 4.x

Screenshots

Alchemy CMS - Pages 2020-05-19 00-09-06

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

We should only check if any menus are present to attach a page to for the same language.
The Page#visible status is used to build the urlname of child pages. If a page is attached to a menu we should still be able to toggle that flag.
@tvdeyen tvdeyen added this to the 4.5.1 milestone May 18, 2020
@tvdeyen tvdeyen self-assigned this May 18, 2020
Copy link

@hound hound bot left a comment

Choose a reason for hiding this comment

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

Some files could not be reviewed due to errors:

.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout
.rubocop.yml: Metrics/LineLength has the wrong namespace - should be Layout
Error: The `Layout/AlignHash` cop has been renamed to `Layout/HashAlignment`.
(obsolete configuration found in .rubocop.yml, please update it)
The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`.
The `Layout/IndentArray` cop has been renamed to `Layout/FirstArrayElementIndentation`.
The `Layout/IndentHash` cop has been renamed to `Layout/FirstHashElementIndentation`.
The `Layout/IndentHeredoc` cop has been renamed to `Layout/HeredocIndentation`.
The `Lint/HandleExceptions` cop has been renamed to `Lint/SuppressedException`.
The `Style/BracesAroundHashParameters` cop has been removed.

@tvdeyen tvdeyen requested a review from mamhoff May 19, 2020 06:57
@tvdeyen tvdeyen changed the title Allow page visible toggle Allow page visible toggle (4.5) May 19, 2020
@tvdeyen tvdeyen mentioned this pull request May 19, 2020
3 tasks
@tvdeyen tvdeyen changed the title Allow page visible toggle (4.5) Allow page visible toggle (4.6) May 21, 2020
@tvdeyen tvdeyen changed the base branch from 4.5-stable to 4.6-stable May 21, 2020 07:04
@tvdeyen tvdeyen merged commit 68696e0 into AlchemyCMS:4.6-stable May 25, 2020
@tvdeyen tvdeyen deleted the allow-page-visible-toggle branch May 25, 2020 11:32
tvdeyen added a commit that referenced this pull request Jun 4, 2020
- Use apt update instead of apt-get in GH action [#1865](#1865) ([tvdeyen](https://github.com/tvdeyen))
- Use depth for page tree serializer root_or_leaf [#1864](#1864) ([tvdeyen](https://github.com/tvdeyen))
- Fix sitemap wrapper height [#1861](#1861) ([tvdeyen](https://github.com/tvdeyen))
- Do not return the root page with API responses. [#1860](#1860) ([tvdeyen](https://github.com/tvdeyen))
- Introduce page.url_path and use it for alchemyPageSelect [#1859](#1859) ([tvdeyen](https://github.com/tvdeyen))
- Update Urlname translation [#1857](#1857) ([tvdeyen](https://github.com/tvdeyen))
- Show url name in Page tree [#1856](#1856) ([tvdeyen](https://github.com/tvdeyen))
- Deprecate Page#visible attribute [#1855](#1855) ([tvdeyen](https://github.com/tvdeyen))
- 4.6: Re-add `auto_logout_time` configuration option [#1852](#1852) ([mamhoff](https://github.com/mamhoff))
- Backport ContentEditor to 4.6, deprecate removed methods on `Alchemy::Content` [#1847](#1847) ([mamhoff](https://github.com/mamhoff))
- Deprecate auto_logout_time (4.6) [#1843](#1843) ([tvdeyen](https://github.com/tvdeyen))
- Deprecate require_ssl (4.6) [#1842](#1842) ([tvdeyen](https://github.com/tvdeyen))
- Deprecate url_nesting configuration (4.6) [#1841](#1841) ([tvdeyen](https://github.com/tvdeyen))
- Allow page visible toggle (4.6) [#1838](#1838) ([tvdeyen](https://github.com/tvdeyen))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants