diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index c3f75301f67..cc55c7ba10a 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -68,6 +68,7 @@ PageForLib=File for PHP library PageForObjLib=File for PHP library dedicated to object SqlFileExtraFields=Sql file for complementary attributes SqlFileKey=Sql file for keys +SqlFileKeyExtraFields=Sql file for keys of complementary attributes AnObjectAlreadyExistWithThisNameAndDiffCase=An object already exists with this name and a different case UseAsciiDocFormat=You can use Markdown format, but it is recommended to use Asciidoc format (omparison between .md and .asciidoc: http://asciidoctor.org/docs/user-manual/#compared-to-markdown) IsAMeasure=Is a measure diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index e5024f6949f..e2ab8d964a3 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -1203,9 +1203,11 @@ print load_fiche_titre($text, '', 'title_setup'); print ''.$langs->trans("ModuleBuilderDesc", 'https://wiki.dolibarr.org/index.php/Module_development#Create_your_module').'
'; $dirsrootforscan=array($dirread); -if ($dirread != DOL_DOCUMENT_ROOT && $conf->global->MAIN_FEATURES_LEVEL >=2) { $dirsrootforscan[]=DOL_DOCUMENT_ROOT; } +// Add also the core modules into the list of modules to show/edit +if ($dirread != DOL_DOCUMENT_ROOT && ($conf->global->MAIN_FEATURES_LEVEL >=2 || ! empty($conf->global->MODULEBUILDER_ADD_DOCUMENT_ROOT))) { $dirsrootforscan[]=DOL_DOCUMENT_ROOT; } // Search modules to edit +print ''."\n"; $listofmodules=array(); foreach($dirsrootforscan as $dirread) { @@ -1873,6 +1875,12 @@ elseif (! empty($module)) $realpathtopicto = dol_buildpath($pathtopicto, 0, 2); $realpathtoscript = dol_buildpath($pathtoscript, 0, 2); + if (empty($realpathtoapi)) // For compatibility with some old modules + { + $pathtoapi = strtolower($module).'/class/api_'.strtolower($module).'s.class.php'; + $realpathtoapi = dol_buildpath($pathtoapi, 0, 2); + } + print '
'; print ' '.$langs->trans("ClassFile").' : '.($realpathtoclass?'':'').$pathtoclass.($realpathtoclass?'':'').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; @@ -1962,12 +1970,27 @@ elseif (! empty($module)) print '
'; print ' '.$langs->trans("PageForAgendaTab").' : '.($realpathtoagenda?'':'').$pathtoagenda.($realpathtoagenda?'':'').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; + if ($realpathtoagenda) + { + print '   '; + print ''.img_picto($langs->trans("Delete"), 'delete').''; + } print '
'; print ' '.$langs->trans("PageForDocumentTab").' : '.($realpathtodocument?'':'').$pathtodocument.($realpathtodocument?'':'').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; + if ($realpathtodocument) + { + print '   '; + print ''.img_picto($langs->trans("Delete"), 'delete').''; + } print '
'; print ' '.$langs->trans("PageForNoteTab").' : '.($realpathtonote?'':'').$pathtonote.($realpathtonote?'':'').''; print ' '.img_picto($langs->trans("Edit"), 'edit').''; + if ($realpathtonote) + { + print '   '; + print ''.img_picto($langs->trans("Delete"), 'delete').''; + } print '
'; /* This is already on Tab CLI