diff --git a/htdocs/langs/en_US/modulebuilder.lang b/htdocs/langs/en_US/modulebuilder.lang index 1c3a7932263d2..9eb910da36018 100644 --- a/htdocs/langs/en_US/modulebuilder.lang +++ b/htdocs/langs/en_US/modulebuilder.lang @@ -1,8 +1,8 @@ # Dolibarr language file - Source file is en_US - loan -ModuleBuilderDesc=This tools give you utilites to build or edit your own module (More information here). +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 manual development is here). 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...) -ModuleBuilderDesc2=Path were modules are generated/edited (first alternative directory defined into %s): %s +ModuleBuilderDesc2=Path where modules are generated/edited (first alternative directory defined into %s): %s ModuleBuilderDesc3=Generated/editable modules found: %s (they are detected as editable when the file %s exists in root of module directory). NewModule=New module NewObject=New object @@ -11,17 +11,19 @@ ObjectKey=Object key ModuleInitialized=Module initialized FilesForObjectInitialized=Files for new object initialized 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. 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. 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. 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. -EnterNameOfModuleToDeleteDesc=You can delete your module. WARNING: All files of module will be definitly lost ! +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 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 ! 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) ModuleIsLive=This module has been activated. Any change on it may break a current active feature. DescriptionLong=Long description @@ -33,5 +35,6 @@ ApiClassFile=File for PHP API class PageForList=PHP page for list of record PageForCreateEditView=PHP page to create/edit/view a record PathToModulePackage=Path to zip of module/application package +PathToModuleDocumentation=Path to file of module/application documentation SpaceOrSpecialCharAreNotAllowed=Spaces or special characters are not allowed. -PackageFileNotYetGenerated=Package file not yet generated \ No newline at end of file +FileNotYetGenerated=File not yet generated diff --git a/htdocs/modulebuilder/index.php b/htdocs/modulebuilder/index.php index caa99d4b089b3..8ea54b78454b7 100644 --- a/htdocs/modulebuilder/index.php +++ b/htdocs/modulebuilder/index.php @@ -579,6 +579,11 @@ $head2[$h][2] = 'description'; $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][1] = $langs->trans("Objects"); $head2[$h][2] = 'objects'; @@ -692,6 +697,13 @@ print ''; } + + if ($tab == 'specifications') + { + print $langs->trans("FeatureNotYetAvailable"); + + } + if ($tab == 'objects') { $head3 = array(); @@ -849,7 +861,6 @@ { print $langs->trans("FeatureNotYetAvailable"); - } if ($tab == 'permissions') @@ -900,7 +911,7 @@ print ''; } - if ($tab == 'widget') + if ($tab == 'widgets') { print $langs->trans("FeatureNotYetAvailable"); @@ -947,17 +958,22 @@ { $FILENAMEZIP="module_".$modulelowercase.'-'.$arrayversion[0].'.'.$arrayversion[1].($arrayversion[2]?".".$arrayversion[2]:"").".zip"; $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 '
'; + print ' '. $langs->trans("PathToModulePackage") . ' : '; - if (! dol_is_file($outputfile)) print ''.$langs->trans("PackageFileNotYetGenerated").''; + if (! dol_is_file($outputfile)) print ''.$langs->trans("FileNotYetGenerated").''; else { print ''.$outputfile.''; print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfile), 'dayhour').')'; } print '
'; - print '

'; + print '
'; print '
'; print ''; @@ -965,6 +981,25 @@ print ''; print ''; print '
'; + + print '


'; + + print ' '. $langs->trans("PathToModuleDocumentation") . ' : '; + if (! dol_is_file($outputfiledoc)) print ''.$langs->trans("FileNotYetGenerated").''; + else { + print ''.$outputfiledoc.''; + print ' ('.$langs->trans("GeneratedOn").' '.dol_print_date(dol_filemtime($outputfiledoc), 'dayhour').')'; + } + print '
'; + + print '
'; + + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'; } dol_fiche_end();