Merge branch 'develop' of git+ssh://git@github.com/Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
5d1b5d5e0c
@ -111,9 +111,9 @@ class modMyModule extends DolibarrModules
|
||||
$this->const = array();
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
||||
// 'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2
|
||||
// 'objecttype:-tabname'); // To remove an existing tab identified by code tabname
|
||||
// Example: $this->tabs = array('objecttype:+tabname1:Title1:mylangfile@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1
|
||||
// 'objecttype:+tabname2:Title2:mylangfile@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2
|
||||
// 'objecttype:-tabname':NU:conditiontoremove); // To remove an existing tab identified by code tabname
|
||||
// where objecttype can be
|
||||
// 'thirdparty' to add a tab in third party view
|
||||
// 'intervention' to add a tab in intervention view
|
||||
|
||||
@ -41,8 +41,10 @@ function commissions_admin_prepare_head()
|
||||
// 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,'',$head,$h,'commissionsadmin');
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin');
|
||||
|
||||
complete_head_from_modules($conf,$langs,'',$head,$h,'commissionsadmin','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
@ -443,9 +443,11 @@ function calendars_prepare_head($param)
|
||||
// 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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'agenda','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -51,9 +51,11 @@ function categories_prepare_head($object,$type)
|
||||
// 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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type);
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'categories_'.$type,'remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ function contact_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
|
||||
// $this->tabs = array('entity:-tabname); 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;
|
||||
@ -71,7 +71,7 @@ function contact_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'contact','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ function contract_prepare_head($object)
|
||||
$head[$h][1] = $langs->trans("ContractCard");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/contact.php?id='.$object->id;
|
||||
@ -50,9 +50,9 @@ function contract_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'contract');
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
|
||||
@ -71,6 +71,8 @@ function contract_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'contract','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -42,7 +42,7 @@ function fichinter_prepare_head($object)
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/contact.php?id='.$object->id;
|
||||
@ -62,9 +62,9 @@ function fichinter_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention');
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
|
||||
@ -83,7 +83,9 @@ function fichinter_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'intervention','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -52,7 +52,7 @@ function facturefourn_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_invoice');
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
@ -77,7 +77,9 @@ function facturefourn_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'supplier_invoice','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
|
||||
53
htdocs/core/lib/holiday.lib.php
Normal file
53
htdocs/core/lib/holiday.lib.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
* or see http://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/lib/holiday.lib.php
|
||||
* \brief Ensemble de fonctions de base pour les adherents
|
||||
*/
|
||||
|
||||
/**
|
||||
* Return array head with list of tabs to view object informations
|
||||
*
|
||||
* @param Object $object Holiday
|
||||
* @return array head
|
||||
*/
|
||||
function holiday_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/holiday/fiche.php?id='.$object->id;
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$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); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'holiday');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'holiday','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -39,7 +39,7 @@ function facture_prepare_head($object)
|
||||
$head[$h][1] = $langs->trans('CardBill');
|
||||
$head[$h][2] = 'compta';
|
||||
$h++;
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/contact.php?facid='.$object->id;
|
||||
@ -68,9 +68,9 @@ function facture_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice');
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
|
||||
@ -93,6 +93,8 @@ function facture_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'invoice','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -183,9 +183,11 @@ function member_stats_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'member_stats');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'member_stats','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -67,7 +67,7 @@ function commande_prepare_head($object)
|
||||
$head[$h][2] = 'preview';
|
||||
$h++;
|
||||
}
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_CONTACTS_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/commande/contact.php?id='.$object->id;
|
||||
@ -79,7 +79,7 @@ function commande_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
|
||||
// $this->tabs = array('entity:-tabname); 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;
|
||||
@ -90,7 +90,7 @@ function commande_prepare_head($object)
|
||||
$head[$h][1] = $langs->trans('Documents');
|
||||
$head[$h][2] = 'documents';
|
||||
$h++;
|
||||
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
|
||||
@ -104,7 +104,9 @@ function commande_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'order','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -75,9 +75,11 @@ function prelevement_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'prelevement');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'prelevement','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ function product_prepare_head($object, $user)
|
||||
// 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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'product');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/document.php?id='.$object->id;
|
||||
@ -158,8 +158,8 @@ function product_admin_prepare_head($object=null)
|
||||
|
||||
// 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
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'product_admin');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/product/admin/product_extrafields.php';
|
||||
|
||||
@ -61,7 +61,7 @@ function project_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
|
||||
// $this->tabs = array('entity:-tabname); 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;
|
||||
@ -96,7 +96,9 @@ function project_prepare_head($object)
|
||||
$head[$h][2] = 'gantt';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'project','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -130,7 +132,7 @@ function task_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
|
||||
// $this->tabs = array('entity:-tabname); 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.(GETPOST('withproject')?'&withproject=1':'');;
|
||||
@ -147,6 +149,8 @@ function task_prepare_head($object)
|
||||
$head[$h][2] = 'task_notes';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'task','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -73,7 +73,7 @@ function propal_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal');
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_NOTES_TAB))
|
||||
@ -98,6 +98,8 @@ function propal_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'propal','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -66,10 +66,12 @@ function shipping_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
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
@ -105,10 +107,12 @@ function delivery_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
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'delivery','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ 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
|
||||
// $this->tabs = array('entity:-tabname); 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;
|
||||
@ -74,7 +74,9 @@ function stock_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
return $head;
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'stock','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
?>
|
||||
@ -45,7 +45,7 @@ function tax_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'tax');
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/sociales/document.php?id='.$object->id;
|
||||
@ -58,6 +58,8 @@ function tax_prepare_head($object)
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'tax','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -33,23 +33,25 @@ function trip_prepare_head($object)
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/fiche.php?id=' . $object->id;
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$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
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'trip');
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT . '/compta/deplacement/info.php?id=' . $object->id;
|
||||
$head[$h][1] = $langs->trans("Info");
|
||||
$head[$h][2] = 'info';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'trip','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -81,8 +81,8 @@ function user_prepare_head($object)
|
||||
|
||||
// Show more tabs from modules
|
||||
// Entries must be declared in modules descriptor with line
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:conditiontoshow:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname:Title:@mymodule:conditiontoshow:/mymodule/mypage.php?id=__ID__'); to remove a tab
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'user');
|
||||
|
||||
if (! empty($user->societe_id))
|
||||
@ -98,6 +98,8 @@ function user_prepare_head($object)
|
||||
$h++;
|
||||
}
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'user','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
@ -140,9 +142,11 @@ function group_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
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'group');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'group','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -90,11 +90,11 @@ class Holiday extends CommonObject
|
||||
$error=0;
|
||||
|
||||
$now=dol_now();
|
||||
|
||||
|
||||
// Check parameters
|
||||
if (empty($this->fk_user) || ! is_numeric($this->fk_user) || $this->fk_user < 0) { $this->error="ErrorBadParameter"; return -1; }
|
||||
if (empty($this->fk_validator) || ! is_numeric($this->fk_validator) || $this->fk_validator < 0) { $this->error="ErrorBadParameter"; return -1; }
|
||||
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."holiday(";
|
||||
|
||||
@ -191,7 +191,8 @@ class Holiday extends CommonObject
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$this->rowid = $obj->rowid;
|
||||
$this->id = $obj->rowid;
|
||||
$this->rowid = $obj->rowid; // deprecated
|
||||
$this->fk_user = $obj->fk_user;
|
||||
$this->date_create = $this->db->jdate($obj->date_create);
|
||||
$this->description = $obj->description;
|
||||
@ -206,8 +207,6 @@ class Holiday extends CommonObject
|
||||
$this->date_cancel = $this->db->jdate($obj->date_cancel);
|
||||
$this->fk_user_cancel = $obj->fk_user_cancel;
|
||||
$this->detail_refuse = $obj->detail_refuse;
|
||||
|
||||
|
||||
}
|
||||
$this->db->free($resql);
|
||||
|
||||
@ -1601,17 +1600,17 @@ class Holiday extends CommonObject
|
||||
function initAsSpecimen()
|
||||
{
|
||||
global $user,$langs;
|
||||
|
||||
|
||||
// Initialise parameters
|
||||
$this->id=0;
|
||||
$this->specimen=1;
|
||||
|
||||
|
||||
$this->fk_user=1;
|
||||
$this->description='SPECIMEN description';
|
||||
$this->date_debut=dol_now();
|
||||
$this->date_fin=dol_now()+(24*3600);
|
||||
$this->fk_validator=1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/common.inc.php';
|
||||
|
||||
// Get parameters
|
||||
@ -752,9 +753,9 @@ else
|
||||
//print_fiche_titre($langs->trans('TitreRequestCP'));
|
||||
|
||||
// Si il y a une erreur
|
||||
if (GETPOST('error'))
|
||||
if (GETPOST('error'))
|
||||
{
|
||||
switch(GETPOST('error'))
|
||||
switch(GETPOST('error'))
|
||||
{
|
||||
case 'datefin' :
|
||||
$errors[] = $langs->transnoentitiesnoconv('ErrorEndDateCP');
|
||||
@ -829,16 +830,8 @@ else
|
||||
if ($ret == 'html') print '<br />';
|
||||
}
|
||||
|
||||
$head=holiday_prepare_head($cp);
|
||||
|
||||
$h=0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT . '/holiday/fiche.php?id='.$id;
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
complete_head_from_modules($conf,$langs,$cp,$head,$h,'holiday');
|
||||
|
||||
dol_fiche_head($head,'card',$langs->trans("CPTitreMenu"),0,'holiday');
|
||||
|
||||
|
||||
|
||||
@ -40,10 +40,12 @@ function marges_admin_prepare_head()
|
||||
|
||||
// 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
|
||||
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,'',$head,$h,'margesadmin');
|
||||
|
||||
complete_head_from_modules($conf,$langs,'',$head,$h,'margesadmin','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
|
||||
@ -182,8 +182,10 @@ function paypaladmin_prepare_head()
|
||||
// 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,'paypaladmin');
|
||||
// $this->tabs = array('entity:-tabname); to remove a tab
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin');
|
||||
|
||||
complete_head_from_modules($conf,$langs,$object,$head,$h,'paypaladmin','remove');
|
||||
|
||||
return $head;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user