<%
/**
 * Copyright (c) 2000-2011 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.
 */
%>

<c:if test="<%= !themeDisplay.isStateExclusive() %>">
	<div class="portlet-body">
</c:if>

<c:choose>
	<c:when test="<%= portletDisplay.isActive() %>">
		<c:choose>
			<c:when test="<%= themeDisplay.isStateExclusive() %>">
				<%@ include file="/html/common/themes/portlet_content.jspf" %>
			</c:when>
			<c:when test="<%= portletDisplay.isAccess() %>">
				<c:if test='<%= !tilesPortletContent.endsWith("/error.jsp") %>'>
					<%@ include file="/html/common/themes/portlet_messages.jspf" %>
				</c:if>

				<c:choose>
					<c:when test="<%= group.isLayoutPrototype() && layoutTypePortlet.hasPortletId(portletDisplay.getId()) %>">
						<div class="portlet-msg-info">
							<liferay-ui:message key="configure-this-application-and-place-it-where-desired-on-the-page" />
						</div>
					</c:when>
					<c:otherwise>
						<%@ include file="/html/common/themes/portlet_content.jspf" %>
					</c:otherwise>
				</c:choose>
			</c:when>
			<c:otherwise>
				<liferay-util:include page="/html/portal/portlet_access_denied.jsp" />
			</c:otherwise>
		</c:choose>
	</c:when>
	<c:otherwise>
		<liferay-util:include page="/html/portal/portlet_inactive.jsp" />
	</c:otherwise>
</c:choose>

<c:if test="<%= !themeDisplay.isStateExclusive() %>">
	</div>
</c:if>