diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index ddd96bfa675..2085c3f2320 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3496,7 +3496,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'dynamicprice', 'edit', 'ellipsis-h', 'email', 'eraser', 'establishment', 'expensereport', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'folder-plus', - 'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group', + 'generate', 'globe', 'globe-americas', 'graph', 'grip', 'grip_title', 'group', 'help', 'holiday', 'images', 'incoterm', 'info', 'intervention', 'inventory', 'intracommreport', 'knowledgemanagement', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right', @@ -3534,7 +3534,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'donation'=>'file-alt', 'dynamicprice'=>'hand-holding-usd', 'setup'=>'cog', 'companies'=>'building', 'products'=>'cube', 'commercial'=>'suitcase', 'invoicing'=>'coins', 'accounting'=>'search-dollar', 'category'=>'tag', 'dollyrevert'=>'dolly', - 'hrm'=>'user-tie', 'incoterm'=>'truck-loading', + 'generate'=>'plus-square', 'hrm'=>'user-tie', 'incoterm'=>'truck-loading', 'margin'=>'calculator', 'members'=>'user-friends', 'ticket'=>'ticket-alt', 'globe'=>'external-link-alt', 'lot'=>'barcode', 'email'=>'at', 'establishment'=>'building', 'edit'=>'pencil-alt', 'graph'=>'chart-line', 'grip_title'=>'arrows-alt', 'grip'=>'arrows-alt', 'help'=>'question-circle', diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index a1e3b8070a5..9cb22f735e6 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -2149,7 +2149,7 @@ if ($module == 'initmodule') { print ''; print ''; print $formadmin->select_language($conf->global->MAIN_LANG_DEFAULT, 'newlangcode', 0, 0, 1, 0, 0, 'minwidth300', 1); - print '
'; + print '
'; print ''; print '
'; @@ -2408,7 +2408,7 @@ if ($module == 'initmodule') { print '
'; print ' '.$form->textwithpicto($langs->trans("IncludeRefGeneration"), $langs->trans("IncludeRefGenerationHelp")).'
'; print ' '.$form->textwithpicto($langs->trans("IncludeDocGeneration"), $langs->trans("IncludeDocGenerationHelp")).'
'; - print ''; + print ''; print '
'; print '
'; print '
'; @@ -2418,7 +2418,7 @@ if ($module == 'initmodule') { //print ' '; print $langs->trans("InitStructureFromExistingTable"); print ''; - print ''; + print ''; print '
'; print ''; @@ -2472,7 +2472,6 @@ if ($module == 'initmodule') { $pathtolib = strtolower($module).'/lib/'.strtolower($module).'.lib.php'; $pathtoobjlib = strtolower($module).'/lib/'.strtolower($module).'_'.strtolower($tabobj).'.lib.php'; $pathtopicto = strtolower($module).'/img/object_'.strtolower($tabobj).'.png'; - $pathtoscript = strtolower($module).'/scripts/'.strtolower($tabobj).'.php'; //var_dump($pathtoclass); var_dump($dirread); $realpathtoclass = $dirread.'/'.$pathtoclass; @@ -2491,7 +2490,6 @@ if ($module == 'initmodule') { $realpathtolib = $dirread.'/'.$pathtolib; $realpathtoobjlib = $dirread.'/'.$pathtoobjlib; $realpathtopicto = $dirread.'/'.$pathtopicto; - $realpathtoscript = $dirread.'/'.$pathtoscript; if (empty($realpathtoapi)) { // For compatibility with some old modules $pathtoapi = strtolower($module).'/class/api_'.strtolower($module).'s.class.php'; @@ -2500,11 +2498,11 @@ if ($module == 'initmodule') { $urloflist = $dirread.'/'.$pathtolist; $urlofcard = $dirread.'/'.$pathtocard; - print '
'; - print ' '.$langs->trans("ClassFile").' : '.($realpathtoclass ? '' : '').$pathtoclass.($realpathtoclass ? '' : '').''; + print '
'; + print ' '.$langs->trans("ClassFile").' : '.($realpathtoclass ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoclass).($realpathtoclass ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; - print ' '.$langs->trans("ApiClassFile").' : '.($realpathtoapi ? '' : '').$pathtoapi.($realpathtoapi ? '' : '').''; + print ' '.$langs->trans("ApiClassFile").' : '.($realpathtoapi ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoapi).($realpathtoapi ? '' : '').''; if (dol_is_file($realpathtoapi)) { print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; @@ -2517,44 +2515,44 @@ if ($module == 'initmodule') { } } else { //print ''.$langs->trans("FileNotYetGenerated").' '; - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } // PHPUnit print '
'; - print ' '.$langs->trans("TestClassFile").' : '.($realpathtophpunit ? '' : '').$pathtophpunit.($realpathtophpunit ? '' : '').''; + print ' '.$langs->trans("TestClassFile").' : '.($realpathtophpunit ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtophpunit).($realpathtophpunit ? '' : '').''; if (dol_is_file($realpathtophpunit)) { print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { //print ''.$langs->trans("FileNotYetGenerated").' '; - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print '
'; print '
'; - print ' '.$langs->trans("PageForLib").' : '.($realpathtolib ? '' : '').$pathtolib.($realpathtolib ? '' : '').''; + print ' '.$langs->trans("PageForLib").' : '.($realpathtolib ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtolib).($realpathtolib ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; - print ' '.$langs->trans("PageForObjLib").' : '.($realpathtoobjlib ? '' : '').$pathtoobjlib.($realpathtoobjlib ? '' : '').''; + print ' '.$langs->trans("PageForObjLib").' : '.($realpathtoobjlib ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoobjlib).($realpathtoobjlib ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; - print ' '.$langs->trans("Image").' : '.($realpathtopicto ? '' : '').$pathtopicto.($realpathtopicto ? '' : '').''; + print ' '.$langs->trans("Image").' : '.($realpathtopicto ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtopicto).($realpathtopicto ? '' : '').''; //print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; print '
'; - print ' '.$langs->trans("SqlFile").' : '.($realpathtosql ? '' : '').$pathtosql.($realpathtosql ? '' : '').''; + print ' '.$langs->trans("SqlFile").' : '.($realpathtosql ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosql).($realpathtosql ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '   '.$langs->trans("DropTableIfEmpty").''; //print '   '.$langs->trans("RunSql").''; print '
'; - print ' '.$langs->trans("SqlFileKey").' : '.($realpathtosqlkey ? '' : '').$pathtosqlkey.($realpathtosqlkey ? '' : '').''; + print ' '.$langs->trans("SqlFileKey").' : '.($realpathtosqlkey ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlkey).($realpathtosqlkey ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; //print '   '.$langs->trans("RunSql").''; print '
'; - print ' '.$langs->trans("SqlFileExtraFields").' : '.($realpathtosqlextra ? '' : '').$pathtosqlextra.($realpathtosqlextra ? '' : '').''; + print ' '.$langs->trans("SqlFileExtraFields").' : '.($realpathtosqlextra ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlextra).($realpathtosqlextra ? '' : '').''; if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; @@ -2562,66 +2560,56 @@ if ($module == 'initmodule') { print '   '; print ''.$langs->trans("DropTableIfEmpty").''; } else { - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } //print '   '.$langs->trans("RunSql").''; print '
'; - print ' '.$langs->trans("SqlFileKeyExtraFields").' : '.($realpathtosqlextrakey ? '' : '').$pathtosqlextrakey.($realpathtosqlextrakey ? '' : '').''; + print ' '.$langs->trans("SqlFileKeyExtraFields").' : '.($realpathtosqlextrakey ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtosqlextrakey).($realpathtosqlextrakey ? '' : '').''; if (dol_is_file($realpathtosqlextra) && dol_is_file($realpathtosqlextrakey)) { print ' '.img_picto($langs->trans("Edit"), 'edit').''; print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } - //print '   '.$langs->trans("RunSql").''; - print '
'; - print '
'; print '
'; - print '
'; - print ' '.$langs->trans("PageForList").' : '.($realpathtolist ? '' : '').$pathtolist.($realpathtolist ? '' : '').''; + print '
'; + print ' '.$langs->trans("PageForList").' : '.($realpathtolist ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtolist).($realpathtolist ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; - print ' '.$langs->trans("PageForCreateEditView").' : '.($realpathtocard ? '' : '').$pathtocard.($realpathtocard ? '' : '').'?action=create'; + print ' '.$langs->trans("PageForCreateEditView").' : '.($realpathtocard ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtocard).($realpathtocard ? '' : '').'?action=create'; print ' '.img_picto($langs->trans("Edit"), 'edit').''; print '
'; - print ' '.$langs->trans("PageForContactTab").' : '.($realpathtocontact ? '' : '').$pathtocontact.($realpathtocontact ? '' : '').''; + print ' '.$langs->trans("PageForContactTab").' : '.($realpathtocontact ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtocontact).($realpathtocontact ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtocontact)) { print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } print '
'; - print ' '.$langs->trans("PageForDocumentTab").' : '.($realpathtodocument ? '' : '').$pathtodocument.($realpathtodocument ? '' : '').''; + print ' '.$langs->trans("PageForDocumentTab").' : '.($realpathtodocument ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtodocument).($realpathtodocument ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtodocument)) { print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } print '
'; - print ' '.$langs->trans("PageForNoteTab").' : '.($realpathtonote ? '' : '').$pathtonote.($realpathtonote ? '' : '').''; + print ' '.$langs->trans("PageForNoteTab").' : '.($realpathtonote ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtonote).($realpathtonote ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtonote)) { print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } print '
'; - print ' '.$langs->trans("PageForAgendaTab").' : '.($realpathtoagenda ? '' : '').$pathtoagenda.($realpathtoagenda ? '' : '').''; + print ' '.$langs->trans("PageForAgendaTab").' : '.($realpathtoagenda ? '' : '').preg_replace('/^'.strtolower($module).'\//', '', $pathtoagenda).($realpathtoagenda ? '' : '').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; if (dol_is_file($realpathtoagenda)) { print ' '; print ''.img_picto($langs->trans("Delete"), 'delete').''; } print '
'; - - /* This is already on Tab CLI - print '
'; - print ' '.$langs->trans("ScriptFile").' : '.($realpathtoscript?'':'').$pathtoscript.($realpathtoscript?'':'').''; - print ' '.img_picto($langs->trans("Edit"), 'edit').''; - print '
';*/ - print '
'; print '
'; @@ -3255,7 +3243,7 @@ if ($module == 'initmodule') { print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } print ''; @@ -3317,7 +3305,7 @@ if ($module == 'initmodule') { } else { print ''; print ' '.$langs->trans("NoTrigger"); - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; print ''; } @@ -3365,7 +3353,7 @@ if ($module == 'initmodule') { print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print ''; } else { @@ -3410,7 +3398,7 @@ if ($module == 'initmodule') { print ''.img_picto($langs->trans("Delete"), 'delete').''; } else { print ''.$langs->trans("FileNotYetGenerated").''; - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; } print ''; } else { @@ -3460,7 +3448,7 @@ if ($module == 'initmodule') { } } else { print ' '.$langs->trans("NoWidget"); - print ''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } print ''; @@ -3576,8 +3564,8 @@ if ($module == 'initmodule') { print ''; } } else { - print ' '.$langs->trans("NoCLIFile"); - print ''; + print ' '.$langs->trans("CLIFile").' : '.$langs->trans("FileNotYetGenerated");''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } print ''; @@ -3751,8 +3739,8 @@ if ($module == 'initmodule') { } } else { print ''; - print ' '.$langs->trans("FileNotYetGenerated"); - print ''; + print ' '.$langs->trans("SpecificationFile").' : '.$langs->trans("FileNotYetGenerated").''; + print ''.img_picto('Generate', 'generate', 'class="paddingleft"').''; print ''; } print ''; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index a60e81c6cf3..01ed6b127dd 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -3217,6 +3217,8 @@ tr.nocellnopadd td.nobordernopadding, tr.nocellnopadd td.nocellnopadd .smallpaddingimp { padding: 4px !important; + padding-left: 7px !important; + padding-right: 7px !important; } input.button[name="upload"] { padding: 4px !important;