This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new fcb8bc56c7 Improved: Data of tenant specific component gets loaded in 
all instances (OFBIZ-6065)
fcb8bc56c7 is described below

commit fcb8bc56c7c3c7015d7211cec4cc4cd109d29be3
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Thu Jul 28 09:40:28 2022 +0200

    Improved: Data of tenant specific component gets loaded in all instances 
(OFBIZ-6065)
    
    Improves the information provided about importing and loadAll Gradle task
    loadTenant Gradle task should be used when necessary
---
 framework/webtools/config/WebtoolsUiLabels.xml             | 10 +++++++---
 framework/webtools/template/entity/EntityImport.ftl        |  6 +++++-
 framework/webtools/template/entity/EntityImportDir.ftl     |  6 +++++-
 framework/webtools/template/entity/EntityImportReaders.ftl |  6 +++++-
 4 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/framework/webtools/config/WebtoolsUiLabels.xml 
b/framework/webtools/config/WebtoolsUiLabels.xml
index 1d1046a408..2f00f567ed 100644
--- a/framework/webtools/config/WebtoolsUiLabels.xml
+++ b/framework/webtools/config/WebtoolsUiLabels.xml
@@ -5981,9 +5981,13 @@
         <value xml:lang="zh">本页面用于导入导出的实体引擎XML文档。这些文档都有一个根标签 
"&lt;entity-engine-xml&gt;".</value>
         <value xml:lang="zh-TW">本頁面用於匯入匯出的資料實體引擎XML檔.這些檔都有一個根標簽 
"&lt;entity-engine-xml&gt;".&lt;/entity-engine-xml&gt;</value>
     </property>
-    <property key="WebtoolsXMLImportInfoBewareTenant">
-        <value xml:lang="en">Beware, if you are using tenant this acts as the 
"loadAll" Gradle task that says: "Load default data; meant for OFBiz 
development, testing, and demo purposes".</value>
-        <value xml:lang="fr">Attention, si vous utilisez la fonctionnalité 
"tenant", cela agit comme la tâche Gradle "loadAll" : "Charger les données par 
défaut ; destiné au développement, aux tests et à la démonstration 
OFBiz".</value>
+    <property key="WebtoolsXMLImportInfoBewareTenant1">
+        <value xml:lang="en">Beware, you are using tenant, import acts as the 
"loadAll" Gradle task that says: "Load default data; meant for OFBiz 
development, testing, and demo purposes".</value>
+        <value xml:lang="fr">Attention, vous utilisez la fonctionnalité 
"tenant", l'import agit comme la tâche Gradle "loadAll" : "Charger les données 
par défaut ; destiné au développement, aux tests et à la démonstration 
OFBiz".</value>
+    </property>
+    <property key="WebtoolsXMLImportInfoBewareTenant2">
+        <value xml:lang="en">You should use the "loadTenant" Gradle task to 
load tenant specific data.</value>
+        <value xml:lang="fr">Vous devez utiliser la tâche Gradle "loadTenant" 
pour charger des données spécifiques à un tenant.</value>
     </property>
     <property key="WebtoolsYouMayCreateAnEntity">
         <value xml:lang="de">You may create an Entity ${entityName} by 
entering the values you want, and clicking Create.</value>
diff --git a/framework/webtools/template/entity/EntityImport.ftl 
b/framework/webtools/template/entity/EntityImport.ftl
index e4ef0bd23d..c99dff2457 100644
--- a/framework/webtools/template/entity/EntityImport.ftl
+++ b/framework/webtools/template/entity/EntityImport.ftl
@@ -19,7 +19,11 @@ under the License.
 
 <div 
class="page-title"><span>${uiLabelMap.WebtoolsImportToDataSource}</span></div>
 <p>${uiLabelMap.WebtoolsXMLImportInfo}</p>
-<p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant}</p>
+<#assign tenantUsed = 
Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general",
 "multitenant", "N", delegator)>
+<#if tenantUsed=="Y">
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant1}</p>
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant2}</p>
+</#if>
 <hr />
 
   <form class="basic-form" method="post" 
action="<@ofbizUrl>entityImport</@ofbizUrl>">
diff --git a/framework/webtools/template/entity/EntityImportDir.ftl 
b/framework/webtools/template/entity/EntityImportDir.ftl
index b3c411c930..d78235ab0a 100644
--- a/framework/webtools/template/entity/EntityImportDir.ftl
+++ b/framework/webtools/template/entity/EntityImportDir.ftl
@@ -19,7 +19,11 @@ under the License.
 
 <div 
class="page-title"><span>${uiLabelMap.WebtoolsImportToDataSource}</span></div>
 <p>${uiLabelMap.WebtoolsXMLImportInfo}</p>
-<p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant}</p>
+<#assign tenantUsed = 
Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general",
 "multitenant", "N", delegator)>
+<#if tenantUsed=="Y">
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant1}</p>
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant2}</p>
+</#if>
 <hr />
 
   <form class="basic-form" method="post" 
action="<@ofbizUrl>entityImportDir</@ofbizUrl>">
diff --git a/framework/webtools/template/entity/EntityImportReaders.ftl 
b/framework/webtools/template/entity/EntityImportReaders.ftl
index 8627a5d3b4..2e193b67a8 100644
--- a/framework/webtools/template/entity/EntityImportReaders.ftl
+++ b/framework/webtools/template/entity/EntityImportReaders.ftl
@@ -19,7 +19,11 @@ under the License.
 
 <div 
class="page-title"><span>${uiLabelMap.WebtoolsImportToDataSource}</span></div>
 <p>${uiLabelMap.WebtoolsXMLImportInfo}</p>
-<p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant}</p>
+<#assign tenantUsed = 
Static["org.apache.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("general",
 "multitenant", "N", delegator)>
+<#if tenantUsed=="Y">
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant1}</p>
+    <p>${uiLabelMap.WebtoolsXMLImportInfoBewareTenant2}</p>
+</#if>
 <hr />
   <form class="basic-form" method="post" 
action="<@ofbizUrl>entityImportReaders</@ofbizUrl>">
     <table class="basic-table" cellspacing="0">

Reply via email to