All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.edit_discussion.jsp Maven / Gradle / Ivy

The newest version!
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>

<%
String redirect = ParamUtil.getString(request, "redirect");

String backURL = ParamUtil.getString(request, "backURL", redirect);

if (Validator.isNull(redirect)) {
	redirect = currentURL;
}

Comment comment = (Comment)request.getAttribute(WebKeys.COMMENT);

long commentId = BeanParamUtil.getLong(comment, request, "commentId");

long parentCommentId = comment.getParentCommentId();

Comment parentComment = CommentManagerUtil.fetchComment(parentCommentId);

if ((parentComment != null) && parentComment.isRoot()) {
	parentComment = null;
}

WorkflowableComment workflowableComment = null;

boolean approved = true;
boolean pending = false;

if (comment instanceof WorkflowableComment) {
	workflowableComment = (WorkflowableComment)comment;

	approved = workflowableComment.getStatus() == WorkflowConstants.STATUS_APPROVED;
	pending = workflowableComment.getStatus() == WorkflowConstants.STATUS_PENDING;
}
%>




	
		
		

		
		
		
		
		
		

		
		
		
		
		

		

		
			
				
			

			

			
		

		
			:

			<%
			request.setAttribute(WebKeys.COMMENT, parentComment);
			%>

			
		

		
			
function saveComment() { Liferay.Util.postForm(document.fm, { data: { body: window.bodyEditor.getHTML(), }, }); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy