
META-INF.resources.wiki.edit_page_view_attachments.jsp Maven / Gradle / Ivy
<%--
/**
* 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="/wiki/init.jsp" %>
<%
WikiPage wikiPage = (WikiPage)request.getAttribute(WikiWebKeys.WIKI_PAGE);
boolean copyPageAttachments = ParamUtil.getBoolean(request, "copyPageAttachments", true);
List attachmentsFileEntries = null;
if (wikiPage != null) {
attachmentsFileEntries = wikiPage.getAttachmentsFileEntries();
}
long templateNodeId = ParamUtil.getLong(request, "templateNodeId");
String templateTitle = ParamUtil.getString(request, "templateTitle");
WikiPage templatePage = null;
if ((templateNodeId > 0) && Validator.isNotNull(templateTitle)) {
try {
templatePage = WikiPageServiceUtil.getPage(templateNodeId, templateTitle);
attachmentsFileEntries = templatePage.getAttachmentsFileEntries();
}
catch (Exception e) {
}
}
int deletedAttachmentsCount = 0;
if (wikiPage != null) {
deletedAttachmentsCount = wikiPage.getDeletedAttachmentsFileEntriesCount();
}
%>
var viewRemovedAttachmentsLink = A.one('#view-removed-attachments-link');
viewRemovedAttachmentsLink.on('click', (event) => {
Liferay.Util.openWindow({
dialog: {
destroyOnHide: true,
modal: true,
},
id: ' openRemovedPageAttachments',
title: '<%= LanguageUtil.get(request, "removed-attachments") %>',
uri: '<%= viewTrashAttachmentsURL %>',
});
});
<%
int attachmentsFileEntriesCount = attachmentsFileEntries.size();
String emptyResultsMessage = "this-page-does-not-have-file-attachments";
boolean paginate = false;
boolean showPageAttachmentAction = templateNodeId == 0;
int status = WorkflowConstants.STATUS_APPROVED;
%>
<%@ include file="/wiki/attachments_list.jspf" %>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy