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

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


The following commit(s) were added to refs/heads/trunk by this push:
     new b45d243581 Removed party/person/partyGroup related code from themes 
component to remove application dependency from themes (OFBIZ-13418) (#1270)
b45d243581 is described below

commit b45d2435815285376a1a86410bb8bd3e142a413a
Author: Deepak Dixit <[email protected]>
AuthorDate: Tue May 26 15:22:20 2026 +0530

    Removed party/person/partyGroup related code from themes component to 
remove application dependency from themes (OFBIZ-13418) (#1270)
---
 applications/commonext/widget/CommonScreens.xml    |  2 +-
 themes/bluelight/template/Header.ftl               | 29 ++++------------------
 themes/flatgrey/template/Header.ftl                |  2 +-
 themes/helveticus/template/includes/Avatar.ftl     | 14 ++++-------
 themes/helveticus/template/includes/HomeMenu.ftl   |  4 +--
 themes/helveticus/template/includes/TopAppBar.ftl  |  4 +--
 themes/rainbowstone/template/includes/Avatar.ftl   | 21 ++++++----------
 themes/rainbowstone/template/includes/HomeMenu.ftl |  4 +--
 .../rainbowstone/template/includes/TopAppBar.ftl   |  4 +--
 themes/tomahawk/template/AppBarClose.ftl           | 27 ++++----------------
 themes/tomahawk/template/Header.ftl                |  2 --
 11 files changed, 33 insertions(+), 80 deletions(-)

diff --git a/applications/commonext/widget/CommonScreens.xml 
b/applications/commonext/widget/CommonScreens.xml
index 46df879425..58483c7292 100644
--- a/applications/commonext/widget/CommonScreens.xml
+++ b/applications/commonext/widget/CommonScreens.xml
@@ -66,7 +66,7 @@ under the License.
                         <set field="orgPartyContent" value="${groovy: 
orgContentId!=null?'/content/control/stream?contentId=' + orgContentId + 
externalKeyParam : ''}"/>
                         <set field="layoutSettings.organizationLogoLinkUrl" 
from-field="orgPartyContent" default-value="${orgPartyLogoMap.logoImageUrl}" 
global="true"/>
                         <set field="defaultOrganizationPartyCurrencyUomId" 
from-field="orgParty.baseCurrencyUomId" default-value="${defaultCurrencyUomId}" 
global="true"/>
-                        <set field="defaultOrganizationPartyGroupName" 
from-field="orgParty.groupName" global="true"/>
+                        <set field="defaultOrganizationName" 
from-field="orgParty.groupName" global="true"/>
                         <set field="dropdown.hiddenFieldList" 
from-field="hiddenFields" global="true"/>
                         <set field="dropdown.action" 
value="setUserPreference"/>
                         <set field="dropdown.textBegin" 
from-field="uiLabelMap.CommonDefaultOrganizationPartyId"/>
diff --git a/themes/bluelight/template/Header.ftl 
b/themes/bluelight/template/Header.ftl
index 2c59f6c448..1d8a3f8bb7 100644
--- a/themes/bluelight/template/Header.ftl
+++ b/themes/bluelight/template/Header.ftl
@@ -18,8 +18,6 @@ under the License.
 -->
 <#assign externalKeyParam = "&amp;externalLoginKey=" + 
requestAttributes.externalLoginKey!>
 
-<#if (requestAttributes.person)??><#assign person = 
requestAttributes.person></#if>
-<#if (requestAttributes.partyGroup)??><#assign partyGroup = 
requestAttributes.partyGroup></#if>
 <#assign docLangAttr = locale.toString()?replace("_", "-")>
 <#assign langDir = "ltr">
 <#if "ar.iw"?contains(docLangAttr?substring(0, 2))>
@@ -104,18 +102,14 @@ under the License.
 </#if>
 <#assign organizationLogoLinkURL = 
"${layoutSettings.organizationLogoLinkUrl!}">
 
-<#if person?has_content>
-  <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + 
person.lastName!>
-<#elseif partyGroup?has_content>
-  <#assign userName = partyGroup.groupName!>
-<#elseif userLogin??>
-  <#assign userName = userLogin.userLoginId>
+<#if userLogin??>
+  <#assign userName = userLogin.userFullName!userLogin.userLoginId>
 <#else>
   <#assign userName = "">
 </#if>
 
-<#if defaultOrganizationPartyGroupName?has_content>
-  <#assign orgName = " - " + defaultOrganizationPartyGroupName!>
+<#if defaultOrganizationName?has_content>
+  <#assign orgName = " - " + defaultOrganizationName!>
 <#else>
   <#assign orgName = "">
 </#if>
@@ -170,20 +164,7 @@ under the License.
         <li class="control-area">
           <ul id="preferences-menu">
             <#if userLogin??>
-              <#if userLogin.partyId??>
-                <#assign size = companyListSize?default(0)>
-                <#if size &gt; 1>
-                    <#assign currentCompany = 
delegator.findOne("PartyNameView", {"partyId" : organizationPartyId}, false)>
-                    <#if currentCompany?exists>
-                        <li class="user">
-                            <a 
href="<@ofbizUrl>ListSetCompanies</@ofbizUrl>">${currentCompany.groupName} 
&nbsp;- </a>
-                        </li>
-                    </#if>
-                </#if>
-                <li class="user"><a href="<@ofbizUrl 
controlPath="/partymgr/control">viewprofile?partyId=${userLogin.partyId}</@ofbizUrl>">${userName}</a></li>
-              <#else>
-                <li class="user">${userName}</li>
-              </#if>
+              <li class="user">${userName}</li>
               <#if orgName?has_content>
                 <li class="org">${orgName}</li>
               </#if>
diff --git a/themes/flatgrey/template/Header.ftl 
b/themes/flatgrey/template/Header.ftl
index 3ab7761601..9eee7fad28 100644
--- a/themes/flatgrey/template/Header.ftl
+++ b/themes/flatgrey/template/Header.ftl
@@ -151,7 +151,7 @@ under the License.
                 </#if>
               </#list>
             <#else>
-              <li>${userLogin.userLoginId}</li>
+              <li>${userLogin.userFullName!userLogin.userLoginId}</li>
             </#if>
             <li><a 
href="<@ofbizUrl>logout</@ofbizUrl>">${uiLabelMap.CommonLogout}</a></li>
           <#else>
diff --git a/themes/helveticus/template/includes/Avatar.ftl 
b/themes/helveticus/template/includes/Avatar.ftl
index 130b240854..67606367a4 100644
--- a/themes/helveticus/template/includes/Avatar.ftl
+++ b/themes/helveticus/template/includes/Avatar.ftl
@@ -18,20 +18,16 @@ under the License.
 -->
 
 <div id="user-avatar" onclick="showHideUserPref()">
-<#if avatarDetail??>
+<#--<#if avatarDetail??>
     <img 
src="<@ofbizUrl>stream?contentId=${avatarDetail.contentId}</@ofbizUrl>" 
alt="user">
-<#else>
+<#else>-->
     <svg class="appbar-btn-img" fill="none" stroke="currentColor" viewBox="0 0 
24 24" xmlns="http://www.w3.org/2000/svg";>
         <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" 
d="M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 
0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z" />
     </svg>
-</#if>
+<#--</#if>-->
     <div id="user-details" style="display:none;">
-        <p id="user-name" <#if 
userLogin.partyId??>onclick="javascript:location.href='/partymgr/control/viewprofile?partyId=${userLogin.partyId}'"</#if>>
-            <#if (person.firstName)?? && (person.lastName)??>
-                ${person.firstName}&nbsp;<strong> 
${person.lastName?upper_case}</strong>
-            <#else>
-                <strong>${userLogin.userLoginId}</strong>
-            </#if>
+        <p id="user-name">
+            <strong>${userLogin.userFullName!userLogin.userLoginId}</strong>
         </p>
 
         <a id="user-lang" href="<@ofbizUrl>ListLocales</@ofbizUrl>">
diff --git a/themes/helveticus/template/includes/HomeMenu.ftl 
b/themes/helveticus/template/includes/HomeMenu.ftl
index 92fa8d4b77..6bf83cb1aa 100644
--- a/themes/helveticus/template/includes/HomeMenu.ftl
+++ b/themes/helveticus/template/includes/HomeMenu.ftl
@@ -23,11 +23,11 @@ under the License.
 <#assign contextPath = request.getContextPath()>
 <#assign displayApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "main")>
 <#assign displaySecondaryApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "secondary")>
-<#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId", 
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
+<#--<#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId", 
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
 <#if avatarList?has_content>
     <#assign avatar = 
Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(avatarList)>
     <#assign avatarDetail = 
EntityQuery.use(delegator).from("PartyContentDetail").where("partyId", 
person.partyId!, "contentId", avatar.contentId!).queryFirst()!>
-</#if>
+</#if>-->
 <body onpageshow="showHideFavorites()">
 <script type="text/javascript">
     function showHideFavorites() {
diff --git a/themes/helveticus/template/includes/TopAppBar.ftl 
b/themes/helveticus/template/includes/TopAppBar.ftl
index 3b83062ef0..5e80fc657b 100644
--- a/themes/helveticus/template/includes/TopAppBar.ftl
+++ b/themes/helveticus/template/includes/TopAppBar.ftl
@@ -22,13 +22,13 @@ under the License.
 <#assign contextPath = request.getContextPath()>
 <#assign displayApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "main")>
 <#assign displaySecondaryApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "secondary")>
-<#if person?has_content>
+<#--<#if person?has_content>
     <#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId",  
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
     <#if avatarList?has_content>
         <#assign avatar = 
Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(avatarList)>
         <#assign avatarDetail = 
EntityQuery.use(delegator).from("PartyContentDetail").where("partyId", 
person.partyId!, "contentId", avatar.contentId!).queryFirst()!>
     </#if>
-</#if>
+</#if>-->
 <body>
 <#include "component://common-theme/template/ImpersonateBanner.ftl"/>
 <div id="wait-spinner" class="hidden">
diff --git a/themes/rainbowstone/template/includes/Avatar.ftl 
b/themes/rainbowstone/template/includes/Avatar.ftl
index 0100f3614d..3f6ecce19f 100644
--- a/themes/rainbowstone/template/includes/Avatar.ftl
+++ b/themes/rainbowstone/template/includes/Avatar.ftl
@@ -18,25 +18,20 @@ under the License.
 -->
 
 <div id="user-avatar" onclick="showHideUserPref()">
-<#if avatarDetail??>
+<#--<#if avatarDetail??>
     <img 
src="<@ofbizUrl>stream?contentId=${avatarDetail.contentId}</@ofbizUrl>" 
alt="user">
-<#else>
+<#else>-->
     <img src="/rainbowstone/images/avatar.svg" alt="user">
-</#if>
+<#--</#if>-->
     <div id="user-details" style="display:none;">
         <div id="user-row1">
-        <#if avatarDetail??>
+        <#--<#if avatarDetail??>
             <img 
src="<@ofbizUrl>stream?contentId=${avatarDetail.contentId}</@ofbizUrl>" 
alt="user">
-        <#else>
+        <#else>-->
             <img src="/rainbowstone/images/avatar.svg" alt="user">
-        </#if>
-            <div id="user-name" <#if 
userLogin.partyId??>onclick="javascript:location.href='/partymgr/control/viewprofile?partyId=${userLogin.partyId}'"</#if>>
-                <#if (person.firstName)?? && (person.lastName)??>
-                    <span>${person.firstName}</span>
-                    <span>${person.lastName?upper_case}</span>
-                <#else>
-                    <span>${userLogin.userLoginId}</span>
-                </#if>
+<#--        </#if>-->
+            <div id="user-name">
+                <span>${userLogin.userFullName!userLogin.userLoginId}</span>
             </div>
             <a id="user-lang" href="<@ofbizUrl>ListLocales</@ofbizUrl>">
             <#assign userLang = locale.toString()>
diff --git a/themes/rainbowstone/template/includes/HomeMenu.ftl 
b/themes/rainbowstone/template/includes/HomeMenu.ftl
index 92fa8d4b77..6bf83cb1aa 100644
--- a/themes/rainbowstone/template/includes/HomeMenu.ftl
+++ b/themes/rainbowstone/template/includes/HomeMenu.ftl
@@ -23,11 +23,11 @@ under the License.
 <#assign contextPath = request.getContextPath()>
 <#assign displayApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "main")>
 <#assign displaySecondaryApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "secondary")>
-<#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId", 
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
+<#--<#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId", 
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
 <#if avatarList?has_content>
     <#assign avatar = 
Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(avatarList)>
     <#assign avatarDetail = 
EntityQuery.use(delegator).from("PartyContentDetail").where("partyId", 
person.partyId!, "contentId", avatar.contentId!).queryFirst()!>
-</#if>
+</#if>-->
 <body onpageshow="showHideFavorites()">
 <script type="text/javascript">
     function showHideFavorites() {
diff --git a/themes/rainbowstone/template/includes/TopAppBar.ftl 
b/themes/rainbowstone/template/includes/TopAppBar.ftl
index 83ebc4fa6e..6f6b54e38a 100644
--- a/themes/rainbowstone/template/includes/TopAppBar.ftl
+++ b/themes/rainbowstone/template/includes/TopAppBar.ftl
@@ -22,13 +22,13 @@ under the License.
 <#assign contextPath = request.getContextPath()>
 <#assign displayApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "main")>
 <#assign displaySecondaryApps = 
Static["org.apache.ofbiz.webapp.WebAppCache"].getShared().getAppBarWebInfos(ofbizServerName,
 "secondary")>
-<#if person?has_content>
+<#--<#if person?has_content>
     <#assign avatarList = 
EntityQuery.use(delegator).from("PartyContent").where("partyId",  
person.partyId!, "partyContentTypeId", "LGOIMGURL").queryList()!>
     <#if avatarList?has_content>
         <#assign avatar = 
Static["org.apache.ofbiz.entity.util.EntityUtil"].getFirst(avatarList)>
         <#assign avatarDetail = 
EntityQuery.use(delegator).from("PartyContentDetail").where("partyId", 
person.partyId!, "contentId", avatar.contentId!).queryFirst()!>
     </#if>
-</#if>
+</#if>-->
 <body>
 <#include "component://common-theme/template/ImpersonateBanner.ftl"/>
 <div id="wait-spinner" class="hidden">
diff --git a/themes/tomahawk/template/AppBarClose.ftl 
b/themes/tomahawk/template/AppBarClose.ftl
index 3a1c5e99b3..0bdb853ef8 100644
--- a/themes/tomahawk/template/AppBarClose.ftl
+++ b/themes/tomahawk/template/AppBarClose.ftl
@@ -17,17 +17,13 @@ specific language governing permissions and limitations
 under the License.
 -->
 <#assign appModelMenu = 
Static["org.apache.ofbiz.widget.model.MenuFactory"].getMenuFromLocation(applicationMenuLocation,applicationMenuName,visualTheme)>
-<#if person?has_content>
-  <#assign userName = (person.firstName!) + " " + (person.middleName!) + " " + 
person.lastName!>
-<#elseif partyGroup?has_content>
-  <#assign userName = partyGroup.groupName!>
-<#elseif userLogin??>
-  <#assign userName = userLogin.userLoginId>
+<#if userLogin??>
+  <#assign userName = userLogin.userFullName!userLogin.userLoginId>
 <#else>
   <#assign userName = "">
 </#if>
-<#if defaultOrganizationPartyGroupName?has_content>
-  <#assign orgName = " - " + defaultOrganizationPartyGroupName!>
+<#if defaultOrganizationName?has_content>
+  <#assign orgName = " - " + defaultOrganizationName!>
 <#else>
   <#assign orgName = "">
 </#if>
@@ -80,20 +76,7 @@ under the License.
     </#if>
     <li <#if companyListSize?default(0) &lt;= 1>class="language"</#if>><a 
href="<@ofbizUrl>ListLocales</@ofbizUrl>">${uiLabelMap.CommonLanguageTitle}</a></li>
     <#if userLogin?exists>
-      <#if userLogin.partyId?exists>
-        <li class="user"><a href="<@ofbizUrl 
controlPath="/partymgr/control">viewprofile?partyId=${userLogin.partyId}</@ofbizUrl>">${userName}</a>&nbsp;&nbsp;&nbsp;&nbsp;</li>
-        <#assign size = companyListSize?default(0)>
-        <#if size &gt; 1>
-            <#assign currentCompany = delegator.findOne("PartyNameView", 
{"partyId" : organizationPartyId}, false)>
-            <#if currentCompany?exists>
-                <li class="user">
-                    <a 
href="<@ofbizUrl>ListSetCompanies</@ofbizUrl>">${currentCompany.groupName} 
&nbsp;- </a>
-                </li>
-            </#if>
-        </#if>
-      <#else>
-        <li class="user">${userName}</li>
-      </#if>
+      <li class="user">${userName}</li>
     </#if>
   </ul>
 </div>
diff --git a/themes/tomahawk/template/Header.ftl 
b/themes/tomahawk/template/Header.ftl
index 684c1af4fb..57c0e01513 100644
--- a/themes/tomahawk/template/Header.ftl
+++ b/themes/tomahawk/template/Header.ftl
@@ -18,8 +18,6 @@ under the License.
 -->
 <#assign externalKeyParam = "&amp;externalLoginKey=" + 
requestAttributes.externalLoginKey!>
 
-<#if (requestAttributes.person)??><#assign person = 
requestAttributes.person></#if>
-<#if (requestAttributes.partyGroup)??><#assign partyGroup = 
requestAttributes.partyGroup></#if>
 <#assign docLangAttr = locale.toString()?replace("_", "-")>
 <#assign langDir = "ltr">
 <#if "ar.iw"?contains(docLangAttr?substring(0, 2))>

Reply via email to