social-dockbar-hook/src/main/webapp/custom_jsps/html/portlet/dockbar/view_admin_links.jspf

57 lines
2.4 KiB
Plaintext

<%--
/**
* Copyright (c) 2000-2013 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.
*/
--%>
<c:if test="<%= (themeDisplay.isShowControlPanelIcon() || themeDisplay.isShowSiteAdministrationIcon()) && (!layout.getGroup().isControlPanel() || (Validator.isNotNull(controlPanelCategory) && (controlPanelCategory.startsWith(PortletCategoryKeys.CURRENT_SITE) || (controlPanelCategory.equals(PortletCategoryKeys.MY) && !PropsValues.DOCKBAR_ADMINISTRATIVE_LINKS_SHOW_IN_POP_UP)))) %>">
<aui:nav-item cssClass="admin-links" dropdown="<%= true %>" id="adminLinks" label="admin">
<c:if test="<%= themeDisplay.isShowSiteAdministrationIcon() %>">
<aui:nav-item anchorId="siteAdministrationLink" href="<%= themeDisplay.getURLSiteAdministration() %>" iconCssClass="icon-cog" label="site-administration">
<%
Map<String, List<Portlet>> categoriesMap = PortalUtil.getSiteAdministrationCategoriesMap(request);
if (!categoriesMap.isEmpty()) {
String currentSiteCategory = PortletCategoryKeys.CURRENT_SITE.concat(StringPool.PERIOD);
%>
<ul class="unstyled site-administration-menu">
<%
for (String category : categoriesMap.keySet()) {
String url = HttpUtil.setParameter(themeDisplay.getURLSiteAdministration(), "controlPanelCategory", StringUtil.replace(category, PortletCategoryKeys.SITE_ADMINISTRATION, currentSiteCategory));
%>
<aui:nav-item anchorId='<%= "siteAdministrationLink-" + category %>' href="<%= url %>" iconCssClass="icon-chevron-right" label='<%= "category." + category %>' />
<%
}
%>
</ul>
<%
}
%>
</aui:nav-item>
</c:if>
<c:if test="<%= themeDisplay.isShowControlPanelIcon() %>">
<aui:nav-item anchorId="controlPanelLink" href="<%= themeDisplay.getURLControlPanel() %>" iconCssClass="icon-wrench" label="control-panel" />
</c:if>
</aui:nav-item>
<aui:nav-item cssClass="divider-vertical"></aui:nav-item>
</c:if>