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

META-INF.resources.edit_document_library_extra_settings.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" %>

<%
DLFileEntry dlFileEntry = null;

List keys = null;
List expandoBridgeAttributeNames = null;

List dlFileEntries = DLFileEntryLocalServiceUtil.getExtraSettingsFileEntries(0, 1);

if (!dlFileEntries.isEmpty()) {
	dlFileEntry = dlFileEntries.get(0);

	List dlFileVersions = dlFileEntry.getFileVersions(WorkflowConstants.STATUS_ANY);

	for (DLFileVersion dlFileVersion : dlFileVersions) {
		UnicodeProperties extraSettingsProperties = dlFileVersion.getExtraSettingsProperties();

		if (extraSettingsProperties.isEmpty()) {
			continue;
		}

		keys = new ArrayList(extraSettingsProperties.size());
		expandoBridgeAttributeNames = new ArrayList(extraSettingsProperties.size());

		ExpandoBridge expandoBridge = dlFileEntry.getExpandoBridge();

		for (String key : extraSettingsProperties.keySet()) {
			if (expandoBridge.hasAttribute(key)) {
				expandoBridgeAttributeNames.add(key);
			}
			else {
				keys.add(key);
			}
		}

		break;
	}
}
%>


	
		
<% for (String key : keys) { %>
<% for (int curType : ExpandoColumnConstants.TYPES) { if ((curType == ExpandoColumnConstants.BOOLEAN_ARRAY) || (curType == ExpandoColumnConstants.DATE_ARRAY)) { continue; } %> <% } %>
<% } %>
function convertDocumentLibraryExtraSettings(event) { event.preventDefault(); var form = document.getElementById('fm'); if (form) { form.action = ''; var cmd = form.querySelector( '#<%= Constants.CMD %>' ); if (cmd) { cmd.setAttribute('value', 'convert'); } submitForm(form); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy