Skip to content
Snippets Groups Projects
Commit eb8ac6c1 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Modules can add their own tab on projects cards

parent aea99b1d
No related branches found
No related tags found
No related merge requests found
......@@ -25,9 +25,9 @@ For users:
- Fix: Running sending-email.php
For developers:
- Reorganize /dev directory.
- Change the way items are linked together.
- Qual: Reorganize /dev directory.
- Qual: Change the way items are linked together.
- New: Modules can add their own tab on projects cards.
***** ChangeLog for 2.7.1 compared to 2.7 *****
......
......@@ -52,6 +52,23 @@ function project_prepare_head($objsoc)
$h++;
}
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['project']))
{
$i=0;
foreach ($conf->tabs_modules['project'] as $value)
{
$values=explode(':',$value);
if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$objsoc->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1];
$h++;
}
}
return $head;
}
......@@ -83,6 +100,23 @@ function task_prepare_head($object)
$head[$h][2] = 'who';
$h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:MyModule:@mymodule:/dolibarr/mymodule/mypage.php?id=__ID__');
if (is_array($conf->tabs_modules['task']))
{
$i=0;
foreach ($conf->tabs_modules['task'] as $value)
{
$values=explode(':',$value);
if ($values[2]) $langs->load($values[2]);
$head[$h][0] = preg_replace('/__ID__/i',$objsoc->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]);
$head[$h][2] = 'tab'.$values[1];
$h++;
}
}
return $head;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment