Author: klichong Date: Fri Oct 30 06:39:44 2009 New Revision: 831213 URL: http://svn.apache.org/viewvc?rev=831213&view=rev Log: fixing pagination for friends' thumbnails on user profile page. More than 6 friends will result in a "more" link.
Modified: incubator/olio/webapp/java/trunk/ws/apps/webapp/web/personContent.jsp Modified: incubator/olio/webapp/java/trunk/ws/apps/webapp/web/personContent.jsp URL: http://svn.apache.org/viewvc/incubator/olio/webapp/java/trunk/ws/apps/webapp/web/personContent.jsp?rev=831213&r1=831212&r2=831213&view=diff ============================================================================== --- incubator/olio/webapp/java/trunk/ws/apps/webapp/web/personContent.jsp (original) +++ incubator/olio/webapp/java/trunk/ws/apps/webapp/web/personContent.jsp Fri Oct 30 06:39:44 2009 @@ -158,15 +158,22 @@ <div id="friend_cloud"> <h2>Friend Cloud</h2> <p id="friend_cloud"> - <c:forEach var="friend" items="${requestScope['displayPerson'].friends}"> - <div class="friend_cloud_item"> - <a href="${pageContext.servletContext.contextPath}/person?&user_name=${friend.userName}&actionType=display_person"><img src="${mf.artifactPath}/${friend.imageThumbURL}" height=50px width=50px /> </a><br /> <a href="${pageContext.servletContext.contextPath}/person?&user_name=${friend.userName}&actionType=display_person">${friend.userName}</a> </br> - </div> + <c:forEach var="friend" items="${requestScope['displayPerson'].friends}" varStatus="rowCounter"> + <c:set var="friendLoopCount" scope="page" value="${rowCounter.count}"/> + <c:if test="${rowCounter.count < 7}"> + <div class="friend_cloud_item"> + <a href="${pageContext.servletContext.contextPath}/person?&user_name=${friend.userName}&actionType=display_person"> + <img src="${mf.artifactPath}/${friend.imageThumbURL}" height=50px width=50px /> </a><br /> + <a href="${pageContext.servletContext.contextPath}/person?&user_name=${friend.userName}&actionType=display_person"> + ${friend.firstName} ${friend.lastName}</a> + <br></br> + </div> + </c:if> </c:forEach> <p class="clr" /> - + <c:if test="${friendLoopCount > 6}"> <a href="${pageContext.servletContext.contextPath}/person?user_name=${displayPerson.userName}&actionType=display_friends">more...</a> - + </c:if> </div> <c:if test="${requestScope['displayPerson'].userName == userBean.loggedInPerson.userName}"> <div id="incoming">