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

META-INF.resources.wiki.view_page_details.jsp Maven / Gradle / Ivy

There is a newer version: 7.0.121
Show newest version
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/wiki/init.jsp" %>

<%
WikiEngineRenderer wikiEngineRenderer = (WikiEngineRenderer)request.getAttribute(WikiWebKeys.WIKI_ENGINE_RENDERER);
WikiNode node = (WikiNode)request.getAttribute(WikiWebKeys.WIKI_NODE);

WikiPage wikiPage = (WikiPage)request.getAttribute(WikiWebKeys.WIKI_PAGE);

List attachmentsFileEntries = wikiPage.getAttachmentsFileEntries();

WikiPage initialPage = WikiPageLocalServiceUtil.getPage(wikiPage.getNodeId(), wikiPage.getTitle(), WikiPageConstants.VERSION_DEFAULT);

PortletURL viewPageURL = PortletURLBuilder.createRenderURL(
	renderResponse
).setMVCRenderCommandName(
	"/wiki/view"
).setParameter(
	"nodeName", node.getName()
).setParameter(
	"title", wikiPage.getTitle()
).buildPortletURL();

PortletURL editPageURL = PortletURLBuilder.createRenderURL(
	renderResponse
).setMVCRenderCommandName(
	"/wiki/edit_page"
).setRedirect(
	currentURL
).setParameter(
	"nodeId", node.getNodeId()
).setParameter(
	"title", wikiPage.getTitle()
).buildPortletURL();

PortalUtil.addPortletBreadcrumbEntry(request, wikiPage.getTitle(), viewPageURL.toString());

PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "details"), currentURL);
%>




	




		<%
		String[] conversions = DocumentConversionUtil.getConversions("html");

		PortletURL exportPageURL = PortletURLBuilder.createActionURL(
			renderResponse
		).setActionName(
			"/wiki/export_page"
		).setParameter(
			"nodeId", node.getNodeId()
		).setParameter(
			"nodeName", node.getName()
		).setParameter(
			"title", wikiPage.getTitle()
		).setParameter(
			"version", wikiPage.getVersion()
		).setWindowState(
			LiferayWindowState.EXCLUSIVE
		).buildPortletURL();
		%>

		
		
		
		
<%= wikiPage.getTitle() %>
<%= WikiUtil.getFormatLabel(wikiEngineRenderer, wikiPage.getFormat(), themeDisplay.getLocale()) %>
<%= wikiPage.getVersion() %> ()
<%= HtmlUtil.escape(Validator.isNotNull(initialPage.getUserName()) ? initialPage.getUserName() : "Liferay") %> (<%= dateTimeFormat.format(initialPage.getCreateDate()) %>)
<%= HtmlUtil.escape(wikiPage.getUserName()) %> (<%= dateTimeFormat.format(wikiPage.getModifiedDate()) %>)
<%= (attachmentsFileEntries != null) ? attachmentsFileEntries.size() : 0 %>
<% for (String conversion : conversions) { exportPageURL.setParameter("targetExtension", conversion); %> <% } %>
<% PortletURL deletePageURL = PortletURLBuilder.create( PortletURLUtil.clone(editPageURL, PortletRequest.ACTION_PHASE, renderResponse) ).setActionName( "/wiki/edit_page" ).buildPortletURL(); if (trashHelper.isTrashEnabled(scopeGroupId)) { deletePageURL.setParameter(Constants.CMD, Constants.MOVE_TO_TRASH); } else { deletePageURL.setParameter(Constants.CMD, Constants.DELETE); } deletePageURL.setParameter( "redirect", PortletURLBuilder.create( PortletURLUtil.clone(viewPageURL, renderResponse) ).setParameter( "title", wikiGroupServiceConfiguration.frontPageName() ).buildString()); %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy