Added edit capabilities to forums

Disabled forums functionality
Changed version number back to 1.1.1
Added support for next/previous item navigation

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2033 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2005-12-13 12:44:00 +00:00
parent d1563e19c9
commit 145f72a6e7
14 changed files with 969 additions and 38 deletions

View File

@@ -18,11 +18,17 @@
package org.alfresco.web.bean.wizard;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import org.alfresco.model.ContentModel;
import org.alfresco.model.ForumModel;
import org.alfresco.service.cmr.repository.ContentReader;
import org.alfresco.service.cmr.repository.ContentWriter;
import org.alfresco.util.GUID;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
import org.springframework.util.StringUtils;
/**
* Backing bean for posting forum articles.
@@ -39,28 +45,91 @@ public class NewPostWizard extends CreateContentWizard
{
super.init();
// set up for creating a post instead of HTML
this.createType = CONTENT_TEXT;
// set up for creating a post
this.objectType = ForumModel.TYPE_POST.toString();
}
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#startWizardForEdit(javax.faces.event.ActionEvent)
*/
@Override
public void startWizardForEdit(ActionEvent event)
{
// TODO: Allow action link to have multiple action listeners
// then we wouldn't need to have this coupling in here
// we need to setup the content in the browse bean first
this.browseBean.setupContentAction(event);
super.startWizardForEdit(event);
}
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#populate()
*/
@Override
public void populate()
{
super.populate();
// we need to remove the <br> tags and replace with carriage returns
// and then setup the content member variable
Node currentDocument = this.browseBean.getDocument();
ContentReader reader = this.contentService.getReader(currentDocument.getNodeRef(),
ContentModel.PROP_CONTENT);
if (reader != null)
{
String htmlContent = reader.getContentString();
if (htmlContent != null)
{
this.content = StringUtils.replace(htmlContent, "<br/>", "\r\n");
}
}
}
/**
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#finish()
*/
@Override
public String finish()
{
// create appropriate values for filename, title and content type
this.fileName = GUID.generate() + ".txt";
this.contentType = Repository.getMimeTypeForFileName(
FacesContext.getCurrentInstance(), this.fileName);
this.title = this.fileName;
// remove link breaks and replace with <br/>
this.content = Utils.replaceLineBreaks(this.content);
if (this.editMode)
{
// remove the line breaks before the save
this.content = Utils.replaceLineBreaks(this.content);
}
else
{
// create appropriate values for filename, title and content type
this.fileName = GUID.generate() + ".html";
this.contentType = Repository.getMimeTypeForFileName(
FacesContext.getCurrentInstance(), this.fileName);
this.title = this.fileName;
// remove link breaks and replace with <br/>
this.content = Utils.replaceLineBreaks(this.content);
}
return super.finish();
}
/**
* @see org.alfresco.web.bean.wizard.BaseContentWizard#performCustomProcessing()
*/
@Override
protected void performCustomProcessing()
{
// update the content
Node currentDocument = this.browseBean.getDocument();
ContentWriter writer = this.contentService.getWriter(currentDocument.getNodeRef(),
ContentModel.PROP_CONTENT, true);
if (writer != null)
{
writer.putContent(this.content);
}
}
}

View File

@@ -916,6 +916,10 @@
<from-outcome>showForumsDetails</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editForumsProperties</from-outcome>
<to-view-id>/jsp/forums/edit-forums.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>deleteForums</from-outcome>
<to-view-id>/jsp/forums/delete-forums.jsp</to-view-id>
@@ -932,6 +936,10 @@
<from-outcome>showForumDetails</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editForumProperties</from-outcome>
<to-view-id>/jsp/forums/edit-forum.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>createTopic</from-outcome>
<to-view-id>/jsp/forums/create-topic.jsp</to-view-id>
@@ -944,6 +952,10 @@
<from-outcome>showTopicDetails</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editTopicProperties</from-outcome>
<to-view-id>/jsp/forums/edit-topic.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>createPost</from-outcome>
<to-view-id>/jsp/forums/create-post.jsp</to-view-id>
@@ -952,6 +964,10 @@
<from-outcome>createReply</from-outcome>
<to-view-id>/jsp/forums/create-reply.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>editPost</from-outcome>
<to-view-id>/jsp/forums/edit-post.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>deletePost</from-outcome>
<to-view-id>/jsp/forums/delete-post.jsp</to-view-id>
@@ -968,6 +984,14 @@
<from-outcome>browse</from-outcome>
<to-view-id>/jsp/forums/forums.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
@@ -976,6 +1000,14 @@
<from-outcome>browse</from-outcome>
<to-view-id>/jsp/forums/forum.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
@@ -1028,6 +1060,14 @@
<from-outcome>finish</from-outcome>
<to-view-id>/jsp/forums/topic.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
@@ -1069,5 +1109,53 @@
<to-view-id>/jsp/forums/topic.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/edit-forums.jsp</from-view-id>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finish</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/edit-forum.jsp</from-view-id>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finish</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/edit-topic.jsp</from-view-id>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finish</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/edit-post.jsp</from-view-id>
<navigation-case>
<from-outcome>cancel</from-outcome>
<to-view-id>/jsp/forums/topic.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finish</from-outcome>
<to-view-id>/jsp/forums/topic.jsp</to-view-id>
</navigation-case>
</navigation-rule>
</faces-config>

View File

@@ -1206,6 +1206,43 @@
</managed-property>
</managed-bean>
<managed-bean>
<description>
The bean that backs up the Edit Post Dialog
</description>
<managed-bean-name>EditPostDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.wizard.NewPostWizard</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>fileFolderService</property-name>
<value>#{FileFolderService}</value>
</managed-property>
<managed-property>
<property-name>searchService</property-name>
<value>#{SearchService}</value>
</managed-property>
<managed-property>
<property-name>navigator</property-name>
<value>#{NavigationBean}</value>
</managed-property>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>contentService</property-name>
<value>#{ContentService}</value>
</managed-property>
<managed-property>
<property-name>dictionaryService</property-name>
<value>#{DictionaryService}</value>
</managed-property>
</managed-bean>
<managed-bean>
<description>
The bean that backs up the Create Reply Dialog

View File

@@ -118,16 +118,6 @@
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.topic_props}" /></td>
</tr>
<%--
<tr>
<td><h:outputText value="#{msg.type}" />:</td>
<td width="95%">
<h:selectOneMenu value="#{CreateTopicDialog.topicType}">
<f:selectItems value="#{CreateTopicDialog.topicTypes}" />
</h:selectOneMenu>&nbsp;*
</td>
</tr>
--%>
<tr>
<td><h:outputText value="#{msg.subject}" />:</td>
<td>

View File

@@ -0,0 +1,190 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_edit_forum">
<script language="JavaScript1.2">
function checkButtonState()
{
if (document.getElementById("edit-forum:name").value.length == 0)
{
document.getElementById("edit-forum:ok-button").disabled = true;
}
else
{
document.getElementById("edit-forum:ok-button").disabled = false;
}
}
</script>
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="edit-forum">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr valign="top">
<td width="32">
<h:graphicImage id="wizard-logo" url="/images/icons/create_space_large.gif" />
</td>
<td>
<div class="mainSubTitle"><h:outputText value="#{BrowseBean.actionSpace.name}" /></div>
<div class="mainTitle"><h:outputText value="#{msg.modify_props_of}" /> '<h:outputText value="#{BrowseBean.actionSpace.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.edit_forum_description}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<a:errors message="#{msg.error_dialog}" styleClass="errorMessage" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.forum_props}" /></td>
</tr>
<tr>
<td><h:outputText value="#{msg.name}" />:</td>
<td width="90%">
<h:inputText id="name" value="#{EditForumDialog.name}" size="35" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr>
<td><h:outputText value="#{msg.description}" />:</td>
<td>
<h:inputText value="#{EditForumDialog.description}" size="35" maxlength="1024" />
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td colspan="2" class="wizardSectionHeading">&nbsp;<h:outputText value="#{msg.other_options}" /></td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.choose_space_icon}" />:</nobr></td>
<td>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<a:imagePickerRadio columns="6" spacing="4" value="#{EditForumDialog.icon}">
<a:listItems value="#{EditForumDialog.icons}" />
</a:imagePickerRadio>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td></tr></table>
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumDialog.finish}" styleClass="wizardButton" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{EditForumDialog.cancel}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -0,0 +1,190 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_edit_forums">
<script language="JavaScript1.2">
function checkButtonState()
{
if (document.getElementById("edit-forums:name").value.length == 0)
{
document.getElementById("edit-forums:ok-button").disabled = true;
}
else
{
document.getElementById("edit-forums:ok-button").disabled = false;
}
}
</script>
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="edit-forums">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr valign="top">
<td width="32">
<h:graphicImage id="wizard-logo" url="/images/icons/create_space_large.gif" />
</td>
<td>
<div class="mainSubTitle"><h:outputText value="#{BrowseBean.actionSpace.name}" /></div>
<div class="mainTitle"><h:outputText value="#{msg.modify_props_of}" /> '<h:outputText value="#{BrowseBean.actionSpace.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.edit_forums_description}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<a:errors message="#{msg.error_dialog}" styleClass="errorMessage" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.forums_props}" /></td>
</tr>
<tr>
<td><h:outputText value="#{msg.name}" />:</td>
<td width="90%">
<h:inputText id="name" value="#{EditForumsDialog.name}" size="35" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr>
<td><h:outputText value="#{msg.description}" />:</td>
<td>
<h:inputText value="#{EditForumsDialog.description}" size="35" maxlength="1024" />
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td colspan="2" class="wizardSectionHeading">&nbsp;<h:outputText value="#{msg.other_options}" /></td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.choose_space_icon}" />:</nobr></td>
<td>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<a:imagePickerRadio columns="6" spacing="4" value="#{EditForumsDialog.icon}">
<a:listItems value="#{EditForumsDialog.icons}" />
</a:imagePickerRadio>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td></tr></table>
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditForumsDialog.finish}" styleClass="wizardButton" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{EditForumsDialog.cancel}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -0,0 +1,179 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_edit_post">
<script language="JavaScript1.2">
function checkButtonState()
{
if (document.getElementById("edit-post:message").value.length == 0)
{
document.getElementById("edit-post:ok-button").disabled = true;
}
else
{
document.getElementById("edit-post:ok-button").disabled = false;
}
}
</script>
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="edit-post">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr valign="top">
<td width="32">
<h:graphicImage id="wizard-logo" url="/images/icons/file_large.gif" />
</td>
<td>
<div class="mainSubTitle"><h:outputText value="#{NavigationBean.nodeProperties.name}" /></div>
<div class="mainTitle"><h:outputText value="#{msg.edit_post}" /></div>
<div class="mainSubText"><h:outputText value="#{msg.edit_post_description}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<a:errors message="#{msg.error_create_post_dialog}" styleClass="errorMessage" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.message}" /></td>
</tr>
<tr>
<td valign="top"><h:outputText value="#{msg.message}" />:</td>
<td>
<h:inputTextarea id="message" value="#{EditPostDialog.content}" rows="6" cols="70"
onkeyup="javascript:checkButtonState();" onchange="javascript:checkButtonState();" />
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td colspan="2"><h:outputText value="#{msg.edit_post_finish}" /></td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton id="ok-button" value="#{msg.post}" action="#{EditPostDialog.finish}"
styleClass="wizardButton" disabled="true" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{EditPostDialog.cancel}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
<script language="JavaScript1.2">
document.getElementById("edit-post:message").focus();
checkButtonState();
</script>
</f:view>
</r:page>

View File

@@ -0,0 +1,184 @@
<%--
Copyright (C) 2005 Alfresco, Inc.
Licensed under the Mozilla Public License version 1.1
with a permitted attribution clause. You may obtain a
copy of the License at
http://www.alfresco.org/legal/license.txt
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied. See the License for the specific
language governing permissions and limitations under the
License.
--%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_edit_topic">
<script language="JavaScript1.2">
function checkButtonState()
{
if (document.getElementById("edit-topic:name").value.length == 0)
{
document.getElementById("edit-topic:ok-button").disabled = true;
}
else
{
document.getElementById("edit-topic:ok-button").disabled = false;
}
}
</script>
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="edit-topic">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr valign="top">
<td width="32">
<h:graphicImage id="wizard-logo" url="/images/icons/create_space_large.gif" />
</td>
<td>
<div class="mainSubTitle"><h:outputText value="#{BrowseBean.actionSpace.name}" /></div>
<div class="mainTitle"><h:outputText value="#{msg.modify_props_of}" /> '<h:outputText value="#{BrowseBean.actionSpace.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.edit_topic_description}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<a:errors message="#{msg.error_dialog}" styleClass="errorMessage" />
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.topic_props}" /></td>
</tr>
<tr>
<td><h:outputText value="#{msg.subject}" />:</td>
<td width="90%">
<h:inputText id="name" value="#{EditTopicDialog.name}" size="35" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr><td class="paddingRow"></td></tr>
<tr>
<td colspan="2" class="wizardSectionHeading">&nbsp;<h:outputText value="#{msg.other_options}" /></td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.choose_space_icon}" />:</nobr></td>
<td>
<table border="0" cellpadding="0" cellspacing="0"><tr><td>
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<a:imagePickerRadio columns="6" spacing="4" value="#{EditTopicDialog.icon}">
<a:listItems value="#{EditTopicDialog.icons}" />
</a:imagePickerRadio>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td></tr></table>
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{EditTopicDialog.finish}" styleClass="wizardButton" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{EditTopicDialog.cancel}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -146,18 +146,16 @@
<tr>
<td width="100%" valign="top">
<%-- wrapper comment used by the panel to add additional component facets --%>
<%--
<h:column id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif"
action="editSpaceProperties" actionListener="#{EditSpaceDialog.startWizardForEdit}" />
action="editForumProperties" actionListener="#{EditForumDialog.startWizardForEdit}" />
</r:permissionEvaluator>
</f:facet>
</h:column>
facetsId="props-panel-facets"
--%>
<a:panel label="#{msg.properties}" id="properties-panel"
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>

View File

@@ -146,18 +146,16 @@
<tr>
<td width="100%" valign="top">
<%-- wrapper comment used by the panel to add additional component facets --%>
<%--
<h:column id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif"
action="editSpaceProperties" actionListener="#{EditSpaceDialog.startWizardForEdit}" />
action="editForumsProperties" actionListener="#{EditForumsDialog.startWizardForEdit}" />
</r:permissionEvaluator>
</f:facet>
</h:column>
facetsId="props-panel-facets"
--%>
<a:panel label="#{msg.properties}" id="properties-panel"
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>

View File

@@ -146,18 +146,16 @@
<tr>
<td width="100%" valign="top">
<%-- wrapper comment used by the panel to add additional component facets --%>
<%--
<h:column id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif"
action="editSpaceProperties" actionListener="#{EditSpaceDialog.startWizardForEdit}" />
action="editTopicProperties" actionListener="#{EditTopicDialog.startWizardForEdit}" />
</r:permissionEvaluator>
</f:facet>
</h:column>
facetsId="props-panel-facets"
--%>
<a:panel label="#{msg.properties}" id="properties-panel"
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>

View File

@@ -222,7 +222,7 @@
</a:actionLink>
</r:permissionEvaluator>
<r:permissionEvaluator value="#{r}" allow="Write">
<a:actionLink value="#{msg.edit_post}" image="/images/icons/edit_icon.gif" showLink="false" styleClass="inlineAction" action="editPost" actionListener="#{BrowseBean.setupContentAction}">
<a:actionLink value="#{msg.edit_post}" image="/images/icons/edit_icon.gif" showLink="false" styleClass="inlineAction" action="editPost" actionListener="#{EditPostDialog.startWizardForEdit}">
<f:param name="id" value="#{r.id}" />
</a:actionLink>
</r:permissionEvaluator>