forked from Wavyzz/dolibarr
Qual: Mutualized code
This commit is contained in:
@@ -83,6 +83,14 @@ function societe_prepare_head($object)
|
|||||||
$head[$h][2] = 'category';
|
$head[$h][2] = 'category';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'thirdparty');
|
||||||
|
|
||||||
|
// Notes
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/socnote.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/socnote.php?socid='.$object->id;
|
||||||
@@ -90,6 +98,7 @@ function societe_prepare_head($object)
|
|||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
// Attached files
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
|
||||||
@@ -97,6 +106,7 @@ function societe_prepare_head($object)
|
|||||||
$head[$h][2] = 'document';
|
$head[$h][2] = 'document';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
// Notifications
|
||||||
if ($conf->notification->enabled && $user->societe_id == 0)
|
if ($conf->notification->enabled && $user->societe_id == 0)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/fiche.php?socid='.$object->id;
|
||||||
@@ -104,25 +114,6 @@ function societe_prepare_head($object)
|
|||||||
$head[$h][2] = 'notify';
|
$head[$h][2] = 'notify';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['thirdparty']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['thirdparty'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Log
|
// Log
|
||||||
if ($user->societe_id == 0)
|
if ($user->societe_id == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,27 +64,18 @@ function contact_prepare_head($object)
|
|||||||
$head[$h][2] = 'exportimport';
|
$head[$h][2] = 'exportimport';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'contact');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/contact/info.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['contact']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['contact'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ function contract_prepare_head($object)
|
|||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'contract');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Note");
|
$head[$h][1] = $langs->trans("Note");
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -55,23 +61,6 @@ function contract_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['contract']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['contract'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -53,6 +53,12 @@ function fichinter_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -68,23 +74,6 @@ function fichinter_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['intervention']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['intervention'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,12 @@ function facturefourn_prepare_head($object)
|
|||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_invoice');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -59,23 +65,6 @@ function facturefourn_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['invoice_supplier']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['invoice_supplier'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -105,6 +94,12 @@ function ordersupplier_prepare_head($object)
|
|||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_order');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Notes");
|
$head[$h][1] = $langs->trans("Notes");
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -124,23 +119,6 @@ function ordersupplier_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['order_supplier']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['order_supplier'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3760,4 +3760,52 @@ function picto_from_langcode($codelang)
|
|||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Complete a head array with value added by external modules
|
||||||
|
* @param conf Object conf
|
||||||
|
* @param langs Object langs
|
||||||
|
* @param object Object object
|
||||||
|
* @param head Object head
|
||||||
|
* @param h New position to fill
|
||||||
|
* @param type Value for object where objectvalue can be
|
||||||
|
* 'thirdparty' to add a tab in third party view
|
||||||
|
* 'intervention' to add a tab in intervention view
|
||||||
|
* 'supplier_order' to add a tab in supplier order view
|
||||||
|
* 'supplier_invoice' to add a tab in supplier invoice view
|
||||||
|
* 'invoice' to add a tab in customer invoice view
|
||||||
|
* 'order' to add a tab in customer order view
|
||||||
|
* 'product' to add a tab in product view
|
||||||
|
* 'propal' to add a tab in propal view
|
||||||
|
* 'member' to add a tab in fundation member view
|
||||||
|
*/
|
||||||
|
function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type)
|
||||||
|
{
|
||||||
|
if (is_array($conf->tabs_modules['thirdparty']))
|
||||||
|
{
|
||||||
|
$i=0;
|
||||||
|
foreach ($conf->tabs_modules['thirdparty'] as $value)
|
||||||
|
{
|
||||||
|
$values=explode(':',$value);
|
||||||
|
if (sizeof($values) == 5) // new declaration
|
||||||
|
{
|
||||||
|
if ($values[0] != $type) continue;
|
||||||
|
if ($values[3]) $langs->load($values[3]);
|
||||||
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[4]),1);
|
||||||
|
$head[$h][1] = $langs->trans($values[2]);
|
||||||
|
$head[$h][2] = str_replace('+','',$values[1]);
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
else if (sizeof($values) == 4) // old declaration, for backward compatibility
|
||||||
|
{
|
||||||
|
if ($values[0] != $type) continue;
|
||||||
|
if ($values[2]) $langs->load($values[2]);
|
||||||
|
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
||||||
|
$head[$h][1] = $langs->trans($values[1]);
|
||||||
|
$head[$h][2] = 'tab'.$values[1];
|
||||||
|
$h++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -59,6 +59,12 @@ function facture_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -78,23 +84,6 @@ function facture_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['invoice']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['invoice'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -64,6 +64,12 @@ function member_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'member');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Note");
|
$head[$h][1] = $langs->trans("Note");
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -79,23 +85,6 @@ function member_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['member']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['member'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,6 +77,12 @@ function commande_prepare_head($object)
|
|||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'order');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
|
||||||
/*$filesdir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($commande->ref);
|
/*$filesdir = $conf->commande->dir_output . "/" . dol_sanitizeFileName($commande->ref);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||||
@@ -96,23 +102,6 @@ function commande_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['order']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['order'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,20 +75,9 @@ function prelevement_prepare_head($object)
|
|||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
if (is_array($conf->tabs_modules['prelevement']))
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
{
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'prelevement');
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['prelevement'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,11 +105,6 @@ function product_prepare_head($object, $user)
|
|||||||
$head[$h][2] = 'referers';
|
$head[$h][2] = 'referers';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
|
|
||||||
$head[$h][1] = $langs->trans('Documents');
|
|
||||||
$head[$h][2] = 'documents';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
if($object->isproduct()) // Si produit stockable
|
if($object->isproduct()) // Si produit stockable
|
||||||
{
|
{
|
||||||
if ($conf->stock->enabled && $user->rights->stock->lire)
|
if ($conf->stock->enabled && $user->rights->stock->lire)
|
||||||
@@ -123,20 +118,15 @@ function product_prepare_head($object, $user)
|
|||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
if (is_array($conf->tabs_modules['product']))
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
{
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'product');
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['product'] as $value)
|
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
|
||||||
{
|
$head[$h][1] = $langs->trans('Documents');
|
||||||
$values=explode(':',$value);
|
$head[$h][2] = 'documents';
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
$h++;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// More tabs from canvas
|
// More tabs from canvas
|
||||||
if (is_array($object->onglets))
|
if (is_array($object->onglets))
|
||||||
|
|||||||
@@ -52,6 +52,12 @@ function project_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'project');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
|
||||||
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||||
@@ -66,23 +72,6 @@ function project_prepare_head($object)
|
|||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/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] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Then tab for sub level of projet, i mean tasks
|
// Then tab for sub level of projet, i mean tasks
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Tasks");
|
$head[$h][1] = $langs->trans("Tasks");
|
||||||
@@ -132,6 +121,12 @@ function task_prepare_head($object)
|
|||||||
$head[$h][2] = 'time';
|
$head[$h][2] = 'time';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'task');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/document.php?id='.$object->id;
|
||||||
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
/*$filesdir = $conf->projet->dir_output . "/" . dol_sanitizeFileName($object->ref);
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
|
||||||
@@ -146,23 +141,6 @@ function task_prepare_head($object)
|
|||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/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] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,12 @@ function propal_prepare_head($object)
|
|||||||
$head[$h][2] = 'contact';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans('Notes');
|
$head[$h][1] = $langs->trans('Notes');
|
||||||
$head[$h][2] = 'note';
|
$head[$h][2] = 'note';
|
||||||
@@ -91,23 +97,6 @@ function propal_prepare_head($object)
|
|||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['propal']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['propal'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,24 +51,14 @@ function shipping_prepare_head($object)
|
|||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
if (is_array($conf->tabs_modules['delivery']))
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
{
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery');
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['delivery'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function delivery_prepare_head($object)
|
function delivery_prepare_head($object)
|
||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
@@ -94,20 +84,9 @@ function delivery_prepare_head($object)
|
|||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
if (is_array($conf->tabs_modules['delivery']))
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
{
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery');
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['delivery'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,28 +65,17 @@ function stock_prepare_head($object)
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'stock');
|
||||||
|
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/product/stock/info.php?id='.$object->id;
|
||||||
$head[$h][1] = $langs->trans("Info");
|
$head[$h][1] = $langs->trans("Info");
|
||||||
$head[$h][2] = 'info';
|
$head[$h][2] = 'info';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['stock']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['stock'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,6 +74,12 @@ function user_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Show more tabs from modules
|
||||||
|
// Entries must be declared in modules descriptor with line
|
||||||
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'user');
|
||||||
|
|
||||||
if (! $user->societe_id)
|
if (! $user->societe_id)
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
|
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
|
||||||
@@ -87,23 +93,6 @@ function user_prepare_head($object)
|
|||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show more tabs from modules
|
|
||||||
// Entries must be declared in modules descriptor with line
|
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
|
||||||
if (is_array($conf->tabs_modules['user']))
|
|
||||||
{
|
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['user'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,20 +134,9 @@ function group_prepare_head($object)
|
|||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
// $this->tabs = array('entity:MyModule:@mymodule:/mymodule/mypage.php?id=__ID__');
|
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||||
if (is_array($conf->tabs_modules['group']))
|
// $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||||
{
|
complete_head_from_modules($conf,$langs,$object,$head,$h,'group');
|
||||||
$i=0;
|
|
||||||
foreach ($conf->tabs_modules['group'] as $value)
|
|
||||||
{
|
|
||||||
$values=explode(':',$value);
|
|
||||||
if ($values[2]) $langs->load($values[2]);
|
|
||||||
$head[$h][0] = dol_buildpath(preg_replace('/__ID__/i',$object->id,$values[3]),1);
|
|
||||||
$head[$h][1] = $langs->trans($values[1]);
|
|
||||||
$head[$h][2] = 'tab'.$values[1];
|
|
||||||
$h++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return $head;
|
return $head;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user