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

<%
SegmentsDisplayContext segmentsDisplayContext = (SegmentsDisplayContext)request.getAttribute(SegmentsWebKeys.SEGMENTS_DISPLAY_CONTEXT);

ResultRow row = (ResultRow)request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);

SegmentsEntry segmentsEntry = (SegmentsEntry)row.getObject();
%>

<liferay-ui:icon-menu
	direction="left-side"
	icon="<%= StringPool.BLANK %>"
	markupView="lexicon"
	message="<%= StringPool.BLANK %>"
	showWhenSingleIcon="<%= true %>"
>
	<c:if test="<%= segmentsDisplayContext.isShowUpdateAction(segmentsEntry) %>">
		<liferay-ui:icon
			message="edit"
			url="<%= segmentsDisplayContext.getEditURL(segmentsEntry) %>"
		/>
	</c:if>

	<c:if test="<%= segmentsDisplayContext.isShowViewAction(segmentsEntry) %>">
		<liferay-ui:icon
			message="view-members"
			url="<%= segmentsDisplayContext.getPreviewMembersURL(segmentsEntry) %>"
			useDialog="<%= true %>"
		/>
	</c:if>

	<c:if test="<%= segmentsDisplayContext.isShowAssignUserRolesAction(segmentsEntry) %>">
		<liferay-ui:icon
			data="<%= segmentsDisplayContext.getAssignUserRolesDataMap(segmentsEntry) %>"
			linkCssClass="<%= segmentsDisplayContext.getAssignUserRolesLinkCss(segmentsEntry) %>"
			message="assign-site-roles"
			url="javascript:void(0);"
		/>
	</c:if>

	<c:if test="<%= segmentsDisplayContext.isShowPermissionAction(segmentsEntry) %>">
		<liferay-ui:icon
			message="permissions"
			method="get"
			url="<%= segmentsDisplayContext.getPermissionURL(segmentsEntry) %>"
			useDialog="<%= true %>"
		/>
	</c:if>

	<c:if test="<%= segmentsDisplayContext.isShowDeleteAction(segmentsEntry) %>">
		<liferay-ui:icon-delete
			url="<%= segmentsDisplayContext.getDeleteURL(segmentsEntry) %>"
		/>
	</c:if>
</liferay-ui:icon-menu>