|
From: <jbo...@li...> - 2006-07-03 16:58:45
|
Author: unibrew
Date: 2006-07-03 12:58:38 -0400 (Mon, 03 Jul 2006)
New Revision: 4902
Modified:
labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
Log:
[JBFORUMS-89] and [JBFORUMS-94] Refresh issue for deleting, locking and unlocking actions solved. Flow updates and finishing moderator's actions integration into TopicView.
Modified: labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java
===================================================================
--- labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/main/org/jboss/portlet/forums/ui/action/ModeratorAction.java 2006-07-03 16:58:38 UTC (rev 4902)
@@ -225,8 +225,6 @@
message = bundle.getString("SUCC_TOPIC_MOVED");
FacesContext.getCurrentInstance().addMessage("message",
new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(this.forum.getId());
- checkboxes=new HashMap();
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -267,10 +265,7 @@
}
message = bundle.getString("SUCC_TOPIC_LOCKED");
FacesContext.getCurrentInstance().addMessage("message",
- new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(forum.getId());
-
- checkboxes=new HashMap();
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -319,9 +314,7 @@
}
message = bundle.getString("SUCC_TOPIC_UNLOCKED");
FacesContext.getCurrentInstance().addMessage("message",
- new FacesMessage(FacesMessage.SEVERITY_WARN,message, "moderate"));
- this.forum = BaseController.getForumsModule().findForumById(forum.getId());
- checkboxes=new HashMap();
+ new FacesMessage(FacesMessage.SEVERITY_INFO,message, "moderate"));
} catch (Exception e)
{
JSFUtil.handleException(e);
@@ -428,7 +421,7 @@
}
private void execute() throws Exception
- {
+ {
if (this.bundle == null) {
// Getting ResourceBundle with current Locale
FacesContext ctx = FacesContext.getCurrentInstance();
@@ -450,7 +443,7 @@
// trying to get forumId from request parameter
int forumId = -1;
String f = ForumUtil.getParameter(Constants.p_forumId);
-
+
if(f!=null && f.trim().length()>0)
{
forumId = Integer.parseInt(f);
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/WEB-INF/forums-config.xml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -82,6 +82,10 @@
<key>moderator</key>
<value>/views/moderator/modcp_body.jsf</value>
</map-entry>
+ <map-entry>
+ <key>topicSplit</key>
+ <value>/views/moderator/modcp_split.jsf</value>
+ </map-entry>
</map-entries>
</managed-property>
</managed-bean>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/forums/viewforum_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -652,8 +652,10 @@
<forums:isAllowed fragment="acl://votePoll">
You <b>cannot</b> vote in polls in this forum <br/>
</forums:isAllowed>
- <!-- TODO: insert security check to make sure "moderator access" is allowed on "this forum" -->
+ <!-- TODO: insert link to moderator control panel if user is allowed to moderate this forum -->
+ <forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">
You <b>cannot</b> moderate this forum <b/>
+ </forums:isAllowed>
</span>
<ui:include src="/views/jumpbox.xhtml"/>
</span>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/delete_topic.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -42,6 +42,7 @@
<tr>
<td class="row1" align="center">
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<span class="gen"><br/>
${resource.Topic_delete_confirm}
<br/><br/>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -35,6 +35,7 @@
<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
<h:messages layout="table" infoStyle="color:green" warnStyle="color:red"/>
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td align="left">
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/moderator/modcp_move.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -33,6 +33,7 @@
<ui:define name="mainContent">
<forums:isAllowed fragment="acl://moderateForum" contextData="#{moderator.forum}">
<h:form>
+ <input type="hidden" name="f" value="#{moderator.forum.id}"/>
<table width="100%" cellspacing="2" cellpadding="2" border="0"
align="center">
<tr>
Modified: labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
===================================================================
--- labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-07-03 14:29:57 UTC (rev 4901)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-07-03 16:58:38 UTC (rev 4902)
@@ -762,15 +762,18 @@
<h:commandLink action="#{moderator.unlockTopic}" style="text-decoration: none;">
<f:param name="t" value="#{topic.topic.id}"/>
<f:verbatim>
- <img border="0" src="/portal-forums/subSilver/images/topic_unlock.gif" alt="Lock this topic" title="Lock this topic"/>
+ <img border="0" src="/portal-forums/subSilver/images/topic_unlock.gif" alt="Unlock this topic" title="Unlock this topic"/>
</f:verbatim>
</h:commandLink>
&nbsp;
</c:otherwise>
</c:choose>
- <a href="" style="text-decoration: none;">
+ <h:outputLink value="#{forums:outputLink(shared.links['topicSplit'],true)}" style="text-decoration: none;">
+ <f:param name="t" value="#{topic.topic.id}"/>
+ <f:verbatim>
<img border="0" src="/portal-forums/subSilver/images/topic_split.gif" alt="Split this topic" title="Split this topic"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:outputLink>&nbsp;
</td>
</tr>
</c:if>
|