mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 17:48:25 +01:00
Look and feel v12
This commit is contained in:
@@ -60,6 +60,9 @@ class Adherent extends CommonObject
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
public $picto = 'member';
|
||||
|
||||
|
||||
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_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_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_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_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_other',
|
||||
'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email',
|
||||
@@ -3178,7 +3179,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
|
||||
$arrayconvpictotofa = array(
|
||||
'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',
|
||||
'accounting'=>'chart-line', 'category'=>'tag', 'dollyrevert'=>'dolly',
|
||||
'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',
|
||||
'other'=>'square',
|
||||
'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',
|
||||
'resource'=>'laptop-house',
|
||||
'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
|
||||
$arrayconvpictotomorcess = array(
|
||||
'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',
|
||||
'multicurrency'=>'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',
|
||||
'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',
|
||||
'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',
|
||||
'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.
|
||||
// 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'
|
||||
$this->picto = 'generic';
|
||||
$this->picto = 'accounting';
|
||||
|
||||
// Defined all module parts (triggers, login, substitutions, menus, css, etc...)
|
||||
// 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);
|
||||
// Name of png file (without png) used for this module.
|
||||
// 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
|
||||
$this->dirs = array("/don/temp");
|
||||
|
||||
@@ -318,7 +318,7 @@ if (!empty($conf->projet->enabled)) { $formproject = new FormProjets($db); }
|
||||
|
||||
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 '<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.'">';
|
||||
|
||||
|
||||
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">';
|
||||
|
||||
@@ -629,7 +629,7 @@ if (!empty($id) && $action != 'edit')
|
||||
$hselected = 'card';
|
||||
|
||||
$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 $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
|
||||
*/
|
||||
public $picto = 'generic';
|
||||
public $picto = 'donation';
|
||||
|
||||
/**
|
||||
* @var string Date of the donation
|
||||
|
||||
@@ -104,7 +104,7 @@ if ($object->id)
|
||||
|
||||
$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
|
||||
|
||||
@@ -85,7 +85,7 @@ if ($result)
|
||||
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">';
|
||||
|
||||
@@ -67,7 +67,7 @@ $object->info($id);
|
||||
|
||||
$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>';
|
||||
|
||||
|
||||
@@ -77,17 +77,17 @@ $fieldstosearchall = array(
|
||||
'd.firstname'=>'Firstname',
|
||||
);
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
$donationstatic = new Don($db);
|
||||
$form = new Form($db);
|
||||
if (!empty($conf->projet->enabled)) $projectstatic = new Project($db);
|
||||
|
||||
llxHeader('', $langs->trans("Donations"), 'EN:Module_Donations|FR:Module_Dons|ES:Módulo_Donaciones');
|
||||
|
||||
$donationstatic = new Don($db);
|
||||
|
||||
// Genere requete de liste des dons
|
||||
$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,";
|
||||
@@ -163,7 +163,7 @@ if ($resql)
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -83,7 +83,7 @@ if ($id > 0 || !empty($ref))
|
||||
|
||||
$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>';
|
||||
|
||||
|
||||
@@ -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
|
||||
*/
|
||||
public $picto = 'order';
|
||||
public $picto = 'supplier_order';
|
||||
|
||||
/**
|
||||
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
|
||||
331
htdocs/index.php
331
htdocs/index.php
@@ -125,212 +125,178 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
|
||||
if (empty($reshook))
|
||||
{
|
||||
// Cle array returned by the method load_state_board for each line
|
||||
$keys = array(
|
||||
'users',
|
||||
'members',
|
||||
'expensereports',
|
||||
'holidays',
|
||||
'customers',
|
||||
'prospects',
|
||||
'suppliers',
|
||||
'contacts',
|
||||
'products',
|
||||
'services',
|
||||
'projects',
|
||||
'proposals',
|
||||
'orders',
|
||||
'invoices',
|
||||
'donations',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'supplier_orders',
|
||||
'supplier_invoices',
|
||||
'supplier_proposals',
|
||||
'ticket'
|
||||
);
|
||||
|
||||
// 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
|
||||
'users' => $user->rights->user->user->lire,
|
||||
'members' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->global->SOCIETE_DISABLE_CUSTOMERS_STATS),
|
||||
'customers' => !empty($conf->societe->enabled) && $user->rights->societe->lire && empty($conf->global->SOCIETE_DISABLE_PROSPECTS) && empty($conf->global->SOCIETE_DISABLE_PROSPECTS_STATS),
|
||||
'prospects' => !empty($conf->fournisseur->enabled) && $user->rights->fournisseur->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_STATS),
|
||||
'suppliers' => !empty($conf->societe->enabled) && $user->rights->societe->contact->lire,
|
||||
'contacts' => !empty($conf->adherent->enabled) && $user->rights->adherent->lire,
|
||||
'products' => !empty($conf->product->enabled) && $user->rights->produit->lire,
|
||||
'services' => !empty($conf->service->enabled) && $user->rights->service->lire,
|
||||
'proposals' => !empty($conf->propal->enabled) && $user->rights->propale->lire,
|
||||
'orders' => !empty($conf->commande->enabled) && $user->rights->commande->lire,
|
||||
'invoices' => !empty($conf->facture->enabled) && $user->rights->facture->lire,
|
||||
'donations' => !empty($conf->don->enabled) && $user->rights->don->lire,
|
||||
'contracts' => !empty($conf->contrat->enabled) && $user->rights->contrat->lire,
|
||||
'interventions' => !empty($conf->ficheinter->enabled) && $user->rights->ficheinter->lire,
|
||||
'supplier_orders' => !empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_ORDERS_STATS),
|
||||
'supplier_invoices' => !empty($conf->supplier_invoice->enabled) && $user->rights->fournisseur->facture->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_INVOICES_STATS),
|
||||
'supplier_proposals' => !empty($conf->supplier_proposal->enabled) && $user->rights->supplier_proposal->lire && empty($conf->global->SOCIETE_DISABLE_SUPPLIERS_PROPOSAL_STATS),
|
||||
'projects' => !empty($conf->projet->enabled) && $user->rights->projet->lire,
|
||||
'expensereports' => !empty($conf->expensereport->enabled) && $user->rights->expensereport->lire,
|
||||
'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(
|
||||
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"
|
||||
'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(
|
||||
'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
|
||||
$keys = array(
|
||||
'users',
|
||||
'members',
|
||||
'customers',
|
||||
'prospects',
|
||||
'suppliers',
|
||||
'contacts',
|
||||
'products',
|
||||
'services',
|
||||
'proposals',
|
||||
'orders',
|
||||
'invoices',
|
||||
'donations',
|
||||
'contracts',
|
||||
'interventions',
|
||||
'supplier_orders',
|
||||
'supplier_invoices',
|
||||
'askprice',
|
||||
'projects',
|
||||
'expensereports',
|
||||
'holidays',
|
||||
'ticket'
|
||||
);
|
||||
// Dashboard Icon lines
|
||||
$icons = array(
|
||||
'user',
|
||||
'user',
|
||||
'company',
|
||||
'company',
|
||||
'company',
|
||||
'contact',
|
||||
'product',
|
||||
'service',
|
||||
'propal',
|
||||
'order',
|
||||
'bill',
|
||||
'generic',
|
||||
'contract',
|
||||
'intervention',
|
||||
'order',
|
||||
'bill',
|
||||
'propal',
|
||||
'project',
|
||||
'trip',
|
||||
'holiday',
|
||||
'ticket',
|
||||
'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
|
||||
$titres = array(
|
||||
"Users",
|
||||
"Members",
|
||||
"ThirdPartyCustomersStats",
|
||||
"ThirdPartyProspectsStats",
|
||||
"Suppliers",
|
||||
"Contacts",
|
||||
"Products",
|
||||
"Services",
|
||||
"CommercialProposalsShort",
|
||||
"CustomersOrders",
|
||||
"BillsCustomers",
|
||||
"Donations",
|
||||
"Contracts",
|
||||
"Interventions",
|
||||
"SuppliersOrders",
|
||||
"SuppliersInvoices",
|
||||
"SupplierProposalShort",
|
||||
"Projects",
|
||||
"ExpenseReports",
|
||||
"Holidays",
|
||||
"Ticket",
|
||||
'users' => "Users",
|
||||
'members' => "Members",
|
||||
'customers' => "ThirdPartyCustomersStats",
|
||||
'prospects' => "ThirdPartyProspectsStats",
|
||||
'suppliers' => "Suppliers",
|
||||
'contacts' => "Contacts",
|
||||
'products' => "Products",
|
||||
'services' => "Services",
|
||||
'proposals' => "CommercialProposalsShort",
|
||||
'orders' => "CustomersOrders",
|
||||
'invoices' => "BillsCustomers",
|
||||
'donations' => "Donations",
|
||||
'contracts' => "Contracts",
|
||||
'interventions' => "Interventions",
|
||||
'supplier_orders' => "SuppliersOrders",
|
||||
'supplier_invoices' => "SuppliersInvoices",
|
||||
'supplier_proposals' => "SupplierProposalShort",
|
||||
'projects' => "Projects",
|
||||
'expensereports' => "ExpenseReports",
|
||||
'holidays' => "Holidays",
|
||||
'ticket' => "Ticket",
|
||||
);
|
||||
// Dashboard Link lines
|
||||
$links = array(
|
||||
DOL_URL_ROOT.'/user/list.php',
|
||||
DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
|
||||
DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
|
||||
DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
|
||||
DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
|
||||
DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
|
||||
DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
|
||||
DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
|
||||
DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
||||
DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
||||
DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
||||
DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
|
||||
DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
||||
DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
||||
DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
||||
DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
||||
DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
||||
DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
|
||||
DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
||||
DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
||||
DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket'
|
||||
'users' => DOL_URL_ROOT.'/user/list.php',
|
||||
'members' => DOL_URL_ROOT.'/adherents/list.php?statut=1&mainmenu=members',
|
||||
'customers' => DOL_URL_ROOT.'/societe/list.php?type=c&mainmenu=companies',
|
||||
'prospects' => DOL_URL_ROOT.'/societe/list.php?type=p&mainmenu=companies',
|
||||
'suppliers' => DOL_URL_ROOT.'/societe/list.php?type=f&mainmenu=companies',
|
||||
'contacts' => DOL_URL_ROOT.'/contact/list.php?mainmenu=companies',
|
||||
'products' => DOL_URL_ROOT.'/product/list.php?type=0&mainmenu=products',
|
||||
'services' => DOL_URL_ROOT.'/product/list.php?type=1&mainmenu=products',
|
||||
'proposals' => DOL_URL_ROOT.'/comm/propal/list.php?mainmenu=commercial&leftmenu=propals',
|
||||
'orders' => DOL_URL_ROOT.'/commande/list.php?mainmenu=commercial&leftmenu=orders',
|
||||
'invoices' => DOL_URL_ROOT.'/compta/facture/list.php?mainmenu=billing&leftmenu=customers_bills',
|
||||
'donations' => DOL_URL_ROOT.'/don/list.php?leftmenu=donations',
|
||||
'contracts' => DOL_URL_ROOT.'/contrat/list.php?mainmenu=commercial&leftmenu=contracts',
|
||||
'interventions' => DOL_URL_ROOT.'/fichinter/list.php?mainmenu=commercial&leftmenu=ficheinter',
|
||||
'supplier_orders' => DOL_URL_ROOT.'/fourn/commande/list.php?mainmenu=commercial&leftmenu=orders_suppliers',
|
||||
'supplier_invoices' => DOL_URL_ROOT.'/fourn/facture/list.php?mainmenu=billing&leftmenu=suppliers_bills',
|
||||
'supplier_proposals' => DOL_URL_ROOT.'/supplier_proposal/list.php?mainmenu=commercial&leftmenu=',
|
||||
'projects' => DOL_URL_ROOT.'/projet/list.php?mainmenu=project',
|
||||
'expensereports' => DOL_URL_ROOT.'/expensereport/list.php?mainmenu=hrm&leftmenu=expensereport',
|
||||
'holidays' => DOL_URL_ROOT.'/holiday/list.php?mainmenu=hrm&leftmenu=holiday',
|
||||
'ticket' => DOL_URL_ROOT.'/ticket/list.php?leftmenu=ticket'
|
||||
);
|
||||
// Translation lang files
|
||||
$langfile = array(
|
||||
"users",
|
||||
"members",
|
||||
"companies",
|
||||
"prospects",
|
||||
"suppliers",
|
||||
"companies",
|
||||
"products",
|
||||
"products",
|
||||
"propal",
|
||||
"orders",
|
||||
"bills",
|
||||
"donations",
|
||||
"contracts",
|
||||
"interventions",
|
||||
"bills",
|
||||
"bills",
|
||||
"supplier_proposal",
|
||||
"projects",
|
||||
"trips",
|
||||
"holiday",
|
||||
"ticket"
|
||||
'customers' => "companies",
|
||||
'contacts' => "companies",
|
||||
'services' => "products",
|
||||
'proposals' => "propal",
|
||||
'invoices' => "bills",
|
||||
'supplier_orders' => "orders",
|
||||
'supplier_invoices' => "bills",
|
||||
'supplier_proposals' => 'supplier_proposal',
|
||||
'expensereports' => "trips",
|
||||
'holidays' => "holiday",
|
||||
);
|
||||
|
||||
|
||||
// Loop and displays each line of table
|
||||
$boardloaded = array();
|
||||
foreach ($keys as $key => $val)
|
||||
foreach ($keys as $val)
|
||||
{
|
||||
if ($conditions[$key])
|
||||
if ($conditions[$val])
|
||||
{
|
||||
$boxstatItem = '';
|
||||
$classe = $classes[$key];
|
||||
$classe = $classes[$val];
|
||||
// Search in cache if load_state_board is already realized
|
||||
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->load_state_board($user);
|
||||
@@ -341,12 +307,13 @@ if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS))
|
||||
$board = $boardloaded[$classe];
|
||||
}
|
||||
|
||||
if (!empty($langfile[$key])) $langs->load($langfile[$key]);
|
||||
$text = $langs->trans($titres[$key]);
|
||||
$boxstatItem .= '<a href="'.$links[$key].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||
$langs->load(empty($langfile[$val]) ? $val : $langfile[$val]);
|
||||
|
||||
$text = $langs->trans($titres[$val]);
|
||||
$boxstatItem .= '<a href="'.$links[$val].'" class="boxstatsindicator thumbstat nobold nounderline">';
|
||||
$boxstatItem .= '<div class="boxstats">';
|
||||
$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 .= '</a>';
|
||||
|
||||
|
||||
@@ -71,6 +71,9 @@ class Product extends CommonObject
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
|
||||
public $picto = 'product';
|
||||
|
||||
/**
|
||||
* {@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
|
||||
*/
|
||||
public $picto = 'projectpub';
|
||||
public $picto = 'project';
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
||||
@@ -64,6 +64,8 @@ class User extends CommonObject
|
||||
*/
|
||||
public $ismultientitymanaged = 1;
|
||||
|
||||
public $picto = 'user';
|
||||
|
||||
public $id = 0;
|
||||
public $statut;
|
||||
public $ldap_sid;
|
||||
|
||||
Reference in New Issue
Block a user