
META-INF.resources.admin.template_comments.jsp Maven / Gradle / Ivy
<%--
/**
* 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.
*/
--%>
<%@ include file="/admin/init.jsp" %>
<%
KBTemplate kbTemplate = (KBTemplate)request.getAttribute(KBWebKeys.KNOWLEDGE_BASE_KB_TEMPLATE);
KBComment kbComment = null;
try {
kbComment = KBCommentLocalServiceUtil.getKBComment(user.getUserId(), KBTemplate.class.getName(), kbTemplate.getKbTemplateId());
}
catch (NoSuchCommentException nsce) {
}
long kbCommentId = BeanParamUtil.getLong(kbComment, request, "kbCommentId");
boolean helpful = BeanParamUtil.getBoolean(kbComment, request, "helpful", true);
%>
<%
request.setAttribute("template_comment.jsp-kb_comment", kbComment);
%>
<%= LanguageUtil.format(request, "all-comments-x", total, false) %>
<%
for (KBComment curKBComment : (List)searchContainer.getResults()) {
%>
<%
request.setAttribute("template_comment.jsp-kb_comment", curKBComment);
%>
<%
}
%>
function deleteKBComment(kbCommentId) {
document. fm. kbCommentId.value = kbCommentId;
submitForm(document. fm, ' ');
}
function updateKBComment() {
document. fm. <%= Constants.CMD %>.value = '<%= (kbComment == null) ? Constants.ADD : Constants.UPDATE %>';
submitForm(document. fm, ' ');
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy