Login  Register

Re: Proposal for a small change to the header template

Posted by David E Jones-2 on Aug 09, 2006; 5:59pm
URL: http://ofbiz.116.s1.nabble.com/Proposal-for-a-small-change-to-the-header-template-tp170514p170515.html


Is the objective to show the userLoginId as well as the first/last or  
group name of the user?

Perhaps it would be better to just add the userLoginId in  
parenthesis. Something like:

"Welcome Jacopo Cappellato! (jacopoc)"

-David


On Aug 9, 2006, at 10:33 AM, Jacopo Cappellato wrote:

> Hi all,
>
> what do you think about the attached patch that will slightly  
> modify the information in the top right corner of each OFBiz screen?
>
> It basically change the information from:
>
> "Welcome Jacopo Cappellato!"
>
> to:
>
> "Username: jacopoc Jacopo Cappellato"
>
> Do you like it? Can I commit?
>
> Jacopo
> Index: framework/common/webcommon/includes/header.ftl
> ===================================================================
> --- framework/common/webcommon/includes/header.ftl (revision 429656)
> +++ framework/common/webcommon/includes/header.ftl (working copy)
> @@ -52,13 +52,16 @@
>            <td align="left" width="1%"><img alt="$
> {layoutSettings.companyName}" src="<@ofbizContentUrl>$
> {layoutSettings.headerImageUrl}</@ofbizContentUrl>"/></td>
>            </#if>
>            <td align="right" width="1%" nowrap="nowrap" <#if  
> layoutSettings.headerRightBackgroundUrl?has_content>background="$
> {layoutSettings.headerRightBackgroundUrl}"</#if>>
> +            <div class="insideHeaderText">
> +            <#if userLogin?exists>$
> {uiLabelMap.CommonUsername}:&nbsp;${userLogin.userLoginId?if_exists}
> &nbsp;</#if>
>              <#if person?has_content>
> -              <div class="insideHeaderText">$
> {uiLabelMap.CommonWelcome}&nbsp;${person.firstName?if_exists}&nbsp;$
> {person.lastName?if_exists}!</div>
> +              ${person.firstName?if_exists}&nbsp;${person.lastName?
> if_exists}
>              <#elseif partyGroup?has_content>
> -              <div class="insideHeaderText">$
> {uiLabelMap.CommonWelcome}&nbsp;${partyGroup.groupName?if_exists}!</
> div>
> +              ${partyGroup.groupName?if_exists}
>              <#else>
> -              <div class="insideHeaderText">$
> {uiLabelMap.CommonWelcome}!</div>
> +              ${uiLabelMap.CommonWelcome}!
>              </#if>
> +            </div>
>              <div class="insideHeaderText">&nbsp;${Static
> ["org.ofbiz.base.util.UtilDateTime"].nowTimestamp().toString()}</div>
>              <div class="insideHeaderText">
>                  <form method="post"  
> action="<@ofbizUrl>setSessionLocale</@ofbizUrl>" style="margin: 0;">