
META-INF.resources.document_library.sort_button.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="/document_library/init.jsp" %>
<%
String navigation = ParamUtil.getString(request, "navigation", "home");
int deltaEntry = ParamUtil.getInteger(request, "deltaEntry");
long folderId = GetterUtil.getLong((String)request.getAttribute("view.jsp-folderId"));
long fileEntryTypeId = ParamUtil.getLong(request, "fileEntryTypeId", DLFileEntryTypeConstants.FILE_ENTRY_TYPE_ID_ALL);
String orderByCol = GetterUtil.getString((String)request.getAttribute("view.jsp-orderByCol"));
String orderByType = GetterUtil.getString((String)request.getAttribute("view.jsp-orderByType"));
Map orderColumns = new HashMap();
orderColumns.put("creationDate", "create-date");
orderColumns.put("downloads", "downloads");
orderColumns.put("modifiedDate", "modified-date");
orderColumns.put("size", "size");
orderColumns.put("title", "title");
PortletURL sortURL = renderResponse.createRenderURL();
sortURL.setParameter("mvcRenderCommandName", (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) ? "/document_library/view" : "/document_library/view_folder");
sortURL.setParameter("navigation", navigation);
if (deltaEntry > 0) {
sortURL.setParameter("deltaEntry", String.valueOf(deltaEntry));
}
sortURL.setParameter("folderId", String.valueOf(folderId));
sortURL.setParameter("fileEntryTypeId", String.valueOf(fileEntryTypeId));
%>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy