mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 10:08:27 +01:00
UIUX : Experiment Dolibarr JS context and tools - Add tool for langs (#36389)
* Add more doc and simplify hook systeme uasge * doc * doc * lang tool * lang tool * lang tool
This commit is contained in:
@@ -255,17 +255,30 @@ class Documentation
|
||||
'UxDolibarrContext' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(
|
||||
'Introduction' => '#titlesection-basicusage',
|
||||
'ConsoleHelp' => '#titlesection-console-help',
|
||||
'JSDolibarrhooks' => '#titlesection-hooks',
|
||||
'JSDolibarrhooksReadyVsInit' => '#titlesection-event-init-vs-ready',
|
||||
'JSDolibarrAwaitHooks' => '#titlesection-await-hooks',
|
||||
'ExampleOfCreatingNewContextTool' => '#titlesection-create-tool-example',
|
||||
'SetEventMessageTool' => '#titlesection-tool-seteventmessage',
|
||||
'SetAndUseContextVars' => '#titlesection-contextvars',
|
||||
'submenu' => array(
|
||||
'UxDolibarrContextHowItWork' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/index.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(
|
||||
'Introduction' => '#titlesection-basicusage',
|
||||
'ConsoleHelp' => '#titlesection-console-help',
|
||||
'JSDolibarrhooks' => '#titlesection-hooks',
|
||||
'JSDolibarrhooksReadyVsInit' => '#titlesection-event-init-vs-ready',
|
||||
'JSDolibarrAwaitHooks' => '#titlesection-await-hooks',
|
||||
'ExampleOfCreatingNewContextTool' => '#titlesection-create-tool-example',
|
||||
'SetEventMessageTool' => '#titlesection-tool-seteventmessage',
|
||||
'SetAndUseContextVars' => '#titlesection-contextvars',
|
||||
),
|
||||
),
|
||||
'UxDolibarrContextLangsTool' => array(
|
||||
'url' => dol_buildpath($this->baseUrl.'/experimental/experiments/dolibarr-context/langs-tool.php', 1),
|
||||
'icon' => 'fas fa-flask',
|
||||
'submenu' => array(),
|
||||
'summary' => array(),
|
||||
),
|
||||
),
|
||||
'summary' => array(),
|
||||
),
|
||||
)
|
||||
);
|
||||
@@ -485,7 +498,13 @@ class Documentation
|
||||
if ($showsubmenu && !empty($menu['submenu'])) {
|
||||
foreach ($menu['submenu'] as $key => $item) {
|
||||
print '<li class="summary-title ">';
|
||||
|
||||
if (!empty($item['url'])) {
|
||||
print '<h3 class="level-'.$level.'"><a href="'.dolBuildUrl($item['url']).'" >'.$langs->trans($key).'</a></h3>';
|
||||
} else {
|
||||
print '<h3 class="level-'.$level.'">'.$langs->trans($key).'</h3>';
|
||||
}
|
||||
|
||||
if ($showsubmenu_summary) {
|
||||
$this->displaySummary($item, $level);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user