Clean code

This commit is contained in:
Laurent Destailleur 2017-10-20 18:04:46 +02:00
parent 5c189449e1
commit 985675d680
8 changed files with 15 additions and 32 deletions

View File

@ -60,11 +60,6 @@ function user_prepare_head($object)
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
$head[$h][1] = $langs->trans("UserGUISetup");
$head[$h][2] = 'guisetup';
$h++;
if ($canreadperms) if ($canreadperms)
{ {
$head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id; $head[$h][0] = DOL_URL_ROOT.'/user/perms.php?id='.$object->id;
@ -73,6 +68,11 @@ function user_prepare_head($object)
$h++; $h++;
} }
$head[$h][0] = DOL_URL_ROOT.'/user/param_ihm.php?id='.$object->id;
$head[$h][1] = $langs->trans("UserGUISetup");
$head[$h][2] = 'guisetup';
$h++;
if (! empty($conf->agenda->enabled)) if (! empty($conf->agenda->enabled))
{ {
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5; if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;

View File

@ -102,7 +102,7 @@ class modExpenseReport extends DolibarrModules
$r++; $r++;
// Array to add new pages in new tabs // Array to add new pages in new tabs
$this->tabs = array('user:+expensereport:ExpenseReport:expensereport:$user->rights->expensereport->lire:/expensereport/list.php?mainmenu=hrm&id=__ID__'); $this->tabs[] = array('data'=>'user:+expensereport:ExpenseReport:expensereport:$user->rights->expensereport->lire:/expensereport/list.php?mainmenu=hrm&id=__ID__'); // To add a new tab identified by code tabname1
// Boxes // Boxes
$this->boxes = array(); // List of boxes $this->boxes = array(); // List of boxes

View File

@ -91,26 +91,7 @@ class modHoliday extends DolibarrModules
$this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities') $this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
// Array to add new pages in new tabs // Array to add new pages in new tabs
// Example: $this->tabs = array('objecttype:+tabname1:Title1:@mymodule:$user->rights->mymodule->read:/mymodule/mynewtab1.php?id=__ID__', // To add a new tab identified by code tabname1 $this->tabs[] = array('data'=>'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__'); // To add a new tab identified by code tabname1
// 'objecttype:+tabname2:Title2:@mymodule:$user->rights->othermodule->read:/mymodule/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2
// 'objecttype:-tabname'); // To remove an existing tab identified by code tabname
// where objecttype can be
// 'thirdparty' to add a tab in third party view
// 'intervention' to add a tab in intervention view
// 'order_supplier' to add a tab in supplier order view
// 'invoice_supplier' to add a tab in supplier invoice view
// 'invoice' to add a tab in customer invoice view
// 'order' to add a tab in customer order view
// 'product' to add a tab in product view
// 'stock' to add a tab in stock view
// 'propal' to add a tab in propal view
// 'member' to add a tab in fundation member view
// 'contract' to add a tab in contract view
// 'user' to add a tab in user view
// 'group' to add a tab in group view
// 'contact' to add a tab in contact view
// 'categories_x' to add a tab in category view (replace 'x' by type of category (0=product, 1=supplier, 2=customer, 3=member)
$this->tabs = array('user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__');
// Boxes // Boxes
$this->boxes = array(); // List of boxes $this->boxes = array(); // List of boxes

View File

@ -80,7 +80,7 @@ class modWebsites extends DolibarrModules
// New pages on tabs // New pages on tabs
// ----------------- // -----------------
$this->tabs = array(); $this->tabs[] = array('data'=>'user:+websites:WebSites:website:$user->rights->websites->read:/user/website.php?mainmenu=home&id=__ID__'); // To add a new tab identified by code tabname1
// Boxes // Boxes
//------ //------

View File

@ -808,6 +808,10 @@ ModuleBuilder=Module Builder
SetMultiCurrencyCode=Set currency SetMultiCurrencyCode=Set currency
BulkActions=Bulk actions BulkActions=Bulk actions
ClickToShowHelp=Click to show tooltip help ClickToShowHelp=Click to show tooltip help
Website=Web site
WebSites=Web sites
ExpenseReport=Expense report
ExpenseReports=Expense reports
HR=HR HR=HR
HRAndBank=HR and Bank HRAndBank=HR and Bank
AutomaticallyCalculated=Automatically calculated AutomaticallyCalculated=Automatically calculated

View File

@ -1,6 +1,4 @@
# Dolibarr language file - Source file is en_US - trips # Dolibarr language file - Source file is en_US - trips
ExpenseReport=Expense report
ExpenseReports=Expense reports
ShowExpenseReport=Show expense report ShowExpenseReport=Show expense report
Trips=Expense reports Trips=Expense reports
TripsAndExpenses=Expenses reports TripsAndExpenses=Expenses reports

View File

@ -17,7 +17,6 @@ EditCss=Edit Style/CSS or HTML header
EditMenu=Edit menu EditMenu=Edit menu
EditMedias=Edit medias EditMedias=Edit medias
EditPageMeta=Edit Meta EditPageMeta=Edit Meta
Website=Web site
AddWebsite=Add website AddWebsite=Add website
Webpage=Web page/container Webpage=Web page/container
AddPage=Add page/container AddPage=Add page/container

View File

@ -34,7 +34,7 @@ CKEDITOR.editorConfig = function( config )
[ [
['Templates','NewPage'], ['Templates','NewPage'],
['Save'], ['Save'],
['Source','Maximize','Preview'], ['Maximize','Preview'],
['PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone ['PasteText','PasteFromWord','-','Print', 'SpellChecker', 'Scayt'], // 'Cut','Copy','Paste','-', are useless, can be done with right click, even on smarpthone
['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'], ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
['CreateDiv','ShowBlocks'], ['CreateDiv','ShowBlocks'],
@ -46,7 +46,8 @@ CKEDITOR.editorConfig = function( config )
['Link','Unlink','Anchor'], ['Link','Unlink','Anchor'],
['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'], ['Image','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe'],
['Styles','Format','Font','FontSize'], ['Styles','Format','Font','FontSize'],
['TextColor','BGColor'] ['TextColor','BGColor'],
['Source']
]; ];
// Used for mailing fields // Used for mailing fields