All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.edit_scope.jsp Maven / Gradle / Ivy

There is a newer version: 5.0.85
Show newest version
<%--
/**
 * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
 * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
 */
--%>

<%@ include file="/init.jsp" %>

<%
String scopeType = GetterUtil.getString(portletPreferences.getValue("lfrScopeType", null));
String scopeLayoutUuid = GetterUtil.getString(portletPreferences.getValue("lfrScopeLayoutUuid", null));

Group group = null;

if (Validator.isNull(scopeType)) {
	group = themeDisplay.getSiteGroup();
}
else if (scopeType.equals("company")) {
	group = GroupLocalServiceUtil.getGroup(themeDisplay.getCompanyGroupId());
}
else if (scopeType.equals("layout")) {
	for (Layout scopeGroupLayout : LayoutLocalServiceUtil.getScopeGroupLayouts(layout.getGroupId(), layout.isPrivateLayout())) {
		if (scopeLayoutUuid.equals(scopeGroupLayout.getUuid())) {
			group = GroupLocalServiceUtil.getLayoutGroup(scopeGroupLayout.getCompanyId(), scopeGroupLayout.getPlid());

			break;
		}
	}

	if (group == null) {
		group = themeDisplay.getSiteGroup();
	}
}

Set availableGroups = new LinkedHashSet();

availableGroups.add(group);
availableGroups.add(themeDisplay.getSiteGroup());
availableGroups.add(company.getGroup());

for (Layout scopeGroupLayout : LayoutLocalServiceUtil.getScopeGroupLayouts(layout.getGroupId(), layout.isPrivateLayout())) {
	availableGroups.add(scopeGroupLayout.getScopeGroup());
}
%>


	
	
	
	



	


<% for (Group availableGroup : availableGroups) { String availableGroupScopeType = StringPool.BLANK; String availableGroupScopeLayoutUuid = StringPool.BLANK; if (availableGroup.isCompany()) { availableGroupScopeType = "company"; } else if (availableGroup.isLayout()) { availableGroupScopeType = "layout"; Layout availableGroupLayout = LayoutLocalServiceUtil.getLayout(availableGroup.getClassPK()); availableGroupScopeLayoutUuid = availableGroupLayout.getUuid(); } %> <% } %>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy