forked from Wavyzz/dolibarr
Look and feel v12
This commit is contained in:
@@ -60,6 +60,9 @@ class Adherent extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
|
public $picto = 'member';
|
||||||
|
|
||||||
|
|
||||||
public $mesgs;
|
public $mesgs;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3148,9 +3148,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom',
|
'object_accounting', 'object_action', 'object_account', 'object_barcode', 'object_bom',
|
||||||
'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
'object_category', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
|
||||||
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
|
||||||
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_dynamicprice',
|
'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice',
|
||||||
'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
'object_holiday', 'object_hrm', 'object_intervention', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment',
|
||||||
'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', 'object_supplier_proposal', 'object_service', 'object_stock',
|
'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal',
|
||||||
|
'object_supplier_invoice', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock',
|
||||||
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask',
|
||||||
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
||||||
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email',
|
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email',
|
||||||
@@ -3178,7 +3179,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
|
|
||||||
$arrayconvpictotofa = array(
|
$arrayconvpictotofa = array(
|
||||||
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes',
|
'account'=>'university', 'action'=>'calendar-alt', 'address'=> 'address-book', 'bank_account'=>'university', 'bom'=>'cubes',
|
||||||
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'dynamicprice'=>'hand-holding-usd',
|
'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'donation'=>'file-medical', 'dynamicprice'=>'hand-holding-usd',
|
||||||
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt',
|
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accountancy'=>'money-check-alt',
|
||||||
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
||||||
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
'hrm'=>'umbrella-beach', 'members'=>'users', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
|
||||||
@@ -3193,7 +3194,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle',
|
||||||
'other'=>'square',
|
'other'=>'square',
|
||||||
'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature',
|
'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature',
|
||||||
'resize'=>'crop', 'supplier_proposal'=>'file-signature',
|
'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature',
|
||||||
'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell',
|
||||||
'resource'=>'laptop-house',
|
'resource'=>'laptop-house',
|
||||||
'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'technic'=>'cogs', 'ticket'=>'ticket-alt',
|
||||||
@@ -3249,7 +3250,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
// Add CSS
|
// Add CSS
|
||||||
$arrayconvpictotomorcess = array(
|
$arrayconvpictotomorcess = array(
|
||||||
'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'cash-register'=>'bg-infobox-bank_account',
|
'action'=>'bg-infobox-action', 'account'=>'bg-infobox-bank_account', 'bank_account'=>'bg-infobox-bank_account', 'cash-register'=>'bg-infobox-bank_account',
|
||||||
'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action',
|
'contract'=>'bg-infobox-contrat', 'check'=>'font-status4', 'donation'=>'bg-infobox-commande', 'dollyrevert'=>'flip', 'ecm'=>'bg-infobox-action',
|
||||||
'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat',
|
'hrm'=>'bg-infobox-adherent', 'group'=>'bg-infobox-adherent', 'intervention'=>'bg-infobox-contrat',
|
||||||
'multicurrency'=>'bg-infobox-bank_account',
|
'multicurrency'=>'bg-infobox-bank_account',
|
||||||
'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account',
|
'members'=>'bg-infobox-adherent', 'member'=>'bg-infobox-adherent', 'money-bill-alt'=>'bg-infobox-bank_account',
|
||||||
@@ -3258,7 +3259,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
|||||||
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
'error'=>'pictoerror', 'warning'=>'pictowarning', 'switch_on'=>'font-status4',
|
||||||
'holiday'=>'bg-infobox-holiday',
|
'holiday'=>'bg-infobox-holiday',
|
||||||
'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal',
|
'payment'=>'bg-infobox-bank_account', 'poll'=>'bg-infobox-adherent', 'project'=>'bg-infobox-project', 'projecttask'=>'bg-infobox-project', 'propal'=>'bg-infobox-propal',
|
||||||
'resource'=>'bg-infobox-action', 'supplier_proposal'=>'bg-infobox-supplier_proposal',
|
'resource'=>'bg-infobox-action', 'supplier_order'=>'bg-infobox-order_supplier', 'supplier_proposal'=>'bg-infobox-supplier_proposal',
|
||||||
'ticket'=>'bg-infobox-contrat', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action',
|
'ticket'=>'bg-infobox-contrat', 'title_hrm'=>'bg-infobox-holiday', 'trip'=>'bg-infobox-expensereport', 'title_agenda'=>'bg-infobox-action',
|
||||||
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
'list-alt'=>'imgforviewmode', 'calendar'=>'imgforviewmode', 'calendarweek'=>'imgforviewmode', 'calendarmonth'=>'imgforviewmode', 'calendarday'=>'imgforviewmode', 'calendarperuser'=>'imgforviewmode'
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ class modAsset extends DolibarrModules
|
|||||||
// Name of image file used for this module.
|
// Name of image file used for this module.
|
||||||
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
// If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue'
|
||||||
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
// If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module'
|
||||||
$this->picto = 'generic';
|
$this->picto = 'accounting';
|
||||||
|
|
||||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||||
// for default path (eg: /asset/core/xxxxx) (0=disable, 1=enable)
|
// for default path (eg: /asset/core/xxxxx) (0=disable, 1=enable)
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ class modDon extends DolibarrModules
|
|||||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||||
// Name of png file (without png) used for this module.
|
// Name of png file (without png) used for this module.
|
||||||
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
|
// Png file must be in theme/yourtheme/img directory under name object_pictovalue.png.
|
||||||
$this->picto = 'bill';
|
$this->picto = 'donation';
|
||||||
|
|
||||||
// Data directories to create when module is enabled
|
// Data directories to create when module is enabled
|
||||||
$this->dirs = array("/don/temp");
|
$this->dirs = array("/don/temp");
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
|
|||||||
|
|
||||||
if ($action == 'create')
|
if ($action == 'create')
|
||||||
{
|
{
|
||||||
print load_fiche_titre($langs->trans("AddDonation"), '', 'invoicing');
|
print load_fiche_titre($langs->trans("AddDonation"), '', 'object_donation');
|
||||||
|
|
||||||
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
print '<form name="add" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
@@ -500,7 +500,7 @@ if (!empty($id) && $action == 'edit')
|
|||||||
print '<input type="hidden" name="amount" value="'.$object->amount.'">';
|
print '<input type="hidden" name="amount" value="'.$object->amount.'">';
|
||||||
|
|
||||||
|
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic');
|
dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'donation');
|
||||||
|
|
||||||
print '<table class="border centpercent">';
|
print '<table class="border centpercent">';
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ if (!empty($id) && $action != 'edit')
|
|||||||
$hselected = 'card';
|
$hselected = 'card';
|
||||||
|
|
||||||
$head = donation_prepare_head($object);
|
$head = donation_prepare_head($object);
|
||||||
dol_fiche_head($head, $hselected, $langs->trans("Donation"), -1, 'generic');
|
dol_fiche_head($head, $hselected, $langs->trans("Donation"), -1, 'donation');
|
||||||
|
|
||||||
// Print form confirm
|
// Print form confirm
|
||||||
print $formconfirm;
|
print $formconfirm;
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class Don extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for object don. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for object don. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'generic';
|
public $picto = 'donation';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string Date of the donation
|
* @var string Date of the donation
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ if ($object->id)
|
|||||||
|
|
||||||
$head = donation_prepare_head($object);
|
$head = donation_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'generic');
|
dol_fiche_head($head, 'documents', $langs->trans("Donation"), -1, 'donation');
|
||||||
|
|
||||||
|
|
||||||
// Build file list
|
// Build file list
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ if ($result)
|
|||||||
dol_print_error($db);
|
dol_print_error($db);
|
||||||
}
|
}
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("DonationsArea"), '', 'invoicing');
|
print load_fiche_titre($langs->trans("DonationsArea"), '', 'object_donation');
|
||||||
|
|
||||||
|
|
||||||
print '<div class="fichecenter"><div class="fichethirdleft">';
|
print '<div class="fichecenter"><div class="fichethirdleft">';
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ $object->info($id);
|
|||||||
|
|
||||||
$head = donation_prepare_head($object);
|
$head = donation_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'info', $langs->trans("Donation"), -1, 'generic');
|
dol_fiche_head($head, 'info', $langs->trans("Donation"), -1, 'donation');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/don/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/don/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|||||||
@@ -77,17 +77,17 @@ $fieldstosearchall = array(
|
|||||||
'd.firstname'=>'Firstname',
|
'd.firstname'=>'Firstname',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
$donationstatic = new Don($db);
|
||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
if (!empty($conf->projet->enabled)) $projectstatic = new Project($db);
|
if (!empty($conf->projet->enabled)) $projectstatic = new Project($db);
|
||||||
|
|
||||||
llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
|
llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
|
||||||
|
|
||||||
$donationstatic = new Don($db);
|
|
||||||
|
|
||||||
// Genere requete de liste des dons
|
// Genere requete de liste des dons
|
||||||
$sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
|
$sql = "SELECT d.rowid, d.datedon, d.fk_soc as socid, d.firstname, d.lastname, d.societe,";
|
||||||
$sql .= " d.amount, d.fk_statut as status,";
|
$sql .= " d.amount, d.fk_statut as status,";
|
||||||
@@ -163,7 +163,7 @@ if ($resql)
|
|||||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||||
print '<input type="hidden" name="type" value="'.$type.'">';
|
print '<input type="hidden" name="type" value="'.$type.'">';
|
||||||
|
|
||||||
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'object_donation', 0, $newcardbutton, '', $limit, 0, 0, 1);
|
||||||
|
|
||||||
if ($search_all)
|
if ($search_all)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ if ($id > 0 || !empty($ref))
|
|||||||
|
|
||||||
$head = donation_prepare_head($object);
|
$head = donation_prepare_head($object);
|
||||||
|
|
||||||
dol_fiche_head($head, 'note', $langs->trans("Donation"), -1, 'generic');
|
dol_fiche_head($head, 'note', $langs->trans("Donation"), -1, 'donation');
|
||||||
|
|
||||||
$linkback = '<a href="'.DOL_URL_ROOT.'/don/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
$linkback = '<a href="'.DOL_URL_ROOT.'/don/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||||
|
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'order';
|
public $picto = 'supplier_order';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||||
|
|||||||
307
htdocs/index.php
307
htdocs/index.php
@@ -125,88 +125,19 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
|||||||
|
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
// Condition to be checked for each display line dashboard
|
|
||||||
$conditions = array(
|
|
||||||
$user->rights->user->user->lire,
|
|
||||||
!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
|
|
||||||
!empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
|
|
||||||
!empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
|
|
||||||
!empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
|
|
||||||
!empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
|
||||||
!empty($conf->product->enabled) && $user->rights->produit->lire,
|
|
||||||
!empty($conf->service->enabled) && $user->rights->service->lire,
|
|
||||||
!empty($conf->propal->enabled) && $user->rights->propale->lire,
|
|
||||||
!empty($conf->commande->enabled) && $user->rights->commande->lire,
|
|
||||||
!empty($conf->facture->enabled) && $user->rights->facture->lire,
|
|
||||||
!empty($conf->contrat->enabled) && $user->rights->contrat->lire,
|
|
||||||
!empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
|
|
||||||
!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
|
|
||||||
!empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
|
|
||||||
!empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
|
|
||||||
!empty($conf->projet->enabled) && $user->rights->projet->lire,
|
|
||||||
!empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
|
|
||||||
!empty($conf->holiday->enabled) && $user->rights->holiday->read,
|
|
||||||
!empty($conf->don->enabled) && $user->rights->don->lire,
|
|
||||||
!empty($conf->ticket->enabled) && $user->rights->ticket->read
|
|
||||||
);
|
|
||||||
// Class file containing the method load_state_board for each line
|
|
||||||
$includes = array(
|
|
||||||
DOL_DOCUMENT_ROOT."/user/class/user.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/contact/class/contact.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/don/class/don.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php",
|
|
||||||
DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"
|
|
||||||
);
|
|
||||||
// Name class containing the method load_state_board for each line
|
|
||||||
$classes = array(
|
|
||||||
'User',
|
|
||||||
'Adherent',
|
|
||||||
'Client',
|
|
||||||
'Client',
|
|
||||||
'Fournisseur',
|
|
||||||
'Contact',
|
|
||||||
'Product',
|
|
||||||
'Product',
|
|
||||||
'Propal',
|
|
||||||
'Commande',
|
|
||||||
'Facture',
|
|
||||||
'Don',
|
|
||||||
'Contrat',
|
|
||||||
'Fichinter',
|
|
||||||
'CommandeFournisseur',
|
|
||||||
'FactureFournisseur',
|
|
||||||
'SupplierProposal',
|
|
||||||
'Project',
|
|
||||||
'ExpenseReport',
|
|
||||||
'Holiday',
|
|
||||||
'Ticket',
|
|
||||||
);
|
|
||||||
// Cle array returned by the method load_state_board for each line
|
// Cle array returned by the method load_state_board for each line
|
||||||
$keys = array(
|
$keys = array(
|
||||||
'users',
|
'users',
|
||||||
'members',
|
'members',
|
||||||
|
'expensereports',
|
||||||
|
'holidays',
|
||||||
'customers',
|
'customers',
|
||||||
'prospects',
|
'prospects',
|
||||||
'suppliers',
|
'suppliers',
|
||||||
'contacts',
|
'contacts',
|
||||||
'products',
|
'products',
|
||||||
'services',
|
'services',
|
||||||
|
'projects',
|
||||||
'proposals',
|
'proposals',
|
||||||
'orders',
|
'orders',
|
||||||
'invoices',
|
'invoices',
|
||||||
@@ -215,122 +146,157 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
|||||||
'interventions',
|
'interventions',
|
||||||
'supplier_orders',
|
'supplier_orders',
|
||||||
'supplier_invoices',
|
'supplier_invoices',
|
||||||
'askprice',
|
'supplier_proposals',
|
||||||
'projects',
|
|
||||||
'expensereports',
|
|
||||||
'holidays',
|
|
||||||
'ticket'
|
'ticket'
|
||||||
);
|
);
|
||||||
// Dashboard Icon lines
|
|
||||||
$icons = array(
|
// Condition to be checked for each display line dashboard
|
||||||
'user',
|
$conditions = array(
|
||||||
'user',
|
'users' => $user->rights->user->user->lire,
|
||||||
'company',
|
'members' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
|
||||||
'company',
|
'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
|
||||||
'company',
|
'prospects' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
|
||||||
'contact',
|
'suppliers' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
|
||||||
'product',
|
'contacts' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
||||||
'service',
|
'products' => !empty($conf->product->enabled) && $user->rights->produit->lire,
|
||||||
'propal',
|
'services' => !empty($conf->service->enabled) && $user->rights->service->lire,
|
||||||
'order',
|
'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||||
'bill',
|
'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||||
'generic',
|
'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||||
'contract',
|
'donations' => !empty($conf->don->enabled) && $user->rights->don->lire,
|
||||||
'intervention',
|
'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire,
|
||||||
'order',
|
'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
|
||||||
'bill',
|
'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
|
||||||
'propal',
|
'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
|
||||||
'project',
|
'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
|
||||||
'trip',
|
'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire,
|
||||||
'holiday',
|
'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
|
||||||
'ticket',
|
'holidays' => !empty($conf->holiday->enabled) && $user->rights->holiday->read,
|
||||||
|
'ticket' => !empty($conf->ticket->enabled) && $user->rights->ticket->read
|
||||||
|
);
|
||||||
|
// Class file containing the method load_state_board for each line
|
||||||
|
$includes = array(
|
||||||
|
'users' => DOL_DOCUMENT_ROOT."/user/class/user.class.php",
|
||||||
|
'members' => DOL_DOCUMENT_ROOT."/adherents/class/adherent.class.php",
|
||||||
|
'customers' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
||||||
|
'prospects' => DOL_DOCUMENT_ROOT."/societe/class/client.class.php",
|
||||||
|
'suppliers' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.class.php",
|
||||||
|
'contacts' => DOL_DOCUMENT_ROOT."/contact/class/contact.class.php",
|
||||||
|
'products' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
||||||
|
'services' => DOL_DOCUMENT_ROOT."/product/class/product.class.php",
|
||||||
|
'proposals' => DOL_DOCUMENT_ROOT."/comm/propal/class/propal.class.php",
|
||||||
|
'orders' => DOL_DOCUMENT_ROOT."/commande/class/commande.class.php",
|
||||||
|
'invoices' => DOL_DOCUMENT_ROOT."/compta/facture/class/facture.class.php",
|
||||||
|
'donations' => DOL_DOCUMENT_ROOT."/don/class/don.class.php",
|
||||||
|
'contracts' => DOL_DOCUMENT_ROOT."/contrat/class/contrat.class.php",
|
||||||
|
'interventions' => DOL_DOCUMENT_ROOT."/fichinter/class/fichinter.class.php",
|
||||||
|
'supplier_orders' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.commande.class.php",
|
||||||
|
'supplier_invoices' => DOL_DOCUMENT_ROOT."/fourn/class/fournisseur.facture.class.php",
|
||||||
|
'supplier_proposals' => DOL_DOCUMENT_ROOT."/supplier_proposal/class/supplier_proposal.class.php",
|
||||||
|
'projects' => DOL_DOCUMENT_ROOT."/projet/class/project.class.php",
|
||||||
|
'expensereports' => DOL_DOCUMENT_ROOT."/expensereport/class/expensereport.class.php",
|
||||||
|
'holidays' => DOL_DOCUMENT_ROOT."/holiday/class/holiday.class.php",
|
||||||
|
'ticket' => DOL_DOCUMENT_ROOT."/ticket/class/ticket.class.php"
|
||||||
|
);
|
||||||
|
// Name class containing the method load_state_board for each line
|
||||||
|
$classes = array(
|
||||||
|
'users' => 'User',
|
||||||
|
'members' => 'Adherent',
|
||||||
|
'customers' => 'Client',
|
||||||
|
'prospects' => 'Client',
|
||||||
|
'suppliers' => 'Fournisseur',
|
||||||
|
'contacts' => 'Contact',
|
||||||
|
'products' => 'Product',
|
||||||
|
'services' => 'Service',
|
||||||
|
'proposals' => 'Propal',
|
||||||
|
'orders' => 'Commande',
|
||||||
|
'invoices' => 'Facture',
|
||||||
|
'donations' => 'Don',
|
||||||
|
'contracts' => 'Contrat',
|
||||||
|
'interventions' => 'Fichinter',
|
||||||
|
'supplier_orders' => 'CommandeFournisseur',
|
||||||
|
'supplier_invoices' => 'FactureFournisseur',
|
||||||
|
'supplier_proposals' => 'SupplierProposal',
|
||||||
|
'projects' => 'Project',
|
||||||
|
'expensereports' => 'ExpenseReport',
|
||||||
|
'holidays' => 'Holiday',
|
||||||
|
'ticket' => 'Ticket',
|
||||||
);
|
);
|
||||||
// Translation keyword
|
// Translation keyword
|
||||||
$titres = array(
|
$titres = array(
|
||||||
"Users",
|
'users' => "Users",
|
||||||
"Members",
|
'members' => "Members",
|
||||||
"ThirdPartyCustomersStats",
|
'customers' => "ThirdPartyCustomersStats",
|
||||||
"ThirdPartyProspectsStats",
|
'prospects' => "ThirdPartyProspectsStats",
|
||||||
"Suppliers",
|
'suppliers' => "Suppliers",
|
||||||
"Contacts",
|
'contacts' => "Contacts",
|
||||||
"Products",
|
'products' => "Products",
|
||||||
"Services",
|
'services' => "Services",
|
||||||
"CommercialProposalsShort",
|
'proposals' => "CommercialProposalsShort",
|
||||||
"CustomersOrders",
|
'orders' => "CustomersOrders",
|
||||||
"BillsCustomers",
|
'invoices' => "BillsCustomers",
|
||||||
"Donations",
|
'donations' => "Donations",
|
||||||
"Contracts",
|
'contracts' => "Contracts",
|
||||||
"Interventions",
|
'interventions' => "Interventions",
|
||||||
"SuppliersOrders",
|
'supplier_orders' => "SuppliersOrders",
|
||||||
"SuppliersInvoices",
|
'supplier_invoices' => "SuppliersInvoices",
|
||||||
"SupplierProposalShort",
|
'supplier_proposals' => "SupplierProposalShort",
|
||||||
"Projects",
|
'projects' => "Projects",
|
||||||
"ExpenseReports",
|
'expensereports' => "ExpenseReports",
|
||||||
"Holidays",
|
'holidays' => "Holidays",
|
||||||
"Ticket",
|
'ticket' => "Ticket",
|
||||||
);
|
);
|
||||||
// Dashboard Link lines
|
// Dashboard Link lines
|
||||||
$links = array(
|
$links = array(
|
||||||
DOL_URL_ROOT.'/user/list.php',
|
'users' => DOL_URL_ROOT.'/user/list.php',
|
||||||
DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
|
'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
|
||||||
DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
|
'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
|
||||||
DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
|
'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
|
||||||
DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
|
'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
|
||||||
DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
|
'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
|
||||||
DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
|
'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
|
||||||
DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
|
'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
|
||||||
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
||||||
DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
||||||
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
||||||
DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
|
'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
|
||||||
DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
||||||
DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
||||||
DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
||||||
DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
||||||
DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
||||||
DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
|
'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
|
||||||
DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
||||||
DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
||||||
DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket'
|
'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket'
|
||||||
);
|
);
|
||||||
// Translation lang files
|
// Translation lang files
|
||||||
$langfile = array(
|
$langfile = array(
|
||||||
"users",
|
'customers' => "companies",
|
||||||
"members",
|
'contacts' => "companies",
|
||||||
"companies",
|
'services' => "products",
|
||||||
"prospects",
|
'proposals' => "propal",
|
||||||
"suppliers",
|
'invoices' => "bills",
|
||||||
"companies",
|
'supplier_orders' => "orders",
|
||||||
"products",
|
'supplier_invoices' => "bills",
|
||||||
"products",
|
'supplier_proposals' => 'supplier_proposal',
|
||||||
"propal",
|
'expensereports' => "trips",
|
||||||
"orders",
|
'holidays' => "holiday",
|
||||||
"bills",
|
|
||||||
"donations",
|
|
||||||
"contracts",
|
|
||||||
"interventions",
|
|
||||||
"bills",
|
|
||||||
"bills",
|
|
||||||
"supplier_proposal",
|
|
||||||
"projects",
|
|
||||||
"trips",
|
|
||||||
"holiday",
|
|
||||||
"ticket"
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Loop and displays each line of table
|
// Loop and displays each line of table
|
||||||
$boardloaded = array();
|
$boardloaded = array();
|
||||||
foreach ($keys as $key => $val)
|
foreach ($keys as $val)
|
||||||
{
|
{
|
||||||
if ($conditions[$key])
|
if ($conditions[$val])
|
||||||
{
|
{
|
||||||
$boxstatItem = '';
|
$boxstatItem = '';
|
||||||
$classe = $classes[$key];
|
$classe = $classes[$val];
|
||||||
// Search in cache if load_state_board is already realized
|
// Search in cache if load_state_board is already realized
|
||||||
if (!isset($boardloaded[$classe]) || !is_object($boardloaded[$classe]))
|
if (!isset($boardloaded[$classe]) || !is_object($boardloaded[$classe]))
|
||||||
{
|
{
|
||||||
include_once $includes[$key]; // Loading a class cost around 1Mb
|
include_once $includes[$val]; // Loading a class cost around 1Mb
|
||||||
|
|
||||||
$board = new $classe($db);
|
$board = new $classe($db);
|
||||||
$board->load_state_board($user);
|
$board->load_state_board($user);
|
||||||
@@ -341,12 +307,13 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
|||||||
$board = $boardloaded[$classe];
|
$board = $boardloaded[$classe];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($langfile[$key])) $langs->load($langfile[$key]);
|
$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);
|
||||||
$text = $langs->trans($titres[$key]);
|
|
||||||
$boxstatItem .= '<a href="'.$links[$key].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
$text = $langs->trans($titres[$val]);
|
||||||
|
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||||
$boxstatItem .= '<div class="boxstats">';
|
$boxstatItem .= '<div class="boxstats">';
|
||||||
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
$boxstatItem .= '<span class="boxstatstext" title="'.dol_escape_htmltag($text).'">'.$text.'</span><br>';
|
||||||
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $icons[$key], 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).'</span>';
|
$boxstatItem .= '<span class="boxstatsindicator">'.img_object("", $board->picto, 'class="inline-block"').' '.($board->nb[$val] ? $board->nb[$val] : 0).'</span>';
|
||||||
$boxstatItem .= '</div>';
|
$boxstatItem .= '</div>';
|
||||||
$boxstatItem .= '</a>';
|
$boxstatItem .= '</a>';
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,9 @@ class Product extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
|
|
||||||
|
public $picto = 'product';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@@ -5632,3 +5635,13 @@ class Product extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to manage products or services
|
||||||
|
*/
|
||||||
|
class Service extends Product
|
||||||
|
{
|
||||||
|
public $picto = 'service';
|
||||||
|
}
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||||
*/
|
*/
|
||||||
public $picto = 'projectpub';
|
public $picto = 'project';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ class User extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $ismultientitymanaged = 1;
|
public $ismultientitymanaged = 1;
|
||||||
|
|
||||||
|
public $picto = 'user';
|
||||||
|
|
||||||
public $id = 0;
|
public $id = 0;
|
||||||
public $statut;
|
public $statut;
|
||||||
public $ldap_sid;
|
public $ldap_sid;
|
||||||
|
|||||||
Reference in New Issue
Block a user