|
From: <jbo...@li...> - 2006-06-28 21:57:33
|
Author: unibrew
Date: 2006-06-28 17:57:30 -0400 (Wed, 28 Jun 2006)
New Revision: 4855
Modified:
labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml
Log:
[JBFORUMS-89] Integrating lock and unlock topic moderator's actions.
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-06-28 21:55:45 UTC (rev 4854)
+++ labs/jbossforums/trunk/forums/src/resources/portal-forums-war/views/topics/viewtopic_body.xhtml 2006-06-28 21:57:30 UTC (rev 4855)
@@ -126,15 +126,9 @@
</forums:isAllowed>
<forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">
<!-- reply -->
- <h:commandLink id="replyTopic" action="#{replyTopic.start}" style="text-decoration: none;">
- <f:param name="f" value="#{topic.topic.forum.id}"/>
- <f:param name="t" value="#{topic.topic.id}"/>
- <f:verbatim>
- <img border="0"
+ <img border="0" style="text-decoration: none;"
src="#{forums:themeURL('resourceReplyLockedURL')}"
alt="${resource.Topic_locked}" />
- </f:verbatim>
- </h:commandLink>
</forums:isAllowed>
</c:when>
@@ -541,15 +535,9 @@
</forums:isAllowed>
<forums:isAllowed fragment="acl://reply" contextData="#{topic.topic}">
<!-- reply -->
- <h:commandLink id="replyTopicBelow" action="#{replyTopic.start}" style="text-decoration: none;">
- <f:param name="f" value="#{topic.topic.forum.id}"/>
- <f:param name="t" value="#{topic.topic.id}"/>
- <f:verbatim>
- <img border="0"
+ <img border="0" style="text-decoration: none;"
src="#{forums:themeURL('resourceReplyLockedURL')}"
alt="${resource.Topic_locked}" />
- </f:verbatim>
- </h:commandLink>
</forums:isAllowed>
</c:when>
@@ -741,7 +729,7 @@
</td>
</tr>
- <!--<forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">-->
+ <forums:isAllowed fragment="acl://moderateForum" contextData="#{forum.forum}">
<c:if test="#{moderator.initialized && moderator.forum!=null && moderator.forum.id!=-1}">
<tr>
<td>
@@ -760,15 +748,23 @@
</f:verbatim>
</h:commandLink>&nbsp;
<c:choose>
- <c:when test="#{topic.topic.status==forums:constantInt('TOPIC_LOCKED')}">
- <a href="" style="text-decoration: none;">
+ <c:when test="#{topic.topic.status!=forums:constantInt('TOPIC_LOCKED')}">
+ <h:commandLink action="#{moderator.lockTopic}" style="text-decoration: none;">
+ <f:param name="t" value="#{topic.topic.id}"/>
+ <f:verbatim>
<img border="0" src="/portal-forums/subSilver/images/topic_lock.gif" alt="Lock this topic" title="Lock this topic"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:commandLink>
+ &nbsp;
</c:when>
<c:otherwise>
- <a href="" style="text-decoration: none;">
+ <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"/>
- </a>&nbsp;
+ </f:verbatim>
+ </h:commandLink>
+ &nbsp;
</c:otherwise>
</c:choose>
<a href="" style="text-decoration: none;">
@@ -777,7 +773,7 @@
</td>
</tr>
</c:if>
- <!--</forums:isAllowed>-->
+ </forums:isAllowed>
</table>
</forums:isAllowed>
</forums:isAllowed>
|