Skip to content

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
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…ickController.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…ontroller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…ickController.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
….php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…ntroller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
….php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
….php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
….php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…lCollector.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…xtension.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
….php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
bdalsass and others added 14 commits January 7, 2025 07:46
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…Controller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…Controller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…Controller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
…Controller.php

Co-authored-by: Stephen Abello <stephen.abello@combodo.com>
@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.

4 participants