Debug modulebuilder
This commit is contained in:
parent
657bd5c2fe
commit
2c0c1dbef3
@ -68,6 +68,7 @@ PageForLib=File for PHP library
|
|||||||
PageForObjLib=File for PHP library dedicated to object
|
PageForObjLib=File for PHP library dedicated to object
|
||||||
SqlFileExtraFields=Sql file for complementary attributes
|
SqlFileExtraFields=Sql file for complementary attributes
|
||||||
SqlFileKey=Sql file for keys
|
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
|
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)
|
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
|
IsAMeasure=Is a measure
|
||||||
|
|||||||
@ -1203,9 +1203,11 @@ print load_fiche_titre($text, '', 'title_setup');
|
|||||||
print '<span class="opacitymedium">'.$langs->trans("ModuleBuilderDesc", 'https://wiki.dolibarr.org/index.php/Module_development#Create_your_module').'</span><br>';
|
print '<span class="opacitymedium">'.$langs->trans("ModuleBuilderDesc", 'https://wiki.dolibarr.org/index.php/Module_development#Create_your_module').'</span><br>';
|
||||||
|
|
||||||
$dirsrootforscan=array($dirread);
|
$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
|
// Search modules to edit
|
||||||
|
print '<!-- Scanned dir -->'."\n";
|
||||||
$listofmodules=array();
|
$listofmodules=array();
|
||||||
foreach($dirsrootforscan as $dirread)
|
foreach($dirsrootforscan as $dirread)
|
||||||
{
|
{
|
||||||
@ -1873,6 +1875,12 @@ elseif (! empty($module))
|
|||||||
$realpathtopicto = dol_buildpath($pathtopicto, 0, 2);
|
$realpathtopicto = dol_buildpath($pathtopicto, 0, 2);
|
||||||
$realpathtoscript = dol_buildpath($pathtoscript, 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 '<div class="fichehalfleft">';
|
print '<div class="fichehalfleft">';
|
||||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("ClassFile").' : <strong>'.($realpathtoclass?'':'<strike>').$pathtoclass.($realpathtoclass?'':'</strike>').'</strong>';
|
print '<span class="fa fa-file-o"></span> '.$langs->trans("ClassFile").' : <strong>'.($realpathtoclass?'':'<strike>').$pathtoclass.($realpathtoclass?'':'</strike>').'</strong>';
|
||||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtoclass).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtoclass).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||||
@ -1962,12 +1970,27 @@ elseif (! empty($module))
|
|||||||
print '<br>';
|
print '<br>';
|
||||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForAgendaTab").' : <strong>'.($realpathtoagenda?'':'<strike>').$pathtoagenda.($realpathtoagenda?'':'</strike>').'</strong>';
|
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForAgendaTab").' : <strong>'.($realpathtoagenda?'':'<strike>').$pathtoagenda.($realpathtoagenda?'':'</strike>').'</strong>';
|
||||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||||
|
if ($realpathtoagenda)
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=confirm_removefile&file='.urlencode($pathtoagenda).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||||
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForDocumentTab").' : <strong>'.($realpathtodocument?'':'<strike>').$pathtodocument.($realpathtodocument?'':'</strike>').'</strong>';
|
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForDocumentTab").' : <strong>'.($realpathtodocument?'':'<strike>').$pathtodocument.($realpathtodocument?'':'</strike>').'</strong>';
|
||||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtodocument).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtodocument).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||||
|
if ($realpathtodocument)
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=confirm_removefile&file='.urlencode($pathtodocument).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||||
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForNoteTab").' : <strong>'.($realpathtonote?'':'<strike>').$pathtonote.($realpathtonote?'':'</strike>').'</strong>';
|
print '<span class="fa fa-file-o"></span> '.$langs->trans("PageForNoteTab").' : <strong>'.($realpathtonote?'':'<strike>').$pathtonote.($realpathtonote?'':'</strike>').'</strong>';
|
||||||
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtonote).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
print ' <a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=editfile&format=php&file='.urlencode($pathtonote).'">'.img_picto($langs->trans("Edit"), 'edit').'</a>';
|
||||||
|
if ($realpathtonote)
|
||||||
|
{
|
||||||
|
print ' ';
|
||||||
|
print '<a href="'.$_SERVER['PHP_SELF'].'?tab='.$tab.'&tabobj='.$tabobj.'&module='.$module.($forceddirread?'@'.$dirread:'').'&action=confirm_removefile&file='.urlencode($pathtonote).'">'.img_picto($langs->trans("Delete"), 'delete').'</a>';
|
||||||
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
/* This is already on Tab CLI
|
/* This is already on Tab CLI
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user