2
0
forked from Wavyzz/dolibarr

Look and feel v14

This commit is contained in:
Laurent Destailleur
2021-05-02 13:13:55 +02:00
parent 3edb929f9e
commit a54e60d345
5 changed files with 30 additions and 9 deletions

View File

@@ -134,7 +134,7 @@ foreach ($modules as $key => $module) {
$newModule->name = $module->getName(); $newModule->name = $module->getName();
$newModule->version = $module->getVersion(); $newModule->version = $module->getVersion();
$newModule->id = $key; $newModule->id = $key;
$newModule->module_position = $module->module_position; $newModule->module_position = $module->getModulePosition();
$alt = $module->name.' - '.$modules_files[$key]; $alt = $module->name.' - '.$modules_files[$key];

View File

@@ -3517,7 +3517,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus',
'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group', 'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group',
'help', 'holiday', 'help', 'holiday',
'images', 'info', 'intervention', 'inventory', 'intracommreport', 'knowledgemanagement', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'knowledgemanagement',
'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next', 'margin', 'map-marker-alt', 'member', 'meeting', 'money-bill-alt', 'movement', 'mrp', 'note', 'next',
'off', 'on', 'order', 'off', 'on', 'order',
@@ -3553,7 +3553,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd',
'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins',
'accounting'=>'search-dollar', 'category'=>'tag', 'dollyrevert'=>'dolly', 'accounting'=>'search-dollar', 'category'=>'tag', 'dollyrevert'=>'dolly',
'hrm'=>'user-tie', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'hrm'=>'user-tie', 'incoterm'=>'truck-loading',
'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode',
'email'=>'at', 'establishment'=>'building', 'email'=>'at', 'establishment'=>'building',
'edit'=>'pencil-alt', 'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle', 'edit'=>'pencil-alt', 'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle',
'generic'=>'file', 'holiday'=>'umbrella-beach', 'generic'=>'file', 'holiday'=>'umbrella-beach',
@@ -3635,9 +3636,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billr'=>'infobox-commande', 'billd'=>'infobox-commande', 'bill'=>'infobox-commande', 'billa'=>'infobox-commande', 'billr'=>'infobox-commande', 'billd'=>'infobox-commande',
'conferenceorbooth'=>'infobox-project', 'conferenceorbooth'=>'infobox-project',
'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'collab'=>'infobox-action', 'conversation'=>'infobox-contrat', 'cash-register'=>'infobox-bank_account', 'contract'=>'infobox-contrat', 'check'=>'font-status4', 'collab'=>'infobox-action', 'conversation'=>'infobox-contrat',
'donation'=>'infobox-commande', 'dollyrevert'=>'flip', 'donation'=>'infobox-commande', 'dolly'=>'infobox-commande', 'dollyrevert'=>'flip infobox-order_supplier',
'ecm'=>'infobox-action', 'eventorganization'=>'infobox-project', 'ecm'=>'infobox-action', 'eventorganization'=>'infobox-project',
'hrm'=>'infobox-adherent', 'group'=>'infobox-adherent', 'intervention'=>'infobox-contrat', 'hrm'=>'infobox-adherent', 'group'=>'infobox-adherent', 'intervention'=>'infobox-contrat',
'incoterm'=>'infobox-supplier_proposal',
'multicurrency'=>'infobox-bank_account', 'multicurrency'=>'infobox-bank_account',
'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account', 'members'=>'infobox-adherent', 'member'=>'infobox-adherent', 'money-bill-alt'=>'infobox-bank_account',
'order'=>'infobox-commande', 'order'=>'infobox-commande',
@@ -3648,7 +3650,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'pos'=>'infobox-bank_account', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal', 'payment'=>'infobox-bank_account', 'poll'=>'infobox-adherent', 'pos'=>'infobox-bank_account', 'project'=>'infobox-project', 'projecttask'=>'infobox-project', 'propal'=>'infobox-propal',
'reception'=>'flip', 'recruitmentjobposition'=>'infobox-adherent', 'recruitmentcandidature'=>'infobox-adherent', 'reception'=>'flip', 'recruitmentjobposition'=>'infobox-adherent', 'recruitmentcandidature'=>'infobox-adherent',
'resource'=>'infobox-action', 'resource'=>'infobox-action',
'salary'=>'infobox-bank_account', 'supplier_invoice'=>'infobox-order_supplier', 'supplier_invoicea'=>'infobox-order_supplier', 'supplier_invoiced'=>'infobox-order_supplier', 'salary'=>'infobox-bank_account', 'shipment'=>'infobox-commande', 'supplier_invoice'=>'infobox-order_supplier', 'supplier_invoicea'=>'infobox-order_supplier', 'supplier_invoiced'=>'infobox-order_supplier',
'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal', 'supplier_order'=>'infobox-order_supplier', 'supplier_proposal'=>'infobox-supplier_proposal',
'ticket'=>'infobox-contrat', 'title_accountancy'=>'infobox-bank_account', 'title_hrm'=>'infobox-holiday', 'expensereport'=>'infobox-expensereport', 'trip'=>'infobox-expensereport', 'title_agenda'=>'infobox-action', 'ticket'=>'infobox-contrat', 'title_accountancy'=>'infobox-bank_account', 'title_hrm'=>'infobox-holiday', 'expensereport'=>'infobox-expensereport', 'trip'=>'infobox-expensereport', 'title_agenda'=>'infobox-action',
//'title_setup'=>'infobox-action', 'tools'=>'infobox-action', //'title_setup'=>'infobox-action', 'tools'=>'infobox-action',
@@ -3664,11 +3666,13 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'cron'=>'#555', 'cog'=>'#999', 'companies'=>'#6c6aa8', 'company'=>'#6c6aa8', 'contact'=>'#6c6aa8', 'cron'=>'#555',
'dynamicprice'=>'#a69944', 'dynamicprice'=>'#a69944',
'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999', 'language'=>'#555', 'edit'=>'#444', 'note'=>'#999', 'error'=>'', 'help'=>'#bbb', 'listlight'=>'#999', 'language'=>'#555',
'dolly'=>'#a69944', 'dollyrevert'=>'#a69944', 'lot'=>'#a69944', //'dolly'=>'#a69944', 'dollyrevert'=>'#a69944',
'lot'=>'#a69944',
'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'inventory'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944', 'map-marker-alt'=>'#aaa', 'mrp'=>'#a69944', 'product'=>'#a69944', 'service'=>'#a69944', 'inventory'=>'#a69944', 'stock'=>'#a69944', 'movement'=>'#a69944',
'other'=>'#ddd', 'other'=>'#ddd',
'partnership'=>'#6c6aa8', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'reception'=>'#a69944', 'resize'=>'#444', 'rss'=>'#cba', 'partnership'=>'#6c6aa8', 'playdisabled'=>'#ccc', 'printer'=>'#444', 'projectpub'=>'#986c6a', 'reception'=>'#a69944', 'resize'=>'#444', 'rss'=>'#cba',
'shipment'=>'#a69944', 'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555', //'shipment'=>'#a69944',
'stats'=>'#444', 'switch_off'=>'#999', 'technic'=>'#999', 'timespent'=>'#555',
'uncheck'=>'#800', 'uparrow'=>'#555', 'user-cog'=>'#999', 'country'=>'#aaa', 'globe-americas'=>'#aaa', 'uncheck'=>'#800', 'uparrow'=>'#555', 'user-cog'=>'#999', 'country'=>'#aaa', 'globe-americas'=>'#aaa',
'website'=>'#304', 'workstation'=>'#a69944' 'website'=>'#304', 'workstation'=>'#a69944'
); );

View File

@@ -800,6 +800,23 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
return $ret; return $ret;
} }
/**
* Gives the module position
*
* @return int Module position (an external module should never return a value lower than 100000. 1-100000 are reserved for core)
*/
public function getModulePosition()
{
if (in_array($this->version, array('dolibarr', 'experimental', 'development'))) { // core module
return $this->module_position;
} else { // external module
if ($this->module_position >= 100000) {
return $this->module_position;
} else {
return $this->module_position + 100000;
}
}
}
/** /**
* Tells if module is core or external * Tells if module is core or external

View File

@@ -56,7 +56,7 @@ class modIncoterm extends DolibarrModules
$this->version = 'dolibarr'; $this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase) // Key used in llx_const table to save module status enabled/disabled (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->picto = 'generic'; $this->picto = 'incoterm';
$this->module_parts = array(); $this->module_parts = array();
$this->dirs = array(); $this->dirs = array();

View File

@@ -48,7 +48,7 @@ class modPartnership extends DolibarrModules
// Id for module (must be unique). // Id for module (must be unique).
// Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id). // Use here a free id (See in Home -> System information -> Dolibarr for list of used modules id).
$this->numero = 500000; // TODO Go on page https://wiki.dolibarr.org/index.php/List_of_modules_id to reserve an id number for your module $this->numero = 58000;
// Key text used to identify module (for permissions, menus, etc...) // Key text used to identify module (for permissions, menus, etc...)
$this->rights_class = 'partnership'; $this->rights_class = 'partnership';