diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 8c3ed1b10f..cf6bee8e12 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -796,6 +796,7 @@ create_website_finish_instruction=To close this wizard and create your website s title_browse_website=Browse Website Sandboxes website_info=Use this view to browse the staging area and user sandboxes for a website. staging_sandbox=Staging Sandbox +user_sandboxes=User Sandboxes # New User Wizard messages new_user_title=New User Wizard diff --git a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java index a7ae2a90fe..c847a4fad9 100644 --- a/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java +++ b/source/java/org/alfresco/web/bean/wcm/CreateWebsiteWizard.java @@ -17,6 +17,7 @@ package org.alfresco.web.bean.wcm; import java.io.Serializable; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -100,10 +101,16 @@ public class CreateWebsiteWizard extends BaseWizardBean // create the AVM stores (layers) to represent the newly created location website createStagingSandbox(this.name); - // create layer for current user (TODO: based on role) - createUserSandbox(this.name, Application.getCurrentUser(context).getUserName()); + // create a sandbox for each user (TODO: based on role?) + List invitedUsers = getInvitedUsernames(); + invitedUsers.add(Application.getCurrentUser(context).getUserName()); + for (String username : invitedUsers) + { + createUserSandbox(this.name, username); + } - // TODO: create layers for invited users based on roles + // save the list of invited users against the store + this.nodeService.setProperty(nodeRef, ContentModel.PROP_USERSANDBOXES, (Serializable)invitedUsers); // TODO: import the ZIP structure into the AVM staging store @@ -362,4 +369,13 @@ public class CreateWebsiteWizard extends BaseWizardBean this.avmService.setStoreProperty(store, QName.createQName(null, dnsProp), new PropertyValue(DataTypeDefinition.TEXT, path)); } + + /** + * @return The list of invited usernames + */ + private List getInvitedUsernames() + { + // TODO: add the list of invited users here + return new ArrayList(1); + } } diff --git a/source/web/WEB-INF/faces-config-repo.xml b/source/web/WEB-INF/faces-config-repo.xml index 72eefca71b..31eab1ed04 100644 --- a/source/web/WEB-INF/faces-config-repo.xml +++ b/source/web/WEB-INF/faces-config-repo.xml @@ -154,6 +154,7 @@ org.alfresco.web.ui.repo.component.UIWorkflowSummary + org.alfresco.faces.PermissionEvaluator diff --git a/source/web/WEB-INF/faces-config-wcm.xml b/source/web/WEB-INF/faces-config-wcm.xml new file mode 100644 index 0000000000..d0601dfabc --- /dev/null +++ b/source/web/WEB-INF/faces-config-wcm.xml @@ -0,0 +1,19 @@ + + + + + + + org.alfresco.faces.UserSandboxes + org.alfresco.web.ui.wcm.component.UIUserSandboxes + + + + + + + + + + diff --git a/source/web/WEB-INF/wcm.tld b/source/web/WEB-INF/wcm.tld new file mode 100644 index 0000000000..ae08fd8fc3 --- /dev/null +++ b/source/web/WEB-INF/wcm.tld @@ -0,0 +1,47 @@ + + + + + + 1.0 + 1.2 + w + Alfresco WCM JSF Components + Tag library consisting of Alfresco WCM JSF components i.e. those that can only be used in Alfresco WCM based projects + + + userSandboxes + org.alfresco.web.ui.wcm.tag.UserSandboxesTag + JSP + User Sandboxes + Displays the user sandboxes for a website + + + id + false + true + The component identifier for this component + + + + value + true + true + The noderef of the website to display sandboxes for + + + + binding + false + true + The value binding expression linking this component to a property in a backing bean + + + + rendered + false + true + + + + diff --git a/source/web/WEB-INF/web.xml b/source/web/WEB-INF/web.xml index aeabc86ba8..bd3412c338 100644 --- a/source/web/WEB-INF/web.xml +++ b/source/web/WEB-INF/web.xml @@ -16,7 +16,7 @@ javax.faces.CONFIG_FILES - /WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,WEB-INF/faces-config-custom.xml,/WEB-INF/faces-config-enterprise.xml,/WEB-INF/faces-config-jbpm.xml + /WEB-INF/faces-config-app.xml,/WEB-INF/faces-config-beans.xml,/WEB-INF/faces-config-navigation.xml,/WEB-INF/faces-config-common.xml,/WEB-INF/faces-config-repo.xml,/WEB-INF/faces-config-wcm.xml,WEB-INF/faces-config-custom.xml,/WEB-INF/faces-config-enterprise.xml,/WEB-INF/faces-config-jbpm.xml diff --git a/source/web/jsp/wcm/browse-website.jsp b/source/web/jsp/wcm/browse-website.jsp index 0e81fe992e..ecfbf06a10 100644 --- a/source/web/jsp/wcm/browse-website.jsp +++ b/source/web/jsp/wcm/browse-website.jsp @@ -17,12 +17,13 @@ <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %> <%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %> +<%@ taglib uri="/WEB-INF/wcm.tld" prefix="w" %> <%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %> <%@ page isELIgnored="false" %> +<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %> @@ -94,7 +95,13 @@ <%-- Staging Sandbox Info here --%> - ---STAGING SANDBOX INFO HERE--- + <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> + ---STAGING SANDBOX INFO HERE---
+ -------------------------------
+ Last Updated: 1234
+ 12 items currently being modified
+ 3 items pending approval + <% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
@@ -107,10 +114,10 @@ - + <%-- User Sandboxes List --%> - ---USER SANDBOXES HERE--- +