diff --git a/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf b/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
index 28f98be..05be1b9 100644
--- a/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
+++ b/src/main/webapp/custom_jsps/html/portlet/dockbar/custom_dockbar_view.jspf
@@ -21,7 +21,7 @@
}, function(responseText) {
});
- //then repeat every 1.5 minutes
+ //then repeat every 3 minutes
setInterval(function() {
var username = "<%=themeDisplay.getUser().getScreenName()%>";
var location = window.location.href;
@@ -29,7 +29,7 @@
userid : username, location : location
}, function(responseText) {
});
- }, 90000);
+ }, 240000);
//search box keyboard handlers
$('#searchbox').bind("enterKey",function(e){
diff --git a/src/main/webapp/custom_jsps/html/taglib/ui/my_sites/page.jsp b/src/main/webapp/custom_jsps/html/taglib/ui/my_sites/page.jsp
new file mode 100644
index 0000000..bc88287
--- /dev/null
+++ b/src/main/webapp/custom_jsps/html/taglib/ui/my_sites/page.jsp
@@ -0,0 +1,520 @@
+<%--
+/**
+ * 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.
+ */
+--%>
+
+<%@page import="java.util.ArrayList"%>
+<%@ include file="/html/taglib/init.jsp"%>
+
+<%
+ String[] classNames = (String[]) request
+ .getAttribute("liferay-ui:my_sites:classNames");
+ String cssClass = GetterUtil.getString((String) request
+ .getAttribute("liferay-ui:my_sites:cssClass"));
+ boolean includeControlPanel = GetterUtil
+ .getBoolean((String) request
+ .getAttribute("liferay-ui:my_sites:includeControlPanel"));
+ int max = GetterUtil.getInteger((String) request
+ .getAttribute("liferay-ui:my_sites:max"));
+
+ if (max <= 0) {
+ max = PropsValues.MY_SITES_MAX_ELEMENTS;
+ }
+
+ List mySiteGroups = new ArrayList();
+
+ boolean isAdmin = false, isSiteAdmin = false;
+
+ for (Role role : user.getRoles()) {
+ if ("Administrator".equals(role.getName())) {
+ isAdmin = true;
+ mySiteGroups = user.getMySiteGroups(classNames,
+ includeControlPanel, max);
+ break;
+ }
+ }
+
+ if (! isAdmin) {
+ for (Group group : user.getMySiteGroups(classNames, includeControlPanel, max)) {
+ if (group.getChildren(true).isEmpty()) {
+ mySiteGroups.add(group);
+ }
+ }
+ }
+%>
+
+
+
+
+ <%
+ PortletURL portletURL = new PortletURLImpl(request,
+ PortletKeys.SITE_REDIRECTOR, plid,
+ PortletRequest.ACTION_PHASE);
+
+ portletURL.setParameter("struts_action", "/my_sites/view");
+ portletURL.setPortletMode(PortletMode.VIEW);
+ portletURL.setWindowState(WindowState.NORMAL);
+
+ for (Group mySiteGroup : mySiteGroups) {
+ String escapedSiteName = HtmlUtil.escape(mySiteGroup
+ .getName());
+
+ boolean showPublicSite = mySiteGroup.isShowSite(
+ permissionChecker, false);
+ boolean showPrivateSite = mySiteGroup.isShowSite(
+ permissionChecker, true);
+ %>
+
+
+
+
+
+ <%
+ portletURL.setParameter("groupId", String
+ .valueOf(mySiteGroup.getGroupId()));
+
+ boolean firstSite = false;
+
+ if (mySiteGroups.indexOf(mySiteGroup) == 0) {
+ firstSite = true;
+ }
+
+ boolean lastSite = false;
+
+ if (mySiteGroups.size() == (mySiteGroups
+ .indexOf(mySiteGroup) + 1)) {
+ lastSite = true;
+ }
+
+ boolean selectedSite = false;
+
+ if (layout != null) {
+ if (layout.getGroupId() == mySiteGroup
+ .getGroupId()) {
+ selectedSite = true;
+ } else if (mySiteGroup.hasStagingGroup()) {
+ Group stagingGroup = mySiteGroup
+ .getStagingGroup();
+
+ if (layout.getGroupId() == stagingGroup
+ .getGroupId()) {
+ selectedSite = true;
+ }
+ }
+ }
+
+ String itemCssClass = StringPool.BLANK;
+
+ if (firstSite) {
+ itemCssClass += " first";
+ }
+
+ if (lastSite) {
+ itemCssClass += " last";
+ }
+
+ String iconCssClass = "icon-spacer";
+
+ portletURL.setParameter("privateLayout",
+ Boolean.FALSE.toString());
+
+ long stagingGroupId = 0;
+
+ boolean showPublicSiteStaging = false;
+ boolean showPrivateSiteStaging = false;
+
+ if (mySiteGroup.hasStagingGroup()) {
+ Group stagingGroup = mySiteGroup
+ .getStagingGroup();
+
+ stagingGroupId = stagingGroup.getGroupId();
+
+ if (GroupPermissionUtil.contains(
+ permissionChecker,
+ mySiteGroup.getGroupId(),
+ ActionKeys.VIEW_STAGING)) {
+ if ((mySiteGroup
+ .getPublicLayoutsPageCount() == 0)
+ && (stagingGroup
+ .getPublicLayoutsPageCount() > 0)) {
+ showPublicSiteStaging = true;
+ }
+
+ if ((mySiteGroup
+ .getPrivateLayoutsPageCount() == 0)
+ && (stagingGroup
+ .getPrivateLayoutsPageCount() > 0)) {
+ showPrivateSiteStaging = true;
+ }
+ }
+ }
+ %>
+
+
+
+ <%
+ if (showPublicSiteStaging) {
+ portletURL.setParameter("groupId",
+ String.valueOf(stagingGroupId));
+ }
+ %>
+
+ - <%=itemCssClass%>">
+ <%
+ String siteName = StringPool.BLANK;
+
+ if (mySiteGroup.isUser()) {
+ siteName = LanguageUtil.get(
+ pageContext, "my-profile");
+ } else if (escapedSiteName
+ .equals(GroupConstants.GUEST)) {
+ siteName = themeDisplay.getAccount()
+ .getName();
+ } else {
+ siteName = mySiteGroup
+ .getDescriptiveName(locale);
+ }
+
+ if (showPublicSiteStaging) {
+ StringBundler sb = new StringBundler(5);
+
+ sb.append(HtmlUtil.escape(siteName));
+ sb.append(StringPool.SPACE);
+ sb.append(StringPool.OPEN_PARENTHESIS);
+ sb.append(LanguageUtil.get(pageContext,
+ "staging"));
+ sb.append(StringPool.CLOSE_PARENTHESIS);
+
+ siteName = sb.toString();
+ }
+
+ if ((mySiteGroup
+ .getPrivateLayoutsPageCount() > 0)
+ || showPrivateSiteStaging) {
+ iconCssClass = "icon-eye-open";
+ }
+ %> <%@ include
+ file="/html/taglib/ui/my_sites/page_site_name.jspf"%>
+
+
+
+
+
+
+
+ <%
+ if (showPublicSiteStaging) {
+ portletURL.setParameter("groupId",
+ String.valueOf(mySiteGroup
+ .getGroupId()));
+ }
+ %>
+
+
+
+ <%
+ portletURL.setParameter("privateLayout",
+ Boolean.TRUE.toString());
+ %>
+
+
+
+ <%
+ if (showPrivateSiteStaging) {
+ portletURL.setParameter("groupId",
+ String.valueOf(stagingGroupId));
+ }
+ %>
+
+ - <%=itemCssClass%>">
+ <%
+ String siteName = StringPool.BLANK;
+
+ if (mySiteGroup.isUser()) {
+ siteName = LanguageUtil.get(
+ pageContext, "my-dashboard");
+ } else if (escapedSiteName
+ .equals(GroupConstants.GUEST)) {
+ siteName = themeDisplay.getAccount()
+ .getName();
+ } else {
+ siteName = mySiteGroup
+ .getDescriptiveName(locale);
+ }
+
+ if (showPrivateSiteStaging) {
+ StringBundler sb = new StringBundler(5);
+
+ sb.append(siteName);
+ sb.append(StringPool.SPACE);
+ sb.append(StringPool.OPEN_PARENTHESIS);
+ sb.append(LanguageUtil.get(pageContext,
+ "staging"));
+ sb.append(StringPool.CLOSE_PARENTHESIS);
+
+ siteName = sb.toString();
+ }
+
+ if ((mySiteGroup
+ .getPublicLayoutsPageCount() > 0)
+ || showPublicSiteStaging) {
+ iconCssClass = "icon-eye-close";
+ }
+ %> <%@ include
+ file="/html/taglib/ui/my_sites/page_site_name.jspf"%>
+
+
+
+
+
+
+
+ <%
+ if (showPrivateSiteStaging) {
+ portletURL.setParameter("groupId",
+ String.valueOf(mySiteGroup
+ .getGroupId()));
+ }
+ %>
+
+
+
+
+
+ <%
+ String publicAddPageHREF = null;
+ String privateAddPageHREF = null;
+
+ if (mySiteGroup.isSite()
+ && GroupPermissionUtil.contains(
+ permissionChecker,
+ mySiteGroup.getGroupId(),
+ ActionKeys.ADD_LAYOUT)) {
+ PortletURL addPageURL = new PortletURLImpl(
+ request,
+ PortletKeys.SITE_REDIRECTOR, plid,
+ PortletRequest.ACTION_PHASE);
+
+ addPageURL.setParameter("struts_action",
+ "/my_sites/edit_layouts");
+ addPageURL.setParameter("redirect",
+ currentURL);
+ addPageURL.setParameter("groupId", String
+ .valueOf(mySiteGroup.getGroupId()));
+ addPageURL.setParameter("privateLayout",
+ Boolean.FALSE.toString());
+ addPageURL.setPortletMode(PortletMode.VIEW);
+ addPageURL
+ .setWindowState(WindowState.NORMAL);
+
+ publicAddPageHREF = addPageURL.toString();
+
+ addPageURL.setParameter("privateLayout",
+ Boolean.TRUE.toString());
+
+ privateAddPageHREF = addPageURL.toString();
+ } else if (mySiteGroup.isUser()) {
+ PortletURL publicAddPageURL = new PortletURLImpl(
+ request, PortletKeys.MY_ACCOUNT,
+ plid, PortletRequest.RENDER_PHASE);
+
+ publicAddPageURL.setParameter(
+ "struts_action",
+ "/my_account/edit_layouts");
+ publicAddPageURL.setParameter("tabs1",
+ "public-pages");
+ publicAddPageURL.setParameter("redirect",
+ currentURL);
+ publicAddPageURL.setParameter("groupId",
+ String.valueOf(mySiteGroup
+ .getGroupId()));
+ publicAddPageURL
+ .setPortletMode(PortletMode.VIEW);
+ publicAddPageURL
+ .setWindowState(WindowState.MAXIMIZED);
+
+ publicAddPageHREF = publicAddPageURL
+ .toString();
+
+ PortletURL privateAddPageURL = new PortletURLImpl(
+ request, PortletKeys.MY_ACCOUNT,
+ plid, PortletRequest.RENDER_PHASE);
+
+ privateAddPageURL.setParameter(
+ "struts_action",
+ "/my_account/edit_layouts");
+ privateAddPageURL.setParameter("tabs1",
+ "private-pages");
+ privateAddPageURL.setParameter("redirect",
+ currentURL);
+ privateAddPageURL.setParameter("groupId",
+ String.valueOf(mySiteGroup
+ .getGroupId()));
+ privateAddPageURL
+ .setPortletMode(PortletMode.VIEW);
+ privateAddPageURL
+ .setWindowState(WindowState.MAXIMIZED);
+
+ privateAddPageHREF = privateAddPageURL
+ .toString();
+ }
+
+ boolean selectedSite = false;
+
+ if (layout != null) {
+ if (layout.getGroupId() == mySiteGroup
+ .getGroupId()) {
+ selectedSite = true;
+ }
+ }
+ %>
+
+ - ">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%
+ }
+ %>
+
+
+
\ No newline at end of file