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

META-INF.resources.message_boards.edit_message_quick.jspf Maven / Gradle / Ivy

There is a newer version: 5.0.117
Show newest version
<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */
--%>

<%
MBMessage replyMessage = null;

long messageId = 0;

long categoryId = messageDisplay.getMessage().getCategoryId();
long threadId = messageDisplay.getMessage().getThreadId();
long parentMessageId = messageDisplay.getMessage().getMessageId();
String subject = BeanParamUtil.getString(replyMessage, request, "subject");
double priority = messageDisplay.getMessage().getPriority();

MBMessage curParentMessage = null;
String parentAuthor = null;

if (threadId > 0) {
	try {
		curParentMessage = MBMessageLocalServiceUtil.getMessage(parentMessageId);

		if (Validator.isNull(subject)) {
			if (curParentMessage.getSubject().startsWith("RE: ")) {
				subject = curParentMessage.getSubject();
			}
			else {
				subject = "RE: " + curParentMessage.getSubject();
			}
		}

		parentAuthor = curParentMessage.isAnonymous() ? LanguageUtil.get(request, "anonymous") : HtmlUtil.escape(PortalUtil.getUserName(curParentMessage.getUserId(), curParentMessage.getUserName(), StringPool.BLANK));
	}
	catch (Exception e) {
	}
}

String body = BeanParamUtil.getString(replyMessage, request, "body");
boolean quote = ParamUtil.getBoolean(request, "quote");
boolean splitThread = ParamUtil.getBoolean(request, "splitThread");
%>




	
	
	
	
	
	
	
	
	
	

	

	
		
			
				
					<%@ include file="/message_boards/bbcode_editor.jspf" %>
				
				
					<%@ include file="/message_boards/html_editor.jspf" %>
				
			

			
		

		
			
		

		
			
		
	

	

		<%
		String publishButtonLabel = "publish";

		if (WorkflowDefinitionLinkLocalServiceUtil.hasWorkflowDefinitionLink(themeDisplay.getCompanyId(), scopeGroupId, MBMessage.class.getName())) {
			publishButtonLabel = "submit-for-publication";
		}
		%>

		

		<%
		String taglibCancelReply = renderResponse.getNamespace() + "addQuickReply('cancel', '');";
		%>

		
	



	function saveMessage() {
		document.addQuickReplyFm.body.value = getHTML();

		submitForm(document.addQuickReplyFm);
	}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy