
META-INF.resources.edit_organization_assignments.jsp Maven / Gradle / Ivy
<%--
/**
* 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" %>
<%
String tabs1 = ParamUtil.getString(request, "tabs1");
String tabs2 = ParamUtil.getString(request, "tabs2", "current");
int cur = ParamUtil.getInteger(request, SearchContainer.DEFAULT_CUR_PARAM);
String redirect = ParamUtil.getString(request, "redirect");
long organizationId = ParamUtil.getLong(request, "organizationId");
Organization organization = OrganizationServiceUtil.fetchOrganization(organizationId);
PortletURL portletURL = renderResponse.createRenderURL();
portletURL.setParameter("mvcRenderCommandName", "/users_admin/edit_organization_assignments");
portletURL.setParameter("tabs1", tabs1);
portletURL.setParameter("tabs2", tabs2);
portletURL.setParameter("redirect", redirect);
portletURL.setParameter("organizationId", String.valueOf(organization.getOrganizationId()));
UsersAdminUtil.addPortletBreadcrumbEntries(organization, request, renderResponse);
PortalUtil.addPortletBreadcrumbEntry(request, LanguageUtil.get(request, "assign-members"), currentURL);
portletDisplay.setShowBackIcon(true);
portletDisplay.setURLBack(redirect);
renderResponse.setTitle(organization.getName());
%>
<%
UserSearchTerms searchTerms = (UserSearchTerms)userSearchContainer.getSearchTerms();
LinkedHashMap userParams = new LinkedHashMap();
if (tabs2.equals("current")) {
userParams.put("usersOrgs", Long.valueOf(organization.getOrganizationId()));
}
else if (PropsValues.ORGANIZATIONS_ASSIGNMENT_STRICT && !permissionChecker.isCompanyAdmin() && !permissionChecker.hasPermission(scopeGroupId, User.class.getName(), User.class.getName(), ActionKeys.VIEW)) {
userParams.put("usersOrgsTree", user.getOrganizations(true));
}
%>
<%
String taglibOnClick = renderResponse.getNamespace() + "updateOrganizationUsers('" + portletURL.toString() + StringPool.AMPERSAND + renderResponse.getNamespace() + "cur=" + cur + "');";
%>
function updateOrganizationUsers(assignmentsRedirect) {
var form = AUI.$(document. fm);
form.fm('assignmentsRedirect').val(assignmentsRedirect);
form.fm('addUserIds').val(Liferay.Util.listCheckedExcept(form, ' allRowIds'));
form.fm('removeUserIds').val(Liferay.Util.listUncheckedExcept(form, ' allRowIds'));
submitForm(form, ' ');
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy