forked from liferay/liferay-portal
/
view_account_organizations.jsp
90 lines (76 loc) · 3.67 KB
/
view_account_organizations.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<%--
/**
* Copyright (c) 2000-present 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.
*/
--%>
<%@ include file="/init.jsp" %>
<%
AccountEntryDisplay accountEntryDisplay = (AccountEntryDisplay)request.getAttribute(AccountWebKeys.ACCOUNT_ENTRY_DISPLAY);
SearchContainer<Organization> accountOrganizationSearchContainer = AccountOrganizationSearchContainerFactory.create(accountEntryDisplay.getAccountEntryId(), liferayPortletRequest, liferayPortletResponse);
ViewAccountOrganizationsManagementToolbarDisplayContext viewAccountOrganizationsManagementToolbarDisplayContext = new ViewAccountOrganizationsManagementToolbarDisplayContext(request, liferayPortletRequest, liferayPortletResponse, accountOrganizationSearchContainer);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(ParamUtil.getString(request, "backURL", String.valueOf(renderResponse.createRenderURL())));
renderResponse.setTitle(accountEntryDisplay.getName());
%>
<clay:management-toolbar-v2
displayContext="<%= viewAccountOrganizationsManagementToolbarDisplayContext %>"
/>
<clay:container-fluid>
<aui:form method="post" name="fm">
<aui:input name="accountEntryId" type="hidden" value="<%= accountEntryDisplay.getAccountEntryId() %>" />
<aui:input name="accountOrganizationIds" type="hidden" />
<liferay-ui:search-container
searchContainer="<%= accountOrganizationSearchContainer %>"
>
<liferay-ui:search-container-row
className="com.liferay.portal.kernel.model.Organization"
keyProperty="organizationId"
modelVar="accountOrganization"
>
<liferay-ui:search-container-column-text
cssClass="table-cell-expand-small table-cell-minw-150"
name="name"
property="name"
/>
<liferay-ui:search-container-column-text
cssClass="table-cell-expand-small table-cell-minw-150"
name="parent-organization"
property="parentOrganizationName"
/>
<c:if test="<%= AccountEntryPermission.contains(permissionChecker, accountEntryDisplay.getAccountEntryId(), AccountActionKeys.MANAGE_ORGANIZATIONS) %>">
<liferay-ui:search-container-column-text>
<portlet:actionURL name="/account_admin/remove_account_organizations" var="removeAccountOrganizationsURL">
<portlet:param name="redirect" value="<%= currentURL %>" />
<portlet:param name="accountEntryId" value="<%= String.valueOf(accountEntryDisplay.getAccountEntryId()) %>" />
<portlet:param name="accountOrganizationIds" value="<%= String.valueOf(accountOrganization.getOrganizationId()) %>" />
</portlet:actionURL>
<liferay-ui:icon-delete
confirmation="are-you-sure-you-want-to-remove-this-organization"
icon="times-circle"
message="remove"
showIcon="<%= true %>"
url="<%= removeAccountOrganizationsURL %>"
/>
</liferay-ui:search-container-column-text>
</c:if>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator
markupView="lexicon"
/>
</liferay-ui:search-container>
</aui:form>
</clay:container-fluid>
<liferay-frontend:component
componentId="<%= viewAccountOrganizationsManagementToolbarDisplayContext.getDefaultEventHandler() %>"
module="account_entries_admin/js/AccountOrganizationsManagementToolbarDefaultEventHandler.es"
/>