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

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

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

Jacques Le Roux
Administrator
Hi Scott,

The result is very good indeed (when seen in browser HTML source) and not a too big effort in the template itself.
Community: should we discuss it or directly put it as a new recommendation in the best practices?

Jacques

From: <[hidden email]>

> Author: lektran
> Date: Mon Jul 12 11:22:19 2010
> New Revision: 963242
>
> URL: http://svn.apache.org/viewvc?rev=963242&view=rev
> Log:
> No functional changes.  Fixed indentation to use separate indent levels for freemarker and html.  Committers please consider using
> this method, it makes templates MUCH easier to read.
>
> 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=963242&r1=963241&r2=963242&view=diff
> ==============================================================================
> --- ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl (original)
> +++ ofbiz/trunk/applications/party/webapp/partymgr/party/findparty.ftl Mon Jul 12 11:22:19 2010
> @@ -29,38 +29,38 @@ under the License.
> </#if>
> <h1>${uiLabelMap.PartyFindParties}</h1>
> <#if (parameters.firstName?has_content || parameters.lastName?has_content)>
> -    <#assign createUrl =
> "editperson?create_new=Y&amp;lastName=${parameters.lastName?if_exists}&amp;firstName=${parameters.firstName?if_exists}"/>
> +  <#assign createUrl =
> "editperson?create_new=Y&amp;lastName=${parameters.lastName?if_exists}&amp;firstName=${parameters.firstName?if_exists}"/>
> <#elseif (parameters.groupName?has_content)>
> -    <#assign createUrl = "editpartygroup?create_new=Y&amp;groupName=${parameters.groupName?if_exists}"/>
> +  <#assign createUrl = "editpartygroup?create_new=Y&amp;groupName=${parameters.groupName?if_exists}"/>
> <#else>
> -    <#assign createUrl = "createnew"/>
> +  <#assign createUrl = "createnew"/>
> </#if>
> <div class="button-bar"><a href="<@ofbizUrl>${createUrl}</@ofbizUrl>" class="buttontext
> create">${uiLabelMap.CommonCreateNew}</a></div>
> <div class="screenlet">
>   <div class="screenlet-title-bar">
> -    <#if partyList?has_content>
> -      <ul>
> -        <#if hideFields == "Y">
> -          <li class="collapsed"><a href="<@ofbizUrl>findparty?hideFields=N${paramList}</@ofbizUrl>"
> title="${uiLabelMap.CommonShowLookupFields}">&nbsp;</a></li>
> -        <#else>
> -          <li class="expanded"><a href="<@ofbizUrl>findparty?hideFields=Y${paramList}</@ofbizUrl>"
> title="${uiLabelMap.CommonHideFields}">&nbsp;</a></li>
> -        </#if>
> -        <#if (partyListSize > 0)>
> -          <#if (partyListSize > highIndex)>
> -            <li><a class="nav-next"
> href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndex+1}&amp;hideFields=${hideFields}${paramList}</@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="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndex-1}&amp;hideFields=${hideFields}${paramList}</@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
> -          <#else>
> -            <li class="disabled">${uiLabelMap.CommonPrevious}</li>
> -          </#if>
> -        </#if>
> -      </ul>
> -      <br class="clear"/>
> +<#if partyList?has_content>
> +    <ul>
> +  <#if hideFields == "Y">
> +      <li class="collapsed"><a href="<@ofbizUrl>findparty?hideFields=N${paramList}</@ofbizUrl>"
> title="${uiLabelMap.CommonShowLookupFields}">&nbsp;</a></li>
> +  <#else>
> +      <li class="expanded"><a href="<@ofbizUrl>findparty?hideFields=Y${paramList}</@ofbizUrl>"
> title="${uiLabelMap.CommonHideFields}">&nbsp;</a></li>
> +  </#if>
> +  <#if (partyListSize > 0)>
> +    <#if (partyListSize > highIndex)>
> +      <li><a class="nav-next"
> href="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndex+1}&amp;hideFields=${hideFields}${paramList}</@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="<@ofbizUrl>findparty?VIEW_SIZE=${viewSize}&amp;VIEW_INDEX=${viewIndex-1}&amp;hideFields=${hideFields}${paramList}</@ofbizUrl>">${uiLabelMap.CommonPrevious}</a></li>
> +    <#else>
> +      <li class="disabled">${uiLabelMap.CommonPrevious}</li>
>     </#if>
> +  </#if>
> +    </ul>
> +    <br class="clear"/>
> +</#if>
>   </div>
>   <div class="screenlet-body">
>     <div id="findPartyParameters" <#if hideFields != "N"> style="display:none" </#if> >
> @@ -107,14 +107,14 @@ under the License.
>             <td class="label">${uiLabelMap.PartyRoleType}</td>
>             <td>
>               <select name="roleTypeId">
> -                <#if currentRole?has_content>
> -                  <option value="${currentRole.roleTypeId}">${currentRole.get("description",locale)}</option>
> -                  <option value="${currentRole.roleTypeId}">---</option>
> -                </#if>
> +<#if currentRole?has_content>
> +                <option value="${currentRole.roleTypeId}">${currentRole.get("description",locale)}</option>
> +                <option value="${currentRole.roleTypeId}">---</option>
> +</#if>
>                 <option value="ANY">${uiLabelMap.CommonAnyRoleType}</option>
> -                <#list roleTypes as roleType>
> -                  <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> -                </#list>
> +<#list roleTypes as roleType>
> +                <option value="${roleType.roleTypeId}">${roleType.get("description",locale)}</option>
> +</#list>
>               </select>
>             </td>
>           </tr>
> @@ -122,14 +122,14 @@ under the License.
>             <td class="label">${uiLabelMap.PartyType}</td>
>             <td>
>               <select name="partyTypeId">
> -               <#if currentPartyType?has_content>
> -                  <option value="${currentPartyType.partyTypeId}">${currentPartyType.get("description",locale)}</option>
> -                  <option value="${currentPartyType.partyTypeId}">---</option>
> -                </#if>
> +<#if currentPartyType?has_content>
> +                <option value="${currentPartyType.partyTypeId}">${currentPartyType.get("description",locale)}</option>
> +                <option value="${currentPartyType.partyTypeId}">---</option>
> +</#if>
>                 <option value="ANY">${uiLabelMap.CommonAny}</option>
> -                <#list partyTypes as partyType>
> -                  <option value="${partyType.partyTypeId}">${partyType.get("description",locale)}</option>
> -                </#list>
> +<#list partyTypes as partyType>
> +                <option value="${partyType.partyTypeId}">${partyType.get("description",locale)}</option>
> +</#list>
>               </select>
>             </td>
>           </tr>
> @@ -145,60 +145,60 @@ under the License.
>             <td class="label">${uiLabelMap.ProductSoftIdentifier}</td>
>             <td><input type="text" name="softIdentifier" value="${parameters.softIdentifier?if_exists}"/></td>
>           </tr>
> -          <#if extInfo == "P">
> -            <tr><td colspan="3"><hr /></td></tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.CommonAddress1}</td>
> -              <td><input type="text" name="address1" value="${parameters.address1?if_exists}"/></td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.CommonAddress2}</td>
> -              <td><input type="text" name="address2" value="${parameters.address2?if_exists}"/></td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.CommonCity}</td>
> -              <td><input type="text" name="city" value="${parameters.city?if_exists}"/></td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.CommonStateProvince}</td>
> -              <td>
> -                <select name="stateProvinceGeoId">
> -                  <#if currentStateGeo?has_content>
> -                    <option value="${currentStateGeo.geoId}">${currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
> -                    <option value="${currentStateGeo.geoId}">---</option>
> -                  </#if>
> -                  <option value="ANY">${uiLabelMap.CommonAnyStateProvince}</option>
> -                  ${screens.render("component://common/widget/CommonScreens.xml#states")}
> -                </select>
> -              </td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.PartyPostalCode}</td>
> -              <td><input type="text" name="postalCode" value="${parameters.postalCode?if_exists}"/></td>
> -            </tr>
> -          </#if>
> -          <#if extInfo == "T">
> -            <tr><td colspan="3"><hr /></td></tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.PartyCountryCode}</td>
> -              <td><input type="text" name="countryCode" value="${parameters.countryCode?if_exists}"/></td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.PartyAreaCode}</td>
> -              <td><input type="text" name="areaCode" value="${parameters.areaCode?if_exists}"/></td>
> -            </tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.PartyContactNumber}</td>
> -              <td><input type="text" name="contactNumber" value="${parameters.contactNumber?if_exists}"/></td>
> -            </tr>
> -          </#if>
> -          <#if extInfo == "O">
> -            <tr><td colspan="3"><hr /></td></tr>
> -            <tr>
> -              <td class="label">${uiLabelMap.PartyContactInformation}</td>
> -              <td><input type="text" name="infoString" value="${parameters.infoString?if_exists}"/></td>
> -            </tr>
> -          </#if>
> +<#if extInfo == "P">
> +          <tr><td colspan="3"><hr /></td></tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.CommonAddress1}</td>
> +            <td><input type="text" name="address1" value="${parameters.address1?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.CommonAddress2}</td>
> +            <td><input type="text" name="address2" value="${parameters.address2?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.CommonCity}</td>
> +            <td><input type="text" name="city" value="${parameters.city?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.CommonStateProvince}</td>
> +            <td>
> +              <select name="stateProvinceGeoId">
> +  <#if currentStateGeo?has_content>
> +                <option value="${currentStateGeo.geoId}">${currentStateGeo.geoName?default(currentStateGeo.geoId)}</option>
> +                <option value="${currentStateGeo.geoId}">---</option>
> +  </#if>
> +                <option value="ANY">${uiLabelMap.CommonAnyStateProvince}</option>
> +                ${screens.render("component://common/widget/CommonScreens.xml#states")}
> +              </select>
> +            </td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyPostalCode}</td>
> +            <td><input type="text" name="postalCode" value="${parameters.postalCode?if_exists}"/></td>
> +          </tr>
> +</#if>
> +<#if extInfo == "T">
> +          <tr><td colspan="3"><hr /></td></tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyCountryCode}</td>
> +            <td><input type="text" name="countryCode" value="${parameters.countryCode?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyAreaCode}</td>
> +            <td><input type="text" name="areaCode" value="${parameters.areaCode?if_exists}"/></td>
> +          </tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyContactNumber}</td>
> +            <td><input type="text" name="contactNumber" value="${parameters.contactNumber?if_exists}"/></td>
> +          </tr>
> +</#if>
> +<#if extInfo == "O">
> +          <tr><td colspan="3"><hr /></td></tr>
> +          <tr>
> +            <td class="label">${uiLabelMap.PartyContactInformation}</td>
> +            <td><input type="text" name="infoString" value="${parameters.infoString?if_exists}"/></td>
> +          </tr>
> +</#if>
>           <tr>
>             <td>&nbsp;</td>
>             <td>
> @@ -212,151 +212,151 @@ under the License.
>       document.lookupparty.partyId.focus();
>     </script>
>
> -  <#if partyList?exists>
> -    <#if hideFields != "Y">
> -      <hr />
> -    </#if>
> +<#if partyList?exists>
> +  <#if hideFields != "Y">
> +    <hr />
> +  </#if>
>     <div id="findPartyResults">
>       <h2>${uiLabelMap.CommonSearchResults}</h2>
>     </div>
> -    <#if partyList?has_content>
> -      <table class="basic-table hover-bar" cellspacing="0">
> -        <tr class="header-row-2">
> -          <td>${uiLabelMap.PartyPartyId}</td>
> -          <td>${uiLabelMap.PartyUserLogin}</td>
> -          <td>${uiLabelMap.PartyName}</td>
> -          <#if extInfo?default("") == "P" >
> -            <td>${uiLabelMap.PartyCity}</td>
> -          </#if>
> -          <#if extInfo?default("") == "P">
> -            <td>${uiLabelMap.PartyPostalCode}</td>
> -          </#if>
> -          <#if extInfo?default("") == "T">
> -            <td>${uiLabelMap.PartyAreaCode}</td>
> -          </#if>
> -          <#if inventoryItemId?default("") != "">
> -            <td>${uiLabelMap.ProductInventoryItemId}</td>
> -          </#if>
> -          <#if serialNumber?default("") != "">
> -            <td>${uiLabelMap.ProductSerialNumber}</td>
> -          </#if>
> -          <#if softIdentifier?default("") != "">
> -            <td>${uiLabelMap.ProductSoftIdentifier}</td>
> +  <#if partyList?has_content>
> +    <table class="basic-table hover-bar" cellspacing="0">
> +      <tr class="header-row-2">
> +        <td>${uiLabelMap.PartyPartyId}</td>
> +        <td>${uiLabelMap.PartyUserLogin}</td>
> +        <td>${uiLabelMap.PartyName}</td>
> +    <#if extInfo?default("") == "P" >
> +        <td>${uiLabelMap.PartyCity}</td>
> +    </#if>
> +    <#if extInfo?default("") == "P">
> +        <td>${uiLabelMap.PartyPostalCode}</td>
> +    </#if>
> +    <#if extInfo?default("") == "T">
> +        <td>${uiLabelMap.PartyAreaCode}</td>
> +    </#if>
> +    <#if inventoryItemId?default("") != "">
> +        <td>${uiLabelMap.ProductInventoryItemId}</td>
> +    </#if>
> +    <#if serialNumber?default("") != "">
> +        <td>${uiLabelMap.ProductSerialNumber}</td>
> +    </#if>
> +    <#if softIdentifier?default("") != "">
> +        <td>${uiLabelMap.ProductSoftIdentifier}</td>
> +    </#if>
> +        <td>${uiLabelMap.PartyRelatedCompany}</td>
> +        <td>${uiLabelMap.PartyType}</td>
> +        <td>${uiLabelMap.PartyMainRole}</td>
> +        <td>&nbsp;</td>
> +      </tr>
> +    <#assign alt_row = false>
> +    <#assign rowCount = 0>
> +    <#list partyList as partyRow>
> +      <#assign partyType = partyRow.getRelatedOne("PartyType")?if_exists>
> +      <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
> +        <td><a href="<@ofbizUrl>viewprofile?partyId=${partyRow.partyId}</@ofbizUrl>">${partyRow.partyId}</a></td>
> +        <td>
> +      <#if partyRow.containsKey("userLoginId")>
> +          ${partyRow.userLoginId?default("N/A")}
> +      <#else>
> +        <#assign userLogins = partyRow.getRelated("UserLogin")>
> +        <#if (userLogins.size() > 0)>
> +          <#if (userLogins.size() > 1)>
> +          (${uiLabelMap.CommonMany})
> +          <#else>
> +            <#assign userLogin = userLogins.get(0)>
> +          ${userLogin.userLoginId}
>           </#if>
> -          <td>${uiLabelMap.PartyRelatedCompany}</td>
> -          <td>${uiLabelMap.PartyType}</td>
> -          <td>${uiLabelMap.PartyMainRole}</td>
> -          <td>&nbsp;</td>
> -        </tr>
> -        <#assign alt_row = false>
> -        <#assign rowCount = 0>
> -        <#list partyList as partyRow>
> -          <#assign partyType = partyRow.getRelatedOne("PartyType")?if_exists>
> -          <tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
> -            <td><a href="<@ofbizUrl>viewprofile?partyId=${partyRow.partyId}</@ofbizUrl>">${partyRow.partyId}</a></td>
> -            <td>
> -              <#if partyRow.containsKey("userLoginId")>
> -                ${partyRow.userLoginId?default("N/A")}
> -              <#else>
> -                <#assign userLogins = partyRow.getRelated("UserLogin")>
> -                <#if (userLogins.size() > 0)>
> -                  <#if (userLogins.size() > 1)>
> -                    (${uiLabelMap.CommonMany})
> -                  <#else>
> -                  <#assign userLogin = userLogins.get(0)>
> -                    ${userLogin.userLoginId}
> -                  </#if>
> -                <#else>
> -                  (${uiLabelMap.CommonNone})
> -                </#if>
> -              </#if>
> -            </td>
> -            <td>
> -              <#if partyRow.getModelEntity().isField("lastName") && lastName?has_content>
> -                ${partyRow.lastName}<#if partyRow.firstName?has_content>, ${partyRow.firstName}</#if>
> -              <#elseif partyRow.getModelEntity().isField("groupName") && partyRow.groupName?has_content>
> -                ${partyRow.groupName}
> -              <#else>
> -                <#assign partyName = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)>
> -                <#if partyName?has_content>
> -                  ${partyName}
> -                <#else>
> -                  (${uiLabelMap.PartyNoNameFound})
> -                </#if>
> +        <#else>
> +          (${uiLabelMap.CommonNone})
> +        </#if>
> +      </#if>
> +        </td>
> +        <td>
> +      <#if partyRow.getModelEntity().isField("lastName") && lastName?has_content>
> +          ${partyRow.lastName}<#if partyRow.firstName?has_content>, ${partyRow.firstName}</#if>
> +      <#elseif partyRow.getModelEntity().isField("groupName") && partyRow.groupName?has_content>
> +          ${partyRow.groupName}
> +      <#else>
> +        <#assign partyName = Static["org.ofbiz.party.party.PartyHelper"].getPartyName(partyRow, true)>
> +        <#if partyName?has_content>
> +          ${partyName}
> +        <#else>
> +          (${uiLabelMap.PartyNoNameFound})
> +        </#if>
> +      </#if>
> +        </td>
> +      <#if extInfo?default("") == "T">
> +        <td>${partyRow.areaCode?if_exists}</td>
> +      </#if>
> +      <#if extInfo?default("") == "P" >
> +        <td>${partyRow.city?if_exists}, ${partyRow.stateProvinceGeoId?if_exists}</td>
> +      </#if>
> +      <#if extInfo?default("") == "P">
> +        <td>${partyRow.postalCode?if_exists}</td>
> +      </#if>
> +      <#if inventoryItemId?default("") != "">
> +        <td>${partyRow.inventoryItemId?if_exists}</td>
> +      </#if>
> +      <#if serialNumber?default("") != "">
> +        <td>${partyRow.serialNumber?if_exists}</td>
> +      </#if>
> +      <#if softIdentifier?default("") != "">
> +        <td>${partyRow.softIdentifier?if_exists}</td>
> +      </#if>
> +      <#if partyType?exists>
> +        <td>
> +        <#if partyType.partyTypeId?has_content && partyType.partyTypeId=="PERSON">
> +          <#assign partyRelateCom = delegator.findByAnd("PartyRelationship", {"partyIdTo",
> partyRow.partyId,"roleTypeIdFrom","ACCOUNT","roleTypeIdTo","CONTACT"})>
> +          <#if partyRelateCom?has_content>
> +            <#list partyRelateCom as partyRelationship>
> +              <#if partyRelationship.partyIdFrom?has_content>
> +                <#assign companyName=Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator,
> partyRelationship.partyIdFrom, true)>
> +          ${companyName?if_exists}
>               </#if>
> -            </td>
> -            <#if extInfo?default("") == "T">
> -              <td>${partyRow.areaCode?if_exists}</td>
> -            </#if>
> -            <#if extInfo?default("") == "P" >
> -               <td>${partyRow.city?if_exists}, ${partyRow.stateProvinceGeoId?if_exists}</td>
> -            </#if>
> -            <#if extInfo?default("") == "P">
> -              <td>${partyRow.postalCode?if_exists}</td>
> -            </#if>
> -            <#if inventoryItemId?default("") != "">
> -              <td>${partyRow.inventoryItemId?if_exists}</td>
> -            </#if>
> -            <#if serialNumber?default("") != "">
> -              <td>${partyRow.serialNumber?if_exists}</td>
> -            </#if>
> -            <#if softIdentifier?default("") != "">
> -              <td>${partyRow.softIdentifier?if_exists}</td>
> -            </#if>
> -            <#if partyType?exists>
> -              <td>
> -                  <#if partyType.partyTypeId?has_content && partyType.partyTypeId=="PERSON">
> -                       <#assign partyRelateCom = delegator.findByAnd("PartyRelationship", {"partyIdTo",
> partyRow.partyId,"roleTypeIdFrom","ACCOUNT","roleTypeIdTo","CONTACT"})>
> -                       <#if partyRelateCom?has_content>
> -                          <#list partyRelateCom as partyRelationship>
> -                              <#if partyRelationship.partyIdFrom?has_content>
> -                                  <#assign companyName=Static["org.ofbiz.party.party.PartyHelper"].getPartyName(delegator,
> partyRelationship.partyIdFrom, true)>
> -                                  ${companyName?if_exists}
> -                              </#if>
> -                          </#list>
> -                       </#if>
> -                  </#if>
> -              </td>
> -              <td><#if partyType.description?exists>${partyType.get("description", locale)}<#else>???</#if></td>
> -           <#else>
> -            <td></td><td></td>
> -           </#if>
> -            <td>
> -              <#assign mainRole = dispatcher.runSync("getPartyMainRole", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId",
> partyRow.partyId, "userLogin", userLogin))/>
> +            </#list>
> +          </#if>
> +        </#if>
> +        </td>
> +        <td><#if partyType.description?exists>${partyType.get("description", locale)}<#else>???</#if></td>
> +      <#else>
> +        <td></td><td></td>
> +      </#if>
> +        <td>
> +      <#assign mainRole = dispatcher.runSync("getPartyMainRole", Static["org.ofbiz.base.util.UtilMisc"].toMap("partyId",
> partyRow.partyId, "userLogin", userLogin))/>
>               ${mainRole.description?if_exists}
> -            </td>
> -            <td class="button-col align-float">
> -              <a href="<@ofbizUrl>viewprofile?partyId=${partyRow.partyId}</@ofbizUrl>">${uiLabelMap.CommonDetails}</a>
> -              <#if security.hasRolePermission("ORDERMGR", "_VIEW", "", "", session)>
> -                  <form name= "searchorders_o_${rowCount}" method= "post" action= "/ordermgr/control/searchorders">
> -                    <input type= "hidden" name= "lookupFlag" value= "Y" />
> -                    <input type= "hidden" name= "hideFields" value= "Y" />
> -                    <input type= "hidden" name= "partyId" value= "${partyRow.partyId}" />
> -                    <input type= "hidden" name= "viewIndex" value= "1" />
> -                    <input type= "hidden" name= "viewSize" value= "20" />
> -                    <a href="javascript:document.searchorders_o_${rowCount}.submit()">${uiLabelMap.OrderOrders}</a>
> -                </form>
> -                <a href="/ordermgr/control/FindQuote?partyId=${partyRow.partyId +
> externalKeyParam}">${uiLabelMap.OrderOrderQuotes}</a>
> -              </#if>
> -              <#if security.hasEntityPermission("ORDERMGR", "_CREATE", session)>
> -                <a href="/ordermgr/control/checkinits?partyId=${partyRow.partyId +
> externalKeyParam}">${uiLabelMap.OrderNewOrder}</a>
> -                <a href="/ordermgr/control/EditQuote?partyId=${partyRow.partyId +
> externalKeyParam}">${uiLabelMap.OrderNewQuote}</a>
> -              </#if>
> -            </td>
> -          </tr>
> -          <#assign rowCount = rowCount + 1>
> -          <#-- toggle the row color -->
> -          <#assign alt_row = !alt_row>
> -        </#list>
> -      </table>
> -    <#else>
> -      <div id="findPartyResults_2">
> -        <h3>${uiLabelMap.PartyNoPartiesFound}</h3>
> -      </div>
> -    </#if>
> -    <#if lookupErrorMessage?exists>
> -      <h3>${lookupErrorMessage}</h3>
> -    </#if>
> +        </td>
> +        <td class="button-col align-float">
> +          <a href="<@ofbizUrl>viewprofile?partyId=${partyRow.partyId}</@ofbizUrl>">${uiLabelMap.CommonDetails}</a>
> +      <#if security.hasRolePermission("ORDERMGR", "_VIEW", "", "", session)>
> +          <form name= "searchorders_o_${rowCount}" method= "post" action= "/ordermgr/control/searchorders">
> +            <input type= "hidden" name= "lookupFlag" value= "Y" />
> +            <input type= "hidden" name= "hideFields" value= "Y" />
> +            <input type= "hidden" name= "partyId" value= "${partyRow.partyId}" />
> +            <input type= "hidden" name= "viewIndex" value= "1" />
> +            <input type= "hidden" name= "viewSize" value= "20" />
> +            <a href="javascript:document.searchorders_o_${rowCount}.submit()">${uiLabelMap.OrderOrders}</a>
> +          </form>
> +          <a href="/ordermgr/control/FindQuote?partyId=${partyRow.partyId + externalKeyParam}">${uiLabelMap.OrderOrderQuotes}</a>
> +      </#if>
> +      <#if security.hasEntityPermission("ORDERMGR", "_CREATE", session)>
> +          <a href="/ordermgr/control/checkinits?partyId=${partyRow.partyId + externalKeyParam}">${uiLabelMap.OrderNewOrder}</a>
> +          <a href="/ordermgr/control/EditQuote?partyId=${partyRow.partyId + externalKeyParam}">${uiLabelMap.OrderNewQuote}</a>
> +      </#if>
> +        </td>
> +      </tr>
> +      <#assign rowCount = rowCount + 1>
> +      <#-- toggle the row color -->
> +      <#assign alt_row = !alt_row>
> +    </#list>
> +    </table>
> +  <#else>
> +    <div id="findPartyResults_2">
> +      <h3>${uiLabelMap.PartyNoPartiesFound}</h3>
> +    </div>
> +  </#if>
> +  <#if lookupErrorMessage?exists>
> +    <h3>${lookupErrorMessage}</h3>
> +  </#if>
>   </div>
> </#if>
> </div>
>
>