Skip to content
Snippets Groups Projects
Commit cb1c461b authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Work on module builder

parent 7f647964
No related branches found
No related tags found
No related merge requests found
# Dolibarr language file - Source file is en_US - loan # Dolibarr language file - Source file is en_US - loan
ModuleBuilderDesc=This tools give you utilites to build or edit your own module (<a href="%s" target="_blank">More information here</a>). ModuleBuilderDesc=This tools must be used by experienced users or developers. It gives you utilities to build or edit your own module (Documentation for alternative <a href="%s" target="_blank">manual development is here</a>).
EnterNameOfModuleDesc=Enter name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...) EnterNameOfModuleDesc=Enter name of the module/application to create with no spaces. Use uppercase to separate words (For example: MyModule, EcommerceForShop, SyncWithMySystem...)
EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...) EnterNameOfObjectDesc=Enter name of the object to create with no spaces. Use uppercase to separate words (For example: MyObject, Student, Teacher...)
ModuleBuilderDesc2=Path were modules are generated/edited (first alternative directory defined into %s): <strong>%s</strong> ModuleBuilderDesc2=Path where modules are generated/edited (first alternative directory defined into %s): <strong>%s</strong>
ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> (they are detected as editable when the file <strong>%s</strong> exists in root of module directory). ModuleBuilderDesc3=Generated/editable modules found: <strong>%s</strong> (they are detected as editable when the file <strong>%s</strong> exists in root of module directory).
NewModule=New module NewModule=New module
NewObject=New object NewObject=New object
...@@ -11,17 +11,19 @@ ObjectKey=Object key ...@@ -11,17 +11,19 @@ ObjectKey=Object key
ModuleInitialized=Module initialized ModuleInitialized=Module initialized
FilesForObjectInitialized=Files for new object initialized FilesForObjectInitialized=Files for new object initialized
ModuleBuilderDescdescription=Enter here all general information that describe your module ModuleBuilderDescdescription=Enter here all general information that describe your module
ModuleBuilderDescspecifications=You can enter here a long text to describe the specifications of your module that is not already structured into other tabs. So you have on hand the rules to develop. Also this text content will be included into the generated documentation (see last tab).
ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A sql file, a page to list them, to create/edit/view a card and an API will be generated. ModuleBuilderDescobjects=Define here the objects you want to manage with your module. A sql file, a page to list them, to create/edit/view a card and an API will be generated.
ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module. ModuleBuilderDescmenus=This tab is dedicated to define menu entries provided by your module.
ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module. ModuleBuilderDescpermissions=This tab is dedicated to define the new permissions you want to provide with your module.
ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file with your IDE. ModuleBuilderDesctriggers=This is the view of triggers provided by your module. To include code executed when a triggered business event is launched, just edit this file with your IDE.
ModuleBuilderDeschooks=This tab is dedicated to hooks. ModuleBuilderDeschooks=This tab is dedicated to hooks.
ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets. ModuleBuilderDescwidgets=This tab is dedicated to manage/build widgets.
ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module. Just click on button to build the module package file. ModuleBuilderDescbuildpackage=You can generate here a "ready to distribute" package file (a normalized .zip file) of your module and a "ready to distribute" documentation file. Just click on button to build the package or documentation file.
EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All files of module will be definitly lost ! EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All files of module but also structured data and documentation will be definitly lost !
EnterNameOfObjectToDeleteDesc=You can delete an object. WARNING: All files related to object will be definitly lost ! EnterNameOfObjectToDeleteDesc=You can delete an object. WARNING: All files related to object will be definitly lost !
DangerZone=Danger zone DangerZone=Danger zone
BuildPackage=Build package BuildPackage=Build package/documentation
BuildDocumentation=Build documentation
ModuleIsNotActive=This module was not activated yet (go into Home-Setup-Module to make it live) ModuleIsNotActive=This module was not activated yet (go into Home-Setup-Module to make it live)
ModuleIsLive=This module has been activated. Any change on it may break a current active feature. ModuleIsLive=This module has been activated. Any change on it may break a current active feature.
DescriptionLong=Long description DescriptionLong=Long description
...@@ -33,5 +35,6 @@ ApiClassFile=File for PHP API class ...@@ -33,5 +35,6 @@ ApiClassFile=File for PHP API class
PageForList=PHP page for list of record PageForList=PHP page for list of record
PageForCreateEditView=PHP page to create/edit/view a record PageForCreateEditView=PHP page to create/edit/view a record
PathToModulePackage=Path to zip of module/application package PathToModulePackage=Path to zip of module/application package
PathToModuleDocumentation=Path to file of module/application documentation
SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed. SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed.
PackageFileNotYetGenerated=Package file not yet generated FileNotYetGenerated=File not yet generated
\ No newline at end of file
...@@ -579,6 +579,11 @@ elseif (! empty($module)) ...@@ -579,6 +579,11 @@ elseif (! empty($module))
$head2[$h][2] = 'description'; $head2[$h][2] = 'description';
$h++; $h++;
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=specifications&module='.$module;
$head2[$h][1] = $langs->trans("Specifications");
$head2[$h][2] = 'specifications';
$h++;
$head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module; $head2[$h][0] = $_SERVER["PHP_SELF"].'?tab=objects&module='.$module;
$head2[$h][1] = $langs->trans("Objects"); $head2[$h][1] = $langs->trans("Objects");
$head2[$h][2] = 'objects'; $head2[$h][2] = 'objects';
...@@ -692,6 +697,13 @@ elseif (! empty($module)) ...@@ -692,6 +697,13 @@ elseif (! empty($module))
print '</div>'; print '</div>';
} }
if ($tab == 'specifications')
{
print $langs->trans("FeatureNotYetAvailable");
}
if ($tab == 'objects') if ($tab == 'objects')
{ {
$head3 = array(); $head3 = array();
...@@ -849,7 +861,6 @@ elseif (! empty($module)) ...@@ -849,7 +861,6 @@ elseif (! empty($module))
{ {
print $langs->trans("FeatureNotYetAvailable"); print $langs->trans("FeatureNotYetAvailable");
} }
if ($tab == 'permissions') if ($tab == 'permissions')
...@@ -900,7 +911,7 @@ elseif (! empty($module)) ...@@ -900,7 +911,7 @@ elseif (! empty($module))
print '</div>'; print '</div>';
} }
if ($tab == 'widget') if ($tab == 'widgets')
{ {
print $langs->trans("FeatureNotYetAvailable"); print $langs->trans("FeatureNotYetAvailable");
...@@ -947,17 +958,22 @@ elseif (! empty($module)) ...@@ -947,17 +958,22 @@ elseif (! empty($module))
{ {
$FILENAMEZIP="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".zip"; $FILENAMEZIP="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".zip";
$outputfile = $conf->admin->dir_temp.'/'.$FILENAMEZIP; $outputfile = $conf->admin->dir_temp.'/'.$FILENAMEZIP;
$FILENAMEDOC="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".md";
$outputfiledoc = $conf->admin->dir_temp.'/'.$FILENAMEDOC;
} }
print '<br>';
print '<span class="fa fa-file"></span> '. $langs->trans("PathToModulePackage") . ' : '; print '<span class="fa fa-file"></span> '. $langs->trans("PathToModulePackage") . ' : ';
if (! dol_is_file($outputfile)) print '<strong>'.$langs->trans("PackageFileNotYetGenerated").'</strong>'; if (! dol_is_file($outputfile)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
else { else {
print '<strong>'.$outputfile.'</strong>'; print '<strong>'.$outputfile.'</strong>';
print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfile), 'dayhour').')'; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfile), 'dayhour').')';
} }
print '</strong><br>'; print '</strong><br>';
print '<br><br>'; print '<br>';
print '<form name="generatepackage">'; print '<form name="generatepackage">';
print '<input type="hidden" name="action" value="generatepackage">'; print '<input type="hidden" name="action" value="generatepackage">';
...@@ -965,6 +981,25 @@ elseif (! empty($module)) ...@@ -965,6 +981,25 @@ elseif (! empty($module))
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">'; print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
print '<input type="submit" class="button" value="'.$langs->trans("BuildPackage").'">'; print '<input type="submit" class="button" value="'.$langs->trans("BuildPackage").'">';
print '</form>'; print '</form>';
print '<br><br><br>';
print '<span class="fa fa-file"></span> '. $langs->trans("PathToModuleDocumentation") . ' : ';
if (! dol_is_file($outputfiledoc)) print '<strong>'.$langs->trans("FileNotYetGenerated").'</strong>';
else {
print '<strong>'.$outputfiledoc.'</strong>';
print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledoc), 'dayhour').')';
}
print '</strong><br>';
print '<br>';
print '<form name="generatepackage">';
print '<input type="hidden" name="action" value="generatedoc">';
print '<input type="hidden" name="tab" value="'.dol_escape_htmltag($tab).'">';
print '<input type="hidden" name="module" value="'.dol_escape_htmltag($module).'">';
print '<input type="submit" class="button" value="'.$langs->trans("BuildDocumentation").'">';
print '</form>';
} }
dol_fiche_end(); dol_fiche_end();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment