2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2012-02-04 10:48:47 +01:00
parent c93488e078
commit 62a356b6eb
20 changed files with 218 additions and 133 deletions

View File

@@ -500,9 +500,9 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
/** /**
* Define head array for tabs of security setup pages * Prepare array with list of tabs
* *
* @return array Array of head * @return array Array of tabs to shoc
*/ */
function security_prepare_head() function security_prepare_head()
{ {

View File

@@ -356,9 +356,9 @@ function show_array_last_actions_done($max=5)
/** /**
* Define head array for tabs of agenda setup pages * Prepare array with list of tabs
* *
* @return Array of head * @return array Array of tabs to shoc
*/ */
function agenda_prepare_head() function agenda_prepare_head()
{ {
@@ -386,28 +386,29 @@ function agenda_prepare_head()
} }
/** /**
* Define head array for tabs of agenda setup pages * Prepare array with list of tabs
* @param action Object action *
* @return Array of head * @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/ */
function actions_prepare_head($action) function actions_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$action->id; $head[$h][0] = DOL_URL_ROOT.'/comm/action/fiche.php?id='.$object->id;
$head[$h][1] = $langs->trans("CardAction"); $head[$h][1] = $langs->trans("CardAction");
$head[$h][2] = 'card'; $head[$h][2] = 'card';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$action->id; $head[$h][0] = DOL_URL_ROOT.'/comm/action/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents'); $head[$h][1] = $langs->trans('Documents');
$head[$h][2] = 'documents'; $head[$h][2] = 'documents';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT.'/comm/action/info.php?id='.$action->id; $head[$h][0] = DOL_URL_ROOT.'/comm/action/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++;

View File

@@ -22,51 +22,57 @@
* \ingroup banque * \ingroup banque
*/ */
function bank_prepare_head($obj) /**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function bank_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$obj->id; $head[$h][0] = DOL_URL_ROOT.'/compta/bank/fiche.php?id='.$object->id;
$head[$h][1] = $langs->trans("AccountCard"); $head[$h][1] = $langs->trans("AccountCard");
$head[$h][2] = 'bankname'; $head[$h][2] = 'bankname';
$h++; $h++;
if ($obj->type == 0 || $obj->type == 1) if ($object->type == 0 || $object->type == 1)
{ {
$head[$h][0] = DOL_URL_ROOT.'/compta/bank/bankid_fr.php?id='.$obj->id; $head[$h][0] = DOL_URL_ROOT.'/compta/bank/bankid_fr.php?id='.$object->id;
$head[$h][1] = $langs->trans("RIB"); $head[$h][1] = $langs->trans("RIB");
$head[$h][2] = 'bankid'; $head[$h][2] = 'bankid';
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT."/compta/bank/account.php?account=".$obj->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/account.php?account=".$object->id;
$head[$h][1] = $langs->trans("Transactions"); $head[$h][1] = $langs->trans("Transactions");
$head[$h][2] = 'journal'; $head[$h][2] = 'journal';
$h++; $h++;
// if ($conf->global->MAIN_FEATURES_LEVEL >= 1) // if ($conf->global->MAIN_FEATURES_LEVEL >= 1)
// { // {
$head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$obj->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/treso.php?account=".$object->id;
$head[$h][1] = $langs->trans("PlannedTransactions"); $head[$h][1] = $langs->trans("PlannedTransactions");
$head[$h][2] = 'cash'; $head[$h][2] = 'cash';
$h++; $h++;
// } // }
$head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$obj->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/annuel.php?account=".$object->id;
$head[$h][1] = $langs->trans("IOMonthlyReporting"); $head[$h][1] = $langs->trans("IOMonthlyReporting");
$head[$h][2] = 'annual'; $head[$h][2] = 'annual';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$obj->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/graph.php?account=".$object->id;
$head[$h][1] = $langs->trans("Graph"); $head[$h][1] = $langs->trans("Graph");
$head[$h][2] = 'graph'; $head[$h][2] = 'graph';
$h++; $h++;
if ($obj->courant != 2) if ($object->courant != 2)
{ {
$head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$obj->id; $head[$h][0] = DOL_URL_ROOT."/compta/bank/releve.php?account=".$object->id;
$head[$h][1] = $langs->trans("AccountStatements"); $head[$h][1] = $langs->trans("AccountStatements");
$head[$h][2] = 'statement'; $head[$h][2] = 'statement';
$h++; $h++;

View File

@@ -22,6 +22,12 @@
* \ingroup categorie * \ingroup categorie
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function categories_prepare_head($object,$type) function categories_prepare_head($object,$type)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;

View File

@@ -23,10 +23,10 @@
*/ */
/** /**
* Enter description here... * Prepare array with list of tabs
* *
* @param $object * @param Object $object Object related to tabs
* @return array * @return array Array of tabs to shoc
*/ */
function contact_prepare_head($object) function contact_prepare_head($object)
{ {

View File

@@ -22,6 +22,12 @@
* \brief Ensemble de fonctions de base pour le module contrat * \brief Ensemble de fonctions de base pour le module contrat
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function contract_prepare_head($object) function contract_prepare_head($object)
{ {
global $langs, $conf; global $langs, $conf;

View File

@@ -22,29 +22,29 @@
*/ */
/** /**
* Enter description here... * Prepare array with list of tabs
* *
* @param $mil * @param Object $object Object related to tabs
* @return array * @return array Array of tabs to shoc
*/ */
function emailing_prepare_head($mil) function emailing_prepare_head($object)
{ {
global $langs, $conf; global $langs, $conf;
$h = 0; $h = 0;
$head = array(); $head = array();
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/fiche.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailCard"); $head[$h][1] = $langs->trans("MailCard");
$head[$h][2] = 'card'; $head[$h][2] = 'card';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/cibles.php?id=".$object->id;
$head[$h][1] = $langs->trans("MailRecipients"); $head[$h][1] = $langs->trans("MailRecipients");
$head[$h][2] = 'targets'; $head[$h][2] = 'targets';
$h++; $h++;
$head[$h][0] = DOL_URL_ROOT."/comm/mailing/info.php?id=".$mil->id; $head[$h][0] = DOL_URL_ROOT."/comm/mailing/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++;

View File

@@ -23,6 +23,12 @@
* \ingroup fichinter * \ingroup fichinter
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function fichinter_prepare_head($object) function fichinter_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;

View File

@@ -24,10 +24,10 @@
*/ */
/** /**
* Initialize the array of tabs for supplier invoice * Prepare array with list of tabs
* *
* @param Facture $object Invoice object * @param Object $object Object related to tabs
* @return array Array of head tabs * @return array Array of tabs to shoc
*/ */
function facturefourn_prepare_head($object) function facturefourn_prepare_head($object)
{ {
@@ -74,6 +74,12 @@ function facturefourn_prepare_head($object)
} }
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function ordersupplier_prepare_head($object) function ordersupplier_prepare_head($object)
{ {
global $langs, $conf; global $langs, $conf;

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2006-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
@@ -25,6 +25,12 @@
* \ingroup commande * \ingroup commande
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function commande_prepare_head($object) function commande_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;

View File

@@ -26,9 +26,10 @@
/** /**
* Prepare head for prelevement screen and return it * Prepare array with list of tabs
* @param object Object BonPrelevement *
* @return array head * @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/ */
function prelevement_prepare_head($object) function prelevement_prepare_head($object)
{ {

View File

@@ -24,6 +24,13 @@
* \ingroup product * \ingroup product
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @param User $user Object user
* @return array Array of tabs to shoc
*/
function product_prepare_head($object, $user) function product_prepare_head($object, $user)
{ {
global $langs, $conf; global $langs, $conf;

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
* *
@@ -26,6 +26,12 @@
require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php"); require_once(DOL_DOCUMENT_ROOT."/projet/class/project.class.php");
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function project_prepare_head($object) function project_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
@@ -94,9 +100,10 @@ function project_prepare_head($object)
/** /**
* \file htdocs/core/lib/project.lib.php * Prepare array with list of tabs
* \brief Ensemble de fonctions de base pour le module projet *
* \ingroup societe * @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/ */
function task_prepare_head($object) function task_prepare_head($object)
{ {

View File

@@ -23,6 +23,12 @@
* \ingroup propal * \ingroup propal
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function propal_prepare_head($object) function propal_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@@ -24,6 +24,12 @@ require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php"); require_once(DOL_DOCUMENT_ROOT."/expedition/class/expedition.class.php");
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function shipping_prepare_head($object) function shipping_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
@@ -57,6 +63,12 @@ function shipping_prepare_head($object)
} }
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function delivery_prepare_head($object) function delivery_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
@@ -183,7 +195,9 @@ function show_list_sending_receive($origin='commande',$origin_id,$filter='')
$label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product; $label = (! empty($prod->multilangs[$outputlangs->defaultlang]["libelle"])) ? $prod->multilangs[$outputlangs->defaultlang]["libelle"] : $objp->product;
} }
else else
{
$label = $objp->product; $label = $objp->product;
}
print '<td>'; print '<td>';

View File

@@ -22,10 +22,10 @@
*/ */
/** /**
* Prepare array for tabs of warehouses cards * Prepare array with list of tabs
* *
* @param $object * @param Object $object Object related to tabs
* @return array * @return array Array of tabs to shoc
*/ */
function stock_prepare_head($object) function stock_prepare_head($object)
{ {

View File

@@ -25,10 +25,10 @@
/** /**
* Prepare array for tabs of warehouses cards * Prepare array with list of tabs
* *
* @param $object * @param Object $object Object related to tabs
* @return array * @return array Array of tabs to shoc
*/ */
function tax_prepare_head($object) function tax_prepare_head($object)
{ {

View File

@@ -26,15 +26,15 @@
/** /**
* Return if a child id is in descendance of parentid * Return if a child id is in descendance of parentid
* *
* @param $fulltree Full tree. Tree must be an array of records that looks like: * @param array $fulltree Full tree. Tree must be an array of records that looks like:
* id = id record * id = id record
* id_mere = id record mother * id_mere = id record mother
* id_children = array of direct child id * id_children = array of direct child id
* label = record label * label = record label
* fullpath = Full path of id * fullpath = Full path of id
* level = Level of record * level = Level of record
* @param $parentid Parent id * @param int $parentid Parent id
* @param $childid Child id * @param int $childid Child id
* @return int 1=Yes, 0=No * @return int 1=Yes, 0=No
*/ */
function is_in_subtree($fulltree,$parentid,$childid) function is_in_subtree($fulltree,$parentid,$childid)
@@ -73,9 +73,10 @@ function is_in_subtree($fulltree,$parentid,$childid)
/** /**
* Show picto of a tree view * Show picto of a tree view
* @param fulltree Array of entries in correct order *
* @param key Key of value to show picto * @param array &$fulltree Array of entries in correct order
* @param selected Selected value * @param string $key Key of value to show picto
* @param int $selected Selected value
* @return array (0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after) * @return array (0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after)
*/ */
function tree_showpad(&$fulltree,$key,$selected=0) function tree_showpad(&$fulltree,$key,$selected=0)
@@ -141,8 +142,10 @@ function tree_showpad(&$fulltree,$key,$selected=0)
/** /**
* Show an element with correct offset * Show an element with correct offset
* @param $tab Array of all elements *
* @param $rang Level of offset * @param array $tab Array of all elements
* @param int $rang Level of offset
* @return void
*/ */
function tree_showline($tab,$rang) function tree_showline($tab,$rang)
{ {
@@ -212,9 +215,11 @@ function tree_showline($tab,$rang)
/** /**
* Recursive function to output menu tree * Recursive function to output menu tree
* @param $tab Array of elements *
* @param $pere Id of parent * @param array $tab Array of elements
* @param $rang Level of element * @param int $pere Id of parent
* @param int $rang Level of element
* @return void
*/ */
function tree_recur($tab,$pere,$rang) function tree_recur($tab,$pere,$rang)
{ {

View File

@@ -22,10 +22,10 @@
*/ */
/** /**
* Enter description here... * Prepare array with list of tabs
* *
* @param $object * @param Object $object Object related to tabs
* @return array * @return array Array of tabs to shoc
*/ */
function trip_prepare_head($object) function trip_prepare_head($object)
{ {

View File

@@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2006-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2010 Regis Houssin <regis@dolibarr.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -22,6 +22,13 @@
* \file htdocs/core/lib/usergroups.lib.php * \file htdocs/core/lib/usergroups.lib.php
* \brief Ensemble de fonctions de base pour la gestion des utilisaterus et groupes * \brief Ensemble de fonctions de base pour la gestion des utilisaterus et groupes
*/ */
/**
* Prepare array with list of tabs
*
* @param Object $object Object related to tabs
* @return array Array of tabs to shoc
*/
function user_prepare_head($object) function user_prepare_head($object)
{ {
global $langs, $conf, $user; global $langs, $conf, $user;
@@ -146,6 +153,7 @@ function group_prepare_head($object)
* @param User $fuser User concerned or '' for global theme * @param User $fuser User concerned or '' for global theme
* @param int $edit 1 to add edit form * @param int $edit 1 to add edit form
* @param boolean $foruserprofile Show for user profile view * @param boolean $foruserprofile Show for user profile view
* @return void
*/ */
function show_theme($fuser,$edit=0,$foruserprofile=false) function show_theme($fuser,$edit=0,$foruserprofile=false)
{ {