<%--
/**
 * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
 *
 * The contents of this file are subject to the terms of the Liferay Enterprise
 * Subscription License ("License"). You may not use this file except in
 * compliance with the License. You can obtain a copy of the License by
 * contacting Liferay, Inc. See the License for the specific language governing
 * permissions and limitations under the License, including but not limited to
 * distribution rights of the Software.
 *
 *
 *
 */
--%>

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

<%
COREntryDisplayContext corEntryDisplayContext = (COREntryDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

COREntry corEntry = corEntryDisplayContext.getCOREntry();

portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(String.valueOf(renderResponse.createRenderURL()));
%>

<liferay-portlet:renderURL var="editCOREntryExternalReferenceCodeURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
	<portlet:param name="mvcRenderCommandName" value="/cor_entry/edit_cor_entry_external_reference_code" />
	<portlet:param name="corEntryId" value="<%= String.valueOf(corEntry.getCOREntryId()) %>" />
</liferay-portlet:renderURL>

<commerce-ui:header
	actions="<%= corEntryDisplayContext.getHeaderActionModels() %>"
	bean="<%= corEntry %>"
	beanIdLabel="id"
	externalReferenceCode="<%= corEntry.getExternalReferenceCode() %>"
	externalReferenceCodeEditUrl="<%= editCOREntryExternalReferenceCodeURL %>"
	model="<%= COREntry.class %>"
	title="<%= corEntry.getName() %>"
/>

<liferay-frontend:screen-navigation
	containerWrapperCssClass="container"
	key="<%= COREntryScreenNavigationEntryConstants.SCREEN_NAVIGATION_KEY_COR_ENTRY_GENERAL %>"
	modelBean="<%= corEntry %>"
	portletURL="<%= currentURLObj %>"
/>

<liferay-frontend:component
	context='<%=
		HashMapBuilder.<String, Object>put(
			"workflowAction", WorkflowConstants.ACTION_PUBLISH
		).build()
	%>'
	module="js/editCOREntry"
/>