-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add support for worldwide offices embedded in worldwide organisations #3095
Conversation
fa8e8e4
to
4387232
Compare
4387232
to
d0134b7
Compare
We are changing the content item for Worldwide Organisations and Worldwide Offices to be a single piece of content, with all sub-pages included in a single Worldwide Organisation content item. Therefore switching the Worldwide Organisation page to get the office information from the `details`, rather than `links`.
d0134b7
to
d8bb67c
Compare
d8bb67c
to
6a61980
Compare
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.
How does this load the correct template? Don't you need to modify the content_item_template
method?
6a61980
to
7250a77
Compare
Looks like that got lost in a rebase 🤦♂️. Have added it back in. |
As part of the switch to Worldwide Organisation content items containing the content for their offices, we need to switch the rendering of the office pages to use these parts. This makes that switch in a backward compatible way, so we can continue rendering office pages under the existing content items until the office routes are updated to point to the organisation's content item. In a later PR, we will remove `WorldwideOfficePresenter` and it's associated view.
7250a77
to
0c88e11
Compare
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.
All good from me! ✅
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 Bruce
In #3095, we introduced code that supports Worldwide Offices being included in the Worldwide Organisation content item, whilst also supporting standalone Worldwide Office content items. We have now removed all the Worldwide Office content items and the code that renders them, so can remove the rendering code from this application.
As part of the switch to Worldwide Organisation content items containing the content for their offices, we need to switch the rendering of the Worldwide Organisation and Worldwide Office pages to use these parts.
This makes that switch in a backward compatible way, so we can continue rendering office pages under the existing content items until the office routes are updated to point to the organisation's content item.
In a later PR, we will remove
WorldwideOfficePresenter
and it's associated view, once all the routes for offices have been switched.Trello card
Depends on alphagov/publishing-api#2638, alphagov/whitehall#8844 and all Worldwide Organisations being republished.
Follow these steps if you are doing a Rails upgrade.