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

<liferay-ui:search-container-column-text
	href="<%= rowURL %>"
	name="name"
	orderable="<%= true %>"
	property="name"
/>

<liferay-ui:search-container-column-text
	buffer="buffer"
	href="<%= rowURL %>"
	name="parent-organization"
>

	<%
	if (organization.getParentOrganizationId() > 0) {
		try {
			Organization parentOrganization = OrganizationLocalServiceUtil.getOrganization(organization.getParentOrganizationId());

			buffer.append(HtmlUtil.escape(parentOrganization.getName()));
		}
		catch (Exception e) {
		}
	}
	%>

</liferay-ui:search-container-column-text>

<liferay-ui:search-container-column-text
	href="<%= rowURL %>"
	name="type"
	orderable="<%= true %>"
	value="<%= LanguageUtil.get(pageContext, organization.getType()) %>"
/>

<liferay-ui:search-container-column-text
	href="<%= rowURL %>"
	name="city"
	value="<%= organization.getAddress().getCity() %>"
/>

<liferay-ui:search-container-column-text
	href="<%= rowURL %>"
	name="region"
>
	<liferay-ui:write bean="<%= organization %>" property="region" />
</liferay-ui:search-container-column-text>

<liferay-ui:search-container-column-text
	href="<%= rowURL %>"
	name="country"
>
	<liferay-ui:write bean="<%= organization %>" property="country" />
</liferay-ui:search-container-column-text>