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

META-INF.resources.document_library.select_folder.jsp Maven / Gradle / Ivy

The 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.
 */
--%>

<%@ include file="/document_library/init.jsp" %>

<%
Folder folder = (Folder)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_FOLDER);

long folderId = BeanParamUtil.getLong(folder, request, "folderId", DLFolderConstants.DEFAULT_PARENT_FOLDER_ID);

String eventName = ParamUtil.getString(request, "eventName", liferayPortletResponse.getNamespace() + "selectFolder");

long repositoryId = scopeGroupId;
String folderName = LanguageUtil.get(request, "home");

if (folder != null) {
	repositoryId = folder.getRepositoryId();
	folderName = folder.getName();

	DLBreadcrumbUtil.addPortletBreadcrumbEntries(folder, request, renderResponse);
}

DLVisualizationHelper dlVisualizationHelper = new DLVisualizationHelper(dlRequestHelper);
%>

<% Map data = new HashMap(); data.put("folderid", folderId); data.put("folderissupportsmetadata", ((folder != null) ? folder.isSupportsMetadata() : Boolean.TRUE.toString())); data.put("folderissupportssocial", ((folder != null) ? folder.isSupportsSocial() : Boolean.TRUE.toString())); data.put("foldername", folderName); %> <% PortletURL portletURL = renderResponse.createRenderURL(); portletURL.setParameter("mvcRenderCommandName", "/document_library/select_folder"); portletURL.setParameter("folderId", String.valueOf(folderId)); portletURL.setParameter("ignoreRootFolder", Boolean.TRUE.toString()); %> <% AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(DLFolder.class.getName()); AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(curFolder.getFolderId()); int fileEntriesCount = 0; int foldersCount = 0; try { fileEntriesCount = DLAppServiceUtil.getFoldersFileEntriesCount(curFolder.getRepositoryId(), Arrays.asList(curFolder.getFolderId()), WorkflowConstants.STATUS_APPROVED); foldersCount = DLAppServiceUtil.getFoldersCount(curFolder.getRepositoryId(), curFolder.getFolderId()); } catch (com.liferay.portal.kernel.repository.RepositoryException re) { rowURL = null; } catch (com.liferay.portal.kernel.security.auth.PrincipalException pe) { rowURL = null; } %> <% Map data = new HashMap(); data.put("folderid", curFolder.getFolderId()); data.put("folderissupportsmetadata", curFolder.isSupportsMetadata()); data.put("folderissupportssocial", curFolder.isSupportsSocial()); data.put("foldername", curFolder.getName()); %>
Liferay.Util.selectEntityHandler('#selectFolderFm', '<%= HtmlUtil.escapeJS(eventName) %>');




© 2015 - 2025 Weber Informatics LLC | Privacy Policy