Problem/Motivation
A few components like the list of opening instances on the calendar entity or the slots and booking button on opening instance entities are hard coded and always rendered and displayed when viewing those entities.
This should be configurable, so that the site builder can decide if and where those components are displayed. And at the same time, those components would also be useful as fields in views. Both of those requirements can be delivered with the same solution.
Proposed resolution
Turn the building of those components into a service. Add pseudo fields for those components and only call the rendering from the service when configured accordingly.
Then, also add them as views fields, using the same code from that service.
Issue fork bookable_calendar-3346482
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
jurgenhaasThe MR contains all the code to achieve this issue's goal, please have a look.
Comment #6
josh.fabean@jurgenhaas, I tested that locally and existing display looks exactly the same before and after your changes, and it does allow for more flexibility. Thank you for the changes!
This is pushed to latest 2.2.x and it will end up in 2.2.4 shortly here.
Comment #7
josh.fabeanComment #8
josh.fabean