mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
New: Modules can add their own tab on projects cards
This commit is contained in:
parent
aea99b1d5e
commit
eb8ac6c1b0
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user