<%--
/**
 * 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" %>

<%
CommerceTermEntryDisplayContext commerceTermEntryDisplayContext = (CommerceTermEntryDisplayContext)request.getAttribute(WebKeys.PORTLET_DISPLAY_CONTEXT);

CommerceTermEntry commerceTermEntry = commerceTermEntryDisplayContext.getCommerceTermEntry();

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

<liferay-portlet:renderURL var="editCommerceTermEntryExternalReferenceCodeURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
	<portlet:param name="mvcRenderCommandName" value="/commerce_term_entry/edit_commerce_term_entry_external_reference_code" />
	<portlet:param name="commerceTermEntryId" value="<%= String.valueOf(commerceTermEntry.getCommerceTermEntryId()) %>" />
</liferay-portlet:renderURL>

<commerce-ui:header
	actions="<%= commerceTermEntryDisplayContext.getHeaderActionModels() %>"
	bean="<%= commerceTermEntry %>"
	beanIdLabel="id"
	externalReferenceCode="<%= commerceTermEntry.getExternalReferenceCode() %>"
	externalReferenceCodeEditUrl="<%= editCommerceTermEntryExternalReferenceCodeURL %>"
	model="<%= CommerceTermEntry.class %>"
	title="<%= commerceTermEntry.getLabel(themeDisplay.getLanguageId()) %>"
/>

<liferay-frontend:screen-navigation
	containerWrapperCssClass="container"
	key="<%= CommerceTermEntryScreenNavigationEntryConstants.SCREEN_NAVIGATION_KEY_COMMERCE_TERM_ENTRY_GENERAL %>"
	modelBean="<%= commerceTermEntry %>"
	portletURL="<%= currentURLObj %>"
/>

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