From 27f88a31c2fb5ee2fdce0407ab51b08283dace25 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 19 Sep 2006 21:42:08 +0000 Subject: [PATCH] . WCM UI - Summary information for a staging area based on the AVMStoreDescriptor - More work on the Modified Files list - Framework and components for actions against AVM content and folders git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3855 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 3 + .../web-client-application-context.xml | 1 + .../web-client-config-wcm-actions.xml | 32 +++ .../web/bean/CheckinCheckoutBean.java | 15 +- .../alfresco/web/bean/wcm/AVMBrowseBean.java | 65 +++++- .../alfresco/web/bean/wcm/AVMEditBean.java | 204 ++++++++++++++++++ .../org/alfresco/web/bean/wcm/AVMNode.java | 12 +- .../web/ui/repo/component/UIActions.java | 15 +- .../web/ui/wcm/component/UIUserSandboxes.java | 62 +++--- source/web/WEB-INF/faces-config-beans.xml | 17 ++ .../web/WEB-INF/faces-config-navigation.xml | 61 ++---- source/web/css/main.css | 8 + source/web/jsp/wcm/browse-sandbox.jsp | 2 +- source/web/jsp/wcm/browse-website.jsp | 8 +- 14 files changed, 409 insertions(+), 96 deletions(-) create mode 100644 config/alfresco/web-client-config-wcm-actions.xml create mode 100644 source/java/org/alfresco/web/bean/wcm/AVMEditBean.java diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index d6431f20e0..02d2130864 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -810,6 +810,9 @@ website_browse_folders=Browse Folders website_browse_files=Browse Files creator=Creator modified_items=Modified Items +store_created_on=Created On +store_created_by=Created By +store_working_users=There are {0} user(s) working on this website. # Website actions and dialog messages title_import_content=Import Content into Website diff --git a/config/alfresco/web-client-application-context.xml b/config/alfresco/web-client-application-context.xml index 4c625d66cf..1c03c8494c 100644 --- a/config/alfresco/web-client-application-context.xml +++ b/config/alfresco/web-client-application-context.xml @@ -14,6 +14,7 @@ classpath:alfresco/web-client-config-actions.xml classpath:alfresco/web-client-config-workflow.xml classpath:alfresco/web-client-config-forum-actions.xml + classpath:alfresco/web-client-config-wcm-actions.xml classpath:alfresco/web-client-config-workflow-actions.xml classpath:alfresco/extension/web-client-config-custom.xml diff --git a/config/alfresco/web-client-config-wcm-actions.xml b/config/alfresco/web-client-config-wcm-actions.xml new file mode 100644 index 0000000000..613a134400 --- /dev/null +++ b/config/alfresco/web-client-config-wcm-actions.xml @@ -0,0 +1,32 @@ + + + + + + + + edit + /images/icons/edit_icon.gif + #{AVMEditBean.setupEditAction} + + #{actionContext.path} + + + + + + + false + + + + + + false + + + + + + + diff --git a/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java b/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java index 4f0c938ad5..422b9a8a23 100644 --- a/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java +++ b/source/java/org/alfresco/web/bean/CheckinCheckoutBean.java @@ -579,11 +579,16 @@ public class CheckinCheckoutBean // navigate to appropriate screen FacesContext fc = FacesContext.getCurrentInstance(); this.navigator.setupDispatchContext(node); - String s = (MimetypeMap.MIMETYPE_XML.equals(mimetype) - ? "dialog:editXmlInline" - : "dialog:editTextInline"); - fc.getApplication().getNavigationHandler().handleNavigation(fc, null, s); - + String outcome; + if (MimetypeMap.MIMETYPE_XML.equals(mimetype)) + { + outcome = "dialog:editXmlInline"; + } + else + { + outcome = "dialog:editTextInline"; + } + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, outcome); } else { diff --git a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java index 8c3a0d2e2c..794c50e206 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java @@ -19,8 +19,10 @@ package org.alfresco.web.bean.wcm; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; +import java.util.Date; import java.util.List; import java.util.Map; +import java.util.ResourceBundle; import javax.faces.context.FacesContext; import javax.faces.event.ActionEvent; @@ -30,6 +32,7 @@ import org.alfresco.model.ContentModel; import org.alfresco.repo.avm.AVMNodeConverter; import org.alfresco.service.cmr.avm.AVMNodeDescriptor; import org.alfresco.service.cmr.avm.AVMService; +import org.alfresco.service.cmr.avm.AVMStoreDescriptor; import org.alfresco.service.cmr.dictionary.DictionaryService; import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.search.SearchService; @@ -62,6 +65,9 @@ public class AVMBrowseBean implements IContextListener private static final String MSG_SANDBOXTITLE = "sandbox_title"; private static final String MSG_SANDBOXSTAGING = "sandbox_staging"; + private static final String MSG_CREATED_ON = "store_created_on"; + private static final String MSG_CREATED_BY = "store_created_by"; + private static final String MSG_WORKING_USERS = "store_working_users"; private String sandbox; private String username; @@ -104,8 +110,6 @@ public class AVMBrowseBean implements IContextListener public AVMBrowseBean() { UIContextService.getInstance(FacesContext.getCurrentInstance()).registerBean(this); - - //initFromClientConfig(); } @@ -170,20 +174,46 @@ public class AVMBrowseBean implements IContextListener this.navigator = navigator; } + /** + * Summary text for the staging store: + * Created On: xx/yy/zz + * Created By: username + * There are N user(s) working on this website. + * + * @return summary text + */ + public String getStagingSummary() + { + StringBuilder summary = new StringBuilder(128); + + FacesContext fc = FacesContext.getCurrentInstance(); + ResourceBundle msg = Application.getBundle(fc); + Node websiteNode = this.navigator.getCurrentNode(); + String storeRoot = (String)websiteNode.getProperties().get(ContentModel.PROP_AVMSTORE); + String stagingStore = AVMConstants.buildAVMStagingStoreName(storeRoot); + AVMStoreDescriptor store = this.avmService.getAVMStore(stagingStore); + if (store != null) + { + // TODO: count user stores! + int users = 1; + summary.append(msg.getString(MSG_CREATED_ON)).append(": ") + .append(Utils.getDateFormat(fc).format(new Date(store.getCreateDate()))) + .append("

"); + summary.append(msg.getString(MSG_CREATED_BY)).append(": ") + .append(store.getCreator()) + .append("

"); + summary.append(MessageFormat.format(msg.getString(MSG_WORKING_USERS), users)); + } + + return summary.toString(); + } + /** * @param foldersRichList The foldersRichList to set. */ public void setFoldersRichList(UIRichList foldersRichList) { this.foldersRichList = foldersRichList; - /*if (this.foldersRichList != null) - { - // set the initial sort column and direction - this.foldersRichList.setInitialSortColumn( - this.viewsConfig.getDefaultSortColumn(PAGE_NAME_FORUMS)); - this.foldersRichList.setInitialSortDescending( - this.viewsConfig.hasDescendingSort(PAGE_NAME_FORUMS)); - }*/ } /** @@ -278,11 +308,17 @@ public class AVMBrowseBean implements IContextListener return this.username == null ? WebResources.IMAGE_SANDBOX_32 : WebResources.IMAGE_USERSANDBOX_32; } + /** + * @return website node the view is currently within + */ public Node getWebsite() { return this.navigator.getCurrentNode(); } + /** + * @return Map of avm node objects representing the folders with the current website space + */ public List getFolders() { if (this.folders == null) @@ -292,6 +328,9 @@ public class AVMBrowseBean implements IContextListener return this.folders; } + /** + * @return Map of avm node objects representing the files with the current website space + */ public List getFiles() { if (this.files == null) @@ -301,6 +340,9 @@ public class AVMBrowseBean implements IContextListener return this.files; } + /** + * Build the lists of files and folders within the current browsing path in a website space + */ private void getNodes() { UserTransaction tx = null; @@ -348,6 +390,9 @@ public class AVMBrowseBean implements IContextListener } } + /** + * Update the UI after a folder click action in the website browsing screens + */ public void clickFolder(ActionEvent event) { UIActionLink link = (UIActionLink)event.getComponent(); diff --git a/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java new file mode 100644 index 0000000000..fc9b4e6f7e --- /dev/null +++ b/source/java/org/alfresco/web/bean/wcm/AVMEditBean.java @@ -0,0 +1,204 @@ +/* + * Copyright (C) 2005 Alfresco, Inc. + * + * Licensed under the Mozilla Public License version 1.1 + * with a permitted attribution clause. You may obtain a + * copy of the License at + * + * http://www.alfresco.org/legal/license.txt + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, + * either express or implied. See the License for the specific + * language governing permissions and limitations under the + * License. + */ +package org.alfresco.web.bean.wcm; + +import java.util.Map; + +import javax.faces.context.FacesContext; +import javax.faces.event.ActionEvent; + +import org.alfresco.model.ContentModel; +import org.alfresco.repo.avm.AVMNodeConverter; +import org.alfresco.repo.content.MimetypeMap; +import org.alfresco.service.cmr.avm.AVMNodeDescriptor; +import org.alfresco.service.cmr.avm.AVMService; +import org.alfresco.service.cmr.repository.ContentReader; +import org.alfresco.service.cmr.repository.ContentService; +import org.alfresco.service.cmr.repository.NodeRef; +import org.alfresco.web.bean.repository.Node; +import org.alfresco.web.ui.common.component.UIActionLink; + +/** + * Bean backing the edit pages for a AVM node content. + * + * @author Kevin Roast + */ +public class AVMEditBean +{ + /** Current AVM Node context*/ + private AVMNodeDescriptor avmNode = null; + + private String documentContent = null; + + private String editorOutput = null; + + /** AVM service bean reference */ + protected AVMService avmService; + + /** The ContentService bean reference */ + protected ContentService contentService; + + + // ------------------------------------------------------------------------------ + // Bean property getters and setters + + /** + * @param avmService The AVMService to set. + */ + public void setAvmService(AVMService avmService) + { + this.avmService = avmService; + } + + /** + * @param contentService The ContentService to set. + */ + public void setContentService(ContentService contentService) + { + this.contentService = contentService; + } + + /** + * @return Returns the current AVM node context. + */ + public AVMNodeDescriptor getAVMNode() + { + return this.avmNode; + } + + /** + * @param avmNode The AVM node context to set. + */ + public void setAVMNode(AVMNodeDescriptor avmNode) + { + this.avmNode = avmNode; + } + + /** + * @return Returns the document content used for HTML in-line editing. + */ + public String getDocumentContent() + { + return this.documentContent; + } + + /** + * @param documentContent The document content for HTML in-line editing. + */ + public void setDocumentContent(String documentContent) + { + this.documentContent = documentContent; + } + + /** + * @return Returns output from the in-line editor page. + */ + public String getEditorOutput() + { + return this.editorOutput; + } + + /** + * @param editorOutput The output from the in-line editor page + */ + public void setEditorOutput(String editorOutput) + { + this.editorOutput = editorOutput; + } + + + // ------------------------------------------------------------------------------ + // Action event handlers + + /** + * Action event called by all actions that need to setup a Content node context on the + * before an action page/wizard is called. The context will be an AVMNodeDescriptor in + * setAVMNode() which can be retrieved on action pages via getAVMNode(). + * + * @param event ActionEvent + */ + public void setupContentAction(ActionEvent event) + { + UIActionLink link = (UIActionLink)event.getComponent(); + Map params = link.getParameterMap(); + String path = params.get("id"); + if (path != null && path.length() != 0) + { + setAVMNode(avmService.lookup(-1, path)); + } + else + { + setAVMNode(null); + } + } + + /** + * Action handler called to calculate which editing screen to display based on the mimetype + * of a document. If appropriate, the in-line editing screen will be shown. + */ + public void setupEditAction(ActionEvent event) + { + setupContentAction(event); + + // retrieve the content reader for this node + NodeRef avmRef = AVMNodeConverter.ToNodeRef(-1, getAVMNode().getPath()); + ContentReader reader = contentService.getReader(avmRef, ContentModel.PROP_CONTENT); + if (reader != null) + { + String mimetype = reader.getMimetype(); + + // calculate which editor screen to display + if (MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(mimetype) || + MimetypeMap.MIMETYPE_XML.equals(mimetype) || + MimetypeMap.MIMETYPE_TEXT_CSS.equals(mimetype) || + MimetypeMap.MIMETYPE_JAVASCRIPT.equals(mimetype)) + { + // make content available to the editing screen + setEditorOutput(reader.getContentString()); + + // navigate to appropriate screen + FacesContext fc = FacesContext.getCurrentInstance(); + String outcome; + if (MimetypeMap.MIMETYPE_XML.equals(mimetype)) + { + outcome = "dialog:editAvmXmlInline"; + } + else + { + outcome = "dialog:editAvmTextInline"; + } + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, outcome); + } + else if (MimetypeMap.MIMETYPE_HTML.equals(mimetype)) + { + // make content available to the editing screen + setDocumentContent(reader.getContentString()); + setEditorOutput(null); + + // navigate to appropriate screen + FacesContext fc = FacesContext.getCurrentInstance(); + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editAvmHtmlInline"); + } + else + { + // normal downloadable document + FacesContext fc = FacesContext.getCurrentInstance(); + fc.getApplication().getNavigationHandler().handleNavigation(fc, null, "dialog:editAvmFile"); + } + } + } +} diff --git a/source/java/org/alfresco/web/bean/wcm/AVMNode.java b/source/java/org/alfresco/web/bean/wcm/AVMNode.java index 8748bb7b6b..95357c7485 100644 --- a/source/java/org/alfresco/web/bean/wcm/AVMNode.java +++ b/source/java/org/alfresco/web/bean/wcm/AVMNode.java @@ -51,11 +51,21 @@ public class AVMNode implements Map public AVMNode(AVMNodeDescriptor avmRef) { this.avmRef = avmRef; - this.version = -1; // TODO: why does avmNode.getVersionID() return 1? + this.version = -1; // TODO: always 1 for now... this.path = avmRef.getPath(); getProperties(); } + + public String getPath() + { + return this.path; + } + + public int getVersion() + { + return this.version; + } /** * @return All the properties known about this node. diff --git a/source/java/org/alfresco/web/ui/repo/component/UIActions.java b/source/java/org/alfresco/web/ui/repo/component/UIActions.java index 2e1bd33be3..455636d4ed 100644 --- a/source/java/org/alfresco/web/ui/repo/component/UIActions.java +++ b/source/java/org/alfresco/web/ui/repo/component/UIActions.java @@ -33,7 +33,6 @@ import org.alfresco.config.Config; import org.alfresco.error.AlfrescoRuntimeException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.repository.Node; import org.alfresco.web.config.ActionsConfigElement; import org.alfresco.web.config.ActionsConfigElement.ActionDefinition; import org.alfresco.web.config.ActionsConfigElement.ActionGroup; @@ -503,27 +502,27 @@ public class UIActions extends SelfRenderingComponent } /** - * Get the Node that forms the context object for this group of actions + * Get the object that forms the context for this group of actions * * @return the context */ - public Node getContext() + public Object getContext() { ValueBinding vb = getValueBinding("context"); if (vb != null) { - this.context = (Node)vb.getValue(getFacesContext()); + this.context = vb.getValue(getFacesContext()); } return this.context; } /** - * Set the the Node that forms the context object for this group of actions + * Set the the object that forms the context for this group of actions * * @param context the context */ - public void setContext(Node context) + public void setContext(Object context) { this.context = context; } @@ -609,8 +608,8 @@ public class UIActions extends SelfRenderingComponent /** For this component the value is the ID of an Action Group config block */ private String value = null; - /** The context Node for the action group */ - private Node context = null; + /** The context object for the action group */ + private Object context = null; /** Vertical layout spacing */ private Integer verticalSpacing = null; diff --git a/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java b/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java index b522056839..cd5ea648fe 100644 --- a/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java +++ b/source/java/org/alfresco/web/ui/wcm/component/UIUserSandboxes.java @@ -17,15 +17,14 @@ package org.alfresco.web.ui.wcm.component; import java.io.IOException; -import java.util.HashMap; +import java.text.DateFormat; +import java.util.Date; import java.util.HashSet; -import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.ResourceBundle; import java.util.Set; -import javax.faces.component.NamingContainer; import javax.faces.component.UIComponent; import javax.faces.component.UIParameter; import javax.faces.context.FacesContext; @@ -37,17 +36,16 @@ import org.alfresco.model.ContentModel; import org.alfresco.repo.avm.AVMNodeConverter; import org.alfresco.service.cmr.avm.AVMNodeDescriptor; import org.alfresco.service.cmr.avm.AVMService; -import org.alfresco.service.cmr.avm.AVMStoreDescriptor; import org.alfresco.service.cmr.avmsync.AVMDifference; import org.alfresco.service.cmr.avmsync.AVMSyncService; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeService; -import org.alfresco.service.namespace.QName; import org.alfresco.web.app.Application; import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.bean.BrowseBean; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.bean.wcm.AVMConstants; +import org.alfresco.web.bean.wcm.AVMNode; import org.alfresco.web.ui.common.ComponentConstants; import org.alfresco.web.ui.common.ConstantMethodBinding; import org.alfresco.web.ui.common.PanelGenerator; @@ -55,21 +53,20 @@ import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.component.SelfRenderingComponent; import org.alfresco.web.ui.common.component.UIActionLink; import org.alfresco.web.ui.common.converter.ByteSizeConverter; -import org.alfresco.web.ui.common.converter.XMLDateConverter; import org.alfresco.web.ui.repo.component.UIActions; import org.alfresco.web.ui.wcm.WebResources; -import org.apache.myfaces.taglib.UIComponentTagUtils; import org.springframework.web.jsf.FacesContextUtils; -import sun.swing.UIAction; - /** * @author Kevin Roast */ public class UIUserSandboxes extends SelfRenderingComponent { + private static final String ACTIONS_FILE = "avm_file_modified"; + + private static final String COMPONENT_ACTIONS = "org.alfresco.faces.Actions"; + private static final String MSG_MODIFIED_ITEMS = "modified_items"; - private static final String MSG_DATETIME_PATTERN = "date_time_pattern"; private static final String MSG_SIZE = "size"; private static final String MSG_CREATED = "created_date"; private static final String MSG_USERNAME = "username"; @@ -84,7 +81,6 @@ public class UIUserSandboxes extends SelfRenderingComponent private NodeRef value; private ByteSizeConverter sizeConverter = null; - private XMLDateConverter dateConverter = null; private Set expandedPanels = new HashSet(); @@ -253,7 +249,7 @@ public class UIUserSandboxes extends SelfRenderingComponent if (this.expandedPanels.contains(username)) { out.write("

"); - out.write(""); + out.write("
"); // header row out.write(""); } //} @@ -384,18 +385,29 @@ public class UIUserSandboxes extends SelfRenderingComponent return this.sizeConverter; } - /** - * @return Date format converter - */ - private XMLDateConverter getDateConverter() + private UIActions aquireUIActions(String id) { - if (this.dateConverter == null) + UIActions uiActions = null; + for (UIComponent component : (List)getChildren()) { - this.dateConverter = new XMLDateConverter(); - this.dateConverter.setPattern( - Application.getMessage(FacesContext.getCurrentInstance(), MSG_DATETIME_PATTERN)); + if (id.equals(component.getId())) + { + uiActions = (UIActions)component; + break; + } } - return this.dateConverter; + if (uiActions == null) + { + javax.faces.application.Application facesApp = FacesContext.getCurrentInstance().getApplication(); + uiActions = (UIActions)facesApp.createComponent(COMPONENT_ACTIONS); + uiActions.setShowLink(false); + uiActions.setId(id); + uiActions.setParent(this); + uiActions.setValue(id); + + this.getChildren().add(uiActions); + } + return uiActions; } /** diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml index 8e8a202152..fa318fd9ed 100644 --- a/source/web/WEB-INF/faces-config-beans.xml +++ b/source/web/WEB-INF/faces-config-beans.xml @@ -605,6 +605,23 @@ + + + The bean that backs up the AVM file editing screens + + AVMEditBean + org.alfresco.web.bean.wcm.AVMEditBean + session + + avmService + #{AVMService} + + + contentService + #{ContentService} + + + The bean that backs up the Set Content Properties Dialog diff --git a/source/web/WEB-INF/faces-config-navigation.xml b/source/web/WEB-INF/faces-config-navigation.xml index 5a4767d272..fbdea1e6b5 100644 --- a/source/web/WEB-INF/faces-config-navigation.xml +++ b/source/web/WEB-INF/faces-config-navigation.xml @@ -57,10 +57,6 @@ dashboard /jsp/browse/dashboard.jsp - - addContent - /jsp/content/add-content-dialog.jsp - @@ -105,7 +101,6 @@ addContent /jsp/content/add-content-dialog.jsp - checkoutFile /jsp/dialog/checkout-file.jsp @@ -134,6 +129,10 @@ editTextInline /jsp/dialog/edit-text-inline.jsp + + editXmlInline + /jsp/dialog/edit-xml-inline.jsp + @@ -141,10 +140,6 @@ /jsp/browse/browse.jsp - - editXmlInline - /jsp/dialog/edit-xml-inline.jsp - manageInvitedUsers /jsp/roles/manage-invited-users.jsp @@ -322,38 +317,6 @@ /jsp/dialog/document-details.jsp - - checkoutFile - /jsp/dialog/checkout-file.jsp - - - checkinFile - /jsp/dialog/checkin-file.jsp - - - undoCheckoutFile - /jsp/dialog/undocheckout-file.jsp - - - updateFile - /jsp/dialog/update-file.jsp - - - editFile - /jsp/dialog/edit-file.jsp - - - editHtmlInline - /jsp/dialog/edit-html-inline.jsp - - - editTextInline - /jsp/dialog/edit-text-inline.jsp - - - editXmlInline - /jsp/dialog/edit-xml-inline.jsp - editSimpleWorkflow /jsp/dialog/edit-simple-workflow.jsp @@ -917,6 +880,22 @@ browseSandbox /jsp/wcm/browse-sandbox.jsp + + editAvmFile + /jsp/wcm/edit-file.jsp + + + editAvmHtmlInline + /jsp/wcm/edit-html-inline.jsp + + + editAvmTextInline + /jsp/wcm/edit-text-inline.jsp + + + editAvmXmlInline + /jsp/wcm/edit-xml-inline.jsp + diff --git a/source/web/css/main.css b/source/web/css/main.css index 2a6e4c1746..c50922a2b6 100644 --- a/source/web/css/main.css +++ b/source/web/css/main.css @@ -420,6 +420,14 @@ a.topToolbarLinkHighlight, a.topToolbarLinkHighlight:link, a.topToolbarLinkHighl border-color: #e00028; } +.modifiedItemsList +{ + background-color: #EEEEEE; + border-width: 1px; + border-style: dashed; + border-color: #AAAAAA; +} + .wizardSectionHeading { padding: 2px; diff --git a/source/web/jsp/wcm/browse-sandbox.jsp b/source/web/jsp/wcm/browse-sandbox.jsp index 6f33f78655..aefd82ef79 100644 --- a/source/web/jsp/wcm/browse-sandbox.jsp +++ b/source/web/jsp/wcm/browse-sandbox.jsp @@ -256,7 +256,7 @@ <%-- actions are configured in web-client-config-actions.xml --%> - <%-- --%> + diff --git a/source/web/jsp/wcm/browse-website.jsp b/source/web/jsp/wcm/browse-website.jsp index 97c49d9521..981074b9b0 100644 --- a/source/web/jsp/wcm/browse-website.jsp +++ b/source/web/jsp/wcm/browse-website.jsp @@ -98,7 +98,7 @@
"); @@ -313,11 +309,15 @@ public class UIUserSandboxes extends SelfRenderingComponent { AVMSyncService avmSyncService = getAVMSyncService(fc); AVMService avmService = getAVMService(fc); + DateFormat df = Utils.getDateTimeFormat(fc); // build the paths to the stores to compare String userStore = AVMConstants.buildAVMUserMainStoreName(storeRoot, username) + ":/"; String stagingStore = AVMConstants.buildAVMStagingStoreName(storeRoot) + ":/"; + // get the UIActions component responsible for rendering context related user actions + UIActions uiFileActions = aquireUIActions(ACTIONS_FILE); + // use the sync service to get the list of diffs between the stores List diffs = avmSyncService.compare(-1, userStore, -1, stagingStore); for (AVMDifference diff : diffs) @@ -353,10 +353,10 @@ public class UIUserSandboxes extends SelfRenderingComponent } out.write(""); // created date - out.write(getDateConverter().getAsString(fc, this, node.getCreateDate())); + out.write(df.format(new Date(node.getCreateDate()))); out.write(""); // modified date - out.write(getDateConverter().getAsString(fc, this, node.getModDate())); + out.write(df.format(new Date(node.getModDate()))); out.write(""); if (node.isFile()) { @@ -364,8 +364,9 @@ public class UIUserSandboxes extends SelfRenderingComponent out.write(getSizeConverter().getAsString(fc, this, node.getLength())); } out.write(""); - // TODO: add UI actions for this item - out.write("(P) (E) (T) (D)"); + // add UI actions for this item + uiFileActions.setContext(new AVMNode(node)); + Utils.encodeRecursive(fc, uiFileActions); out.write("
- <%-- Staging Sandbox Info here --%> + <%-- Staging Sandbox Info --%> <% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %> @@ -111,10 +111,8 @@ -
- Last Updated: 20th September 2006

- 12 items currently being modified

- 3 items pending approval +

+