
META-INF.resources.user.personal_site.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" %>
<%
User selUser = (User)request.getAttribute("user.selUser");
List layoutSetPrototypes = LayoutSetPrototypeServiceUtil.search(company.getCompanyId(), Boolean.TRUE, null);
LayoutSet privateLayoutSet = null;
LayoutSetPrototype privateLayoutSetPrototype = null;
boolean privateLayoutSetPrototypeLinkEnabled = true;
LayoutSet publicLayoutSet = null;
LayoutSetPrototype publicLayoutSetPrototype = null;
boolean publicLayoutSetPrototypeLinkEnabled = true;
boolean hasGroupUpdatePermission = true;
if (selUser != null) {
Group userGroup = selUser.getGroup();
hasGroupUpdatePermission = GroupPermissionUtil.contains(themeDisplay.getPermissionChecker(), userGroup.getGroupId(), ActionKeys.UPDATE);
if (userGroup != null) {
try {
LayoutLocalServiceUtil.getLayouts(userGroup.getGroupId(), false, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
privateLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroup.getGroupId(), true);
privateLayoutSetPrototypeLinkEnabled = privateLayoutSet.isLayoutSetPrototypeLinkEnabled();
String layoutSetPrototypeUuid = privateLayoutSet.getLayoutSetPrototypeUuid();
if (Validator.isNotNull(layoutSetPrototypeUuid)) {
privateLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
}
}
catch (Exception e) {
}
try {
LayoutLocalServiceUtil.getLayouts(userGroup.getGroupId(), true, LayoutConstants.DEFAULT_PARENT_LAYOUT_ID);
publicLayoutSet = LayoutSetLocalServiceUtil.getLayoutSet(userGroup.getGroupId(), false);
publicLayoutSetPrototypeLinkEnabled = publicLayoutSet.isLayoutSetPrototypeLinkEnabled();
String layoutSetPrototypeUuid = publicLayoutSet.getLayoutSetPrototypeUuid();
if (Validator.isNotNull(layoutSetPrototypeUuid)) {
publicLayoutSetPrototype = LayoutSetPrototypeLocalServiceUtil.getLayoutSetPrototypeByUuidAndCompanyId(layoutSetPrototypeUuid, company.getCompanyId());
}
}
catch (Exception e) {
}
}
}
%>
<%
boolean hasUnlinkLayoutSetPrototypePermission = PortalPermissionUtil.contains(permissionChecker, ActionKeys.UNLINK_LAYOUT_SET_PROTOTYPE);
%>
<%
for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
%>
<%
}
%>
<%
Group selUserGroup = selUser.getGroup();
%>
<%
for (LayoutSetPrototype layoutSetPrototype : layoutSetPrototypes) {
%>
<%
}
%>
<%
Group selUserGroup = selUser.getGroup();
%>
<%
if ((selUser == null) && layoutSetPrototypes.isEmpty()) {
request.setAttribute(WebKeys.FORM_NAVIGATOR_SECTION_SHOW + "pages", Boolean.FALSE);
}
%>
function isVisible(currentValue, value) {
return currentValue != '';
}
Liferay.Util.toggleSelectBox(' publicLayoutSetPrototypeId', isVisible, ' publicLayoutSetPrototypeIdOptions');
Liferay.Util.toggleSelectBox(' privateLayoutSetPrototypeId', isVisible, ' privateLayoutSetPrototypeIdOptions');
© 2015 - 2025 Weber Informatics LLC | Privacy Policy