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

META-INF.resources.document_library.file_entry_history_action.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");

boolean showHistoryActions = ParamUtil.getBoolean(request, "showHistoryActions", true);

ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);

FileVersion fileVersion = null;

if (row != null) {
	fileVersion = (FileVersion)row.getObject();
}
else {
	fileVersion = (FileVersion)request.getAttribute("info_panel.jsp-fileVersion");
}

FileEntry fileEntry = fileVersion.getFileEntry();
%>


	

	
		
			
			
			
			
		

		

		
			
			
			
		

		
			
				
				
				
				
			

			
		

		
			
				
				
				
				
			

			
		

		<%
		boolean comparableFileEntry = DocumentConversionUtil.isComparableVersion(fileVersion.getExtension());
		%>

		
			
				
				
				
				
			

			<%
			Map data = new HashMap();

			data.put("uri", selectFileVersionURL);
			%>

			

			
				$('body').on(
					'click',
					'.compare-to-link a',
					function(event) {
						var currentTarget = $(event.currentTarget);

						Liferay.Util.selectEntity(
							{
								dialog: {
									constrain: true,
									destroyOnHide: true,
									modal: true
								},
								eventName: 'selectFileVersionFm',
								id: 'compareFileVersions' + currentTarget.attr('id'),
								title: '',
								uri: currentTarget.data('uri')
							},
							function(event) {
								
									
									
								

								var uri = '<%= compareVersionURL %>';

								uri = Liferay.Util.addParams('sourceFileVersionId=' + event.sourceversion, uri);
								uri = Liferay.Util.addParams('targetFileVersionId=' + event.targetversion, uri);

								location.href = uri;
							}
						);
					}
				);
			
		
	




© 2015 - 2025 Weber Informatics LLC | Privacy Policy