[jboss-svn-commits] JBL Code SVN: r38365 - in labs/jbossforums/branches/forums130P27/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:59 EDT 2013
Author: sviluppatorefico
Date: 2013-06-20 15:35:59 -0400 (Thu, 20 Jun 2013)
New Revision: 38365
Modified:
labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
Log:
bug fixing on the moderation and polling
Modified: labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/ForumWatchController.java 2013-06-20 19:35:59 UTC (rev 38365)
@@ -307,6 +307,7 @@
{
ForumWatch forumWatch = getForumsModule(forumsModule).findForumWatchByUserAndForum(PortalUtil.getUser(),this.selectedForum);
forumWatch.setMode(watchMode);
+ getForumsModule(forumsModule).update(forumWatch);
navState="success";
} catch (Exception e)
{
Modified: labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/main/org/jboss/portlet/forums/ui/action/TopicWatchController.java 2013-06-20 19:35:59 UTC (rev 38365)
@@ -265,6 +265,7 @@
{
TopicWatch topicWatch = getForumsModule(forumsModule).findTopicWatchByUserAndTopic(PortalUtil.getUser(),this.topicId);
topicWatch.setMode(watchType);
+ getForumsModule(forumsModule).update(topicWatch);
navState="success";
} catch (Exception e)
{
Modified: labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2013-06-20 19:35:59 UTC (rev 38365)
@@ -23,862 +23,836 @@
******************************************************************************/
-->
-<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"
->
+<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">
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
-<c:if test="#{forum.initialized && forum.forum!=null && forum.forum.id!=-1}">
+ <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">
+ <!-- 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}" />
- <c:if test="${forums:feedsConfigured()}">
- <!-- feeds -->
- <a href="#{forum.rssFeed}">
- <img src="#{forums:themeURL('resourceIconFeedURL')}" border="0" />
- RSS
- </a>
+ <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>
+ <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}">
+
+ <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>
+ <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}">
+ <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="{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>
+ <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}">
+ </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)}">
+
+ <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>
+
+ <c:otherwise>
#{forum.topicLastPosts[topicrow.id].message.subject}
</c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{myForum.anonymous}">
+
+ </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}">
+
+ <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>
+ <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}">
+ <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="${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>
+ <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}">
+ </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)}">
+
+ <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>
+
+ <c:otherwise>
#{forum.topicLastPosts[topicrow.id].message.subject}
</c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{category.anonymous}">
+
+ </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}">
+ <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>
+ <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}">
+ <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="${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>
+ <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}">
+ </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)}">
+
+ <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>
+
+ <c:otherwise>
#{forum.topicLastPosts[topicrow.id].message.subject}
</c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{category.anonymous}">
+
+ </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>
-
+ <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>
- <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">
+ </c:choose> <br /> #{forum.topicLastPosts[topicrow.id].createDate}</td>
+ </tr>
- <!-- 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/>
+ </c:forEach>
+ </c:if>
- <!-- 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/>
+ </c:when>
- <!-- 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/>
+ <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>
- <!-- 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/>
+ <!-- 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>
- </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>
+ <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>
-</ui:define>
-</ui:composition>
+ <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>
Modified: labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_editforums.xhtml 2013-06-20 19:35:59 UTC (rev 38365)
@@ -23,264 +23,254 @@
******************************************************************************/
-->
-<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"
->
+<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">
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
-<c:if test="#{myForumsEdit.initialized}">
+ <c:if test="#{myForumsEdit.initialized}">
-<div class="forumtitletext">
- <h4>${resource.MyForums_title}</h4>
- <p>${resource.MyForums_info}</p>
-</div>
+ <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">
+ <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>
+ <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: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)}">
+ <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>
+
+ <c:otherwise>
#{myForumsEdit.forumsLastPosts[forumrow.id].message.subject}
</c:otherwise>
-
- </c:choose>
- </a>
- <br />
+
+ </c:choose>
+ </a>
+ <br />
${resource.By}
<c:choose>
-
- <c:when test="#{myForumsEdit.anonymous}">
+
+ <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 />
+
+ <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>
+
+ <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}">
+
+ </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}">
+
+ <c:when
+ test="${myForumsEdit.forumWatches[forumrow.id].mode eq 1}">
${resource.EMAIL_EMBEDED_NOTIFICATION}
</c:when>
-
- <c:otherwise>
+
+ <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>
+ </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>
- <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>
+ </f:subview>
- </c:otherwise>
-
- </c:choose>
+ </c:when>
- </f:subview>
+ <c:otherwise>
- </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>
+ <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">
-<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: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:if>
+ <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>
-</ui:define>
-</ui:composition>
+ <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
Modified: labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_main.xhtml 2013-06-20 19:35:59 UTC (rev 38365)
@@ -23,292 +23,287 @@
******************************************************************************/
-->
-<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"
->
+<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">
+ <ui:composition template="/views/common/common.xhtml">
+ <ui:define name="mainContent">
-<c:if test="#{myForums.initialized}">
+ <c:if test="#{myForums.initialized}">
-<div class="forumtitletext">
- <h4>${resource.MyForums_title}</h4>
- <p>${resource.MyForums_info}</p>
-</div>
+ <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">
+ <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}">
+ <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>
+ <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}">
+ <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}">
+ <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>
+ <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}">
+ </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)}">
+
+ <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>
+
+ <c:otherwise>
#{myForums.topicsLastPosts[topicrow.id].message.subject}
</c:otherwise>
-
- </c:choose>
- </a>
- <br />
- ${resource.By}
- <c:choose>
-
- <c:when test="#{myForums.anonymous}">
+
+ </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)}">
+ <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>
+ <c:otherwise>
#{myForums.forumsLastPosts[forumrow.id].message.subject}
</c:otherwise>
- </c:choose>
- </a>
-
- <br></br>
+ </c:choose>
+ </a>
+
+ <br></br>
${resource.By} 
<c:choose>
-
- <c:when test="#{myForums.anonymous}">
+
+ <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>
+
+ <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>
+
+ <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: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>
-</c:if>
+ <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>
-</ui:define>
-</ui:composition>
+ </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>
Modified: labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml
===================================================================
--- labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml 2013-06-20 19:35:23 UTC (rev 38364)
+++ labs/jbossforums/branches/forums130P27/forums/src/resources/portal-forums-war/views/myforums/myforums_viewall.xhtml 2013-06-20 19:35:59 UTC (rev 38365)
@@ -55,18 +55,18 @@
test="${forums:collectionSize(myForumsAll.watchedTopics) gt 0}">
<c:forEach items="#{myForumsAll.watchedTopics}" var="topicrow"
varStatus="status">
- <ui:fragment>
- <c:choose>
+ <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>
- <h:form>
+ <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"
@@ -149,11 +149,9 @@
</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>
+ <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}">
@@ -169,14 +167,10 @@
${resource.EMAIL_NO_NOTIFICATION}
</c:otherwise>
- </c:choose>
-  (
- <h:commandLink action="#{topicWatch.dummyAction}">
+ </c:choose>  ( <h:commandLink action="#{topicWatch.dummyAction}">
<h:outputText value="${resource.Edit}" />
- </h:commandLink>
- )
- </h:form></td>
- <td class="forumlistcentered"><h:form>
+ </h:commandLink> )</td>
+ <td class="forumlistcentered">
<div class="actionbuttons">
<ul>
<li><h:commandLink id="deActivateWatch"
@@ -189,73 +183,72 @@
</h:commandLink></li>
</ul>
</div>
- </h:form></td>
- </tr>
- </ui:fragment>
- </c:when>
+ </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}">
+ <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>
+ <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" />
+ <f:param name="page" value="1" />
</h:commandLink>
- </c:if>
- <c:if
- test="#{myForumsAll.topicNavigator[topicrow.id].totalPages gt 3}">
+ <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>
+ 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}">
+ <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: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}">
+ </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">
@@ -297,15 +290,15 @@
<h:commandButton
action="${topicWatch.updateNotificationType}"
value="${resource.Update}" styleClass="buttonMed" />
- </h:form>
- </div>
- </td>
- </tr>
- </ui:fragment>
- </c:otherwise>
+ </div>
+ </td>
+ </tr>
+ </ui:fragment>
+ </c:otherwise>
- </c:choose>
- </ui:fragment>
+ </c:choose>
+ </ui:fragment>
+ </h:form>
</c:forEach>
</c:if>
</table>
More information about the jboss-svn-commits
mailing list