You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by le...@apache.org on 2008/04/26 04:26:35 UTC

svn commit: r651789 - /ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl

Author: lektran
Date: Fri Apr 25 19:26:32 2008
New Revision: 651789

URL: http://svn.apache.org/viewvc?rev=651789&view=rev
Log:
Only hide the Find Party screen's search fields when we have some results to display

Modified:
    ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl

Modified: ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl?rev=651789&r1=651788&r2=651789&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
+++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Fri Apr 25 19:26:32 2008
@@ -21,21 +21,26 @@
 <#assign inventoryItemId = parameters.inventoryItemId?default("")>
 <#assign serialNumber = parameters.serialNumber?default("")>
 <#assign softIdentifier = parameters.softIdentifier?default("")>
-
+<#-- Only allow the search fields to be hidden when we have some results -->
+<#if partyList?has_content>
+  <#assign hideFields = parameters.hideFields?default("N")>
+<#else>
+  <#assign hideFields = "N">
+</#if>
 <div id="findPartyParameters" class="screenlet">
   <div class="screenlet-title-bar">
     <ul>
       <li class="h3">${uiLabelMap.PartyFindParty}</li>
-      <#if parameters.hideFields?default("N") == "Y">
+      <#if hideFields == "Y">
         <li><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonShowLookupFields}</a></li>
       <#else>
-        <#if partyList?exists><li><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonHideFields}</a></li></#if>
+        <#if partyList?has_content><li><a href="<@o...@ofbizUrl>">${uiLabelMap.CommonHideFields}</a></li></#if>
         <li><a href="javascript:document.lookupparty.submit();">${uiLabelMap.PartyLookupParty}</a></li>
       </#if>
     </ul>
     <br class="clear"/>
   </div>
-  <#if parameters.hideFields?default("N") != "Y">
+  <#if hideFields != "Y">
     <div class="screenlet-body">
       <#-- NOTE: this form is setup to allow a search by partial partyId or userLoginId; to change it to go directly to 
           the viewprofile page when these are entered add the follow attribute to the form element:
@@ -170,7 +175,7 @@
   </#if>
 </div>
 
-<#if parameters.hideFields?default("N") != "Y">
+<#if hideFields != "Y">
   <script language="JavaScript" type="text/javascript">
     <!--//
       document.lookupparty.partyId.focus();
@@ -185,13 +190,13 @@
         <li class="h3">${uiLabelMap.PartyPartiesFound}</li>
           <#if (partyListSize > 0)>
             <#if (partyListSize > highIndex)>
-              <li><a class="nav-next" href="<@o...@ofbizUrl>">${uiLabelMap.CommonNext}</a></li>
+              <li><a class="nav-next" href="<@o...@ofbizUrl>">${uiLabelMap.CommonNext}</a></li>
             <#else>
               <li class="disabled">${uiLabelMap.CommonNext}</li>
             </#if>
             <li>${lowIndex} - ${highIndex} ${uiLabelMap.CommonOf} ${partyListSize}</li>
             <#if (viewIndex > 0)>
-              <li><a class="nav-previous" href="<@o...@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
+              <li><a class="nav-previous" href="<@o...@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
             <#else>
               <li class="disabled">${uiLabelMap.CommonPrevious}</li>
             </#if>