META-INF.resources.folder_action.jsp Maven / Gradle / Ivy
<%--
/**
* 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="/init.jsp" %>
<%
ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
JournalFolder folder = null;
if (row != null) {
folder = (JournalFolder)row.getObject();
}
else {
folder = (JournalFolder)request.getAttribute("info_panel.jsp-folder");
}
boolean folderSelected = GetterUtil.getBoolean(request.getAttribute("view_entries.jsp-folderSelected"));
String modelResource = null;
String modelResourceDescription = null;
String resourcePrimKey = null;
boolean hasPermissionsPermission = false;
if (folder != null) {
modelResource = JournalFolder.class.getName();
modelResourceDescription = folder.getName();
resourcePrimKey = String.valueOf(folder.getPrimaryKey());
hasPermissionsPermission = JournalFolderPermission.contains(permissionChecker, folder, ActionKeys.PERMISSIONS);
}
else {
modelResource = "com.liferay.journal";
modelResourceDescription = themeDisplay.getScopeGroupName();
resourcePrimKey = String.valueOf(scopeGroupId);
hasPermissionsPermission = JournalPermission.contains(permissionChecker, scopeGroupId, ActionKeys.PERMISSIONS);
}
%>
<%
boolean workflowEnabled = false;
if (WorkflowEngineManagerUtil.isDeployed() && (WorkflowHandlerRegistryUtil.getWorkflowHandler(DLFileEntry.class.getName()) != null)) {
workflowEnabled = true;
}
%>
<%
String redirect = currentURL;
long currentFolderId = ParamUtil.getLong(request, "folderId");
if (currentFolderId == folder.getFolderId()) {
PortletURL redirectURL = liferayPortletResponse.createRenderURL();
redirectURL.setParameter("groupId", String.valueOf(folder.getGroupId()));
redirectURL.setParameter("folderId", String.valueOf(folder.getParentFolderId()));
redirect = redirectURL.toString();
}
%>
<%
Group group = themeDisplay.getScopeGroup();
%>