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

N°8031 - Make all portal bricks use custom templates for all templates #696

Merged
merged 41 commits into from
Jan 13, 2025

Conversation

bdalsass
Copy link
Contributor

Base information

Question Answer
Related to a Combodo ticket (https://support.combodo.com/pages/UI.php?operation=details&class=Bug&id=8031&c[menu]=TargetOverview)
Type of change Enhancement

Objective

This pull request aims to allow overriding portal default twig templates.
Historically the portal allows to set the templates for the default layout, the home page and for the tiles and pages of brick instances. We project a new look for the portal and needs to replace more templates that the ones allowed.

Proposed solution

Create a new service for managing templates.
Any PHP class can then registry templates by implementing an interface TemplatesProviderInterface.

image

AbstractBrick and AsbtractController implements this interface, so any brick or controller can provides his own templates without implementing interface.

image

Datamodel module_design properties accept any templates handled by the service

2024-12-30_09h44_39

New Symfony profiler view for the template service:

image

image

Checklist before requesting a review

  • [X ] I have performed a self-review of my code
  • [X ] I have tested all changes I made on an iTop instance
  • I have added a unit test, otherwise I have explained why I couldn't
  • [X ] Is the PR clear and detailed enough so anyone can understand digging in the code?

Checklist of things to do before PR is ready to merge

  • Unit test to add

- Correct InterfaceDiscovery (missing portal autoloader)
- Adjust providers
- Collector
- Cleaning
@bdalsass bdalsass added this to the 3.2.1 milestone Dec 30, 2024
@bdalsass bdalsass requested a review from steffunky December 30, 2024 08:54
@bdalsass bdalsass self-assigned this Dec 30, 2024
@CombodoApplicationsAccount CombodoApplicationsAccount added the internal Work made by Combodo label Dec 30, 2024
bdalsass and others added 17 commits January 7, 2025 07:37
bdalsass and others added 14 commits January 7, 2025 07:46
@bdalsass bdalsass merged commit 9fadbb5 into support/3.2 Jan 13, 2025
@bdalsass bdalsass deleted the feature/templates-portal branch January 13, 2025 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal Work made by Combodo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants