
META-INF.resources.image_gallery_display.view_folders.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="/image_gallery_display/init.jsp" %>
<%
long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
long repositoryId = GetterUtil.getLong((String)request.getAttribute("view.jsp-repositoryId"));
if (folderId != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
Folder folder = DLAppServiceUtil.getFolder(folderId);
repositoryId = folder.getRepositoryId();
}
int status = WorkflowConstants.STATUS_APPROVED;
if (permissionChecker.isContentReviewer(user.getCompanyId(), scopeGroupId)) {
status = WorkflowConstants.STATUS_ANY;
}
PortletURL portletURL = (PortletURL)request.getAttribute("view.jsp-portletURL");
%>
<%
AssetRendererFactory> assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(DLFolder.class.getName());
AssetRenderer> assetRenderer = assetRendererFactory.getAssetRenderer(curFolder.getFolderId());
%>
<%= curFolder.getName() %>
{
<%= curFolder.getDescription() %>
<%
List subfolders = DLAppServiceUtil.getFolders(repositoryId, curFolder.getFolderId(), 0, 5);
%>
:
<%
int subfoldersCount = DLAppServiceUtil.getFoldersCount(repositoryId, curFolder.getFolderId());
for (int j = 0; j < subfolders.size(); j++) {
Folder subfolder = (Folder)subfolders.get(j);
String name = HtmlUtil.escape(subfolder.getName());
if (((j + 1) < subfolders.size()) || (subfoldersCount > subfolders.size())) {
name += StringPool.COMMA_AND_SPACE;
}
%>
<%= name %>
<%
}
rowURL.setParameter("folderId", String.valueOf(curFolder.getFolderId()));
%>
»
© 2015 - 2025 Weber Informatics LLC | Privacy Policy