From: <jbo...@li...> - 2006-05-16 05:22:39
|
Author: soh...@jb... Date: 2006-05-16 01:22:22 -0400 (Tue, 16 May 2006) New Revision: 4240 Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml Log: 1) http://jira.jboss.com/jira/browse/JBFORUMS-42 - ViewTopic usecase 2) Some preference handling related code cleanup Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/BaseController.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -105,5 +105,8 @@ BaseController.singleton = (ForumsModule)new InitialContext().lookup("java:portal/ForumsModule"); } return BaseController.singleton; - } + } + + //user preferences------------------------------------------------------------------------------------------------------------------------- + } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/Constants.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -76,12 +76,16 @@ * DOCUMENT_ME */ public static final int FORUM_LOCKED = 1; - - + /** - * DOCUMENT_ME - */ - public static final int TOPIC_LOCKED = 1; + * DOCUMENT_ME + */ + int TOPIC_UNLOCKED = 0; + + /** + * DOCUMENT_ME + */ + int TOPIC_LOCKED = 1; /** Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/JSFUtil.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -107,7 +107,8 @@ if(component!=null) { - value = (String)component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()); + Object o = component.getValueBinding("value").getValue(FacesContext.getCurrentInstance()); + value = (String)o; } @@ -173,5 +174,5 @@ } return errorMsg; - } + } } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ReplyTopic.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -135,6 +135,20 @@ } return navState; } + + /** + * + * + */ + public String startInstantReplyPreview() + { + String navState = null; + String message = this.getMessage(); + navState = this.start(); + this.setMessage(message); + this.preview(); + return navState; + } //--------execute------------------------------------------------------------------------------------------------------------- /** * @@ -200,5 +214,20 @@ } } return navState; - } + } + + /** + * + * + */ + public String executeInstantReply() + { + String navState = null; + String message = this.getMessage(); + this.start(); + this.setMessage(message); + this.execute(); + navState = "instantReply"; + return navState; + } } Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/PageNavigator.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -21,6 +21,7 @@ */ package org.jboss.portlet.forums.ui.view; +import java.io.Serializable; import java.util.Collection; import java.util.ArrayList; @@ -29,7 +30,7 @@ * * @author <a href="mailto:soh...@jb...">Sohil Shah</a> */ -public class PageNavigator +public class PageNavigator implements Serializable { /** * @@ -182,6 +183,22 @@ * * */ + public int getPageAfterAdd() + { + int pageAfterAdd = 0; + + double totalDbl = this.entries.length+1; + double pageSizeDbl = this.pageSize; + double pageCountDbl = totalDbl/pageSizeDbl; + pageAfterAdd = ((int)Math.ceil(pageCountDbl))-1; + + return pageAfterAdd; + } + + /** + * + * + */ public void setCurrentPage(int currentPage) { this.currentPage = currentPage; Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewForum.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -25,6 +25,8 @@ import java.util.Iterator; import java.util.ArrayList; import java.util.List; +import java.util.Map; +import java.util.HashMap; import org.jboss.portlet.forums.model.Forum; import org.jboss.portlet.forums.model.Topic; @@ -47,59 +49,51 @@ private int topicsPerForum = 0; //feed in the topicsPerForum value as a managed property private String topicsPerForumKey = null; //feed in the topicsPerForum preference key as managed property + //managed bean reference injection + private ViewTopic topicBean = null; //used to extract the posts per topic user preference for now + //business data being generated in this bean by executing ui actions //this is data is created such that it can be consumed by the view components //like facelets private Forum forum = null; private PageNavigator pageNavigator = null; private Collection page = new ArrayList(); - - //----------------bean configuration supplied by the forums-config.xml--------------------------------------------------------------------------------------------- + private Map topicNavigator = new HashMap(); + + //----------------business data being generated for use by the view components like facelets--------------------------------------------------------------------------------------- /** - * @return Returns the topicsPerForum. + * */ - public int getTopicsPerForum() + public Forum getForum() { - return topicsPerForum; - } + return this.forum; + } + /** - * @param topicsPerForum The topicsPerForum to set. + * + * */ - public void setTopicsPerForum(int topicsPerForum) + public void setTopicBean(ViewTopic topicBean) { - this.topicsPerForum = topicsPerForum; + this.topicBean = topicBean; } - + + //page navigation related methods on this bean-------------------------------------------------------------------------------------------- /** - * @return Returns the topicsPerForumKey. + * */ - public String getTopicsPerForumKey() + public PageNavigator getPageNavigator() { - return topicsPerForumKey; + return this.pageNavigator; } - /** - * @param topicsPerForumKey The topicsPerForumKey to set. - */ - public void setTopicsPerForumKey(String topicsPerForumKey) - { - this.topicsPerForumKey = topicsPerForumKey; - } - //----------------business data being generated for use by the view components like facelets--------------------------------------------------------------------------------------- - /** - * - */ - public Forum getForum() - { - return this.forum; - } - //page navigation related methods on this bean-------------------------------------------------------------------------------------------- /** * + * */ - public PageNavigator getPageNavigator() + public Map getTopicNavigator() { - return this.pageNavigator; + return this.topicNavigator; } //-------------------------------------------------------------------------------------------- /** @@ -221,7 +215,48 @@ return present; } //------------user preferences------------------------------------------------------------------------------------------------------------- - + /** + * @return Returns the topicsPerForum. + */ + public int getTopicsPerForum() + { + return topicsPerForum; + } + /** + * @param topicsPerForum The topicsPerForum to set. + */ + public void setTopicsPerForum(int topicsPerForum) + { + this.topicsPerForum = topicsPerForum; + + //get the user's preferred pageSize for viewing a forum and its list of topics, + //instead of using the default page size + String userPreference = PortalUtil.getPreference(this.topicsPerForumKey); + if(userPreference!=null && userPreference.trim().length()>0) + { + int cour = 0; + try{cour = Integer.parseInt(userPreference);}catch(NumberFormatException nfe){} + if(cour>0) + { + this.topicsPerForum = cour; //here override the default page size with the user's preference + } + } + } + + /** + * @return Returns the topicsPerForumKey. + */ + public String getTopicsPerForumKey() + { + return topicsPerForumKey; + } + /** + * @param topicsPerForumKey The topicsPerForumKey to set. + */ + public void setTopicsPerForumKey(String topicsPerForumKey) + { + this.topicsPerForumKey = topicsPerForumKey; + } //------------------------------------------------------------------------------------------------------------------------------------- /** * @@ -287,28 +322,11 @@ } topicObjects = topics.toArray(); } - - - //calculate the pageSize of this forum listing of topics - int pageSize = this.topicsPerForum; //default page size - - //get the user's preferred pageSize for viewing a forum and its list of topics, - //instead of using the default page size - String topicsPerForum = PortalUtil.getPreference(this.topicsPerForumKey); - if(topicsPerForum!=null && topicsPerForum.trim().length()>0) - { - int cour = 0; - try{cour = Integer.parseInt(topicsPerForum);}catch(NumberFormatException nfe){} - if(cour>0) - { - pageSize = cour; //here override the default page size with the user's preference - } - } - + //setup the pageNavigator for this forum this.pageNavigator = new PageNavigator( topicObjects, //total number of entries to be split up into pages - pageSize, + this.topicsPerForum, 0 //currently selected page being displayed, first page by default ); @@ -319,6 +337,21 @@ } this.page = this.pageNavigator.getPage(); + + //setup a pageNavigator for each topic being displayed on this page + for(Iterator itr=this.page.iterator();itr.hasNext();) + { + Topic cour = (Topic)itr.next(); + Collection posts = cour.getPosts(); + if(posts!=null && !posts.isEmpty()) + { + PageNavigator topicNav = new PageNavigator(posts.toArray(), + this.topicBean.getPostsPerTopic(), //this is user's posts per page preference + 0 //current page of the navigator + ); + this.topicNavigator.put(cour.getId(),topicNav); + } + } } } //------------------------------------------------------------------------------------------------------------------------------------- Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewSummary.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -46,6 +46,10 @@ private int summaryTopicLimit = 0; private int summaryTopicDays = 0; private int summaryTopicReplies = 0; + private String summaryModeKey = null; + private String summaryTopicLimitKey = null; + private String summaryTopicDaysKey = null; + private String summaryTopicRepliesKey = null; //business data being generated in this bean by executing ui actions //this is data is created such that it can be consumed by the view components @@ -88,7 +92,7 @@ this.summaryMode = summaryMode; //overwrite the default value with the user's preference - String storedSummaryMode = PortalUtil.getPreference("summarymode"); + String storedSummaryMode = PortalUtil.getPreference(this.summaryModeKey); if(storedSummaryMode!=null && storedSummaryMode.trim().length()>0) { this.summaryMode = Integer.parseInt(storedSummaryMode); @@ -104,7 +108,7 @@ this.summaryTopicLimit = summaryTopicLimit; //overwrite the default value with the user's preference - String storedSummaryTopicLimit = PortalUtil.getPreference("summarytopiclimit"); + String storedSummaryTopicLimit = PortalUtil.getPreference(this.summaryTopicLimitKey); if(storedSummaryTopicLimit!=null && storedSummaryTopicLimit.trim().length()>0) { this.summaryTopicLimit = Integer.parseInt(storedSummaryTopicLimit); @@ -120,7 +124,7 @@ this.summaryTopicDays = summaryTopicDays; //overwrite the default value with the user's preference - String storedSummaryTopicDays = PortalUtil.getPreference("summarytopicdays"); + String storedSummaryTopicDays = PortalUtil.getPreference(this.summaryTopicDaysKey); if(storedSummaryTopicDays!=null && storedSummaryTopicDays.trim().length()>0) { this.summaryTopicDays = Integer.parseInt(storedSummaryTopicDays); @@ -136,12 +140,70 @@ this.summaryTopicReplies = summaryTopicReplies; //overwrite the default value with the user's preference - String storedSummaryTopicReplies = PortalUtil.getPreference("summarytopicreplies"); + String storedSummaryTopicReplies = PortalUtil.getPreference(this.summaryTopicRepliesKey); if(storedSummaryTopicReplies!=null && storedSummaryTopicReplies.trim().length()>0) { this.summaryTopicReplies = Integer.parseInt(storedSummaryTopicReplies); } } + + + /** + * @return Returns the summaryModeKey. + */ + public String getSummaryModeKey() + { + return summaryModeKey; + } + /** + * @param summaryModeKey The summaryModeKey to set. + */ + public void setSummaryModeKey(String summaryModeKey) + { + this.summaryModeKey = summaryModeKey; + } + /** + * @return Returns the summaryTopicDaysKey. + */ + public String getSummaryTopicDaysKey() + { + return summaryTopicDaysKey; + } + /** + * @param summaryTopicDaysKey The summaryTopicDaysKey to set. + */ + public void setSummaryTopicDaysKey(String summaryTopicDaysKey) + { + this.summaryTopicDaysKey = summaryTopicDaysKey; + } + /** + * @return Returns the summaryTopicLimitKey. + */ + public String getSummaryTopicLimitKey() + { + return summaryTopicLimitKey; + } + /** + * @param summaryTopicLimitKey The summaryTopicLimitKey to set. + */ + public void setSummaryTopicLimitKey(String summaryTopicLimitKey) + { + this.summaryTopicLimitKey = summaryTopicLimitKey; + } + /** + * @return Returns the summaryTopicRepliesKey. + */ + public String getSummaryTopicRepliesKey() + { + return summaryTopicRepliesKey; + } + /** + * @param summaryTopicRepliesKey The summaryTopicRepliesKey to set. + */ + public void setSummaryTopicRepliesKey(String summaryTopicRepliesKey) + { + this.summaryTopicRepliesKey = summaryTopicRepliesKey; + } //------------------------------------------------------------------------------------------------------------------------------------- /** * Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java =================================================================== --- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/view/ViewTopic.java 2006-05-16 05:22:22 UTC (rev 4240) @@ -22,6 +22,7 @@ package org.jboss.portlet.forums.ui.view; +import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -31,48 +32,52 @@ import org.jboss.portlet.forums.ui.Constants; import org.jboss.portlet.forums.ui.ForumUtil; import org.jboss.portlet.forums.ui.JSFUtil; +import org.jboss.portlet.forums.ui.PortalUtil; /** * @author <a href="mailto:rys...@jb...">Ryszard Kozmik</a> + * @author <a href="mailto:soh...@jb...">Sohil Shah</a> */ public class ViewTopic extends BaseController { - - private Topic topic; - private boolean rowClass; - - // This is value of selectItem describing time constraint for displayed posts - private long postDays=0L; - - public Topic getTopic () - { - return this.topic; - } - - - public String getPagination() - { - /** - * TODO: implement real code to get the pagination... - */ - //stub code - return "10"; - } - public String getPageNumber() - { - /** - * TODO: implement real code to get the pageNumber... - */ - //stub code - return "2"; - } - + /** + * user preference related data + */ + private String postsPerTopicKey = null; + private int postsPerTopic = 0; + + /** + * + */ + private Topic topic; + private boolean rowClass; + private long postDays=0L; // This is value of selectItem describing time constraint for displayed posts + private PageNavigator pageNavigator = null; + private Collection page = new ArrayList(); + + /** + * + * + */ + public Topic getTopic () + { + return this.topic; + } + + /** + * + * + */ public void setPostDays(long postDays) { this.postDays = postDays; } + /** + * + * + */ public long getPostDays() { return postDays; @@ -114,48 +119,140 @@ } return isBallotView; + } + // page navigation related methods on this bean-------------------------------------------------------------------------------------------- + /** + * + */ + public PageNavigator getPageNavigator() + { + return this.pageNavigator; } + + /** + * + * + */ + public Collection getPage() + { + return this.page; + } //------------user preferences------------------------------------------------------------------------------------------------------------- - + /** + * @return Returns the postsPerTopicKey. + */ + public String getPostsPerTopicKey() + { + return postsPerTopicKey; + } + /** + * @param postsPerTopicKey The postsPerTopicKey to set. + */ + public void setPostsPerTopicKey(String postsPerTopicKey) + { + this.postsPerTopicKey = postsPerTopicKey; + } + + /** + * @return Returns the postsPerTopic. + */ + public int getPostsPerTopic() + { + return postsPerTopic; + } + /** + * @param postsPerTopic The postsPerTopic to set. + */ + public void setPostsPerTopic(int postsPerTopic) + { + this.postsPerTopic = postsPerTopic; + + //override this with the preference specified by the user...if + //nothing is found, use a default value + String userPreference = PortalUtil.getPreference(this.postsPerTopicKey); + if(userPreference!=null && userPreference.trim().length()>0) + { + int cour = -1; + try{cour = Integer.parseInt(userPreference);}catch(NumberFormatException nfe){} + if(cour!=-1) + { + this.postsPerTopic = cour; + } + } + } //------------------------------------------------------------------------------------------------------------------------------------- /** * @author Ryszard Kozmik */ - public ViewTopic () { - super(); - try - { - this.execute(); - } - catch(Exception e) - { - JSFUtil.handleException(e); - } + public ViewTopic () + { + super(); } - - - - - //ui actions supported by this bean---------------------------------------------------------------------------------------------------- + + //ui actions supported by this bean---------------------------------------------------------------------------------------------------- /** + * + */ + public boolean isInitialized() + { + boolean initialized = false; + try + { + this.execute(); + initialized = true; + } + catch(Exception e) + { + JSFUtil.handleException(e); + } + return initialized; + } + /** * This method gets topicId from parameters and tries to find topic with that id. */ private void execute() throws Exception { - int topicId = -1; - String t = ForumUtil.getParameter(Constants.p_topicId); - if(t!=null && t.trim().length()>0) - { - topicId = Integer.parseInt(t); - } - if(topicId!=-1) - { - // start with a stub implementation - this.topic = BaseController.getForumsModule().findTopicById(new Integer(topicId)); - } + //parse input data + int topicId = -1; + String t = ForumUtil.getParameter(Constants.p_topicId); + String page = ForumUtil.getParameter(Constants.p_page); + if(t!=null && t.trim().length()>0) + { + topicId = Integer.parseInt(t); + } + + //process the topic information + if(topicId!=-1) + { + this.topic = BaseController.getForumsModule().findTopicById(new Integer(topicId)); + Collection posts = this.topic.getPosts(); + + if(posts!=null && posts.size()>0) + { + int currentPage = 0; + if(page!=null && page.trim().length()>0) + { + //setup the page data + currentPage = Integer.parseInt(page); + } + + //setup the pageNavigator + this.pageNavigator = new PageNavigator( + posts.toArray(), //total number of entries to be split up into pages + this.postsPerTopic, + currentPage //currently selected page being displayed, first page by default + ); + + + + this.page = this.pageNavigator.getPage(); + } + } } + + //implement this functionality later in 1.1.0 release of forums------------------------------------------------------------------------------------------------------------------------------------------------- /** * This method is for changing the displayed amount of posts in topic. User may * want to see posts from 1 Day, 7 Days, 2 Weeks etc. Additionaly user may @@ -166,6 +263,5 @@ public String topicsConstraint () { - } - */ + }*/ } Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-05-16 05:22:22 UTC (rev 4240) @@ -2,18 +2,18 @@ <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.0//EN" - "http://java.sun.com/dtd/web-facesconfig_1_0.dtd" > + "http://java.sun.com/dtd/web-facesconfig_1_0.dtd"> <faces-config> <!-- general application configuration --> <application> <!-- jbossportal-facelets integration --> - <property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver> - <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler> + <!--property-resolver>org.jboss.portal.faces.el.DelegatingPropertyResolver</property-resolver> + <view-handler>com.sun.facelets.FaceletPortletViewHandler</view-handler--> <!-- standalone facelets integration --> - <!--view-handler>com.sun.facelets.FaceletViewHandler</view-handler--> + <view-handler>com.sun.facelets.FaceletViewHandler</view-handler> <!-- internationalization --> <locale-config> @@ -79,21 +79,37 @@ <managed-bean-scope>request</managed-bean-scope> <!-- user preferences --> <managed-property> + <property-name>summaryModeKey</property-name> + <value>summarymode</value> + </managed-property> + <managed-property> + <property-name>summaryTopicLimitKey</property-name> + <value>summarytopiclimit</value> + </managed-property> + <managed-property> + <property-name>summaryTopicDaysKey</property-name> + <value>summarytopicdays</value> + </managed-property> + <managed-property> + <property-name>summaryTopicRepliesKey</property-name> + <value>summarytopicreplies</value> + </managed-property> + <managed-property> <property-name>summarymode</property-name> <value>0</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopiclimit</property-name> <value>6</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopicdays</property-name> <value>20</value> - </managed-property> + </managed-property> <managed-property> <property-name>summarytopicreplies</property-name> - <value>15</value> - </managed-property> + <value>15</value> + </managed-property> </managed-bean> <!-- configuration for ViewCategory --> @@ -112,11 +128,16 @@ <managed-property> <property-name>topicsPerForumKey</property-name> <value>topicsperforum</value> - </managed-property> - <managed-property> + </managed-property> + <managed-property> <property-name>topicsPerForum</property-name> <value>10</value> </managed-property> + <managed-property> + <property-name>topicBean</property-name> + <property-class>org.jboss.portlet.forums.ui.view.ViewTopic</property-class> + <value>#{topic}</value> + </managed-property> </managed-bean> <navigation-rule> <from-view-id>/views/forums/viewforum_body.xhtml</from-view-id> @@ -124,7 +145,42 @@ <from-outcome>startNewTopic</from-outcome> <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> </navigation-case> - </navigation-rule> + </navigation-rule> + + <!-- managedBean for the viewTopic usecase --> + <managed-bean> + <managed-bean-name>topic</managed-bean-name> + <managed-bean-class>org.jboss.portlet.forums.ui.view.ViewTopic</managed-bean-class> + <managed-bean-scope>request</managed-bean-scope> + <!-- user preferences related configuration --> + <managed-property> + <property-name>postsPerTopicKey</property-name> + <value>postspertopic</value> + </managed-property> + <managed-property> + <property-name>postsPerTopic</property-name> + <value>5</value> + </managed-property> + </managed-bean> + <navigation-rule> + <from-view-id>/views/topics/viewtopic_body.xhtml</from-view-id> + <navigation-case> + <from-outcome>startNewTopic</from-outcome> + <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>startReply</from-outcome> + <to-view-id>/views/topics/posting_reply_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>startEditPost</from-outcome> + <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> + </navigation-case> + <navigation-case> + <from-outcome>instantReply</from-outcome> + <to-view-id>/views/topics/viewtopic_body.xhtml</to-view-id> + </navigation-case> + </navigation-rule> <!-- configuration for NewTopic --> <managed-bean> @@ -232,29 +288,7 @@ <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> </navigation-case> </navigation-rule> - - <!-- managedBean for the viewTopic usecase --> - <managed-bean> - <managed-bean-name>topic</managed-bean-name> - <managed-bean-class>org.jboss.portlet.forums.ui.view.ViewTopic</managed-bean-class> - <managed-bean-scope>request</managed-bean-scope> - </managed-bean> - <navigation-rule> - <from-view-id>/views/topics/viewtopic_body.xhtml</from-view-id> - <navigation-case> - <from-outcome>startNewTopic</from-outcome> - <to-view-id>/views/topics/posting_new_body.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>startReply</from-outcome> - <to-view-id>/views/topics/posting_reply_body.xhtml</to-view-id> - </navigation-case> - <navigation-case> - <from-outcome>startEditPost</from-outcome> - <to-view-id>/views/topics/posting_edit_body.xhtml</to-view-id> - </navigation-case> - </navigation-rule> - + <!-- managedBean for the jumpbox usecase --> <managed-bean> <managed-bean-name>jumpbox</managed-bean-name> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/portlet.xml 2006-05-16 05:22:22 UTC (rev 4240) @@ -122,6 +122,10 @@ <name>topicsperforum</name> <value>10</value> </preference> + <preference> + <name>postspertopic</name> + <value>15</value> + </preference> <!-- not yet integrated with the JSF layer --> <preference> <name>notifyreply</name> @@ -137,12 +141,8 @@ <preference> <name>postorder</name> <value>ascending</value> - </preference> + </preference> <preference> - <name>postspertopic</name> - <value>15</value> - </preference> - <preference> <name>dateformat</name> <value>EEE MMM d, yyyy HH:mm aaa</value> </preference> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -35,8 +35,6 @@ <c:if test="#{forum.initialized && forum.forum!=null && forum.forum.id!=-1}"> - - <!-- title, newtopic, forum, and page navigation --> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> @@ -186,8 +184,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> @@ -268,8 +285,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> @@ -349,8 +385,27 @@ <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}" styleClass="topictitle"> <f:param name="t" value="${topicrow.id}"/> <h:outputText value="${topicrow.subject}"/> - </h:outputLink> - </span> + </h:outputLink> + </span> + <!-- mini post navigator for this topic --> + <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}"> + <span class="gensmall"> + <br/> + <img src="#{forums:themeURL('resourceIconMinipostURL')}" alt="Goto page" title="Goto page"/>Goto page: + [ + <c:forEach items="#{forum.topicNavigator[topicrow.id].pages}" var="page" varStatus="idx"> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topicrow.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + <c:if test="${idx.index-1 ne forum.topicNavigator[topicrow.id].totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + ] + </span> + </c:if> </td> <td class="row2" align="center" valign="middle"> <span class="postdetails"> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/posting_reply_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -290,7 +290,10 @@ <!--h:form id="post"--> <!-- keeps the forum where this topic is being created in context, this is a control parameter --> <input type="hidden" name="f" value="#{replyTopic.forumId}"/> - <input type="hidden" name="t" value="#{replyTopic.topicId}"/> + <input type="hidden" name="t" value="#{replyTopic.topicId}"/> + <c:if test="#{param['page'] ne null}"> + <input type="hidden" name="page" value="#{param['page']}"/> + </c:if> <!-- add Subject --> <tr> Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml =================================================================== --- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-05-16 04:34:09 UTC (rev 4239) +++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-05-16 05:22:22 UTC (rev 4240) @@ -31,8 +31,9 @@ <ui:composition template="/views/common/common.xhtml"> <ui:define name="mainContent"> - - <c:if test="#{topic.topic!=null && topic.topic.id!=-1}"> + + <c:choose> + <c:when test="#{topic.initialized && topic.topic!=null && topic.topic.id!=-1}"> <table width="100%" cellspacing="2" cellpadding="2" border="0"> <tr> <td align="left" valign="bottom" colspan="2"> @@ -42,11 +43,53 @@ <h:outputText value="#{topic.topic.subject}"/> </h:outputLink> </td> - <td align="right" valign="bottom" nowrap="nowrap"> - <span class="gensmall"> - <b>#{forum.pagination}</b> - </span> - </td> + <!-- page navigation --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <td align="right" valign="middle" nowrap="nowrap"> + <span class="gensmall"></span><br/> + <span class="nav"> + Goto page + <!-- previous link --> + <c:if test="#{topic.pageNavigator.pageNumber gt 1}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage-1}"/> + <h:outputText value="Previous"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + <!-- actual pages --> + <c:forEach items="#{topic.pageNavigator.pages}" var="page" varStatus="idx"> + <c:choose> + <c:when test="#{topic.pageNavigator.pageNumber==page}"> + <b>${page}</b> + </c:when> + <c:otherwise> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + </c:otherwise> + </c:choose> + <c:if test="${idx.index-1 ne topic.pageNavigator.totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + <!-- Next link --> + <c:if test="#{topic.pageNavigator.pageNumber lt topic.pageNavigator.totalPages}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage+1}"/> + <h:outputText value="Next"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + </span> + </td> + </c:if> </tr> <tr> <!-- insert the newTopic and replyTopic buttons here --> @@ -150,15 +193,7 @@ <!-- TODO: hook in the previous/next topic function --> <!--tr align="right"> <td class="catHead" colspan="2" height="28"><span class="nav"><a href="${n:out("U_VIEW_OLDER_TOPIC")}" class="nav">${n:i18n("View_previous_topic")}</a> :: <a href="${n:out("U_VIEW_NEWER_TOPIC")}" class="nav">${n:i18n("View_next_topic")}</a> </span></td> - </tr--> - <!-- TODO: POLL DISPLAY - <if ctx="poll_ballot_display"> - <include page="viewtopic_poll_ballot.jsp"/> - </if> - <if ctx="poll_result_display"> - <include page="viewtopic_poll_result.jsp"/> - </if> - --> + </tr--> <!-- POLL DISPLAY --> <c:if test="#{topic.pollPresent && topic.ballotView}"> <ui:include src="/views/topics/viewtopic_poll_ballot.xhtml"> @@ -180,15 +215,14 @@ </tr> <!-- iterate and display each post on this topic in the forum --> - <c:forEach items="#{topic.topic.posts}" var="postrow" varStatus="status" > + <c:forEach items="#{topic.page}" var="postrow" varStatus="status" > <tr> <td width='150' align='left' valign='top' class='${(status.index%2==0)?"row1":"row2"}'> <!-- insert security check to make sure "posting" is allowed --> <span class="name">${postrow.poster.user.userName}</span> <br/> <!-- TODO: NEED TO BE REIMPLEMENTED - <span class="postdetails"> - + <span class="postdetails"> ${n:out("postrow.poster.user.POSTER_RANK")} <br/> ${n:out("postrow.RANK_IMAGE")}${n:out("postrow.POSTER_AVATAR")} @@ -223,17 +257,8 @@ <span class="gen">&nbsp;</span> &nbsp; &nbsp;${resource.Post_subject}&nbsp;:&nbsp;${postrow.message.subject} </span> - </td> - <!-- TODO: MISSING IMAGE LINKS TO DIFFERENT ACTIONS - <td valign="top" nowrap="">${n:out("postrow.QUOTE_IMG")} - ${n:out("postrow.EDIT_IMG")} - ${n:out("postrow.REPOST_IMG")} - ${n:out("postrow.DELETE_IMG")} - ${n:out("postrow.IP_IMG")} - </td>--> - <!-- TODO: please remove me...this is just a temporary integration until the above TODO is completed..this - is only for unit testing the edit post usecase - --> + </td> + <!-- "Quote", "Edit", and "Delete" buttons --> <td valign="top" nowrap=""> <!-- add the quote link --> <h:commandLink action="#{replyTopic.startQuote}" style="text-decoration: none;"> @@ -241,18 +266,14 @@ <f:param name="t" value="#{topic.topic.id}"/> <f:param name="p" value="#{postrow.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyLockedURL')}" - alt="${resource.Topic_locked}" /> + <img border="0" src="#{forums:themeURL('resourceIconQuoteURL')}"/> </f:verbatim> </h:commandLink> <!-- add the edit post link --> <h:commandLink action="#{editPost.start}" style="text-decoration: none;"> <f:param name="p" value="#{postrow.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyNewURL')}" - alt="${resource.Reply_to_topic}" /> + <img border="0" src="#{forums:themeURL('resourceIconEditURL')}"/> </f:verbatim> </h:commandLink> <!-- add the delete post link --> @@ -261,9 +282,7 @@ <f:param name="t" value="#{topic.topic.id}"/> <f:param name="f" value="#{topic.topic.forum.id}"/> <f:verbatim> - <img border="0" - src="#{forums:themeURL('resourceReplyLockedURL')}" - alt="${resource.Topic_locked}" /> + <img border="0" src="#{forums:themeURL('resourceIconDelpostURL')}"/> </f:verbatim> </h:outputLink> </td> @@ -414,15 +433,15 @@ </c:if> <!-- TODO: Status for ICQ. Might be cool for other communicators too.--> <!--<script language="JavaScript" - type="text/javascript">--> + type="text/javascript">--> <!-- - if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) - document.write(' ${postrow.ICQ_IMG}'); - else - document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">${postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">${postrow.ICQ_STATUS_IMG}</div></div>'); + if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 ) + document.write(' ${postrow.ICQ_IMG}'); + else + document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">${postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">${postrow.ICQ_STATUS_IMG}</div></div>'); - //--> + //--> <!--</script> <noscript>${postrow.ICQ_IMG}</noscript>--> </td> @@ -436,14 +455,13 @@ </td> </tr> </c:forEach> - - - <!-- TODO: THIS PART OF CODE IS WAITING FOR FORUMSMODULE METHODS NEEDED FOR THIS FEATURE - <tr align="center"> + + <!-- TODO: THIS PART OF CODE IS WAITING FOR FORUMSMODULE METHODS NEEDED FOR THIS FEATURE --> + <!--tr align="center"> <td class="catBottom" colspan="2" height="28"> <table cellspacing="0" cellpadding="0" border="0"> - <tr> - <h:form> + <tr> + <h:form> <td align="center"> <span class="gensmall"> ${resource.Display_posts}: @@ -466,11 +484,12 @@ </td> </h:form> </tr> - </table> + </table> </td> </tr>--> - </table> - </c:if> + + + </table> <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> @@ -566,22 +585,70 @@ <h:outputText value="#{topic.topic.subject}"/> </h:outputLink> </td> - <td align="right" valign="top" nowrap="nowrap"> - <br/> - <span class="nav">#{forum.pagination}</span> - </td> + <!-- page navigation --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <td align="right" valign="middle" nowrap="nowrap"> + <span class="gensmall"></span><br/> + <span class="nav"> + Goto page + <!-- previous link --> + <c:if test="#{topic.pageNavigator.pageNumber gt 1}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage-1}"/> + <h:outputText value="Previous"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + <!-- actual pages --> + <c:forEach items="#{topic.pageNavigator.pages}" var="page" varStatus="idx"> + <c:choose> + <c:when test="#{topic.pageNavigator.pageNumber==page}"> + <b>${page}</b> + </c:when> + <c:otherwise> + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{page-1}"/> + <h:outputText value="${page}"/> + </h:outputLink> + </c:otherwise> + </c:choose> + <c:if test="${idx.index-1 ne topic.pageNavigator.totalPages-1}"> + <f:verbatim>,</f:verbatim> + </c:if> + </c:forEach> + <!-- Next link --> + <c:if test="#{topic.pageNavigator.pageNumber lt topic.pageNavigator.totalPages}"> + &nbsp;&nbsp; + <h:outputLink value="#{forums:outputLink(shared.links['topic'],true)}"> + <f:param name="t" value="#{topic.topic.id}"/> + <f:param name="page" value="#{topic.pageNavigator.currentPage+1}"/> + <h:outputText value="Next"/> + </h:outputLink> + &nbsp;&nbsp; + </c:if> + </span> + </td> + </c:if> </tr> - <tr> - <!-- TODO: PAGE NUMBERING--> - <td align="left" colspan="3"> - <span class="nav"> - <h:outputFormat value="#{resource.PageNumber}" style="text:bold;" > - <f:param value="#{topic.pageNumber}"/> - <f:param value=""/> - </h:outputFormat> - </span> - </td> - </tr> + <!-- the current page number information --> + <c:if test="#{topic.pageNavigator.totalPages gt 1}"> + <tr> + <td>&nbsp;</td> + </tr> + <tr> + <td align="left" colspan="3"> + <span class="nav"> + Page <b>#{topic.pageNavigator.pageNumber}</b> of <b>#{topic.pageNavigator.totalPages}</b> + </span> + </td> + </tr> + <tr> + <td>&nbsp;</td> + </tr> + </c:if> </table> <table width="100%" cellspacing="2" border="0" align="center"> @@ -594,66 +661,107 @@ <br/> </td> --> + + <!-- instant reply widget --> + <!-- TODO: security check needed here to check if "replying" to this topic is allowed --> <script language='JavaScript' type='text/javascript'> - <!-- - function checkForm() - { - formErrors = false; - if (document.post.message.value.length < 2) - { - formErrors = 'Vous devez entrer un message avant de poster.'; - } - if (formErrors) - { - alert(formErrors); - return false; - } - else - { - return true; - } - } - --> - </script> - <!-- TODO: SECURITY CHECK NEEDED--> - <!-- TODO: THIS INSTANT REPLY BOX IS WAITING FOR POSTINGVIEW UPDATE TO SUPPORT REPLYING + function checkForm() + { + formErrors = false; + if (document["post:message"].value.length &lt; 2) + { + formErrors = "${resource.Empty_message}"; + } + if (formErrors) + { + alert(formErrors); + return false; + } + else + { + return true; + } + } + </script> <td> - <h:form name="post" onsubmit="return checkForm(this)" > + <h:form id="post"> + <input type="hidden" name="f" value="#{topic.topic.forum.id}"/> + <input type="hidden" name="t" value="#{topic.topic.id}"/> + <!-- add this reply and navigate to the page that will have this reply --> + <input type="hidden" name="page" value="#{topic.pageNavigator.pageAfterAdd}"/> + <span class="genmed"> <b>${resource.Instant_reply}</b> <br/> <br/> - <h:inputTextarea class="post" name="message" rows="10" cols="50" wrap="virtual"> - </h:inputTextarea> + <h:inputTextarea id="message" value="#{replyTopic.message}" rows="10" cols="50" styleClass="post"></h:inputTextarea> <br/> - <br/> - <input type="hidden" name="f" value="#{newTopic.forumId}"/> - <input type="hidden" name="t" value="#{newTopic.topicId}"/> - <input type="submit" name="preview" class="liteoption" - value='${n:i18n("Preview")}'/> - &nbsp; - <input type="submit" name="post" class="mainoption" - value='${n:i18n("Submit")}'/> + <br/> + <h:commandButton action="#{replyTopic.startInstantReplyPreview}" value="${resource.Preview}" + styleClass="liteoption" onclick="return checkForm();"/> + &nbsp; + <h:commandButton action="#{replyTopic.executeInstantReply}" value="${resource.Submit}" + styleClass="mainoption" onclick="return checkForm();"/> </span> - </form> - </td>--> - <!-- TODO: IN THIS PLACE THE JUMPBOXVIEW SHOULD BE INCLUDED--> + </h:form> + </td> + <!-- integrate jumpbox here --> <td align="right" valign="top" nowrap="nowrap"> - <ui:include src="/views/jumpbox.xhtml"/> - <!--<span class="gensmall">${n:out("S_AUTH_LIST")}</span>--> + <ui:include src="/views/jumpbox.xhtml"/> </td> </tr> - <!-- TODO: SECURITY CHECK NEEDED, REIMPLEMENTATION OF HARDCODED HTML IN PORTLET WHICH NEEDS MODERATOR VIEWS + <!-- TODO: security check needed for the moderator functions integrated into this topic --> <tr> <td> - ${n:out("S_TOPIC_ADMIN")} + &nbsp;<br/> + <a href="" style="text-decoration: none;"> + <img border="0" src="/portal-forums/subSilver/images/topic_delete.gif" alt="Delete this topic" title="Delete this topic"/> + </a>&nbsp; + <a href="" style="text-decoration: none;"> + <img border="0" src="/portal-forums/subSilver/images/topic_move.gif" alt="Move this topic" title="Move this topic"/> + </a>&nbsp; + <c:choose> + <c:when test="#{top... [truncated message content] |