svn commit: r616167 - /ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

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

svn commit: r616167 - /ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

jleroux@apache.org
Author: jleroux
Date: Mon Jan 28 21:12:36 2008
New Revision: 616167

URL: http://svn.apache.org/viewvc?rev=616167&view=rev
Log:
A patch from Raj Saini "FreeMaker exception1/ while approving the cutomer reviews created by a PartyGroup user ("https://issues.apache.org/jira/browse/OFBIZ-1602) - OFBIZ-1602

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

Modified: ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl?rev=616167&r1=616166&r2=616167&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl Mon Jan 28 21:12:36 2008
@@ -57,13 +57,23 @@
                 <#assign rowClass = "2">
                 <#list pendingReviews as review>
                 <#assign postedUserLogin = review.getRelatedOne("UserLogin")>
-                <#assign postedPerson = postedUserLogin.getRelatedOne("Person")>
+                <#assign party = postedUserLogin.getRelatedOne("Party")>
+                <#assign partyTypeId = party.get("partyTypeId")>
+                <#if partyTypeId == "PERSON">
+                 <#assign postedPerson = postedUserLogin.getRelatedOne("Person")>
+                <#else>
+                 <#assign postedPerson = postedUserLogin.getRelatedOne("PartyGroup")>
+                </#if>
                   <tr valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
                       <td>
                           <input type="hidden" name="productReviewId_o_${rowCount}" value="${review.productReviewId}">
                           ${review.postedDateTime?if_exists}
                       </td>
-                      <td>${postedPerson.firstName} ${postedPerson.lastName}</td>
+                      <#if postedPerson.firstName?has_content && postedPerson.lastName?has_content>
+                       <td>${postedPerson.firstName} ${postedPerson.lastName}</td>
+                      <#else>
+                       <td>${postedPerson.groupName}</td>
+                      </#if>
                       <td>
                           <select name='postedAnonymous_o_${rowCount}'>
                               <option>${review.postedAnonymous?default("N")}</option>
@@ -97,4 +107,4 @@
             </form>
         </#if>
     </div>
-</div>
\ No newline at end of file
+</div>