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

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

<%
String redirect = ParamUtil.getString(request, "redirect");

Repository repository = (Repository)request.getAttribute(WebKeys.DOCUMENT_LIBRARY_REPOSITORY);

long repositoryId = BeanParamUtil.getLong(repository, request, "repositoryId");

long folderId = ParamUtil.getLong(request, "folderId");

String headerTitle = (repository == null) ? LanguageUtil.get(request, "new-repository") : repository.getName();

boolean portletTitleBasedNavigation = GetterUtil.getBoolean(portletConfig.getInitParameter("portlet-title-based-navigation"));

if (portletTitleBasedNavigation) {
	portletDisplay.setShowBackIcon(true);
	portletDisplay.setURLBack(redirect);

	renderResponse.setTitle(headerTitle);
}
%>

> <% for (RepositoryClassDefinition repositoryClassDefinition : RepositoryClassDefinitionCatalogUtil.getExternalRepositoryClassDefinitions()) { %> <% } %>
<% RepositoryClassDefinition repositoryClassDefinition = RepositoryClassDefinitionCatalogUtil.getRepositoryClassDefinition(repository.getClassName()); %>
<%= repositoryClassDefinition.getRepositoryTypeLabel(locale) %>
<% UnicodeProperties typeSettingsProperties = repository.getTypeSettingsProperties(); RepositoryConfiguration repositoryConfiguration = repositoryClassDefinition.getRepositoryConfiguration(); for (RepositoryConfiguration.Parameter repositoryConfigurationParameter : repositoryConfiguration.getParameters()) { String parameterValue = typeSettingsProperties.getProperty(repositoryConfigurationParameter.getName()); if (Validator.isNotNull(parameterValue)) { %>
<%= HtmlUtil.escape(repositoryConfigurationParameter.getLabel(locale)) %>
<%= HtmlUtil.escape(parameterValue) %>
<% } } %>
<% for (RepositoryClassDefinition repositoryClassDefinition : RepositoryClassDefinitionCatalogUtil.getExternalRepositoryClassDefinitions()) { try { String className = repositoryClassDefinition.getClassName(); String unqualifiedClassName = HtmlUtil.escapeAttribute(className.substring(className.lastIndexOf(StringPool.PERIOD) + 1)); %>
<% RepositoryConfiguration repositoryConfiguration = repositoryClassDefinition.getRepositoryConfiguration(); for (RepositoryConfiguration.Parameter repositoryConfigurationParameter : repositoryConfiguration.getParameters()) { %> <% } %>
<% } catch (Exception e) { _log.error(e); } } %>
var settingsSupported = $('#settingsSupported'); var settingsParameters = $('#settingsParameters'); var showConfiguration = function(select) { settingsSupported.append(settingsParameters.find('.settings-parameters')); var className = select.val().split('.').pop(); var repositoryParameters = $('#repository-' + className + '-configuration'); settingsParameters.append(repositoryParameters); }; var selectRepositoryTypes = $('#repositoryTypes'); selectRepositoryTypes.on( 'change', function(event) { showConfiguration(selectRepositoryTypes); } ); showConfiguration(selectRepositoryTypes); <% if (repository != null) { DLBreadcrumbUtil.addPortletBreadcrumbEntries(folderId, request, renderResponse); PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "edit"), currentURL); } %> <%! private static Log _log = LogFactoryUtil.getLog("com_liferay_document_library_web.document_library.edit_repository_jsp"); %>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy