META-INF.resources.publish.simple.publish_layouts_simple.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="/init.jsp" %>
<%
String cmd = ParamUtil.getString(request, Constants.CMD, Constants.PUBLISH_TO_LIVE);
long exportImportConfigurationId = GetterUtil.getLong(request.getAttribute("exportImportConfigurationId"), ParamUtil.getLong(request, "exportImportConfigurationId"));
ExportImportConfiguration exportImportConfiguration = ExportImportConfigurationLocalServiceUtil.getExportImportConfiguration(exportImportConfigurationId);
long selPlid = ParamUtil.getLong(request, "selPlid", LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
boolean localPublishing = true;
String publishMessageKey = "publish-to-live";
if (exportImportConfiguration.getType() == ExportImportConfigurationConstants.TYPE_PUBLISH_LAYOUT_REMOTE) {
cmd = Constants.PUBLISH_TO_REMOTE;
localPublishing = false;
publishMessageKey = "publish-to-remote-live";
}
GroupDisplayContextHelper groupDisplayContextHelper = new GroupDisplayContextHelper(request);
Map settingsMap = exportImportConfiguration.getSettingsMap();
Map parameterMap = (Map)settingsMap.get("parameterMap");
%>
<%@ include file="/publish/error/error_auth_exception.jspf" %>
<%@ include file="/publish/error/error_remote_export_exception.jspf" %>
<%@ include file="/publish/error/error_remote_options_exception.jspf" %>
<%
String taskExecutorClassName = localPublishing ? BackgroundTaskExecutorNames.LAYOUT_STAGING_BACKGROUND_TASK_EXECUTOR : BackgroundTaskExecutorNames.LAYOUT_REMOTE_STAGING_BACKGROUND_TASK_EXECUTOR;
int incompleteBackgroundTasksCount = BackgroundTaskManagerUtil.getBackgroundTasksCount(groupDisplayContextHelper.getStagingGroupId(), taskExecutorClassName, false);
if (localPublishing) {
incompleteBackgroundTasksCount += BackgroundTaskManagerUtil.getBackgroundTasksCount(groupDisplayContextHelper.getLiveGroupId(), taskExecutorClassName, false);
}
%>
" id=" incompleteProcessMessage">