N°7194 - Add link to datamodel class schema on object details (#613)

This commit is contained in:
Anne-Catherine
2024-03-26 11:35:44 +01:00
committed by GitHub
parent 12b30c1531
commit 279b29a98c
20 changed files with 46 additions and 5 deletions

View File

@@ -7,6 +7,7 @@
namespace Combodo\iTop\Application\TwigBase\Twig;
use ApplicationMenu;
use AttributeDate;
use AttributeDateTime;
use AttributeText;
@@ -182,6 +183,13 @@ class Extension
return utils::GetAbsoluteUrlModulesRoot();
});
// Function to check if current user can access to the given menu
// Usage in twig: {% if is_backoffice_menu_enabled('DataModelMenu') %}
/** @since 3.2.0 */
$aFunctions[] = new TwigFunction('is_backoffice_menu_enabled', function ($sMenuId) {
return ApplicationMenu::IsMenuIdEnabled($sMenuId);
});
// Function to render a UI block (HTML, inline CSS, inline JS) and its sub blocks directly in the TWIG
// Usage in twig: {{ render_block(oBlock) }}
/** @since 3.0.0 */