[jboss-svn-commits] JBL Code SVN: r19857 - in labs/jbossforums/branches/forums120P26/forums/src: resources/portal-forums-war/views/search and 1 other directory.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon May 5 07:47:19 EDT 2008


Author: dejp
Date: 2008-05-05 07:47:19 -0400 (Mon, 05 May 2008)
New Revision: 19857

Added:
   labs/jbossforums/branches/forums120P26/forums/src/main/org/jboss/portlet/forums/search/DisplayAs.java
   labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_asposts.xhtml
   labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_astopics.xhtml
Log:
JBFORUMS-2

Added: labs/jbossforums/branches/forums120P26/forums/src/main/org/jboss/portlet/forums/search/DisplayAs.java
===================================================================
--- labs/jbossforums/branches/forums120P26/forums/src/main/org/jboss/portlet/forums/search/DisplayAs.java	                        (rev 0)
+++ labs/jbossforums/branches/forums120P26/forums/src/main/org/jboss/portlet/forums/search/DisplayAs.java	2008-05-05 11:47:19 UTC (rev 19857)
@@ -0,0 +1,7 @@
+package org.jboss.portlet.forums.search;
+
+public enum DisplayAs {
+
+    TOPICS, POSTS;
+    
+}

Added: labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_asposts.xhtml
===================================================================
--- labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_asposts.xhtml	                        (rev 0)
+++ labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_asposts.xhtml	2008-05-05 11:47:19 UTC (rev 19857)
@@ -0,0 +1,435 @@
+<!--
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+-->
+
+<div  xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:c="http://java.sun.com/jstl/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
+      class="forumscontainer">
+
+        <c:choose>
+    
+            <c:when test="#{viewSearch.initialized &amp;&amp; viewSearch.posts != null}">
+
+                <a name="top" />
+
+                <div class="forumtitletext">
+                    <h4>
+                        <h:outputFormat value="#{resource.Search_found}">
+                            <f:param value="#{viewSearch.pageNavigator.numberOfEntries}" />
+                        </h:outputFormat>
+                    </h4>
+                </div>
+	    
+			    <!-- PAGINATION -->
+			    <c:if test="#{viewSearch.pageNavigator.totalPages gt 1}">
+			    <div class="forumpagination">
+			        <ul>
+			            <li class="disablepage">
+			                <h:outputFormat value="#{resource.PageNumber}">
+			                    <f:param value="${viewSearch.pageNavigator.pageNumber}"/>
+			                    <f:param value="${viewSearch.pageNavigator.totalPages}"/>
+			                </h:outputFormat>
+			            </li>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq 0}">
+			                    <li class="disablepage">
+			                        ${resource.First}
+			                    </li>
+			                    <li class="disablepage">
+			                        &#60; ${resource.Previous}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="0"/>
+			                            <h:outputText value="${resource.First}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage-1}"/>
+			                            <h:outputText value="&#60; ${resource.Previous}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationLeft}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <li class="currentpage">
+			                ${viewSearch.pageNavigator.currentPage+1}
+			            </li>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationRight}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq (viewSearch.pageNavigator.totalPages-1) }">
+			                    <li class="disablepage">
+			                        ${resource.Next} &#62;
+			                    </li>
+			                    <li class="disablepage">
+			                        ${resource.Last}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage+1}"/>
+			                            <h:outputText value="${resource.Next} &#62;"/>
+			                        </h:outputLink>
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.totalPages-1}"/>
+			                            <h:outputText value="${resource.Last}"/>
+			                        </h:outputLink>
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			        </ul>
+			    </div>
+			    </c:if>
+
+	            <h:form>
+			        <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
+
+				        <tr class="header">
+				            <td class="forumheaderfirst">${resource.Author}</td>
+				            <td class="forumheaderopen">${resource.Message}</td>
+				        </tr>
+			        
+				        <c:forEach items="#{viewSearch.posts}" var="postrow" varStatus="status">
+				        <tr class="oddRow">
+				            <td class="forumpostleftcolumn">
+				                <c:choose>
+				                    
+				                    <c:when test="#{category.anonymous}">
+				                        ${postrow.poster.user.userName}
+				                    </c:when>
+				                    
+				                    <c:otherwise>
+				                        <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}">
+				                            <f:param name="uid" value="${postrow.poster.user.id}"/>
+				                            <h:outputText value="${postrow.poster.user.userName}"/>
+				                        </h:outputLink>
+				                    </c:otherwise>
+				                    
+				                </c:choose>
+				            </td>
+				            <td class="forumpostspacer">
+				            
+				                <a name="${postrow.id}" />
+				                
+				                <div class="forumpostinfo">
+				                    <ul>
+				                        <li>
+				                            <a name="${postrow.id}" />
+				                            <h:outputLink value="#{forums:postPermlink(postrow.id)}" style="text-decoration: none;">
+				                                <f:verbatim>
+				                                    <h:outputText value="${resource.Permalink}"/>
+				                                </f:verbatim>
+				                            </h:outputLink>
+				                        </li>
+				                        <li>${resource.Posted}:&#160;#{forums:dateStr(postrow.createDate)}</li>
+				                        <li>${resource.Post_subject}:&#160;${postrow.message.subject}</li>
+				                    </ul>
+				                </div>
+				            </td>
+				        </tr>
+				        <tr>
+				            <td class="forumpostleftcolumn">&#160;</td>
+				            <td class="forumpostcontent">
+				
+				                <p>
+				                    <h:outputText value="#{forums:formatMessage(postrow.message.text,false)}" escape="false" />
+				                    <br /><br />
+				                    ${forums:userProperty(postrow.poster.user,'INFO_USER_SIGNATURE')}
+				                </p>
+				
+				                <!-- show the attachments of this post here -->
+				                <p>
+				                    <c:if test="#{postrow.attachments!=null}">
+				                        <ui:include src="/views/topics/attachmentsview.xhtml">
+				                            <ui:param name="attachments" value="#{postrow.attachments}"/>
+				                        </ui:include>
+				                    </c:if>
+				                </p>
+				
+				                <c:if test="${postrow.editCount gt 0}">
+				                <p>
+				                    <em>
+				                        <c:choose>
+				                            <c:when test="${postrow.editCount eq 1}">
+				                                <h:outputFormat value="#{resource.Edited_time_total}">
+				                                    <f:param value="${postrow.poster.user.userName}"/>
+				                                    <f:param value="${postrow.editDate}"/>
+				                                    <f:param value="${postrow.editCount}"/>
+				                                </h:outputFormat>
+				                            </c:when>
+				                            <c:otherwise>
+				                                <h:outputFormat value="#{resource.Edited_times_total}">
+				                                    <f:param value="${postrow.poster.user.userName}"/>
+				                                    <f:param value="${postrow.editDate}"/>
+				                                    <f:param value="${postrow.editCount}"/>
+				                                </h:outputFormat>
+				                            </c:otherwise>
+				                        </c:choose>
+				                    </em>
+				                </p>
+				                </c:if>
+				                
+				            </td>
+				        </tr>
+				        <tr>
+				            <td class="forumpostleftcolumn">
+				                <a href="#top">${resource.Back_to_top}</a>
+				            </td>
+				            <td class="forumthreaduserinfo">
+				                <ul>
+				                    <li>
+				                        <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}">
+				                            <f:param name="uid"
+				                                     value="#{postrow.poster.user.id}"/>
+				                            <f:verbatim>
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconProfileURL')}"
+				                                     alt="${resource.Read_profile}"/>
+				                            </f:verbatim>
+				                        </h:outputLink>
+				                    </li>
+				                    				                    
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_EMAIL_FAKE') ne null}">
+				                        <li>
+				                            <a href="mailto:${forums:userProperty(postrow.poster.user,'INFO_USER_EMAIL_FAKE')}">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconEmailURL')}"
+				                                     alt="${resource.Send_email}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_HOMEPAGE') ne null}">
+				                        <li>
+				                            <a href="${forums:userProperty(postrow.poster.user,'INFO_USER_HOMEPAGE')}">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconWWWURL')}"
+				                                     alt="${resource.Visit_website}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_IM_AIM') ne null}">
+				                        <li>
+				                            <a href="aim:goim?screenname=#{forums:userProperty(postrow.poster.user,'INFO_USER_IM_AIM')}&amp;message=Hello+Are+you+there?">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconAIMURL')}"
+				                                     alt="${resource.AIM}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_IM_YIM') ne null}">
+				                        <li>
+				                            <a href="http://edit.yahoo.com/config/send_webmesg?.target=#{forums:userProperty(postrow.poster.user,'INFO_USER_IM_YIM')}&amp;.src=pg">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconYIMURL')}"
+				                                     alt="${resource.YIM}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_IM_SKYPE') ne null}">
+				                        <li>
+				                            <!-- TODO: some more functionality may be added. Like automatic skype instalation and status checker.-->
+				                            <a href="skype:#{forums:userProperty(postrow.poster.user,'INFO_USER_IM_SKYPE')}?add">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconSkypeURL')}"
+				                                     alt="${resource.L_SKYPE}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_IM_MSNM') ne null}">
+				                        <li>
+				                            <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}">
+				                                <f:param name="uid"
+				                                         value="#{postrow.poster.user.id}"/>
+				                                <f:verbatim>
+				                                    <img border="0"
+				                                         src="#{forums:themeURL('resourceIconMSNMURL')}"
+				                                         alt="${resource.Read_profile}"/>
+				                                </f:verbatim>
+				                            </h:outputLink>
+				                         </li>
+				                    </c:if>
+				                    <c:if test="${forums:userProperty(postrow.poster.user,'INFO_USER_IM_ICQ') ne null}">
+				                        <li>
+				                            <a href="http://www.icq.com/scripts/search.dll?to=#{forums:userProperty(postrow.poster.user,'INFO_USER_IM_ICQ')}">
+				                                <img border="0"
+				                                     src="#{forums:themeURL('resourceIconICQURL')}"
+				                                     alt="${resource.ICQ}"/>
+				                            </a>
+				                        </li>
+				                    </c:if>
+				                    
+				                </ul>
+				            </td>
+				        </tr> 
+				        <tr>
+				            <td colspan="2" class="forumthreadfooter">
+				                <img src="#{forums:themeURL('resourceSpacerURL')}" />
+				            </td>
+				        </tr>
+				        </c:forEach>
+			
+			        </table>
+	            </h:form>
+
+			    <!-- PAGINATION -->
+			    <c:if test="#{viewSearch.pageNavigator.totalPages gt 1}">
+			    <div class="forumpagination">
+			        <ul>
+			            <li class="disablepage">
+			                <h:outputFormat value="#{resource.PageNumber}">
+			                    <f:param value="${viewSearch.pageNavigator.pageNumber}"/>
+			                    <f:param value="${viewSearch.pageNavigator.totalPages}"/>
+			                </h:outputFormat>
+			            </li>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq 0}">
+			                    <li class="disablepage">
+			                        ${resource.First}
+			                    </li>
+			                    <li class="disablepage">
+			                        &#60; ${resource.Previous}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="0"/>
+			                            <h:outputText value="${resource.First}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage-1}"/>
+			                            <h:outputText value="&#60; ${resource.Previous}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationLeft}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <li class="currentpage">
+			                ${viewSearch.pageNavigator.currentPage+1}
+			            </li>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationRight}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq (viewSearch.pageNavigator.totalPages-1) }">
+			                    <li class="disablepage">
+			                        ${resource.Next} &#62;
+			                    </li>
+			                    <li class="disablepage">
+			                        ${resource.Last}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage+1}"/>
+			                            <h:outputText value="${resource.Next} &#62;"/>
+			                        </h:outputLink>
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.totalPages-1}"/>
+			                            <h:outputText value="${resource.Last}"/>
+			                        </h:outputLink>
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			        </ul>
+			    </div>
+			    </c:if>
+	
+            </c:when>
+	
+		    <c:otherwise>
+		        <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
+		            <tr>
+		                <td>
+		                    <table width="100%" cellspacing="0" cellpadding="1" border="0">
+		                        <tr>
+		                            <td>&#160;</td>
+		                        </tr>
+		                        <tr>
+		                            <td align="center">
+		                                ${resource.Search_posts_not_found}
+		                            </td>
+		                        </tr>
+		                        <tr>
+		                            <td>&#160;</td>
+		                        </tr>
+		                    </table>
+		                </td>
+		            </tr>
+		        </table>
+		    </c:otherwise>
+        </c:choose>
+
+</div>

Added: labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_astopics.xhtml
===================================================================
--- labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_astopics.xhtml	                        (rev 0)
+++ labs/jbossforums/branches/forums120P26/forums/src/resources/portal-forums-war/views/search/view_astopics.xhtml	2008-05-05 11:47:19 UTC (rev 19857)
@@ -0,0 +1,365 @@
+<!--
+/******************************************************************************
+ * JBoss, a division of Red Hat                                               *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual                    *
+ * contributors as indicated by the @authors tag. See the                     *
+ * copyright.txt in the distribution for a full listing of                    *
+ * individual contributors.                                                   *
+ *                                                                            *
+ * This is free software; you can redistribute it and/or modify it            *
+ * under the terms of the GNU Lesser General Public License as                *
+ * published by the Free Software Foundation; either version 2.1 of           *
+ * the License, or (at your option) any later version.                        *
+ *                                                                            *
+ * This software is distributed in the hope that it will be useful,           *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU           *
+ * Lesser General Public License for more details.                            *
+ *                                                                            *
+ * You should have received a copy of the GNU Lesser General Public           *
+ * License along with this software; if not, write to the Free                *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA         *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.                   *
+ ******************************************************************************/
+-->
+
+<div  xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:ui="http://java.sun.com/jsf/facelets"
+      xmlns:c="http://java.sun.com/jstl/core"
+      xmlns:h="http://java.sun.com/jsf/html"
+      xmlns:f="http://java.sun.com/jsf/core"
+      xmlns:forums="http://www.jboss.com/products/jbossportal/forums"
+      class="forumscontainer">
+
+        <c:choose>
+    
+            <c:when test="#{viewSearch.initialized &amp;&amp; viewSearch.topics != null}">
+
+                <a name="top" />
+
+                <div class="forumtitletext">
+                    <h4>
+                        <h:outputFormat value="#{resource.Search_found}">
+                            <f:param value="#{viewSearch.pageNavigator.numberOfEntries}" />
+                        </h:outputFormat>
+                    </h4>
+                </div>
+	    
+			    <!-- PAGINATION -->
+			    <c:if test="#{viewSearch.pageNavigator.totalPages gt 1}">
+			    <div class="forumpagination">
+			        <ul>
+			            <li class="disablepage">
+			                <h:outputFormat value="#{resource.PageNumber}">
+			                    <f:param value="${viewSearch.pageNavigator.pageNumber}"/>
+			                    <f:param value="${viewSearch.pageNavigator.totalPages}"/>
+			                </h:outputFormat>
+			            </li>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq 0}">
+			                    <li class="disablepage">
+			                        ${resource.First}
+			                    </li>
+			                    <li class="disablepage">
+			                        &#60; ${resource.Previous}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="0"/>
+			                            <h:outputText value="${resource.First}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage-1}"/>
+			                            <h:outputText value="&#60; ${resource.Previous}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationLeft}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <li class="currentpage">
+			                ${viewSearch.pageNavigator.currentPage+1}
+			            </li>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationRight}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq (viewSearch.pageNavigator.totalPages-1) }">
+			                    <li class="disablepage">
+			                        ${resource.Next} &#62;
+			                    </li>
+			                    <li class="disablepage">
+			                        ${resource.Last}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage+1}"/>
+			                            <h:outputText value="${resource.Next} &#62;"/>
+			                        </h:outputLink>
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.totalPages-1}"/>
+			                            <h:outputText value="${resource.Last}"/>
+			                        </h:outputLink>
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			        </ul>
+			    </div>
+			    </c:if>
+
+	            <h:form>
+			        <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
+
+				        <tr class="header">
+				            <td class="forumheaderfirst" colspan="2">${resource.Topics}</td>
+				            <td class="forumheadercentered">${resource.Replies}</td>
+				            <td class="forumheadercentered">${resource.Views}</td>
+				            <td class="forumheaderlast">${resource.Last_Post}</td>
+				        </tr>
+        
+                        <c:forEach items="#{viewSearch.topics}" var="topicrow" varStatus="status" >
+                            <tr class='${(status.index%2==0)?"evenRow":"oddRow"}'>
+				                
+				                <td class="forumlisticon">
+				                    <img src="#{forums:folderTypeURL(topicrow,forum.anonymous)}" 
+				                         width="11" height="14"
+				                         alt="${resource.Topic_Moved}" title="${resource.Topic_Moved}"/>
+				                </td>
+
+				                <td>
+				                    <h3>
+				                        <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}">
+				                            <f:param name="t" value="${topicrow.id}"/>
+				                            <h:outputText value="${topicrow.subject}"/>                   
+				                        </h:outputLink>
+				                    </h3>
+				                    
+				                    <!-- mini post navigator for this topic -->
+				                    <c:if test="#{forum.topicNavigator[topicrow.id] ne null &amp;&amp; forum.topicNavigator[topicrow.id].totalPages gt 1}">
+				                        &#160;(&#160;
+				                        <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}">
+				                            <f:param name="t" value="#{topicrow.id}"/>
+				                            <f:param name="page" value="0"/>
+				                            <h:outputText value="${1}"/>
+				                        </h:outputLink>
+				                        &#160;
+				                        <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}">
+				                            <f:param name="t" value="#{topicrow.id}"/>
+				                            <f:param name="page" value="1"/>
+				                            <h:outputText value="${2}"/>
+				                        </h:outputLink>
+				                        <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
+				                            &#160;
+				                            <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}">
+				                                <f:param name="t" value="#{topicrow.id}"/>
+				                                <f:param name="page" value="2"/>
+				                                <h:outputText value="${3}"/>
+				                            </h:outputLink>
+				                        </c:if>
+				                        <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">                        
+				                            &#160;&#8230;&#160;
+				                            <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}">
+				                                <f:param name="t" value="#{topicrow.id}"/>
+				                                <f:param name="page" value="#{forum.topicNavigator[topicrow.id].totalPages-1}"/>
+				                                <h:outputText value="${resource.Last_page}"/>
+				                            </h:outputLink>
+				                        </c:if>
+				                        &#160;)
+				                    </c:if>
+				                    <br />
+				                    ${resource.By}&#160;
+				                    <c:choose>
+				                        
+				                        <c:when test="#{forum.anonymous}">
+				                            ${topicrow.poster.user.userName}
+				                        </c:when>
+				                       
+				                        <c:otherwise>
+				                            <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}">
+				                                <f:param name="uid" value="${topicrow.poster.user.id}"/>
+				                                <h:outputText value="${topicrow.poster.user.userName}"/>
+				                            </h:outputLink>
+				                        </c:otherwise>
+				                                    
+				                    </c:choose>
+				                        
+				                </td>
+				                
+			                    <td class="forumlistcentered">${topicrow.replies}</td>
+			                    <td class="forumlistcentered">${topicrow.viewCount}</td>
+			                    <td class="forumlistlast">
+				                    <a href="#{forums:postPermlink(viewSearch.topicLastPosts[topicrow.id].id)}">
+				                        <c:choose>
+				                        
+				                            <c:when test="#{forums:isLongerThan(viewSearch.topicLastPosts[topicrow.id].message.subject,25)}">
+				                                #{forums:subString(viewSearch.topicLastPosts[topicrow.id].message.subject,25)}&#8230;
+				                            </c:when>
+				                            
+				                            <c:otherwise>
+				                                #{viewSearch.topicLastPosts[topicrow.id].message.subject}
+				                            </c:otherwise>
+				                            
+				                        </c:choose>
+				                    </a>
+				                    <br />
+				                    ${resource.By} 
+				                    <c:choose>
+				                    
+				                        <c:when test="#{category.anonymous}">
+				                            ${viewSearch.topicLastPosts[topicrow.id].poster.user.userName}
+				                        </c:when>
+				                                    
+				                        <c:otherwise>
+				                            <h:outputLink value="#{forums:outputLink(shared.links['profile'],true)}">
+				                                <f:param name="uid" value="#{viewSearch.topicLastPosts[topicrow.id].poster.user.id}"/>
+				                                <h:outputText value="${viewSearch.topicLastPosts[topicrow.id].poster.user.userName}"/>
+				                            </h:outputLink>
+				                        </c:otherwise>
+				                                    
+				                    </c:choose>
+				                    <br />
+				                    #{viewSearch.topicLastPosts[topicrow.id].createDate}
+                                </td>
+			                </tr>
+
+                        </c:forEach>
+			
+			        </table>
+	            </h:form>
+
+			    <!-- PAGINATION -->
+			    <c:if test="#{viewSearch.pageNavigator.totalPages gt 1}">
+			    <div class="forumpagination">
+			        <ul>
+			            <li class="disablepage">
+			                <h:outputFormat value="#{resource.PageNumber}">
+			                    <f:param value="${viewSearch.pageNavigator.pageNumber}"/>
+			                    <f:param value="${viewSearch.pageNavigator.totalPages}"/>
+			                </h:outputFormat>
+			            </li>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq 0}">
+			                    <li class="disablepage">
+			                        ${resource.First}
+			                    </li>
+			                    <li class="disablepage">
+			                        &#60; ${resource.Previous}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="0"/>
+			                            <h:outputText value="${resource.First}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage-1}"/>
+			                            <h:outputText value="&#60; ${resource.Previous}"/>
+			                        </h:outputLink>    
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationLeft}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <li class="currentpage">
+			                ${viewSearch.pageNavigator.currentPage+1}
+			            </li>
+			            
+			            <c:forEach items="#{viewSearch.pageNavigator.currentPaginationRight}" var="pageNumber">
+			                <li>
+			                    <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                        <f:param name="page" value="${pageNumber-1}"/>
+			                        <h:outputText value="${pageNumber}"/>
+			                    </h:outputLink>  
+			                </li>
+			            </c:forEach>
+			            
+			            <c:choose>
+			                <c:when test="#{viewSearch.pageNavigator.currentPage eq (viewSearch.pageNavigator.totalPages-1) }">
+			                    <li class="disablepage">
+			                        ${resource.Next} &#62;
+			                    </li>
+			                    <li class="disablepage">
+			                        ${resource.Last}
+			                    </li>
+			                </c:when>
+			                <c:otherwise>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.currentPage+1}"/>
+			                            <h:outputText value="${resource.Next} &#62;"/>
+			                        </h:outputLink>
+			                    </li>
+			                    <li>
+			                        <h:outputLink value="#{forums:outputLink(shared.links['searchResults'],true)}">
+			                            <f:param name="page" value="${viewSearch.pageNavigator.totalPages-1}"/>
+			                            <h:outputText value="${resource.Last}"/>
+			                        </h:outputLink>
+			                    </li>
+			                </c:otherwise>
+			            </c:choose>
+			        </ul>
+			    </div>
+			    </c:if>
+	
+            </c:when>
+	
+		    <c:otherwise>
+		        <table width="100%"  border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
+		            <tr>
+		                <td>
+		                    <table width="100%" cellspacing="0" cellpadding="1" border="0">
+		                        <tr>
+		                            <td>&#160;</td>
+		                        </tr>
+		                        <tr>
+		                            <td align="center">
+		                                ${resource.Search_topics_not_found}
+		                            </td>
+		                        </tr>
+		                        <tr>
+		                            <td>&#160;</td>
+		                        </tr>
+		                    </table>
+		                </td>
+		            </tr>
+		        </table>
+		    </c:otherwise>
+        </c:choose>
+
+</div>




More information about the jboss-svn-commits mailing list