[jboss-svn-commits] JBL Code SVN: r38364 - in labs/jbossforums/trunk/forums/src: resources/portal-forums-war/views/forums and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 20 15:35:24 EDT 2013
Author: sviluppatorefico
Date: 2013-06-20 15:35:23 -0400 (Thu, 20 Jun 2013)
New Revision: 38364
Added:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
Removed:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
Log:
bug fixing on the moderation and polling
Deleted: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,361 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portlet.forums.ui.action;
-
-import javax.ejb.EJB;
-
-import org.jboss.portlet.forums.ForumsModule;
-import org.jboss.portlet.forums.impl.ForumImpl;
-import org.jboss.portlet.forums.model.Forum;
-import org.jboss.portlet.forums.model.ForumWatch;
-import org.jboss.portlet.forums.ui.Constants;
-import org.jboss.portlet.forums.ui.JSFUtil;
-import org.jboss.portlet.forums.ui.PortalUtil;
-
-/**
- * This controller is used for activating/deactivating/managing forum watches
- *
- * Created on Jul 7, 2006
- *
- * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
- * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
- */
-public class ForumWatchController extends ActionController
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 701065663010513552L;
-
- @EJB(name="jboss-forums/ForumsModuleImpl/local")
- private ForumsModule forumsModule;
-
- //ui data supporting the AddForumWatch widget
- private int selectedForum = -1;
- private int watchMode = -1;
- private ForumImpl forum = null;
-
- // flag informing UI that notification edit mode is turned on
- private boolean editMode;
-
-
- /**
- * @return Returns the selectedForum.
- */
- public int getSelectedForum()
- {
- return selectedForum;
- }
-
- /**
- * @param selectedForum The selectedForum to set.
- */
- public void setSelectedForum(int selectedForum)
- {
- this.selectedForum = selectedForum;
- }
-
- /**
- *
- */
- public ForumImpl getForum()
- {
- return this.forum;
- }
-
- /**
- *
- */
- public void setForum (ForumImpl forum)
- {
- this.forum=forum;
- }
-
- /**
- * @return Returns the watchMode.
- */
- public int getWatchMode()
- {
- return watchMode;
- }
-
- /**
- * @param watchMode The watchMode to set.
- */
- public void setWatchMode(int watchMode)
- {
- this.watchMode = watchMode;
- }
-
- /**
- *
- */
- public boolean isEditMode ()
- {
- return this.editMode;
- }
-
- /**
- *
- */
- public void setEditMode (boolean editMode)
- {
- this.editMode = editMode;
- }
-
- //-------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- *
- *
- */
- public ForumWatchController()
- {
- try
- {
- //populate the already setup form watches
- //this.reloadWatches();
-
- try
- {
- String f = JSFUtil.getRequestParameter(Constants.p_forumId);
- if (f!=null && f.trim().length()>0) {
- selectedForum = Integer.parseInt(f);
- }
- } catch (NumberFormatException e)
- {
- JSFUtil.handleException(e);
- }
-
- if (selectedForum!=-1)
- {
- try
- {
- this.forum = (ForumImpl)getForumsModule(forumsModule).findForumById(this.selectedForum);
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- this.forum=null;
- }
- }
-
- if (selectedForum!=-1)
- {
- try
- {
- this.forum = (ForumImpl)getForumsModule(forumsModule).findForumById(selectedForum);
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
- }
-
- String edit = JSFUtil.getRequestParameter(Constants.EDIT_WATCH);
- if (edit!=null && edit.trim().length()>0) {
- editMode = Boolean.valueOf(edit).booleanValue();
- } else {
- editMode = false;
- }
-
-
- }
- catch(Exception e)
- {
- JSFUtil.handleException(e);
- }
- }
- //-------------------------------------------------------------------------------------------------------------------------------------------------
- /**
- *
- *
- */
- public String activateWatch()
- {
- String navState = null;
- try
- {
- int forumId = this.selectedForum;
-
- try
- {
- String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
- if (wt!=null && wt.trim().length()>0) {
- watchMode = Integer.parseInt(wt);
- } else {
- watchMode = -1;
- }
- } catch (NumberFormatException e)
- {
- JSFUtil.handleException(e);
- watchMode = -1;
- }
-
- if (forumId==-1 || watchMode==-1)
- {
- return null;
- }
-
- //make sure a watch for this forum is not already issued for this user
- boolean isDuplicate = this.isDuplicateWatch(forumId);
- if(isDuplicate)
- {
- return "success";
- }
-
- //get the forum that must be activated for watching
- Forum forum = getForumsModule(forumsModule).findForumById(forumId);
-
-
- //activate the watch for the selected forum
- getForumsModule(forumsModule).createWatch(PortalUtil.getPoster(),forum,this.watchMode);
- navState="success";
- }
- catch(Exception e)
- {
- JSFUtil.handleException(e);
- }
- return navState;
- }
-
- /**
- *
- *
- */
- public String deActivateWatch()
- {
- String navState = null;
- try
- {
- int watchId = -1;
-
- String w = JSFUtil.getRequestParameter(Constants.p_watchId);
- if (w!=null && w.trim().length()>0)
- {
- watchId = Integer.parseInt(w);
- }
-
- if (watchId==-1)
- {
- String f = JSFUtil.getRequestParameter(Constants.p_forumId);
- if (f!=null && f.trim().length()>0)
- {
- int forumId = Integer.parseInt(f);
- ForumWatch forumWatch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(), forumId);
- watchId = forumWatch!=null ? forumWatch.getId().intValue() : -1;
- }
- }
-
- if (watchId!=-1)
- {
- getForumsModule(forumsModule).removeWatch(getForumsModule(forumsModule).findForumWatchById(watchId));
- }
- }
- catch(Exception e)
- {
- JSFUtil.handleException(e);
- }
- return navState;
- }
-
- /**
- *
- */
- public String updateNotificationType()
- {
- String navState = null;
-
- try
- {
- String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
- if (wt!=null && wt.trim().length()>0) {
- watchMode = Integer.parseInt(wt);
- } else {
- watchMode = -1;
- }
- } catch (NumberFormatException e)
- {
- JSFUtil.handleException(e);
- watchMode = -1;
- }
-
- if (watchMode==-1 || selectedForum==-1)
- {
- return navState;
- }
-
- try
- {
- ForumWatch forumWatch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(),this.selectedForum);
- forumWatch.setMode(watchMode);
- navState="success";
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
- selectedForum=-1;
- return navState;
- }
-
- /**
- * When user cancels creating forum notification then this action is executed.
- */
- public String cancel()
- {
- return "cancel";
- }
-
- /**
- *
- *
- */
- public String updateWatch()
- {
- return null;
- }
-
- //--------------------------------------------------------------------------------------------------------------
- /**
- *
- *
- */
- private boolean isDuplicateWatch(int forumId)
- {
- try
- {
- ForumWatch watch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(), selectedForum);
- return watch!=null;
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
- return false;
- }
-
- /**
- *
- */
- public String dummyAction()
- {
- return null;
- }
-}
Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java (rev 0)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,362 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.ui.action;
+
+import javax.ejb.EJB;
+
+import org.jboss.portlet.forums.ForumsModule;
+import org.jboss.portlet.forums.impl.ForumImpl;
+import org.jboss.portlet.forums.model.Forum;
+import org.jboss.portlet.forums.model.ForumWatch;
+import org.jboss.portlet.forums.ui.Constants;
+import org.jboss.portlet.forums.ui.JSFUtil;
+import org.jboss.portlet.forums.ui.PortalUtil;
+
+/**
+ * This controller is used for activating/deactivating/managing forum watches
+ *
+ * Created on Jul 7, 2006
+ *
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
+ * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
+ */
+public class ForumWatchController extends ActionController
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 701065663010513552L;
+
+ @EJB(name="jboss-forums/ForumsModuleImpl/local")
+ private ForumsModule forumsModule;
+
+ //ui data supporting the AddForumWatch widget
+ private int selectedForum = -1;
+ private int watchMode = -1;
+ private ForumImpl forum = null;
+
+ // flag informing UI that notification edit mode is turned on
+ private boolean editMode;
+
+
+ /**
+ * @return Returns the selectedForum.
+ */
+ public int getSelectedForum()
+ {
+ return selectedForum;
+ }
+
+ /**
+ * @param selectedForum The selectedForum to set.
+ */
+ public void setSelectedForum(int selectedForum)
+ {
+ this.selectedForum = selectedForum;
+ }
+
+ /**
+ *
+ */
+ public ForumImpl getForum()
+ {
+ return this.forum;
+ }
+
+ /**
+ *
+ */
+ public void setForum (ForumImpl forum)
+ {
+ this.forum=forum;
+ }
+
+ /**
+ * @return Returns the watchMode.
+ */
+ public int getWatchMode()
+ {
+ return watchMode;
+ }
+
+ /**
+ * @param watchMode The watchMode to set.
+ */
+ public void setWatchMode(int watchMode)
+ {
+ this.watchMode = watchMode;
+ }
+
+ /**
+ *
+ */
+ public boolean isEditMode ()
+ {
+ return this.editMode;
+ }
+
+ /**
+ *
+ */
+ public void setEditMode (boolean editMode)
+ {
+ this.editMode = editMode;
+ }
+
+ //-------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ *
+ */
+ public ForumWatchController()
+ {
+ try
+ {
+ //populate the already setup form watches
+ //this.reloadWatches();
+
+ try
+ {
+ String f = JSFUtil.getRequestParameter(Constants.p_forumId);
+ if (f!=null && f.trim().length()>0) {
+ selectedForum = Integer.parseInt(f);
+ }
+ } catch (NumberFormatException e)
+ {
+ JSFUtil.handleException(e);
+ }
+
+ if (selectedForum!=-1)
+ {
+ try
+ {
+ this.forum = (ForumImpl)getForumsModule(forumsModule).findForumById(this.selectedForum);
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ this.forum=null;
+ }
+ }
+
+ if (selectedForum!=-1)
+ {
+ try
+ {
+ this.forum = (ForumImpl)getForumsModule(forumsModule).findForumById(selectedForum);
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ }
+
+ String edit = JSFUtil.getRequestParameter(Constants.EDIT_WATCH);
+ if (edit!=null && edit.trim().length()>0) {
+ editMode = Boolean.valueOf(edit).booleanValue();
+ } else {
+ editMode = false;
+ }
+
+
+ }
+ catch(Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ }
+ //-------------------------------------------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ *
+ */
+ public String activateWatch()
+ {
+ String navState = null;
+ try
+ {
+ int forumId = this.selectedForum;
+
+ try
+ {
+ String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
+ if (wt!=null && wt.trim().length()>0) {
+ watchMode = Integer.parseInt(wt);
+ } else {
+ watchMode = -1;
+ }
+ } catch (NumberFormatException e)
+ {
+ JSFUtil.handleException(e);
+ watchMode = -1;
+ }
+
+ if (forumId==-1 || watchMode==-1)
+ {
+ return null;
+ }
+
+ //make sure a watch for this forum is not already issued for this user
+ boolean isDuplicate = this.isDuplicateWatch(forumId);
+ if(isDuplicate)
+ {
+ return "success";
+ }
+
+ //get the forum that must be activated for watching
+ Forum forum = getForumsModule(forumsModule).findForumById(forumId);
+
+
+ //activate the watch for the selected forum
+ getForumsModule(forumsModule).createWatch(PortalUtil.getPoster(),forum,this.watchMode);
+ navState="success";
+ }
+ catch(Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ return navState;
+ }
+
+ /**
+ *
+ *
+ */
+ public String deActivateWatch()
+ {
+ String navState = null;
+ try
+ {
+ int watchId = -1;
+
+ String w = JSFUtil.getRequestParameter(Constants.p_watchId);
+ if (w!=null && w.trim().length()>0)
+ {
+ watchId = Integer.parseInt(w);
+ }
+
+ if (watchId==-1)
+ {
+ String f = JSFUtil.getRequestParameter(Constants.p_forumId);
+ if (f!=null && f.trim().length()>0)
+ {
+ int forumId = Integer.parseInt(f);
+ ForumWatch forumWatch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(), forumId);
+ watchId = forumWatch!=null ? forumWatch.getId().intValue() : -1;
+ }
+ }
+
+ if (watchId!=-1)
+ {
+ getForumsModule(forumsModule).removeWatch(getForumsModule(forumsModule).findForumWatchById(watchId));
+ }
+ }
+ catch(Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ return navState;
+ }
+
+ /**
+ *
+ */
+ public String updateNotificationType()
+ {
+ String navState = null;
+
+ try
+ {
+ String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
+ if (wt!=null && wt.trim().length()>0) {
+ watchMode = Integer.parseInt(wt);
+ } else {
+ watchMode = -1;
+ }
+ } catch (NumberFormatException e)
+ {
+ JSFUtil.handleException(e);
+ watchMode = -1;
+ }
+
+ if (watchMode==-1 || selectedForum==-1)
+ {
+ return navState;
+ }
+
+ try
+ {
+ ForumWatch forumWatch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(),this.selectedForum);
+ forumWatch.setMode(watchMode);
+ getForumsModule(forumsModule).update(forumWatch);
+ navState="success";
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ selectedForum=-1;
+ return navState;
+ }
+
+ /**
+ * When user cancels creating forum notification then this action is executed.
+ */
+ public String cancel()
+ {
+ return "cancel";
+ }
+
+ /**
+ *
+ *
+ */
+ public String updateWatch()
+ {
+ return null;
+ }
+
+ //--------------------------------------------------------------------------------------------------------------
+ /**
+ *
+ *
+ */
+ private boolean isDuplicateWatch(int forumId)
+ {
+ try
+ {
+ ForumWatch watch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(), selectedForum);
+ return watch!=null;
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ return false;
+ }
+
+ /**
+ *
+ */
+ public String dummyAction()
+ {
+ return null;
+ }
+}
Property changes on: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,302 +0,0 @@
-/******************************************************************************
- * 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. *
- ******************************************************************************/
-package org.jboss.portlet.forums.ui.action;
-
-import javax.annotation.PostConstruct;
-import javax.ejb.EJB;
-
-import org.jboss.portlet.forums.ForumsModule;
-import org.jboss.portlet.forums.impl.TopicImpl;
-import org.jboss.portlet.forums.model.Topic;
-import org.jboss.portlet.forums.model.TopicWatch;
-import org.jboss.portlet.forums.ui.Constants;
-import org.jboss.portlet.forums.ui.JSFUtil;
-import org.jboss.portlet.forums.ui.PortalUtil;
-
-/**
- * This controller is used for activating/deactivating topic watches
- *
- * Created on Jul 7, 2006
- *
- * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
- * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
- */
-public class TopicWatchController extends ActionController
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1444693287363025185L;
-
- @EJB(name="jboss-forums/ForumsModuleImpl/local")
- private ForumsModule forumsModule;
-
- private int topicId ;
- private int watchType ;
- private boolean editMode;
- private TopicImpl topic;
-
- public TopicWatchController() {
- startService();
- }
-
- /**
- *
- */
- public int getWatchType()
- {
- return watchType;
- }
-
- /**
- *
- */
- public void setWatchType(int watchType)
- {
- this.watchType = watchType;
- }
-
- /**
- *
- */
- public String dummyAction()
- {
- return "success";
- }
-
- /**
- *
- */
- public int getTopicId()
- {
- return topicId;
- }
-
- /**
- *
- */
- public void setTopicId(int topicId)
- {
- this.topicId = topicId;
- }
-
- /**
- *
- */
- public TopicImpl getTopic()
- {
- return this.topic;
- }
-
- /**
- *
- */
- public void setTopic(TopicImpl topic)
- {
- this.topic = topic;
- }
-
- /**
- *
- */
- public void setEditMode(boolean editMode)
- {
- this.editMode = editMode;
- }
-
- /**
- *
- */
- public boolean getEditMode()
- {
- return this.editMode;
- }
-
- /**
- *
- *
- */
- public void startService() {
- try
- {
- String t = JSFUtil.getRequestParameter(Constants.p_topicId);
- if (t!=null && t.trim().length()>0) {
- topicId = Integer.parseInt(t);
- } else {
- topicId = -1;
- }
- } catch (NumberFormatException e)
- {
- JSFUtil.handleException(e);
- topicId = -1;
- }
-
- if (topicId!=-1)
- {
- try
- {
- this.topic = (TopicImpl)getForumsModule(forumsModule).findTopicById(this.topicId);
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- this.topic = null;
- }
- }
-
- try
- {
- String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
- if (wt!=null && wt.trim().length()>0) {
- watchType = Integer.parseInt(wt);
- } else {
- watchType = -1;
- }
- } catch (NumberFormatException e)
- {
- JSFUtil.handleException(e);
- watchType = -1;
- }
-
- String edit = JSFUtil.getRequestParameter(Constants.EDIT_WATCH);
- if (edit!=null && edit.trim().length()>0) {
- editMode = Boolean.valueOf(edit).booleanValue();
- } else {
- editMode = false;
- }
-
- }
-
- /**
- *
- *
- */
- public String activateWatch()
- {
- String navState = null;
-
- try
- {
-
- // checking for needed parameters
- if (this.topicId == -1 || this.watchType==-1)
- {
- return navState;
- }
-
- //make sure a watch for this topic is not already issued for this user
- boolean isDuplicate = this.isWatched();
- if(isDuplicate)
- {
- return navState;
- }
-
- //get the topic that must be activated for watching
- Topic topic = getForumsModule(forumsModule).findTopicById(topicId);
-
-
- //activate the watch for the selected topic
- getForumsModule(forumsModule).createWatch(PortalUtil.getPoster(),topic,this.watchType);
- navState="success";
- }
- catch(Exception e)
- {
- JSFUtil.handleException(e);
- }
-
- return navState;
- }
-
- /**
- *
- *
- */
- public String deActivateWatch()
- {
- String navState = null;
-
- try
- {
-
- TopicWatch watch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),topicId);
-
- getForumsModule(forumsModule).removeWatch(watch);
-
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
-
- return navState;
- }
-
- /**
- *
- */
- public String updateNotificationType()
- {
- String navState = null;
- if (watchType==-1 || topicId==-1)
- {
- return navState;
- }
-
- try
- {
- TopicWatch topicWatch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),this.topicId);
- topicWatch.setMode(watchType);
- navState="success";
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
- topicId=-1;
- return navState;
- }
-
- /**
- * When user cancels creating topic notification then this action is executed.
- */
- public String cancel()
- {
- return "cancel";
- }
-
- public boolean isWatched()
- {
- TopicWatch topicWatch = null;
-
- try
- {
-
- topicWatch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),this.topicId);
-
- } catch (Exception e)
- {
- JSFUtil.handleException(e);
- }
-
- return topicWatch!=null;
- }
-
-}
Added: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java (rev 0)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,303 @@
+/******************************************************************************
+ * 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. *
+ ******************************************************************************/
+package org.jboss.portlet.forums.ui.action;
+
+import javax.annotation.PostConstruct;
+import javax.ejb.EJB;
+
+import org.jboss.portlet.forums.ForumsModule;
+import org.jboss.portlet.forums.impl.TopicImpl;
+import org.jboss.portlet.forums.model.Topic;
+import org.jboss.portlet.forums.model.TopicWatch;
+import org.jboss.portlet.forums.ui.Constants;
+import org.jboss.portlet.forums.ui.JSFUtil;
+import org.jboss.portlet.forums.ui.PortalUtil;
+
+/**
+ * This controller is used for activating/deactivating topic watches
+ *
+ * Created on Jul 7, 2006
+ *
+ * @author <a href="mailto:sohil.shah at jboss.com">Sohil Shah</a>
+ * @author <a href="mailto:ryszard.kozmik at jboss.com">Ryszard Kozmik</a>
+ */
+public class TopicWatchController extends ActionController
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1444693287363025185L;
+
+ @EJB(name="jboss-forums/ForumsModuleImpl/local")
+ private ForumsModule forumsModule;
+
+ private int topicId ;
+ private int watchType ;
+ private boolean editMode;
+ private TopicImpl topic;
+
+ public TopicWatchController() {
+ startService();
+ }
+
+ /**
+ *
+ */
+ public int getWatchType()
+ {
+ return watchType;
+ }
+
+ /**
+ *
+ */
+ public void setWatchType(int watchType)
+ {
+ this.watchType = watchType;
+ }
+
+ /**
+ *
+ */
+ public String dummyAction()
+ {
+ return "success";
+ }
+
+ /**
+ *
+ */
+ public int getTopicId()
+ {
+ return topicId;
+ }
+
+ /**
+ *
+ */
+ public void setTopicId(int topicId)
+ {
+ this.topicId = topicId;
+ }
+
+ /**
+ *
+ */
+ public TopicImpl getTopic()
+ {
+ return this.topic;
+ }
+
+ /**
+ *
+ */
+ public void setTopic(TopicImpl topic)
+ {
+ this.topic = topic;
+ }
+
+ /**
+ *
+ */
+ public void setEditMode(boolean editMode)
+ {
+ this.editMode = editMode;
+ }
+
+ /**
+ *
+ */
+ public boolean getEditMode()
+ {
+ return this.editMode;
+ }
+
+ /**
+ *
+ *
+ */
+ public void startService() {
+ try
+ {
+ String t = JSFUtil.getRequestParameter(Constants.p_topicId);
+ if (t!=null && t.trim().length()>0) {
+ topicId = Integer.parseInt(t);
+ } else {
+ topicId = -1;
+ }
+ } catch (NumberFormatException e)
+ {
+ JSFUtil.handleException(e);
+ topicId = -1;
+ }
+
+ if (topicId!=-1)
+ {
+ try
+ {
+ this.topic = (TopicImpl)getForumsModule(forumsModule).findTopicById(this.topicId);
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ this.topic = null;
+ }
+ }
+
+ try
+ {
+ String wt = JSFUtil.getRequestParameter(Constants.p_notified_watch_type);
+ if (wt!=null && wt.trim().length()>0) {
+ watchType = Integer.parseInt(wt);
+ } else {
+ watchType = -1;
+ }
+ } catch (NumberFormatException e)
+ {
+ JSFUtil.handleException(e);
+ watchType = -1;
+ }
+
+ String edit = JSFUtil.getRequestParameter(Constants.EDIT_WATCH);
+ if (edit!=null && edit.trim().length()>0) {
+ editMode = Boolean.valueOf(edit).booleanValue();
+ } else {
+ editMode = false;
+ }
+
+ }
+
+ /**
+ *
+ *
+ */
+ public String activateWatch()
+ {
+ String navState = null;
+
+ try
+ {
+
+ // checking for needed parameters
+ if (this.topicId == -1 || this.watchType==-1)
+ {
+ return navState;
+ }
+
+ //make sure a watch for this topic is not already issued for this user
+ boolean isDuplicate = this.isWatched();
+ if(isDuplicate)
+ {
+ return navState;
+ }
+
+ //get the topic that must be activated for watching
+ Topic topic = getForumsModule(forumsModule).findTopicById(topicId);
+
+
+ //activate the watch for the selected topic
+ getForumsModule(forumsModule).createWatch(PortalUtil.getPoster(),topic,this.watchType);
+ navState="success";
+ }
+ catch(Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+
+ return navState;
+ }
+
+ /**
+ *
+ *
+ */
+ public String deActivateWatch()
+ {
+ String navState = null;
+
+ try
+ {
+
+ TopicWatch watch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),topicId);
+
+ getForumsModule(forumsModule).removeWatch(watch);
+
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+
+ return navState;
+ }
+
+ /**
+ *
+ */
+ public String updateNotificationType()
+ {
+ String navState = null;
+ if (watchType==-1 || topicId==-1)
+ {
+ return navState;
+ }
+
+ try
+ {
+ TopicWatch topicWatch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),this.topicId);
+ topicWatch.setMode(watchType);
+ getForumsModule(forumsModule).update(topicWatch);
+ navState="success";
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+ topicId=-1;
+ return navState;
+ }
+
+ /**
+ * When user cancels creating topic notification then this action is executed.
+ */
+ public String cancel()
+ {
+ return "cancel";
+ }
+
+ public boolean isWatched()
+ {
+ TopicWatch topicWatch = null;
+
+ try
+ {
+
+ topicWatch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),this.topicId);
+
+ } catch (Exception e)
+ {
+ JSFUtil.handleException(e);
+ }
+
+ return topicWatch!=null;
+ }
+
+}
Property changes on: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: 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 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,884 +0,0 @@
-<!--
-/******************************************************************************
- * 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"
->
-
-<ui:composition template="/views/common/common.xhtml">
-<ui:define name="mainContent">
-
-
-<c:if test="#{forum.initialized && forum.forum!=null && forum.forum.id!=-1}">
-
- <!-- make sure the user is allowed to access both the specified forum and the category that this forum belongs to -->
- <forums:isAllowed fragment="acl://readCategory" contextData="#{forum.forum.category}">
- <forums:isAllowed fragment="acl://readForum" contextData="#{forum.forum}">
-<h:form>
- <div class="forumbread">
- <ul>
- <li class="first">
-
- <h:commandLink action="viewCategory" value="#{shared.mainPageName}"/>
-
- <ul>
- <li>>
- <h:commandLink action="viewCategory" value="#{forum.forum.category.title}">
- <f:param name="c" value="#{forum.forum.category.id}"/>
- </h:commandLink>
-
- <ul>
- <li>>
- <h:commandLink action="viewForum" value="#{forum.forum.name}">
- <f:param name="f" value="#{forum.forum.id}"/>
- </h:commandLink>
- </li>
- </ul>
-
- </li>
- </ul>
-
- </li>
- </ul>
- </div>
-
- <div class="forumfloatright">
-
- <c:if test="${forums:feedsConfigured()}">
- <!-- feeds -->
- <a href="#{forum.rssFeed}">
- <img src="#{forums:themeURL('resourceIconFeedURL')}" border="0" />
- RSS
- </a>
-  
- <a href="#{forum.atomFeed}" class="imglink">
- <img src="#{forums:themeURL('resourceIconFeedURL')}" border="0" />
- ATOM
- </a>
-  
- </c:if>
-
- <c:if test="#{shared.anonymous==false}">
-
- <c:choose>
- <c:when test="#{forums:isWatchingForum(forum.forum) ne null}">
- <h:commandLink action="#{forumWatch.deActivateWatch}">
- <f:param name="w" value="#{forums:isWatchingForum(forum.forum)}" />
- <img src="#{forums:themeURL('resourceIconUnSubscribeURL')}"
- alt="${resource.Unsubscribe_from_forum}"
- name="unSubscribe"
- border="0"
- id="unSubscribe" />
- </h:commandLink>
- </c:when>
- <c:otherwise>
- <h:commandLink action="forumWatch">
- <f:param name="f" value="${forum.forum.id}" />
- <img src="#{forums:themeURL('resourceIconSubscribeURL')}"
- alt="${resource.Subscribe_to_forum}"
- name="subscribe"
- border="0"
- id="subscribe" />
- </h:commandLink>
- </c:otherwise>
- </c:choose>
- </c:if>
- </div>
-
- <div class="forumtitletext">
- <input type="hidden" name="f" value="#{forum.forum.id}" />
- <h4>
- ${forum.forum.name}
- </h4>
- </div>
-
- <!-- PAGINATION -->
- <c:if test="#{forum.pageNavigator.totalPages gt 1}">
- <div class="forumpagination">
- <ul>
- <li class="disablepage">
- <h:outputFormat value="#{resource.PageNumber}">
- <f:param value="${forum.pageNavigator.pageNumber}"/>
- <f:param value="${forum.pageNavigator.totalPages}"/>
- </h:outputFormat>
- </li>
-
- <c:choose>
- <c:when test="#{forum.pageNavigator.currentPage eq 0}">
- <li class="disablepage">
- ${resource.First}
- </li>
- <li class="disablepage">
- < ${resource.Previous}
- </li>
- </c:when>
- <c:otherwise>
- <li>
- <h:commandLink action="viewForum" value="${resource.First}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
- </li>
- <li>
- <h:commandLink action="viewForum" value="< ${resource.Previous}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.currentPage-1}"/>
- </h:commandLink>
- </li>
- </c:otherwise>
- </c:choose>
-
- <c:forEach items="#{forum.pageNavigator.currentPaginationLeft}" var="pageNumber">
- <li>
- <h:commandLink action="viewForum" value="${pageNumber}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${pageNumber-1}"/>
- </h:commandLink>
- </li>
- </c:forEach>
-
- <li class="currentpage">
- ${forum.pageNavigator.currentPage+1}
- </li>
-
- <c:forEach items="#{forum.pageNavigator.currentPaginationRight}" var="pageNumber">
- <li>
- <h:commandLink action="viewForum" value="${pageNumber}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${pageNumber-1}"/>
- </h:commandLink>
- </li>
- </c:forEach>
-
- <c:choose>
- <c:when test="#{forum.pageNavigator.currentPage eq (forum.pageNavigator.totalPages-1) }">
- <li class="disablepage">
- ${resource.Next} >
- </li>
- <li class="disablepage">
- ${resource.Last}
- </li>
- </c:when>
- <c:otherwise>
- <li>
- <h:commandLink action="viewForum" value="${resource.Next} >">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.currentPage+1}"/>
- </h:commandLink>
- </li>
- <li>
- <h:commandLink action="viewForum" value="${resource.Last}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.totalPages-1}"/>
- </h:commandLink>
- </li>
- </c:otherwise>
- </c:choose>
- </ul>
- </div>
- </c:if>
-</h:form>
-<h:form>
- <forums:isAllowed fragment="acl://newTopic" contextData="#{forum.forum}">
- <div class="actionbuttons">
- <ul>
- <li>
- <h:commandLink id="newTopic" action="#{newTopic.start}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <c:if test="#{forum.forum.status == forums:constantInt('FORUM_LOCKED')}">
- <f:verbatim>
- <img border="0"
- src="#{forums:themeURL('resourcePostLockedURL')}"
- alt="${resource.Forum_locked}"/>
- </f:verbatim>
- </c:if>
- <c:if test="#{forum.forum.status != forums:constantInt('FORUM_LOCKED')}">
- <f:verbatim>
- <img border="0"
- src="#{forums:themeURL('resourcePostNewURL')}"
- alt="${resource.Post_new_topic}" />
- </f:verbatim>
- </c:if>
- </h:commandLink>
- </li>
- </ul>
- </div>
- </forums:isAllowed>
-
- <!-- display the list of topics associated with this forum -->
- <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:choose>
- <c:when test="#{forum.forum.topicCount>0}">
- <c:if test="#{forum.announcementsPresent}">
- <!-- Announcement threads -->
-
- <tr>
- <td class="forumspecialized" colspan="5">
- <h3>
- ${resource.Announcements}
- </h3>
- </td>
- </tr>
-
- <c:forEach items="#{forum.announcements}" 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>
- ${forums:folderType(topicrow)} 
- <h:commandLink action="viewTopic" value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}"/>
- </h:commandLink>
- </h3>
-
- <!-- mini post navigator for this topic -->
- <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="{2}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="1"/>
- </h:commandLink>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="{3}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="2"/>
- </h:commandLink>
- </c:if>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic" value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="#{forum.topicNavigator[topicrow.id].totalPages-1}"/>
- </h:commandLink>
- </c:if>
-  )
- </c:if>
- <br />
- ${resource.By} 
- <c:choose>
-
- <c:when test="#{category.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
-
- </td>
- <td class="forumlistcentered">${topicrow.replies}</td>
- <td class="forumlistcentered">${topicrow.viewCount}</td>
- <td class="forumlistlast">
- <a href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
- <c:choose>
-
- <c:when test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
- #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{forum.topicLastPosts[topicrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{myForum.anonymous}">
- ${forum.topicLastPosts[topicrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
- <f:param name="uid" value="#{forum.topicLastPosts[topicrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- <br />
- #{forum.topicLastPosts[topicrow.id].createDate}
- </td>
- </tr>
-
- </c:forEach>
- </c:if>
-
- <c:if test="#{forum.stickyThreadsPresent}">
- <!-- Sticky Threads -->
-
- <tr>
- <td class="forumspecialized" colspan="5">
- <h3>
- ${resource.Sticky_Threads}
- </h3>
- </td>
- </tr>
-
- <c:forEach items="#{forum.stickyThreads}" 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>
- ${forums:folderType(topicrow)} 
- <h:commandLink action="viewTopic" value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}"/>
- </h:commandLink>
- </h3>
-
- <!-- mini post navigator for this topic -->
- <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="${2}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="1"/>
- </h:commandLink>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="${3}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="2"/>
- </h:commandLink>
- </c:if>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic" value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="#{forum.topicNavigator[topicrow.id].totalPages-1}"/>
- </h:commandLink>
- </c:if>
-  )
- </c:if>
- <br />
- ${resource.By} 
- <c:choose>
-
- <c:when test="#{category.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
-
- </td>
- <td class="forumlistcentered">${topicrow.replies}</td>
- <td class="forumlistcentered">${topicrow.viewCount}</td>
- <td class="forumlistlast">
- <a href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
- <c:choose>
-
- <c:when test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
- #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{forum.topicLastPosts[topicrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{category.anonymous}">
- ${forum.topicLastPosts[topicrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
- <f:param name="uid" value="#{forum.topicLastPosts[topicrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- <br />
- #{forum.topicLastPosts[topicrow.id].createDate}
- </td>
- </tr>
-
- </c:forEach>
- </c:if>
-
- <c:if test="#{forum.normalThreadsPresent}">
- <!-- Normal threads -->
- <tr>
- <td class="forumspecialized" colspan="5">
- <h3>
- ${resource.Normal_Threads}
- </h3>
- </td>
- </tr>
-
- <c:forEach items="#{forum.normalThreads}" 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:commandLink action="viewTopic" value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}"/>
- </h:commandLink>
- </h3>
-
- <!-- mini post navigator for this topic -->
- <c:if test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="{2}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="1"/>
- </h:commandLink>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="${3}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="2"/>
- </h:commandLink>
- </c:if>
- <c:if test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic" value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="#{forum.topicNavigator[topicrow.id].totalPages-1}"/>
- </h:commandLink>
- </c:if>
-  )
- </c:if>
- <br />
- ${resource.By} 
- <c:choose>
-
- <c:when test="#{forum.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
-
- </td>
- <td class="forumlistcentered">${topicrow.replies}</td>
- <td class="forumlistcentered">${topicrow.viewCount}</td>
- <td class="forumlistlast">
- <a href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
- <c:choose>
-
- <c:when test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
- #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{forum.topicLastPosts[topicrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{category.anonymous}">
- ${forum.topicLastPosts[topicrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
- <f:param name="uid" value="#{forum.topicLastPosts[topicrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- <br />
- #{forum.topicLastPosts[topicrow.id].createDate}
- </td>
- </tr>
-
- </c:forEach>
- </c:if>
-
- </c:when>
-
- <c:otherwise>
- <tr>
- <td class="nonewpostRow" colspan="6">
- <h3>
- <h:outputText value="#{resource['No_topics_post_one']}" escape="false" />
- </h3>
- </td>
- </tr>
- </c:otherwise>
- </c:choose>
- </table>
-
- <!-- PAGINATION -->
- <c:if test="#{forum.pageNavigator.totalPages gt 1}">
- <div class="forumpagination">
- <ul>
- <li class="disablepage">
- <h:outputFormat value="#{resource.PageNumber}">
- <f:param value="${forum.pageNavigator.pageNumber}"/>
- <f:param value="${forum.pageNavigator.totalPages}"/>
- </h:outputFormat>
- </li>
-
- <c:choose>
- <c:when test="#{forum.pageNavigator.currentPage eq 0}">
- <li class="disablepage">
- ${resource.First}
- </li>
- <li class="disablepage">
- < ${resource.Previous}
- </li>
- </c:when>
- <c:otherwise>
- <li>
- <h:commandLink action="viewForum" value="${resource.First}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
- </li>
- <li>
- <h:commandLink action="viewForum" value="< ${resource.Previous}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.currentPage-1}"/>
- </h:commandLink>
- </li>
- </c:otherwise>
- </c:choose>
-
- <c:forEach items="#{forum.pageNavigator.currentPaginationLeft}" var="pageNumber">
- <li>
- <h:commandLink action="viewForum" value="${pageNumber}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${pageNumber-1}"/>
- </h:commandLink>
- </li>
- </c:forEach>
-
- <li class="currentpage">
- ${forum.pageNavigator.currentPage+1}
- </li>
-
- <c:forEach items="#{forum.pageNavigator.currentPaginationRight}" var="pageNumber">
- <li>
- <h:commandLink action="viewForum" value="${pageNumber}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${pageNumber-1}"/>
- </h:commandLink>
- </li>
- </c:forEach>
-
- <c:choose>
- <c:when test="#{forum.pageNavigator.currentPage eq (forum.pageNavigator.totalPages-1) }">
- <li class="disablepage">
- ${resource.Next} >
- </li>
- <li class="disablepage">
- ${resource.Last}
- </li>
- </c:when>
- <c:otherwise>
- <li>
- <h:commandLink action="viewForum" value="${resource.Next} >">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.currentPage+1}"/>
- </h:commandLink>
- </li>
- <li>
- <h:commandLink action="viewForum" value="${resource.Last}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="page" value="${forum.pageNavigator.totalPages-1}"/>
- </h:commandLink>
- </li>
- </c:otherwise>
- </c:choose>
- </ul>
- </div>
- </c:if>
- </h:form>
- <h:form>
- <!-- NEWTOPIC -->
- <forums:isAllowed fragment="acl://newTopic" contextData="#{forum.forum}">
- <div class="actionbuttons">
- <ul>
- <li>
- <h:commandLink id="newTopic" action="#{newTopic.start}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <c:if test="#{forum.forum.status == forums:constantInt('FORUM_LOCKED')}">
- <f:verbatim>
- <img border="0"
- src="#{forums:themeURL('resourcePostLockedURL')}"
- alt="${resource.Forum_locked}"/>
- </f:verbatim>
- </c:if>
- <c:if test="#{forum.forum.status != forums:constantInt('FORUM_LOCKED')}">
- <f:verbatim>
- <img border="0"
- src="#{forums:themeURL('resourcePostNewURL')}"
- alt="${resource.Post_new_topic}" />
- </f:verbatim>
- </c:if>
- </h:commandLink>
- </li>
- </ul>
- </div>
- </forums:isAllowed>
-
- <!-- MODERATION -->
- <c:if test="#{shared.anonymous==false}">
- <forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">
- <div class="modtools">
- <ul>
- <li>
- ${resource.Forum_moderation}:
- </li>
- <li>
- <h:commandLink action="viewModerator">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:verbatim>
- <img src="${forums:themeURL('resourceIconModerateURL')}" alt="${resource.Moderate}" border="0" />
- </f:verbatim>
- </h:commandLink>
- </li>
- </ul>
- </div>
- </forums:isAllowed>
- </c:if>
-
- <!-- ADMINISTRATION -->
- <c:if test="#{shared.anonymous==false}">
- <forums:isAllowed fragment="acl://lockForums" contextData="#{forum.forum}" >
- <div class="admintools">
- <ul>
- <li>${resource.Forum_administration}:</li>
- <li>
- <c:choose>
-
- <c:when test="#{forum.forum.status eq forums:constantInt('FORUM_LOCKED')}">
- <h:commandLink action="#{adminController.unlockForum}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="c" value="#{forum.forum.category.id}"/>
- <f:verbatim>
- <img src="${forums:themeURL('resourceIconUnlockURL')}" alt="${resource.Forum_unlock}" border="0"/>
- </f:verbatim>
- </h:commandLink>
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="#{adminController.lockForum}">
- <f:param name="f" value="#{forum.forum.id}"/>
- <f:param name="c" value="#{forum.forum.category.id}"/>
- <f:verbatim>
- <img src="${forums:themeURL('resourceIconLockURL')}" alt="${resource.Forum_lock}" border="0"/>
- </f:verbatim>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- </li>
- </ul>
- </div>
- </forums:isAllowed>
- </c:if>
-
-
- <hr class="forumdashedHR" />
- <div class="forumthreadlegend">
- <ul>
- <li>
- <img src="#{forums:themeURL('resourceFolderNewURL')}"
- alt="${resource.New_posts}" width="11" height="14" />
- ${resource.New_posts}
- </li>
- <li>
- <img src="#{forums:themeURL('resourceFolderHotNewURL')}"
- alt="${resource.New_posts_hot}" width="11" height="14" />
- ${resource.New_posts_hot}
- </li>
- <li>
- <img src="#{forums:themeURL('resourceFolderLockedNewURL')}"
- alt="${resource.New_posts_locked}" width="11" height="14" />
- ${resource.New_posts_locked}
- </li>
- </ul>
- </div>
- <div class="forumthreadlegend">
- <ul>
- <li>
- <img src="#{forums:themeURL('resourceFolderURL')}"
- alt="${resource.No_new_posts}" width="11" height="14" />
- ${resource.No_new_posts}
- </li>
- <li>
- <img src="#{forums:themeURL('resourceFolderHotURL')}"
- alt="${resource.No_new_posts_hot}" width="11" height="14" />
- ${resource.No_new_posts_hot}
- </li>
- <li>
- <img src="#{forums:themeURL('resourceFolderLockedURL')}"
- alt="${resource.No_new_posts_locked}" width="11" height="14" />
- ${resource.No_new_posts_locked}
- </li>
- </ul>
- </div>
- <div class="forumthreadlegendtext">
-
- <!-- post new topics link -->
- <forums:isAllowedChoose>
- <forums:isAllowedWhen fragment="acl://newTopic">
- <h:outputText value="#{resource['Rules_post_can']}" escape="false" />
- </forums:isAllowedWhen>
- <forums:isAllowedOtherwise>
- <h:outputText value="#{resource['Rules_post_cannot']}" escape="false" />
- </forums:isAllowedOtherwise>
- </forums:isAllowedChoose>
- <br/>
-
- <!-- manage poll link -->
- <forums:isAllowedChoose>
- <forums:isAllowedWhen fragment="acl://managePoll">
- <h:outputText value="#{resource['Rules_poll_can']}" escape="false" />
- </forums:isAllowedWhen>
- <forums:isAllowedOtherwise>
- <h:outputText value="#{resource['Rules_poll_cannot']}" escape="false" />
- </forums:isAllowedOtherwise>
- </forums:isAllowedChoose>
- <br/>
-
- <!-- votePoll link -->
- <forums:isAllowedChoose>
- <forums:isAllowedWhen fragment="acl://votePoll">
- <h:outputText value="#{resource['Rules_vote_can']}" escape="false" />
- </forums:isAllowedWhen>
- <forums:isAllowedOtherwise>
- <h:outputText value="#{resource['Rules_vote_cannot']}" escape="false" />
- </forums:isAllowedOtherwise>
- </forums:isAllowedChoose>
- <br/>
-
- <!-- moderate forum link -->
- <forums:isAllowedChoose>
- <forums:isAllowedWhen fragment="acl://moderateForum" contextData="#{forum.forum}">
- <h:outputText value="#{resource['Rules_moderate_0']}" escape="false" /><h:outputText value="#{resource['Rules_moderate_2']}" escape="false" />
- </forums:isAllowedWhen>
- <forums:isAllowedOtherwise>
- <h:outputText value="#{resource['Rules_moderate_1']}" escape="false" /><h:outputText value="#{resource['Rules_moderate_2']}" escape="false" />
- </forums:isAllowedOtherwise>
- </forums:isAllowedChoose>
- <br/>
-
- </div>
-
- </h:form>
-
- <div class="forumlegendjumpboxclear">
- <ui:include src="/views/jumpbox.xhtml" />
- </div>
-
- </forums:isAllowed>
- </forums:isAllowed>
- </c:if>
-
- <c:if test="#{forum.forum==null}">
- <table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
- <tr>
- <td>
- <table width="100%" cellspacing="0" cellpadding="1" border="0">
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td align="center">
- ${resource.Forum_not_exist}
- </td>
- </tr>
- <tr>
- <td> </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- </c:if>
-
-
-</ui:define>
-</ui:composition>
-
-</div>
Added: 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 (rev 0)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,858 @@
+<!--
+/******************************************************************************
+ * 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">
+
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
+
+
+ <c:if
+ test="#{forum.initialized && forum.forum!=null && forum.forum.id!=-1}">
+
+ <!-- make sure the user is allowed to access both the specified forum and the category that this forum belongs to -->
+ <forums:isAllowed fragment="acl://readCategory"
+ contextData="#{forum.forum.category}">
+ <forums:isAllowed fragment="acl://readForum"
+ contextData="#{forum.forum}">
+ <h:form>
+ <div class="forumbread">
+ <ul>
+ <li class="first"><h:commandLink action="viewCategory"
+ value="#{shared.mainPageName}" />
+
+ <ul>
+ <li>> <h:commandLink action="viewCategory"
+ value="#{forum.forum.category.title}">
+ <f:param name="c" value="#{forum.forum.category.id}" />
+ </h:commandLink>
+
+ <ul>
+ <li>> <h:commandLink action="viewForum"
+ value="#{forum.forum.name}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ </h:commandLink>
+ </li>
+ </ul>
+
+ </li>
+ </ul></li>
+ </ul>
+ </div>
+
+ <div class="forumfloatright">
+
+ <c:if test="${forums:feedsConfigured()}">
+ <!-- feeds -->
+ <a href="#{forum.rssFeed}"> <img
+ src="#{forums:themeURL('resourceIconFeedURL')}" border="0" />
+ RSS
+ </a>
+  
+ <a href="#{forum.atomFeed}" class="imglink"> <img
+ src="#{forums:themeURL('resourceIconFeedURL')}" border="0" />
+ ATOM
+ </a>
+  
+ </c:if>
+
+ <c:if test="#{shared.anonymous==false}">
+
+ <c:choose>
+ <c:when test="#{forums:isWatchingForum(forum.forum) ne null}">
+ <h:commandLink action="#{forumWatch.deActivateWatch}">
+ <f:param name="w"
+ value="#{forums:isWatchingForum(forum.forum)}" />
+ <img src="#{forums:themeURL('resourceIconUnSubscribeURL')}"
+ alt="${resource.Unsubscribe_from_forum}" name="unSubscribe"
+ border="0" id="unSubscribe" />
+ </h:commandLink>
+ </c:when>
+ <c:otherwise>
+ <h:commandLink action="forumWatch">
+ <f:param name="f" value="${forum.forum.id}" />
+ <img src="#{forums:themeURL('resourceIconSubscribeURL')}"
+ alt="${resource.Subscribe_to_forum}" name="subscribe"
+ border="0" id="subscribe" />
+ </h:commandLink>
+ </c:otherwise>
+ </c:choose>
+ </c:if>
+ </div>
+
+ <div class="forumtitletext">
+ <input type="hidden" name="f" value="#{forum.forum.id}" />
+ <h4>${forum.forum.name}</h4>
+ </div>
+
+ <!-- PAGINATION -->
+ <c:if test="#{forum.pageNavigator.totalPages gt 1}">
+ <div class="forumpagination">
+ <ul>
+ <li class="disablepage"><h:outputFormat
+ value="#{resource.PageNumber}">
+ <f:param value="${forum.pageNavigator.pageNumber}" />
+ <f:param value="${forum.pageNavigator.totalPages}" />
+ </h:outputFormat></li>
+
+ <c:choose>
+ <c:when test="#{forum.pageNavigator.currentPage eq 0}">
+ <li class="disablepage">${resource.First}</li>
+ <li class="disablepage">< ${resource.Previous}</li>
+ </c:when>
+ <c:otherwise>
+ <li><h:commandLink action="viewForum"
+ value="${resource.First}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink></li>
+ <li><h:commandLink action="viewForum"
+ value="< ${resource.Previous}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.currentPage-1}" />
+ </h:commandLink></li>
+ </c:otherwise>
+ </c:choose>
+
+ <c:forEach
+ items="#{forum.pageNavigator.currentPaginationLeft}"
+ var="pageNumber">
+ <li><h:commandLink action="viewForum"
+ value="${pageNumber}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="${pageNumber-1}" />
+ </h:commandLink></li>
+ </c:forEach>
+
+ <li class="currentpage">
+ ${forum.pageNavigator.currentPage+1}</li>
+
+ <c:forEach
+ items="#{forum.pageNavigator.currentPaginationRight}"
+ var="pageNumber">
+ <li><h:commandLink action="viewForum"
+ value="${pageNumber}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="${pageNumber-1}" />
+ </h:commandLink></li>
+ </c:forEach>
+
+ <c:choose>
+ <c:when
+ test="#{forum.pageNavigator.currentPage eq (forum.pageNavigator.totalPages-1) }">
+ <li class="disablepage">${resource.Next} ></li>
+ <li class="disablepage">${resource.Last}</li>
+ </c:when>
+ <c:otherwise>
+ <li><h:commandLink action="viewForum"
+ value="${resource.Next} >">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.currentPage+1}" />
+ </h:commandLink></li>
+ <li><h:commandLink action="viewForum"
+ value="${resource.Last}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.totalPages-1}" />
+ </h:commandLink></li>
+ </c:otherwise>
+ </c:choose>
+ </ul>
+ </div>
+ </c:if>
+ </h:form>
+ <h:form>
+ <forums:isAllowed fragment="acl://newTopic"
+ contextData="#{forum.forum}">
+ <div class="actionbuttons">
+ <ul>
+ <li><c:if
+ test="#{forum.forum.status == forums:constantInt('FORUM_LOCKED')}">
+ <f:verbatim>
+ <img border="0"
+ src="#{forums:themeURL('resourcePostLockedURL')}"
+ alt="${resource.Forum_locked}" />
+ </f:verbatim>
+ </c:if> <c:if
+ test="#{forum.forum.status != forums:constantInt('FORUM_LOCKED')}">
+ <h:commandLink id="newTopic" action="#{newTopic.start}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:verbatim>
+ <img border="0"
+ src="#{forums:themeURL('resourcePostNewURL')}"
+ alt="${resource.Post_new_topic}" />
+ </f:verbatim>
+ </h:commandLink>
+ </c:if></li>
+ </ul>
+ </div>
+ </forums:isAllowed>
+
+ <!-- display the list of topics associated with this forum -->
+ <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:choose>
+ <c:when test="#{forum.forum.topicCount>0}">
+ <c:if test="#{forum.announcementsPresent}">
+ <!-- Announcement threads -->
+
+ <tr>
+ <td class="forumspecialized" colspan="5">
+ <h3>${resource.Announcements}</h3>
+ </td>
+ </tr>
+
+ <c:forEach items="#{forum.announcements}" 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>
+ ${forums:folderType(topicrow)} 
+ <h:commandLink action="viewTopic"
+ value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="{2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic"
+ value="{3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{forum.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{category.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+
+ </td>
+ <td class="forumlistcentered">${topicrow.replies}</td>
+ <td class="forumlistcentered">${topicrow.viewCount}</td>
+ <td class="forumlistlast"><a
+ href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
+ #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{forum.topicLastPosts[topicrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a> <br /> ${resource.By} <c:choose>
+
+ <c:when test="#{myForum.anonymous}">
+ ${forum.topicLastPosts[topicrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{forum.topicLastPosts[topicrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose> <br /> #{forum.topicLastPosts[topicrow.id].createDate}</td>
+ </tr>
+
+ </c:forEach>
+ </c:if>
+
+ <c:if test="#{forum.stickyThreadsPresent}">
+ <!-- Sticky Threads -->
+
+ <tr>
+ <td class="forumspecialized" colspan="5">
+ <h3>${resource.Sticky_Threads}</h3>
+ </td>
+ </tr>
+
+ <c:forEach items="#{forum.stickyThreads}" 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>
+ ${forums:folderType(topicrow)} 
+ <h:commandLink action="viewTopic"
+ value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="${2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic"
+ value="${3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{forum.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{category.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+
+ </td>
+ <td class="forumlistcentered">${topicrow.replies}</td>
+ <td class="forumlistcentered">${topicrow.viewCount}</td>
+ <td class="forumlistlast"><a
+ href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
+ #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{forum.topicLastPosts[topicrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a> <br /> ${resource.By} <c:choose>
+
+ <c:when test="#{category.anonymous}">
+ ${forum.topicLastPosts[topicrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{forum.topicLastPosts[topicrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose> <br /> #{forum.topicLastPosts[topicrow.id].createDate}</td>
+ </tr>
+
+ </c:forEach>
+ </c:if>
+
+ <c:if test="#{forum.normalThreadsPresent}">
+ <!-- Normal threads -->
+ <tr>
+ <td class="forumspecialized" colspan="5">
+ <h3>${resource.Normal_Threads}</h3>
+ </td>
+ </tr>
+
+ <c:forEach items="#{forum.normalThreads}" 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:commandLink action="viewTopic"
+ value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{forum.topicNavigator[topicrow.id] ne null && forum.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="{2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic"
+ value="${3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{forum.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{forum.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{forum.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+
+ </td>
+ <td class="forumlistcentered">${topicrow.replies}</td>
+ <td class="forumlistcentered">${topicrow.viewCount}</td>
+ <td class="forumlistlast"><a
+ href="#{forums:postPermlink(forum.topicLastPosts[topicrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(forum.topicLastPosts[topicrow.id].message.subject,25)}">
+ #{forums:subString(forum.topicLastPosts[topicrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{forum.topicLastPosts[topicrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a> <br /> ${resource.By} <c:choose>
+
+ <c:when test="#{category.anonymous}">
+ ${forum.topicLastPosts[topicrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${forum.topicLastPosts[topicrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{forum.topicLastPosts[topicrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose> <br /> #{forum.topicLastPosts[topicrow.id].createDate}</td>
+ </tr>
+
+ </c:forEach>
+ </c:if>
+
+ </c:when>
+
+ <c:otherwise>
+ <tr>
+ <td class="nonewpostRow" colspan="6">
+ <h3>
+ <h:outputText value="#{resource['No_topics_post_one']}"
+ escape="false" />
+ </h3>
+ </td>
+ </tr>
+ </c:otherwise>
+ </c:choose>
+ </table>
+
+ <!-- PAGINATION -->
+ <c:if test="#{forum.pageNavigator.totalPages gt 1}">
+ <div class="forumpagination">
+ <ul>
+ <li class="disablepage"><h:outputFormat
+ value="#{resource.PageNumber}">
+ <f:param value="${forum.pageNavigator.pageNumber}" />
+ <f:param value="${forum.pageNavigator.totalPages}" />
+ </h:outputFormat></li>
+
+ <c:choose>
+ <c:when test="#{forum.pageNavigator.currentPage eq 0}">
+ <li class="disablepage">${resource.First}</li>
+ <li class="disablepage">< ${resource.Previous}</li>
+ </c:when>
+ <c:otherwise>
+ <li><h:commandLink action="viewForum"
+ value="${resource.First}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink></li>
+ <li><h:commandLink action="viewForum"
+ value="< ${resource.Previous}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.currentPage-1}" />
+ </h:commandLink></li>
+ </c:otherwise>
+ </c:choose>
+
+ <c:forEach
+ items="#{forum.pageNavigator.currentPaginationLeft}"
+ var="pageNumber">
+ <li><h:commandLink action="viewForum"
+ value="${pageNumber}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="${pageNumber-1}" />
+ </h:commandLink></li>
+ </c:forEach>
+
+ <li class="currentpage">
+ ${forum.pageNavigator.currentPage+1}</li>
+
+ <c:forEach
+ items="#{forum.pageNavigator.currentPaginationRight}"
+ var="pageNumber">
+ <li><h:commandLink action="viewForum"
+ value="${pageNumber}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page" value="${pageNumber-1}" />
+ </h:commandLink></li>
+ </c:forEach>
+
+ <c:choose>
+ <c:when
+ test="#{forum.pageNavigator.currentPage eq (forum.pageNavigator.totalPages-1) }">
+ <li class="disablepage">${resource.Next} ></li>
+ <li class="disablepage">${resource.Last}</li>
+ </c:when>
+ <c:otherwise>
+ <li><h:commandLink action="viewForum"
+ value="${resource.Next} >">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.currentPage+1}" />
+ </h:commandLink></li>
+ <li><h:commandLink action="viewForum"
+ value="${resource.Last}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="page"
+ value="${forum.pageNavigator.totalPages-1}" />
+ </h:commandLink></li>
+ </c:otherwise>
+ </c:choose>
+ </ul>
+ </div>
+ </c:if>
+ </h:form>
+ <h:form>
+ <!-- NEWTOPIC -->
+ <forums:isAllowed fragment="acl://newTopic"
+ contextData="#{forum.forum}">
+ <div class="actionbuttons">
+ <ul>
+ <li><c:if
+ test="#{forum.forum.status == forums:constantInt('FORUM_LOCKED')}">
+ <f:verbatim>
+ <img border="0"
+ src="#{forums:themeURL('resourcePostLockedURL')}"
+ alt="${resource.Forum_locked}" />
+ </f:verbatim>
+ </c:if> <c:if
+ test="#{forum.forum.status != forums:constantInt('FORUM_LOCKED')}">
+ <h:commandLink id="newTopic" action="#{newTopic.start}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:verbatim>
+ <img border="0"
+ src="#{forums:themeURL('resourcePostNewURL')}"
+ alt="${resource.Post_new_topic}" />
+ </f:verbatim>
+ </h:commandLink>
+ </c:if></li>
+ </ul>
+ </div>
+ </forums:isAllowed>
+
+ <!-- MODERATION -->
+ <c:if test="#{shared.anonymous==false}">
+ <forums:isAllowed fragment="acl://moderateForum"
+ contextData="#{forum.forum}">
+ <div class="modtools">
+ <ul>
+ <li>${resource.Forum_moderation}:</li>
+ <li><h:commandLink action="viewModerator">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:verbatim>
+ <img src="${forums:themeURL('resourceIconModerateURL')}"
+ alt="${resource.Moderate}" border="0" />
+ </f:verbatim>
+ </h:commandLink></li>
+ </ul>
+ </div>
+ </forums:isAllowed>
+ </c:if>
+
+ <!-- ADMINISTRATION -->
+ <c:if test="#{shared.anonymous==false}">
+ <forums:isAllowed fragment="acl://lockForums"
+ contextData="#{forum.forum}">
+ <div class="admintools">
+ <ul>
+ <li>${resource.Forum_administration}:</li>
+ <li><c:choose>
+
+ <c:when
+ test="#{forum.forum.status eq forums:constantInt('FORUM_LOCKED')}">
+ <h:commandLink action="#{adminController.unlockForum}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="c" value="#{forum.forum.category.id}" />
+ <f:verbatim>
+ <img src="${forums:themeURL('resourceIconUnlockURL')}"
+ alt="${resource.Forum_unlock}" border="0" />
+ </f:verbatim>
+ </h:commandLink>
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="#{adminController.lockForum}">
+ <f:param name="f" value="#{forum.forum.id}" />
+ <f:param name="c" value="#{forum.forum.category.id}" />
+ <f:verbatim>
+ <img src="${forums:themeURL('resourceIconLockURL')}"
+ alt="${resource.Forum_lock}" border="0" />
+ </f:verbatim>
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose></li>
+ </ul>
+ </div>
+ </forums:isAllowed>
+ </c:if>
+
+
+ <hr class="forumdashedHR" />
+ <div class="forumthreadlegend">
+ <ul>
+ <li><img src="#{forums:themeURL('resourceFolderNewURL')}"
+ alt="${resource.New_posts}" width="11" height="14" />
+ ${resource.New_posts}</li>
+ <li><img
+ src="#{forums:themeURL('resourceFolderHotNewURL')}"
+ alt="${resource.New_posts_hot}" width="11" height="14" />
+ ${resource.New_posts_hot}</li>
+ <li><img
+ src="#{forums:themeURL('resourceFolderLockedNewURL')}"
+ alt="${resource.New_posts_locked}" width="11" height="14" />
+ ${resource.New_posts_locked}</li>
+ </ul>
+ </div>
+ <div class="forumthreadlegend">
+ <ul>
+ <li><img src="#{forums:themeURL('resourceFolderURL')}"
+ alt="${resource.No_new_posts}" width="11" height="14" />
+ ${resource.No_new_posts}</li>
+ <li><img src="#{forums:themeURL('resourceFolderHotURL')}"
+ alt="${resource.No_new_posts_hot}" width="11" height="14" />
+ ${resource.No_new_posts_hot}</li>
+ <li><img
+ src="#{forums:themeURL('resourceFolderLockedURL')}"
+ alt="${resource.No_new_posts_locked}" width="11" height="14" />
+ ${resource.No_new_posts_locked}</li>
+ </ul>
+ </div>
+ <div class="forumthreadlegendtext">
+
+ <!-- post new topics link -->
+ <forums:isAllowedChoose>
+ <forums:isAllowedWhen fragment="acl://newTopic">
+ <h:outputText value="#{resource['Rules_post_can']}"
+ escape="false" />
+ </forums:isAllowedWhen>
+ <forums:isAllowedOtherwise>
+ <h:outputText value="#{resource['Rules_post_cannot']}"
+ escape="false" />
+ </forums:isAllowedOtherwise>
+ </forums:isAllowedChoose>
+ <br />
+
+ <!-- manage poll link -->
+ <forums:isAllowedChoose>
+ <forums:isAllowedWhen fragment="acl://managePoll">
+ <h:outputText value="#{resource['Rules_poll_can']}"
+ escape="false" />
+ </forums:isAllowedWhen>
+ <forums:isAllowedOtherwise>
+ <h:outputText value="#{resource['Rules_poll_cannot']}"
+ escape="false" />
+ </forums:isAllowedOtherwise>
+ </forums:isAllowedChoose>
+ <br />
+
+ <!-- votePoll link -->
+ <forums:isAllowedChoose>
+ <forums:isAllowedWhen fragment="acl://votePoll">
+ <h:outputText value="#{resource['Rules_vote_can']}"
+ escape="false" />
+ </forums:isAllowedWhen>
+ <forums:isAllowedOtherwise>
+ <h:outputText value="#{resource['Rules_vote_cannot']}"
+ escape="false" />
+ </forums:isAllowedOtherwise>
+ </forums:isAllowedChoose>
+ <br />
+
+ <!-- moderate forum link -->
+ <forums:isAllowedChoose>
+ <forums:isAllowedWhen fragment="acl://moderateForum"
+ contextData="#{forum.forum}">
+ <h:outputText value="#{resource['Rules_moderate_0']}"
+ escape="false" />
+ <h:outputText value="#{resource['Rules_moderate_2']}"
+ escape="false" />
+ </forums:isAllowedWhen>
+ <forums:isAllowedOtherwise>
+ <h:outputText value="#{resource['Rules_moderate_1']}"
+ escape="false" />
+ <h:outputText value="#{resource['Rules_moderate_2']}"
+ escape="false" />
+ </forums:isAllowedOtherwise>
+ </forums:isAllowedChoose>
+ <br />
+
+ </div>
+
+ </h:form>
+
+ <div class="forumlegendjumpboxclear">
+ <ui:include src="/views/jumpbox.xhtml" />
+ </div>
+
+ </forums:isAllowed>
+ </forums:isAllowed>
+ </c:if>
+
+ <c:if test="#{forum.forum==null}">
+ <table width="100%" border="0" cellpadding="0" cellspacing="0"
+ class="forumtablestyle">
+ <tr>
+ <td>
+ <table width="100%" cellspacing="0" cellpadding="1" border="0">
+ <tr>
+ <td> </td>
+ </tr>
+ <tr>
+ <td align="center">${resource.Forum_not_exist}</td>
+ </tr>
+ <tr>
+ <td> </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ </c:if>
+
+
+ </ui:define>
+ </ui:composition>
+
+</div>
Property changes on: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,286 +0,0 @@
-<!--
-/******************************************************************************
- * 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"
->
-
-<ui:composition template="/views/common/common.xhtml">
-<ui:define name="mainContent">
-
-<c:if test="#{myForumsEdit.initialized}">
-
-<div class="forumtitletext">
- <h4>${resource.MyForums_title}</h4>
- <p>${resource.MyForums_info}</p>
-</div>
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
-
- <tr class="header">
- <td class="forumheaderfirst" colspan="2">${resource.Subscribed_forums_info}</td>
- <td class="forumheaderopen">${resource.Last_Post}</td>
- <td class="forumheaderopen">${resource.Notification}</td>
- <td class="forumheadercentered">${resource.Delete}</td>
- </tr>
-
- <c:if test="${forums:collectionSize(myForumsEdit.watchedForums) gt 0}">
- <c:forEach items="#{myForumsEdit.watchedForums}" var="forumrow" varStatus="status" >
-
- <f:subview>
-
- <c:choose>
-
- <c:when test="${forumWatch.selectedForum ne forumrow.id || forumWatch.editMode eq false}">
-
- <f:subview>
-
- <tr>
- <td class="forumlisticon">
- <img src="#{myForumsEdit.forumImages[forumrow.id]}" width="11" height="14"
- alt="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}"
- title="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}" />
- </td>
- <td>
- <h3>
- <h:commandLink action="viewForum" value="${forumrow.name}">
- <f:param name="f" value="${forumrow.id}"/>
- </h:commandLink>
- </h3>
- ${forumrow.description}
- </td>
- <td class="forumlistlast">
-
- <c:choose>
-
- <c:when test="#{myForumsEdit.forumsLastPosts[forumrow.id]!=null}">
-
- <a href="#{forums:postPermlink(myForumsEdit.forumsLastPosts[forumrow.id].id)}">
- <c:choose>
-
- <c:when test="#{forums:isLongerThan(myForumsEdit.forumsLastPosts[forumrow.id].message.subject,25)}">
- #{forums:subString(myForumsEdit.forumsLastPosts[forumrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{myForumsEdit.forumsLastPosts[forumrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{myForumsEdit.anonymous}">
- ${myForumsEdit.forumsLastPosts[forumrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${myForumsEdit.forumsLastPosts[forumrow.id].poster.user.userName}">
- <f:param name="uid" value="#{myForumsEdit.forumsLastPosts[forumrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- <br />
- #{myForumsEdit.forumsLastPosts[forumrow.id].createDate}
-
- </c:when>
-
- <c:otherwise>
- #{resource.No_Posts}
- </c:otherwise>
-
- </c:choose>
- </td>
- <td class="forumlistopen">
- <h:form>
- <input type="hidden" name="f" value="${forumrow.id}"/>
- <input type="hidden" name="editWatch" value="true"/>
- <c:choose>
-
- <c:when test="${myForumsEdit.forumWatches[forumrow.id].mode eq 0}">
- ${resource.EMAIL_LINKED_NOTIFICATION}
- </c:when>
-
- <c:when test="${myForumsEdit.forumWatches[forumrow.id].mode eq 1}">
- ${resource.EMAIL_EMBEDED_NOTIFICATION}
- </c:when>
-
- <c:otherwise>
- ${resource.EMAIL_NO_NOTIFICATION}
- </c:otherwise>
-
- </c:choose>
-  (
- <h:commandLink action="#{forumWatch.dummyAction}">
- <h:outputText value="${resource.Edit}"/>
- </h:commandLink>
- )
- </h:form>
- </td>
- <td class="forumlistcentered">
- <h:form>
- <div class="actionbuttons">
- <ul>
- <li>
- <h:commandLink id="deActivateWatch" action="#{forumWatch.deActivateWatch}">
- <f:param name="f" value="#{forumrow.id}"/>
- <img src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
- alt="${resource.Unsubscribe_from_forum}"
- name="unSubscribe"
- border="0"
- id="unSubscribe" />
- </h:commandLink>
- </li>
- </ul>
- </div>
- </h:form>
- </td>
- </tr>
-
- </f:subview>
-
- </c:when>
-
- <c:otherwise>
-
- <f:subview>
- <tr class="editRow">
- <td class="forumlisticon">
- <img src="#{myForumsEdit.forumImages[forumrow.id]}" width="11" height="14"
- alt="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}"
- title="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}" />
- </td>
- <td>
- <h3>
- <h:commandLink action="viewForum" value="${forumrow.name}">
- <f:param name="f" value="${forumrow.id}"/>
- </h:commandLink>
- </h3>
- ${forumrow.description}
- </td>
- <td colspan="3">
- <div class="forumfloatright">
- <h:form id="notification_${forumrow.id}" >
- <input type="hidden" name="f" value="${forumrow.id}" />
- <select name="notified_watch_type" id="notified_watch_type">
-
- <c:choose>
- <c:when test="${myForumsEdit.watch.mode eq 0}">
- <option value="0" selected="selected" >
- ${resource.EMAIL_LINKED_NOTIFICATION}
- </option>
- </c:when>
- <c:otherwise>
- <option value="0">
- ${resource.EMAIL_LINKED_NOTIFICATION}
- </option>
- </c:otherwise>
- </c:choose>
-
- <c:choose>
- <c:when test="${myForumsEdit.watch.mode eq 1}">
- <option value="1" selected="selected" >
- ${resource.EMAIL_EMBEDED_NOTIFICATION}
- </option>
- </c:when>
- <c:otherwise>
- <option value="1">
- ${resource.EMAIL_EMBEDED_NOTIFICATION}
- </option>
- </c:otherwise>
- </c:choose>
-
- <c:choose>
- <c:when test="${myForumsEdit.watch.mode eq 2}">
- <option value="2" selected="selected" >
- ${resource.EMAIL_NO_NOTIFICATION}
- </option>
- </c:when>
- <c:otherwise>
- <option value="2">
- ${resource.EMAIL_NO_NOTIFICATION}
- </option>
- </c:otherwise>
- </c:choose>
-
- </select>
- <h:commandButton action="${forumWatch.updateNotificationType}"
- value="${resource.Update}" styleClass="buttonMed" />
- </h:form>
- </div>
- </td>
- </tr>
- </f:subview>
-
- </c:otherwise>
-
- </c:choose>
-
- </f:subview>
-
- </c:forEach>
- </c:if>
-
- <c:if test="${forums:collectionSize(myForumsEdit.watchedForums) eq 0}">
- <tr>
- <td class="nonewpostRow" colspan="6">
- ${resource.NotSubscribingToAnyForum}
- </td>
- </tr>
- </c:if>
-
-</table>
-
-<div class="forumlegend">
- <hr class="forumdashedHR" />
- <ul>
- <li>
- <img src="${forums:themeURL('resourceForumNewURL')}" alt="${resource.New_posts}" width="11" height="14" />
- ${resource.New_posts}
- </li>
- <li>
- <img src="${forums:themeURL('resourceForumURL')}" alt="${resource.No_new_posts}" width="11" height="14" />
- ${resource.No_new_posts}
- </li>
- <li>
- <img src="${forums:themeURL('resourceForumLockedURL')}" alt="${resource.Forum_is_locked}" width="11" height="14" />
- ${resource.Forum_is_locked}
- </li>
- </ul>
-</div>
-
-</c:if>
-
-</ui:define>
-</ui:composition>
-</div>
\ No newline at end of file
Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml (rev 0)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,276 @@
+<!--
+/******************************************************************************
+ * 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">
+
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
+
+ <c:if test="#{myForumsEdit.initialized}">
+
+ <div class="forumtitletext">
+ <h4>${resource.MyForums_title}</h4>
+ <p>${resource.MyForums_info}</p>
+ </div>
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0"
+ class="forumtablestyle">
+
+ <tr class="header">
+ <td class="forumheaderfirst" colspan="2">${resource.Subscribed_forums_info}</td>
+ <td class="forumheaderopen">${resource.Last_Post}</td>
+ <td class="forumheaderopen">${resource.Notification}</td>
+ <td class="forumheadercentered">${resource.Delete}</td>
+ </tr>
+
+ <c:if
+ test="${forums:collectionSize(myForumsEdit.watchedForums) gt 0}">
+ <c:forEach items="#{myForumsEdit.watchedForums}" var="forumrow"
+ varStatus="status">
+ <h:form id="notification_${forumrow.id}">
+
+ <f:subview>
+
+ <c:choose>
+
+ <c:when
+ test="${forumWatch.selectedForum ne forumrow.id || forumWatch.editMode eq false}">
+
+ <f:subview>
+
+ <tr>
+ <td class="forumlisticon"><img
+ src="#{myForumsEdit.forumImages[forumrow.id]}" width="11"
+ height="14"
+ alt="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}"
+ title="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}" />
+ </td>
+ <td>
+ <h3>
+ <h:commandLink action="viewForum"
+ value="${forumrow.name}">
+ <f:param name="f" value="${forumrow.id}" />
+ </h:commandLink>
+ </h3> ${forumrow.description}
+ </td>
+ <td class="forumlistlast"><c:choose>
+
+ <c:when
+ test="#{myForumsEdit.forumsLastPosts[forumrow.id]!=null}">
+
+ <a
+ href="#{forums:postPermlink(myForumsEdit.forumsLastPosts[forumrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(myForumsEdit.forumsLastPosts[forumrow.id].message.subject,25)}">
+ #{forums:subString(myForumsEdit.forumsLastPosts[forumrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{myForumsEdit.forumsLastPosts[forumrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a>
+ <br />
+ ${resource.By}
+ <c:choose>
+
+ <c:when test="#{myForumsEdit.anonymous}">
+ ${myForumsEdit.forumsLastPosts[forumrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${myForumsEdit.forumsLastPosts[forumrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{myForumsEdit.forumsLastPosts[forumrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+ <br />
+ #{myForumsEdit.forumsLastPosts[forumrow.id].createDate}
+
+ </c:when>
+
+ <c:otherwise>
+ #{resource.No_Posts}
+ </c:otherwise>
+
+ </c:choose></td>
+ <td class="forumlistopen"><input type="hidden"
+ name="f" value="${forumrow.id}" /> <input type="hidden"
+ name="editWatch" value="true" /> <c:choose>
+
+ <c:when
+ test="${myForumsEdit.forumWatches[forumrow.id].mode eq 0}">
+ ${resource.EMAIL_LINKED_NOTIFICATION}
+ </c:when>
+
+ <c:when
+ test="${myForumsEdit.forumWatches[forumrow.id].mode eq 1}">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}
+ </c:when>
+
+ <c:otherwise>
+ ${resource.EMAIL_NO_NOTIFICATION}
+ </c:otherwise>
+
+ </c:choose>  ( <h:commandLink action="#{forumWatch.dummyAction}">
+ <h:outputText value="${resource.Edit}" />
+ </h:commandLink> )</td>
+ <td class="forumlistcentered">
+ <div class="actionbuttons">
+ <ul>
+ <li><h:commandLink id="deActivateWatch"
+ action="#{forumWatch.deActivateWatch}">
+ <f:param name="f" value="#{forumrow.id}" />
+ <img
+ src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
+ alt="${resource.Unsubscribe_from_forum}"
+ name="unSubscribe" border="0" id="unSubscribe" />
+ </h:commandLink></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+
+ </f:subview>
+
+ </c:when>
+
+ <c:otherwise>
+
+ <f:subview>
+ <tr class="editRow">
+ <td class="forumlisticon"><img
+ src="#{myForumsEdit.forumImages[forumrow.id]}" width="11"
+ height="14"
+ alt="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}"
+ title="#{resource[myForumsEdit.forumImageDescriptions[forumrow.id]]}" />
+ </td>
+ <td>
+ <h3>
+ <h:commandLink action="viewForum"
+ value="${forumrow.name}">
+ <f:param name="f" value="${forumrow.id}" />
+ </h:commandLink>
+ </h3> ${forumrow.description}
+ </td>
+ <td colspan="3">
+ <div class="forumfloatright">
+ <input type="hidden" name="f" value="${forumrow.id}" />
+ <select name="notified_watch_type"
+ id="notified_watch_type">
+
+ <c:choose>
+ <c:when test="${myForumsEdit.watch.mode eq 0}">
+ <option value="0" selected="selected">
+ ${resource.EMAIL_LINKED_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="0">
+ ${resource.EMAIL_LINKED_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="${myForumsEdit.watch.mode eq 1}">
+ <option value="1" selected="selected">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="1">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="${myForumsEdit.watch.mode eq 2}">
+ <option value="2" selected="selected">
+ ${resource.EMAIL_NO_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="2">
+ ${resource.EMAIL_NO_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ </select>
+ <h:commandButton
+ action="${forumWatch.updateNotificationType}"
+ value="${resource.Update}" styleClass="buttonMed" />
+ </div>
+ </td>
+ </tr>
+ </f:subview>
+
+ </c:otherwise>
+
+ </c:choose>
+
+ </f:subview>
+ </h:form>
+ </c:forEach>
+ </c:if>
+
+ <c:if
+ test="${forums:collectionSize(myForumsEdit.watchedForums) eq 0}">
+ <tr>
+ <td class="nonewpostRow" colspan="6">
+ ${resource.NotSubscribingToAnyForum}</td>
+ </tr>
+ </c:if>
+
+ </table>
+
+ <div class="forumlegend">
+ <hr class="forumdashedHR" />
+ <ul>
+ <li><img src="${forums:themeURL('resourceForumNewURL')}"
+ alt="${resource.New_posts}" width="11" height="14" />
+ ${resource.New_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumURL')}"
+ alt="${resource.No_new_posts}" width="11" height="14" />
+ ${resource.No_new_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumLockedURL')}"
+ alt="${resource.Forum_is_locked}" width="11" height="14" />
+ ${resource.Forum_is_locked}</li>
+ </ul>
+ </div>
+
+ </c:if>
+
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Property changes on: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,314 +0,0 @@
-<!--
-/******************************************************************************
- * 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"
->
-
-<ui:composition template="/views/common/common.xhtml">
-<ui:define name="mainContent">
-
-<c:if test="#{myForums.initialized}">
-
-<div class="forumtitletext">
- <h4>${resource.MyForums_title}</h4>
- <p>${resource.MyForums_info}</p>
-</div>
-
-<h:form>
-<table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
-
- <tr class="header">
- <td class="forumheaderfirst" colspan="2">${resource.Subscribed_topics_info}</td>
- <td class="forumheadercentered">${resource.Replies}</td>
- <td class="forumheadercentered">${resource.Views}</td>
- <td class="forumheader250px">${resource.Last_Post}</td>
- <td class="forumheadercentered">${resource.Delete}</td>
- </tr>
-
- <c:if test="${forums:collectionSize(myForums.watchedTopics) gt 0}">
- <c:forEach items="#{myForums.watchedTopics}" var="topicrow" varStatus="status" >
- <tr class='${(status.index%2==0)?"evenRow":"oddRow"}'>
- <td class="forumlisticon">
- <img src="#{forums:folderTypeURL(topicrow,myForums.anonymous)}"
- width="11" height="14"
- alt="${resource.Topic_Moved}" title="${resource.Topic_Moved}" />
- </td>
- <td>
- <h3>
- <h:commandLink action="viewTopic" value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}"/>
- </h:commandLink>
- </h3>
-
- <!-- mini post navigator for this topic -->
- <c:if test="#{myForums.topicNavigator[topicrow.id] ne null && myForums.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="0"/>
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="${2}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="1"/>
- </h:commandLink>
- <c:if test="#{myForums.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="${3}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="2"/>
- </h:commandLink>
- </c:if>
- <c:if test="#{myForums.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic" value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}"/>
- <f:param name="page" value="#{myForums.topicNavigator[topicrow.id].totalPages-1}"/>
- </h:commandLink>
- </c:if>
-  )
- </c:if>
- <br />
- ${resource.By} 
- <c:choose>
-
- <c:when test="#{myForums.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- </td>
- <td class="forumlistcentered">${topicrow.replies}</td>
- <td class="forumlistcentered">${topicrow.viewCount}</td>
- <td class="forumlistlast">
- <a href="#{forums:postPermlink(myForums.topicsLastPosts[topicrow.id].id)}">
- <c:choose>
-
- <c:when test="#{forums:isLongerThan(myForums.topicsLastPosts[topicrow.id].message.subject,25)}">
- #{forums:subString(myForums.topicsLastPosts[topicrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{myForums.topicsLastPosts[topicrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{myForums.anonymous}">
- ${myForums.topicsLastPosts[topicrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${myForums.topicsLastPosts[topicrow.id].poster.user.userName}">
- <f:param name="uid" value="#{myForums.topicsLastPosts[topicrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- <br />
- #{myForums.topicsLastPosts[topicrow.id].createDate}
- </td>
- <td class="forumlistcentered">
- <h:form>
- <div class="actionbuttons">
- <ul>
- <li>
- <h:commandLink id="deActivateWatch" action="#{topicWatch.deActivateWatch}">
- <f:param name="t" value="#{topicrow.id}"/>
- <img src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
- alt="${resource.Unsubscribe_from_topic}"
- name="unSubscribe"
- border="0"
- id="unSubscribe" />
- </h:commandLink>
- </li>
- </ul>
- </div>
- </h:form>
- </td>
- </tr>
- </c:forEach>
- </c:if>
-
- <c:if test="${forums:collectionSize(myForums.watchedTopics) eq 0}">
- <tr>
- <td class="nonewpostRow" colspan="6">
- ${resource.NoNewPosts}
- </td>
- </tr>
- </c:if>
-
- <tr>
- <td class="footerrow" colspan="6">
- <h:commandLink action="myForumsAll" value="${resource.ViewAllSubscribed}"/>
- </td>
- </tr>
- <tr>
- <td class="spacerRow" colspan="6" />
- </tr>
-</table>
-
-<table width="100%" border="0" cellpadding="0" cellspacing="0" class="forumtablestyle">
- <tr class="header">
- <td class="forumheaderfirst" colspan="2">${resource.Subscribed_forums_info}</td>
- <td class="forumheadercentered">#{resource.Topics}</td>
- <td class="forumheadercentered">#{resource.Posts}</td>
- <td class="forumheaderopen">#{resource.Last_Post}</td>
- <td class="forumheadercentered">${resource.Delete}</td>
- </tr>
-
- <c:forEach items="#{myForums.watchedForums}" var="forumrow">
- <forums:isAllowed fragment="acl://readForum" contextData="#{forumrow}">
- <tr>
- <td class="forumlisticon">
- <img src="#{myForums.forumImages[forumrow.id]}" width="11" height="14"
- alt="#{resource[myForums.forumImageDescriptions[forumrow.id]]}"
- title="#{resource[myForums.forumImageDescriptions[forumrow.id]]}" />
- </td>
- <td>
- <h3>
- <h:commandLink action="viewForum" value="#{forumrow.name}">
- <f:param name="f" value="#{forumrow.id}"/>
- </h:commandLink>
- </h3>
- ${forumrow.description}
- </td>
- <td class="forumlistcentered">${forumrow.topicCount}</td>
- <td class="forumlistcentered">${forumrow.postCount}</td>
- <td class="forumlistlast">
-
- <c:choose>
- <c:when test="#{myForums.forumsLastPosts[forumrow.id]!=null}">
-
- <a href="#{forums:postPermlink(myForums.forumsLastPosts[forumrow.id].id)}">
- <c:choose>
- <c:when test="#{forums:isLongerThan(myForums.forumsLastPosts[forumrow.id].message.subject,25)}">
- #{forums:subString(myForums.forumsLastPosts[forumrow.id].message.subject,25)}…
- </c:when>
- <c:otherwise>
- #{myForums.forumsLastPosts[forumrow.id].message.subject}
- </c:otherwise>
- </c:choose>
- </a>
-
- <br></br>
- ${resource.By} 
-
- <c:choose>
-
- <c:when test="#{myForums.anonymous}">
- ${myForums.forumsLastPosts[forumrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile" value="${myForums.forumsLastPosts[forumrow.id].poster.user.userName}">
- <f:param name="uid" value="#{myForums.forumsLastPosts[forumrow.id].poster.user.id}"/>
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
-
- <br></br>
- #{myForums.forumsLastPosts[forumrow.id].createDate}
-
- </c:when>
-
- <c:otherwise>
- #{resource.No_Posts}
- </c:otherwise>
-
- </c:choose>
- </td>
- <td class="forumlistcentered">
- <div class="actionbuttons">
- <ul>
- <li>
- <h:commandLink action="#{forumWatch.deActivateWatch}">
- <f:param name="w" value="#{forums:isWatchingForum(forumrow)}" />
- <img src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
- alt="${resource.Unsubscribe_from_forum}"
- name="unSubscribe"
- border="0"
- id="unSubscribe" />
- </h:commandLink>
- </li>
- </ul>
- </div>
- </td>
- </tr>
- </forums:isAllowed>
- </c:forEach>
-
- <tr>
- <td class="footerrow" colspan="6">
- <h:commandLink action="myForumsEdit" value="${resource.EditAllSubscribed}"/>
- </td>
- </tr>
- <tr>
- <td class="spacerRow" colspan="6" />
- </tr>
-
-</table>
- </h:form>
-
-<div class="forumlegend">
- <hr class="forumdashedHR" />
- <ul>
- <li>
- <img src="${forums:themeURL('resourceForumNewURL')}" alt="${resource.New_posts}" width="11" height="14" />
- ${resource.New_posts}
- </li>
- <li>
- <img src="${forums:themeURL('resourceForumURL')}" alt="${resource.No_new_posts}" width="11" height="14" />
- ${resource.No_new_posts}
- </li>
- <li>
- <img src="${forums:themeURL('resourceForumLockedURL')}" alt="${resource.Forum_is_locked}" width="11" height="14" />
- ${resource.Forum_is_locked}
- </li>
- </ul>
-</div>
-
-</c:if>
-
-</ui:define>
-</ui:composition>
-</div>
Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml (rev 0)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,309 @@
+<!--
+/******************************************************************************
+ * 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">
+
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
+
+ <c:if test="#{myForums.initialized}">
+
+ <div class="forumtitletext">
+ <h4>${resource.MyForums_title}</h4>
+ <p>${resource.MyForums_info}</p>
+ </div>
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0"
+ class="forumtablestyle">
+
+ <tr class="header">
+ <td class="forumheaderfirst" colspan="2">${resource.Subscribed_topics_info}</td>
+ <td class="forumheadercentered">${resource.Replies}</td>
+ <td class="forumheadercentered">${resource.Views}</td>
+ <td class="forumheader250px">${resource.Last_Post}</td>
+ <td class="forumheadercentered">${resource.Delete}</td>
+ </tr>
+
+ <c:if test="${forums:collectionSize(myForums.watchedTopics) gt 0}">
+ <c:forEach items="#{myForums.watchedTopics}" var="topicrow"
+ varStatus="status">
+ <h:form id="notification_${topicrow.id}">
+ <tr class='${(status.index%2==0)?"evenRow":"oddRow"}'>
+ <td class="forumlisticon"><img
+ src="#{forums:folderTypeURL(topicrow,myForums.anonymous)}"
+ width="11" height="14" alt="${resource.Topic_Moved}"
+ title="${resource.Topic_Moved}" /></td>
+ <td>
+ <h3>
+ <h:commandLink action="viewTopic" value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{myForums.topicNavigator[topicrow.id] ne null && myForums.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="${2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{myForums.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic" value="${3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{myForums.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{myForums.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{myForums.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+ </td>
+ <td class="forumlistcentered">${topicrow.replies}</td>
+ <td class="forumlistcentered">${topicrow.viewCount}</td>
+ <td class="forumlistlast"><a
+ href="#{forums:postPermlink(myForums.topicsLastPosts[topicrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(myForums.topicsLastPosts[topicrow.id].message.subject,25)}">
+ #{forums:subString(myForums.topicsLastPosts[topicrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{myForums.topicsLastPosts[topicrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a> <br /> ${resource.By} <c:choose>
+
+ <c:when test="#{myForums.anonymous}">
+ ${myForums.topicsLastPosts[topicrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${myForums.topicsLastPosts[topicrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{myForums.topicsLastPosts[topicrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose> <br /> #{myForums.topicsLastPosts[topicrow.id].createDate}</td>
+ <td class="forumlistcentered">
+ <div class="actionbuttons">
+ <ul>
+ <li><h:commandLink id="deActivateWatch"
+ action="#{topicWatch.deActivateWatch}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <img
+ src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
+ alt="${resource.Unsubscribe_from_topic}"
+ name="unSubscribe" border="0" id="unSubscribe" />
+ </h:commandLink></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </h:form>
+ </c:forEach>
+ </c:if>
+
+ <c:if test="${forums:collectionSize(myForums.watchedTopics) eq 0}">
+ <tr>
+ <td class="nonewpostRow" colspan="6">${resource.NoNewPosts}
+ </td>
+ </tr>
+ </c:if>
+ <h:form>
+ <tr>
+ <td class="footerrow" colspan="6"><h:commandLink
+ action="myForumsAll" value="${resource.ViewAllSubscribed}" /></td>
+ </tr>
+ <tr>
+ <td class="spacerRow" colspan="6" />
+ </tr>
+ </h:form>
+ </table>
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0"
+ class="forumtablestyle">
+ <tr class="header">
+ <td class="forumheaderfirst" colspan="2">${resource.Subscribed_forums_info}</td>
+ <td class="forumheadercentered">#{resource.Topics}</td>
+ <td class="forumheadercentered">#{resource.Posts}</td>
+ <td class="forumheaderopen">#{resource.Last_Post}</td>
+ <td class="forumheadercentered">${resource.Delete}</td>
+ </tr>
+
+ <c:forEach items="#{myForums.watchedForums}" var="forumrow">
+ <h:form id="notification_${forumrow.id}">
+ <forums:isAllowed fragment="acl://readForum"
+ contextData="#{forumrow}">
+ <tr>
+ <td class="forumlisticon"><img
+ src="#{myForums.forumImages[forumrow.id]}" width="11"
+ height="14"
+ alt="#{resource[myForums.forumImageDescriptions[forumrow.id]]}"
+ title="#{resource[myForums.forumImageDescriptions[forumrow.id]]}" />
+ </td>
+ <td>
+ <h3>
+ <h:commandLink action="viewForum" value="#{forumrow.name}">
+ <f:param name="f" value="#{forumrow.id}" />
+ </h:commandLink>
+ </h3> ${forumrow.description}
+ </td>
+ <td class="forumlistcentered">${forumrow.topicCount}</td>
+ <td class="forumlistcentered">${forumrow.postCount}</td>
+ <td class="forumlistlast"><c:choose>
+ <c:when test="#{myForums.forumsLastPosts[forumrow.id]!=null}">
+
+ <a
+ href="#{forums:postPermlink(myForums.forumsLastPosts[forumrow.id].id)}">
+ <c:choose>
+ <c:when
+ test="#{forums:isLongerThan(myForums.forumsLastPosts[forumrow.id].message.subject,25)}">
+ #{forums:subString(myForums.forumsLastPosts[forumrow.id].message.subject,25)}…
+ </c:when>
+ <c:otherwise>
+ #{myForums.forumsLastPosts[forumrow.id].message.subject}
+ </c:otherwise>
+ </c:choose>
+ </a>
+
+ <br></br>
+ ${resource.By} 
+
+ <c:choose>
+
+ <c:when test="#{myForums.anonymous}">
+ ${myForums.forumsLastPosts[forumrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${myForums.forumsLastPosts[forumrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{myForums.forumsLastPosts[forumrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+
+ <br></br>
+ #{myForums.forumsLastPosts[forumrow.id].createDate}
+
+ </c:when>
+
+ <c:otherwise>
+ #{resource.No_Posts}
+ </c:otherwise>
+
+ </c:choose></td>
+ <td class="forumlistcentered">
+ <div class="actionbuttons">
+ <ul>
+ <li><h:commandLink
+ action="#{forumWatch.deActivateWatch}">
+ <f:param name="w"
+ value="#{forums:isWatchingForum(forumrow)}" />
+ <img
+ src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
+ alt="${resource.Unsubscribe_from_forum}"
+ name="unSubscribe" border="0" id="unSubscribe" />
+ </h:commandLink></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </forums:isAllowed>
+ </h:form>
+ </c:forEach>
+
+ <h:form>
+ <tr>
+ <td class="footerrow" colspan="6"><h:commandLink
+ action="myForumsEdit" value="${resource.EditAllSubscribed}" />
+ </td>
+ </tr>
+ <tr>
+ <td class="spacerRow" colspan="6" />
+ </tr>
+ </h:form>
+
+ </table>
+
+ <div class="forumlegend">
+ <hr class="forumdashedHR" />
+ <ul>
+ <li><img src="${forums:themeURL('resourceForumNewURL')}"
+ alt="${resource.New_posts}" width="11" height="14" />
+ ${resource.New_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumURL')}"
+ alt="${resource.No_new_posts}" width="11" height="14" />
+ ${resource.No_new_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumLockedURL')}"
+ alt="${resource.Forum_is_locked}" width="11" height="14" />
+ ${resource.Forum_is_locked}</li>
+ </ul>
+ </div>
+
+ </c:if>
+
+ </ui:define>
+ </ui:composition>
+</div>
Property changes on: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Deleted: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml 2013-06-20 19:34:38 UTC (rev 38363)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -1,332 +0,0 @@
-<!--
-/******************************************************************************
- * 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">
-
- <ui:composition template="/views/common/common.xhtml">
- <ui:define name="mainContent">
-
- <c:if test="#{myForumsAll.initialized}">
-
- <div class="forumtitletext">
- <h4>${resource.MyForums_title}</h4>
- <p>${resource.MyForums_info}</p>
- </div>
-
- <table width="100%" border="0" cellpadding="0" cellspacing="0"
- class="forumtablestyle">
-
- <tr class="header">
- <td class="forumheaderfirst" colspan="2">${resource.Subscribed_topics_info}</td>
- <td class="forumheaderopen">${resource.Last_Post}</td>
- <td class="forumheaderopen">${resource.Notification}</td>
- <td class="forumheadercentered">${resource.Delete}</td>
- </tr>
-
- <c:if
- test="${forums:collectionSize(myForumsAll.watchedTopics) gt 0}">
- <c:forEach items="#{myForumsAll.watchedTopics}" var="topicrow"
- varStatus="status">
- <ui:fragment>
- <c:choose>
-
- <c:when
- test="${topicWatch.topicId ne topicrow.id || topicWatch.editMode eq false}">
- <ui:fragment>
- <tr class='${(status.index%2==0)?"evenRow":"oddRow"}'>
- <td class="forumlisticon"><img
- src="#{forums:folderTypeURL(topicrow,myForumsAll.anonymous)}"
- width="11" height="14" alt="${resource.Topic_Moved}"
- title="${resource.Topic_Moved}" /></td>
- <h:form>
- <td>
- <h3>
- <h:commandLink action="viewTopic"
- value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}" />
- </h:commandLink>
- </h3> <!-- mini post navigator for this topic --> <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id] ne null && myForumsAll.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="0" />
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="${2}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="1" />
- </h:commandLink>
- <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="{3}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="2" />
- </h:commandLink>
- </c:if>
- <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic"
- value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page"
- value="#{myForumsAll.topicNavigator[topicrow.id].totalPages-1}" />
- </h:commandLink>
- </c:if>
-  )
- </c:if> <br /> ${resource.By}  <c:choose>
-
- <c:when test="#{myForumsAll.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile"
- value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}" />
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- </td>
- <td class="forumlistlast"><a
- href="#{forums:postPermlink(myForumsAll.topicsLastPosts[topicrow.id].id)}">
- <c:choose>
-
- <c:when
- test="#{forums:isLongerThan(myForumsAll.topicsLastPosts[topicrow.id].message.subject,25)}">
- #{forums:subString(myForumsAll.topicsLastPosts[topicrow.id].message.subject,25)}…
- </c:when>
-
- <c:otherwise>
- #{myForumsAll.topicsLastPosts[topicrow.id].message.subject}
- </c:otherwise>
-
- </c:choose>
- </a> <br /> ${resource.By} <c:choose>
-
- <c:when test="#{myForumsAll.anonymous}">
- ${myForumsAll.topicsLastPosts[topicrow.id].poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile"
- value="${myForumsAll.topicsLastPosts[topicrow.id].poster.user.userName}">
- <f:param name="uid"
- value="#{myForumsAll.topicsLastPosts[topicrow.id].poster.user.id}" />
- </h:commandLink>
- </c:otherwise>
-
- </c:choose> <br />
- #{myForumsAll.topicsLastPosts[topicrow.id].createDate}</td>
- </h:form>
- <td class="forumlistopen"><h:form>
- <input type="hidden" name="t" value="${topicrow.id}" />
- <input type="hidden" name="editWatch" value="true" />
- <c:choose>
-
- <c:when
- test="${myForumsAll.topicWatches[topicrow.id].mode eq 0}">
- ${resource.EMAIL_LINKED_NOTIFICATION}
- </c:when>
-
- <c:when
- test="${myForumsAll.topicWatches[topicrow.id].mode eq 1}">
- ${resource.EMAIL_EMBEDED_NOTIFICATION}
- </c:when>
-
- <c:otherwise>
- ${resource.EMAIL_NO_NOTIFICATION}
- </c:otherwise>
-
- </c:choose>
-  (
- <h:commandLink action="#{topicWatch.dummyAction}">
- <h:outputText value="${resource.Edit}" />
- </h:commandLink>
- )
- </h:form></td>
- <td class="forumlistcentered"><h:form>
- <div class="actionbuttons">
- <ul>
- <li><h:commandLink id="deActivateWatch"
- action="#{topicWatch.deActivateWatch}">
- <f:param name="t" value="#{topicrow.id}" />
- <img
- src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
- alt="${resource.Unsubscribe_from_topic}"
- name="unSubscribe" border="0" id="unSubscribe" />
- </h:commandLink></li>
- </ul>
- </div>
- </h:form></td>
- </tr>
- </ui:fragment>
- </c:when>
-
- <c:otherwise>
- <ui:fragment>
- <tr class="editRow">
- <td class="forumlisticon"><img
- src="#{forums:folderTypeURL(topicrow,myForumsAll.anonymous)}"
- width="11" height="14" alt="${resource.Topic_Moved}"
- title="${resource.Topic_Moved}" /></td>
- <td>
- <h3>
- <h:commandLink action="viewTopic"
- value="${topicrow.subject}">
- <f:param name="t" value="${topicrow.id}" />
- </h:commandLink>
- </h3> <!-- mini post navigator for this topic --> <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id] ne null && myForumsAll.topicNavigator[topicrow.id].totalPages gt 1}">
-  ( 
- <h:commandLink action="viewTopic" value="${1}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="0" />
- </h:commandLink>
-  
- <h:commandLink action="viewTopic" value="${2}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="1" />
- </h:commandLink>
- <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 2}">
-  
- <h:commandLink action="viewTopic" value="${3}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page" value="2" />
- </h:commandLink>
- </c:if>
- <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 3}">
-  … 
- <h:commandLink action="viewTopic"
- value="${resource.Last_page}">
- <f:param name="t" value="#{topicrow.id}" />
- <f:param name="page"
- value="#{myForumsAll.topicNavigator[topicrow.id].totalPages-1}" />
- </h:commandLink>
- </c:if>
-  )
- </c:if> <br /> ${resource.By}  <c:choose>
-
- <c:when test="#{myForumsAll.anonymous}">
- ${topicrow.poster.user.userName}
- </c:when>
-
- <c:otherwise>
- <h:commandLink action="viewProfile"
- value="${topicrow.poster.user.userName}">
- <f:param name="uid" value="${topicrow.poster.user.id}" />
- </h:commandLink>
- </c:otherwise>
-
- </c:choose>
- </td>
- <td colspan="3">
- <div class="forumfloatright">
- <h:form id="notification_${topicrow.id}">
- <input type="hidden" name="t" value="${topicrow.id}" />
- <select name="notified_watch_type"
- id="notified_watch_type">
-
- <c:choose>
- <c:when test="${myForumsAll.watch.mode eq 0}">
- <option value="0" selected="selected">
- ${resource.EMAIL_LINKED_NOTIFICATION}</option>
- </c:when>
- <c:otherwise>
- <option value="0">
- ${resource.EMAIL_LINKED_NOTIFICATION}</option>
- </c:otherwise>
- </c:choose>
-
- <c:choose>
- <c:when test="${myForumsAll.watch.mode eq 1}">
- <option value="1" selected="selected">
- ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
- </c:when>
- <c:otherwise>
- <option value="1">
- ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
- </c:otherwise>
- </c:choose>
-
- <c:choose>
- <c:when test="${myForumsAll.watch.mode eq 2}">
- <option value="2" selected="selected">
- ${resource.EMAIL_NO_NOTIFICATION}</option>
- </c:when>
- <c:otherwise>
- <option value="2">
- ${resource.EMAIL_NO_NOTIFICATION}</option>
- </c:otherwise>
- </c:choose>
-
- </select>
- <h:commandButton
- action="${topicWatch.updateNotificationType}"
- value="${resource.Update}" styleClass="buttonMed" />
- </h:form>
- </div>
- </td>
- </tr>
- </ui:fragment>
- </c:otherwise>
-
- </c:choose>
- </ui:fragment>
- </c:forEach>
- </c:if>
- </table>
-
- <div class="forumlegend">
- <hr class="forumdashedHR" />
- <ul>
- <li><img src="${forums:themeURL('resourceForumNewURL')}"
- alt="${resource.New_posts}" width="11" height="14" />
- ${resource.New_posts}</li>
- <li><img src="${forums:themeURL('resourceForumURL')}"
- alt="${resource.No_new_posts}" width="11" height="14" />
- ${resource.No_new_posts}</li>
- <li><img src="${forums:themeURL('resourceForumLockedURL')}"
- alt="${resource.Forum_is_locked}" width="11" height="14" />
- ${resource.Forum_is_locked}</li>
- </ul>
- </div>
-
- </c:if>
-
- </ui:define>
- </ui:composition>
-</div>
\ No newline at end of file
Added: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml (rev 0)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
@@ -0,0 +1,325 @@
+<!--
+/******************************************************************************
+ * 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">
+
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
+
+ <c:if test="#{myForumsAll.initialized}">
+
+ <div class="forumtitletext">
+ <h4>${resource.MyForums_title}</h4>
+ <p>${resource.MyForums_info}</p>
+ </div>
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="0"
+ class="forumtablestyle">
+
+ <tr class="header">
+ <td class="forumheaderfirst" colspan="2">${resource.Subscribed_topics_info}</td>
+ <td class="forumheaderopen">${resource.Last_Post}</td>
+ <td class="forumheaderopen">${resource.Notification}</td>
+ <td class="forumheadercentered">${resource.Delete}</td>
+ </tr>
+
+ <c:if
+ test="${forums:collectionSize(myForumsAll.watchedTopics) gt 0}">
+ <c:forEach items="#{myForumsAll.watchedTopics}" var="topicrow"
+ varStatus="status">
+ <h:form id="notification_${topicrow.id}">
+ <ui:fragment>
+ <c:choose>
+
+ <c:when
+ test="${topicWatch.topicId ne topicrow.id || topicWatch.editMode eq false}">
+ <ui:fragment>
+ <tr class='${(status.index%2==0)?"evenRow":"oddRow"}'>
+ <td class="forumlisticon"><img
+ src="#{forums:folderTypeURL(topicrow,myForumsAll.anonymous)}"
+ width="11" height="14" alt="${resource.Topic_Moved}"
+ title="${resource.Topic_Moved}" /></td>
+ <td>
+ <h3>
+ <h:commandLink action="viewTopic"
+ value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id] ne null && myForumsAll.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="${2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic" value="{3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{myForumsAll.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{myForumsAll.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+ </td>
+ <td class="forumlistlast"><a
+ href="#{forums:postPermlink(myForumsAll.topicsLastPosts[topicrow.id].id)}">
+ <c:choose>
+
+ <c:when
+ test="#{forums:isLongerThan(myForumsAll.topicsLastPosts[topicrow.id].message.subject,25)}">
+ #{forums:subString(myForumsAll.topicsLastPosts[topicrow.id].message.subject,25)}…
+ </c:when>
+
+ <c:otherwise>
+ #{myForumsAll.topicsLastPosts[topicrow.id].message.subject}
+ </c:otherwise>
+
+ </c:choose>
+ </a> <br /> ${resource.By} <c:choose>
+
+ <c:when test="#{myForumsAll.anonymous}">
+ ${myForumsAll.topicsLastPosts[topicrow.id].poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${myForumsAll.topicsLastPosts[topicrow.id].poster.user.userName}">
+ <f:param name="uid"
+ value="#{myForumsAll.topicsLastPosts[topicrow.id].poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose> <br />
+ #{myForumsAll.topicsLastPosts[topicrow.id].createDate}</td>
+ <td class="forumlistopen"><input type="hidden"
+ name="t" value="${topicrow.id}" /> <input type="hidden"
+ name="editWatch" value="true" /> <c:choose>
+
+ <c:when
+ test="${myForumsAll.topicWatches[topicrow.id].mode eq 0}">
+ ${resource.EMAIL_LINKED_NOTIFICATION}
+ </c:when>
+
+ <c:when
+ test="${myForumsAll.topicWatches[topicrow.id].mode eq 1}">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}
+ </c:when>
+
+ <c:otherwise>
+ ${resource.EMAIL_NO_NOTIFICATION}
+ </c:otherwise>
+
+ </c:choose>  ( <h:commandLink action="#{topicWatch.dummyAction}">
+ <h:outputText value="${resource.Edit}" />
+ </h:commandLink> )</td>
+ <td class="forumlistcentered">
+ <div class="actionbuttons">
+ <ul>
+ <li><h:commandLink id="deActivateWatch"
+ action="#{topicWatch.deActivateWatch}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <img
+ src="#{forums:themeURL('resourceTopicModeDeleteURL')}"
+ alt="${resource.Unsubscribe_from_topic}"
+ name="unSubscribe" border="0" id="unSubscribe" />
+ </h:commandLink></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </ui:fragment>
+ </c:when>
+
+ <c:otherwise>
+ <ui:fragment>
+ <tr class="editRow">
+ <td class="forumlisticon"><img
+ src="#{forums:folderTypeURL(topicrow,myForumsAll.anonymous)}"
+ width="11" height="14" alt="${resource.Topic_Moved}"
+ title="${resource.Topic_Moved}" /></td>
+ <td>
+ <h3>
+ <h:commandLink action="viewTopic"
+ value="${topicrow.subject}">
+ <f:param name="t" value="${topicrow.id}" />
+ </h:commandLink>
+ </h3> <!-- mini post navigator for this topic --> <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id] ne null && myForumsAll.topicNavigator[topicrow.id].totalPages gt 1}">
+  ( 
+ <h:commandLink action="viewTopic" value="${1}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="0" />
+ </h:commandLink>
+  
+ <h:commandLink action="viewTopic" value="${2}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="1" />
+ </h:commandLink>
+ <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 2}">
+  
+ <h:commandLink action="viewTopic" value="${3}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page" value="2" />
+ </h:commandLink>
+ </c:if>
+ <c:if
+ test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 3}">
+  … 
+ <h:commandLink action="viewTopic"
+ value="${resource.Last_page}">
+ <f:param name="t" value="#{topicrow.id}" />
+ <f:param name="page"
+ value="#{myForumsAll.topicNavigator[topicrow.id].totalPages-1}" />
+ </h:commandLink>
+ </c:if>
+  )
+ </c:if> <br /> ${resource.By}  <c:choose>
+
+ <c:when test="#{myForumsAll.anonymous}">
+ ${topicrow.poster.user.userName}
+ </c:when>
+
+ <c:otherwise>
+ <h:commandLink action="viewProfile"
+ value="${topicrow.poster.user.userName}">
+ <f:param name="uid" value="${topicrow.poster.user.id}" />
+ </h:commandLink>
+ </c:otherwise>
+
+ </c:choose>
+ </td>
+ <td colspan="3">
+ <div class="forumfloatright">
+ <input type="hidden" name="t" value="${topicrow.id}" />
+ <select name="notified_watch_type"
+ id="notified_watch_type">
+
+ <c:choose>
+ <c:when test="${myForumsAll.watch.mode eq 0}">
+ <option value="0" selected="selected">
+ ${resource.EMAIL_LINKED_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="0">
+ ${resource.EMAIL_LINKED_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="${myForumsAll.watch.mode eq 1}">
+ <option value="1" selected="selected">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="1">
+ ${resource.EMAIL_EMBEDED_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ <c:choose>
+ <c:when test="${myForumsAll.watch.mode eq 2}">
+ <option value="2" selected="selected">
+ ${resource.EMAIL_NO_NOTIFICATION}</option>
+ </c:when>
+ <c:otherwise>
+ <option value="2">
+ ${resource.EMAIL_NO_NOTIFICATION}</option>
+ </c:otherwise>
+ </c:choose>
+
+ </select>
+ <h:commandButton
+ action="${topicWatch.updateNotificationType}"
+ value="${resource.Update}" styleClass="buttonMed" />
+ </div>
+ </td>
+ </tr>
+ </ui:fragment>
+ </c:otherwise>
+
+ </c:choose>
+ </ui:fragment>
+ </h:form>
+ </c:forEach>
+ </c:if>
+ </table>
+
+ <div class="forumlegend">
+ <hr class="forumdashedHR" />
+ <ul>
+ <li><img src="${forums:themeURL('resourceForumNewURL')}"
+ alt="${resource.New_posts}" width="11" height="14" />
+ ${resource.New_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumURL')}"
+ alt="${resource.No_new_posts}" width="11" height="14" />
+ ${resource.No_new_posts}</li>
+ <li><img src="${forums:themeURL('resourceForumLockedURL')}"
+ alt="${resource.Forum_is_locked}" width="11" height="14" />
+ ${resource.Forum_is_locked}</li>
+ </ul>
+ </div>
+
+ </c:if>
+
+ </ui:define>
+ </ui:composition>
+</div>
\ No newline at end of file
Property changes on: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
___________________________________________________________________
Added: svn:mime-type
+ text/plain
More information about the jboss-svn-commits
mailing list