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

<c:if test="<%= selGroup.hasLocalOrRemoteStagingGroup() && !selGroup.isStagingGroup() %>">
	<clay:alert
		displayType="warning"
		message="changes-are-immediately-available-to-end-users"
	/>
</c:if>

<%
Group selLayoutGroup = selLayout.getGroup();
%>

<c:choose>
	<c:when test="<%= !SitesUtil.isLayoutUpdateable(selLayout) %>">
		<div class="alert alert-warning">
			<liferay-ui:message key="this-page-cannot-be-modified-because-it-is-associated-with-a-site-template-does-not-allow-modifications-to-it" />
		</div>
	</c:when>
	<c:when test="<%= !SitesUtil.isLayoutDeleteable(selLayout) %>">
		<div class="alert alert-warning">
			<liferay-ui:message key="this-page-cannot-be-deleted-and-cannot-have-child-pages-because-it-is-associated-with-a-site-template" />
		</div>
	</c:when>
</c:choose>

<c:if test="<%= (selLayout.getGroupId() != layoutsAdminDisplayContext.getGroupId()) && selLayoutGroup.isUserGroup() %>">

	<%
	UserGroup userGroup = UserGroupLocalServiceUtil.getUserGroup(selLayoutGroup.getClassPK());
	%>

	<div class="alert alert-warning">
		<liferay-ui:message arguments="<%= HtmlUtil.escape(userGroup.getName()) %>" key="this-page-cannot-be-modified-because-it-belongs-to-the-user-group-x" translateArguments="<%= false %>" />
	</div>
</c:if>