svn commit: r1821965 - /ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1821965 - /ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl

jleroux@apache.org
Author: jleroux
Date: Tue Jan 23 08:34:04 2018
New Revision: 1821965

URL: http://svn.apache.org/viewvc?rev=1821965&view=rev
Log:
Fixed: Rainbow theme: bug in avatar.ftl when the last name does not exist
(OFBIZ-10177)

Both 1st and last names must be present else it's confusing and better to show
the username

Modified:
    ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl

Modified: ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl?rev=1821965&r1=1821964&r2=1821965&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl (original)
+++ ofbiz/ofbiz-framework/trunk/themes/rainbowstone/template/includes/Avatar.ftl Tue Jan 23 08:34:04 2018
@@ -31,13 +31,9 @@ under the License.
             <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?exists>
-                    <#if person.firstName??>
-                <span>${person.firstName}</span>
-                <span>${person.lastName?upper_case}</span>
-                    <#else>
-                <span>${userLogin.userLoginId}</span>
-                    </#if>
+                <#if (person.firstName)?? && (person.lastName)??>
+                    <span>${person.firstName}</span>
+                    <span>${person.lastName?upper_case}</span>
                 <#else>
                     <span>${userLogin.userLoginId}</span>
                 </#if>