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

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

There is a newer version: 5.0.96
Show 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");

long groupId = ParamUtil.getLong(request, "groupId", scopeGroupId);

Group group = GroupLocalServiceUtil.fetchGroup(groupId);

FileEntry fileEntry = ExportImportHelperUtil.getTempFileEntry(groupId, themeDisplay.getUserId(), ExportImportHelper.TEMP_FOLDER_NAME + selPortlet.getPortletId());

ManifestSummary manifestSummary = ExportImportHelperUtil.getManifestSummary(themeDisplay.getUserId(), groupId, new HashMap(), fileEntry);
%>


	



	
	
	
	
	



	
	
	
	
	
	
	

	
<%= HtmlUtil.escape(fileEntry.getTitle()) %>
<% Date exportDate = manifestSummary.getExportDate(); %>
<%= HtmlUtil.escape(fileEntry.getUserName()) %>
<%= LanguageUtil.formatStorageSize(fileEntry.getSize(), locale) %>
<% PortletDataHandler portletDataHandler = selPortlet.getPortletDataHandlerInstance(); PortletDataHandlerControl[] configurationControls = portletDataHandler.getImportConfigurationControls(selPortlet, manifestSummary); %>
    • <% String rootControlId = PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId(); %>
        • <% request.setAttribute("render_controls.jsp-action", Constants.IMPORT); request.setAttribute("render_controls.jsp-childControl", false); request.setAttribute("render_controls.jsp-controls", configurationControls); request.setAttribute("render_controls.jsp-portletId", selPortlet.getRootPortletId()); request.setAttribute("render_controls.jsp-rootControlId", rootControlId); %>
      Liferay.Util.toggleBoxes( '<%= PortletDataHandlerKeys.PORTLET_CONFIGURATION + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>', 'showChangeConfiguration<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>' );
<% long importModelCount = portletDataHandler.getExportModelCount(manifestSummary); long modelDeletionCount = manifestSummary.getModelDeletionCount(portletDataHandler.getDeletionSystemEventStagedModelTypes()); %>
    • <%= (importModelCount > 0) ? importModelCount : StringPool.BLANK %> <%= (modelDeletionCount > 0) ? (modelDeletionCount + StringPool.SPACE + LanguageUtil.get(request, "deletions")) : StringPool.BLANK %> <% String rootControlId = PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId(); %> <% PortletDataHandlerControl[] importControls = portletDataHandler.getImportControls(); PortletDataHandlerControl[] metadataControls = portletDataHandler.getImportMetadataControls(); %>
      • <% request.setAttribute("render_controls.jsp-action", Constants.IMPORT); request.setAttribute("render_controls.jsp-childControl", false); request.setAttribute("render_controls.jsp-controls", importControls); request.setAttribute("render_controls.jsp-manifestSummary", manifestSummary); request.setAttribute("render_controls.jsp-portletDisabled", !portletDataHandler.isPublishToLiveByDefault()); request.setAttribute("render_controls.jsp-rootControlId", rootControlId); %>
        <% for (PortletDataHandlerControl metadataControl : metadataControls) { PortletDataHandlerBoolean control = (PortletDataHandlerBoolean)metadataControl; PortletDataHandlerControl[] childrenControls = control.getChildren(); %> <% request.setAttribute("render_controls.jsp-controls", childrenControls); %>
        <% } %>
      Liferay.Util.toggleBoxes( '<%= PortletDataHandlerKeys.PORTLET_DATA + StringPool.UNDERLINE + selPortlet.getRootPortletId() %>', 'showChangeContent<%= StringPool.UNDERLINE + selPortlet.getRootPortletId() %>' );
<% String taglibMirrorLabel = LanguageUtil.get(request, "mirror") + ": " + LanguageUtil.get(request, "import-data-strategy-mirror-help") + ""; %> <% String taglibMirrorWithOverwritingLabel = LanguageUtil.get(request, "mirror-with-overwriting") + ": " + LanguageUtil.get(request, portletDataHandler.isSupportsDataStrategyMirrorWithOverwriting() ? "import-data-strategy-mirror-with-overwriting-help" : "import-data-strategy-mirror-with-overwriting-is-not-available-help") + ""; %> <% String taglibCopyAsNewLabel = LanguageUtil.get(request, "copy-as-new") + ": " + LanguageUtil.get(request, portletDataHandler.isSupportsDataStrategyCopyAsNew() ? "import-data-strategy-copy-as-new-help" : "not-supported") + ""; %> <% String taglibUseTheOriginalAuthorLabel = LanguageUtil.get(request, "use-the-original-author") + ": " + LanguageUtil.get(request, "use-the-original-author-help") + ""; %> <% String taglibUseTheCurrentUserAsAuthorLabel = LanguageUtil.get(request, "use-the-current-user-as-author") + ": " + LanguageUtil.get(request, "use-the-current-user-as-author-help") + ""; %>
function publishPages() { var deletePortletDataBeforeImportingCheckbox = document.getElementById( '<%= PortletDataHandlerKeys.DELETE_PORTLET_DATA %>' ); var form = document.fm1; if ( deletePortletDataBeforeImportingCheckbox && deletePortletDataBeforeImportingCheckbox.checked ) { Liferay.Util.openConfirmModal({ message: '<%= UnicodeLanguageUtil.get(request, "delete-application-data-before-importing-confirmation") %>', onConfirm: (isConfirmed) => { if (isConfirmed) { submitForm(form); } }, }); } else { submitForm(form); } } new Liferay.ExportImport({ commentsNode: '#<%= PortletDataHandlerKeys.COMMENTS %>', deletionsNode: '#<%= PortletDataHandlerKeys.DELETIONS %>', form: document.fm1, locale: '<%= locale.toLanguageTag() %>', namespace: '', ratingsNode: '#<%= PortletDataHandlerKeys.RATINGS %>', timeZoneOffset: <%= timeZoneOffset %>, });




© 2015 - 2024 Weber Informatics LLC | Privacy Policy