<%--
/**
 * 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:choose>
	<c:when test='<%= displayStyle.equals("descriptive") %>'>
		<liferay-ui:search-container-column-icon
			icon="organizations"
			toggleRowChecker="<%= true %>"
		/>

		<liferay-ui:search-container-column-text
			colspan="<%= 2 %>"
		>
			<h5>
				<aui:a href="<%= String.valueOf(rowURL) %>"><%= organization.getName() %></aui:a>
			</h5>

			<h6 class="text-default">
				<%= HtmlUtil.escape(organization.getParentOrganizationName()) %>
			</h6>

			<h6 class="text-default">
				<%= LanguageUtil.get(request, organization.getType()) %>
			</h6>

			<h6 class="text-default">
				<%= HtmlUtil.escape(organization.getAddress().getCity()) %>
				<%= UsersAdmin.ORGANIZATION_REGION_NAME_ACCESSOR.get(organization) %>
				<%= UsersAdmin.ORGANIZATION_COUNTRY_NAME_ACCESSOR.get(organization) %>
			</h6>
		</liferay-ui:search-container-column-text>

		<liferay-ui:search-container-column-jsp
			cssClass="entry-action-column"
			path="/organization_action.jsp"
		/>
	</c:when>
	<c:when test='<%= displayStyle.equals("icon") %>'>
		<liferay-util:buffer
			var="organizationLogoHTML"
		>
			<div class="user-card">
				<div class="aspect-ratio-item-center-middle aspect-ratio-item-fluid card-type-asset-icon">
					<span class="rounded-circle sticker sticker-primary">
						<span class="sticker-overlay">
							<img alt="thumbnail" class="img-fluid" src="<%= organization.getLogoURL() %>" />
						</span>
					</span>
				</div>
			</div>
		</liferay-util:buffer>

		<liferay-ui:search-container-column-text>
			<liferay-frontend:html-vertical-card
				actionJsp="/organization_action.jsp"
				actionJspServletContext="<%= application %>"
				html="<%= organizationLogoHTML %>"
				resultRow="<%= row %>"
				rowChecker="<%= organizationSearchContainer.getRowChecker() %>"
				subtitle="<%= LanguageUtil.get(request, organization.getType()) %>"
				title="<%= organization.getName() %>"
				url="<%= String.valueOf(rowURL) %>"
			/>
		</liferay-ui:search-container-column-text>
	</c:when>
	<c:otherwise>
		<liferay-ui:search-container-column-text
			cssClass="table-cell-expand table-cell-minw-200 table-title"
			href="<%= rowURL %>"
			name="name"
			orderable="<%= true %>"
			value="<%= organization.getName() %>"
		/>

		<c:if test="<%= Validator.isNotNull(keywords) %>">
			<liferay-ui:search-container-column-text
				cssClass="table-cell-expand table-cell-minw-200"
				href="<%= rowURL %>"
				name="parent-organization"
				value="<%= HtmlUtil.escape(organization.getParentOrganizationName()) %>"
			/>
		</c:if>

		<liferay-ui:search-container-column-text
			cssClass="table-cell-expand table-cell-minw-200"
			href="<%= rowURL %>"
			name="type"
			orderable="<%= true %>"
			value="<%= LanguageUtil.get(request, organization.getType()) %>"
		/>

		<c:if test="<%= Validator.isNotNull(keywords) %>">
			<liferay-ui:search-container-column-text
				href="<%= rowURL %>"
				name="city"
				value="<%= HtmlUtil.escape(organization.getAddress().getCity()) %>"
			/>

			<liferay-ui:search-container-column-text
				href="<%= rowURL %>"
				name="region"
				value="<%= UsersAdmin.ORGANIZATION_REGION_NAME_ACCESSOR.get(organization) %>"
			/>

			<liferay-ui:search-container-column-text
				href="<%= rowURL %>"
				name="country"
				value="<%= UsersAdmin.ORGANIZATION_COUNTRY_NAME_ACCESSOR.get(organization) %>"
			/>
		</c:if>

		<liferay-ui:search-container-column-jsp
			cssClass="entry-action-column"
			path="/organization_action.jsp"
		/>
	</c:otherwise>
</c:choose>