From 18e1e5b7806c67938c03391c9fabfd54ea97286f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Thu, 30 Mar 2017 15:54:48 +0200 Subject: [PATCH] NEW Add "depends on" and "required by "into module informations --- htdocs/admin/modulehelp.php | 18 ++++++++++-------- htdocs/core/modules/modHRM.class.php | 5 ++++- htdocs/langs/en_US/admin.lang | 2 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 5b428443248..3fe6addea2d 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -1,12 +1,5 @@ <?php -/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> - * Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org> - * Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net> - * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> - * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> - * Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es> - * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> - * Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> +/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -343,6 +336,15 @@ if ($mode == 'desc') if ($mode == 'feature') { + $text.='<br><strong>'.$langs->trans("DependsOn").':</strong> '; + if (count($objMod->requiredby)) $text.=join(',', $objMod->depends); + else $text.=$langs->trans("None"); + $text.='<br><strong>'.$langs->trans("RequiredBy").':</strong> '; + if (count($objMod->requiredby)) $text.=join(',', $objMod->requiredby); + else $text.=$langs->trans("None"); + + $text.='<br><br><br>'; + $text.='<strong>'.$langs->trans("AddRemoveTabs").':</strong> '; if (isset($objMod->tabs) && is_array($objMod->tabs) && count($objMod->tabs)) { diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php index 5cbb282424a..74a0107aedb 100644 --- a/htdocs/core/modules/modHRM.class.php +++ b/htdocs/core/modules/modHRM.class.php @@ -52,7 +52,10 @@ class modHRM extends DolibarrModules $this->const_name = 'MAIN_MODULE_' . strtoupper($this->name); $this->special = 0; - // $this->picto = ''; + // Name of image file used for this module. + // If file is in theme/yourtheme/img directory under name object_pictovalue.png, use this->picto='pictovalue' + // If file is in module/img directory under name object_pictovalue.png, use this->picto='pictovalue@module' + $this->picto='generic'; // define triggers $this->module_parts = array(); diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index b3f43698843..1d16fefa959 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -425,6 +425,8 @@ Use3StepsApproval=By default, Purchase Orders need to be created and approved by UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than... WarningPHPMail=WARNING: Some email providers (like Yahoo) does not allow you to send an email from another server than the Yahoo server if the email address used as a sender is your Yahoo email (like myemail@yahoo.com, myemail@yahoo.fr, ...). Your current setup use the server of the application to send email, so some recipients (the one compatible with the restrictive DMARC protocol), will ask Yahoo if they can accept your email and Yahoo will respond "no" because the server is not a server owned by Yahoo, so few of your sent Emails may not be accepted.<br>If your Email provider (like Yahoo) has this restriction, you must change Email setup to choose the other method "SMTP server" and enter the SMTP server and credentials provided by your Email provider (ask your EMail provider to get SMTP credentials for your account). ClickToShowDescription=Click to show description +DependsOn=This module need the module(s) +RequiredBy=This module is required by module(s) # Modules Module0Name=Users & groups Module0Desc=Users / Employees and Groups management -- GitLab