From 695a00f21caf4f797f8fd928cd3cbd7311b08536 Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Wed, 19 Jun 2019 14:04:01 +0100 Subject: [PATCH 1/4] New:Show labels of countries in modulebuilder --- htdocs/core/class/ccountry.class.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index a97d992bf89..d5a929be0dd 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -30,7 +30,7 @@ /** * Class to manage dictionary Countries (used by imports) */ -class Ccountry // extends CommonObject +class Ccountry extends CommonObject { /** * @var DoliDB Database handler. @@ -332,4 +332,19 @@ class Ccountry // extends CommonObject return 1; } } + /** + * Return a link to the object card (with optionaly the picto) + * + * @param int $withpicto Include picto in link (0=No picto, 1=Include picto into link, 2=Only picto) + * @param string $option On what the link point to ('nolink', ...) + * @param int $notooltip 1=Disable tooltip + * @param string $morecss Add more css on link + * @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking + * @return string String with URL + */ + function getNomUrl($withpicto=0, $option='', $notooltip=0, $morecss='', $save_lastsearch_value=-1) + { + global $langs; + return $langs->trans($this->label); + } } From 7f34a03034e835e2e7344b67cfdc648ca48a4eac Mon Sep 17 00:00:00 2001 From: Bahfir Abbes Date: Thu, 20 Jun 2019 20:55:48 +0100 Subject: [PATCH 2/4] It's just a mistake. In order to declare a getnomUrl method, Ccountry does not need to extend Commonobject --- htdocs/core/class/ccountry.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index d5a929be0dd..71df0784fba 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -30,7 +30,7 @@ /** * Class to manage dictionary Countries (used by imports) */ -class Ccountry extends CommonObject +class Ccountry// extends CommonObject { /** * @var DoliDB Database handler. From bd867f5e805e5d9b8b348f1d14582da8464913f5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Oct 2019 15:16:23 +0200 Subject: [PATCH 3/4] Update ccountry.class.php --- htdocs/core/class/ccountry.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index 71df0784fba..d6d33df553e 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -30,7 +30,7 @@ /** * Class to manage dictionary Countries (used by imports) */ -class Ccountry// extends CommonObject +class Ccountry // extends CommonObject { /** * @var DoliDB Database handler. From c724eef85c900b6b3288b5a839b9d2c24b968cda Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Oct 2019 15:16:56 +0200 Subject: [PATCH 4/4] Update ccountry.class.php --- htdocs/core/class/ccountry.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/ccountry.class.php b/htdocs/core/class/ccountry.class.php index d6d33df553e..575a3b7ed71 100644 --- a/htdocs/core/class/ccountry.class.php +++ b/htdocs/core/class/ccountry.class.php @@ -30,7 +30,7 @@ /** * Class to manage dictionary Countries (used by imports) */ -class Ccountry // extends CommonObject +class Ccountry // extends CommonObject { /** * @var DoliDB Database handler.