From 1caa065abae98e5bb5f2f67454a823fac6fa4a14 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Tue, 28 Mar 2006 15:53:54 +0000 Subject: [PATCH] . File and Space link details page now have a clickable Link Destination Details link - navigates to the details page for the destination of the link . Panels in space/space-link details pages now remember their expanded state for the current session . Tightening up spacing around panels in Space/File/Link details pages git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2585 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/messages/webclient.properties | 1 + .../alfresco/web/bean/LinkPropertiesBean.java | 23 +++++++ .../alfresco/web/bean/SpaceDetailsBean.java | 44 +++++++++++++ .../converter/DisplayPathConverter.java | 2 +- source/web/WEB-INF/faces-config-common.xml | 5 -- source/web/WEB-INF/faces-config-repo.xml | 5 ++ source/web/jsp/dialog/document-details.jsp | 9 ++- source/web/jsp/dialog/filelink-details.jsp | 7 ++- source/web/jsp/dialog/space-details.jsp | 63 ++++++++++--------- source/web/jsp/dialog/spacelink-details.jsp | 54 +++++++++------- 10 files changed, 149 insertions(+), 64 deletions(-) rename source/java/org/alfresco/web/ui/{common => repo}/converter/DisplayPathConverter.java (98%) diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index 733a3001e9..cd2aa037c9 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -504,6 +504,7 @@ document_properties=Document Properties link_properties=Link Properties other_properties=Other Properties link_destination=Link Destination +link_destination_details=Link Destination Details no_other_properties=This document does not have any other properties to show. modify_categories_of=Modify categories of space_props=Space Properties diff --git a/source/java/org/alfresco/web/bean/LinkPropertiesBean.java b/source/java/org/alfresco/web/bean/LinkPropertiesBean.java index 6f28531414..f45ae9d1de 100644 --- a/source/java/org/alfresco/web/bean/LinkPropertiesBean.java +++ b/source/java/org/alfresco/web/bean/LinkPropertiesBean.java @@ -37,6 +37,7 @@ import org.alfresco.web.app.Application; import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; +import org.alfresco.web.ui.common.Utils.URLMode; /** * Backing bean for the edit link properties dialog @@ -91,6 +92,28 @@ public class LinkPropertiesBean this.nodeService, this.nodeService.getPath(destRef), null, "/", null); } + /** + * Returns the URL to access the details page for the current document link object + * + * @return The bookmark URL + */ + public String getFileLinkBookmarkUrl() + { + NodeRef destRef = (NodeRef)this.browseBean.getDocument().getProperties().get(ContentModel.PROP_LINK_DESTINATION); + return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.SHOW_DETAILS); + } + + /** + * Returns the URL to access the details page for the current document link object + * + * @return The bookmark URL + */ + public String getSpaceLinkDestinationUrl() + { + NodeRef destRef = (NodeRef)this.browseBean.getActionSpace().getProperties().get(ContentModel.PROP_LINK_DESTINATION); + return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.SHOW_DETAILS); + } + /** * Event handler used to save the edited properties back to the repository * diff --git a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java b/source/java/org/alfresco/web/bean/SpaceDetailsBean.java index 88a61b169c..ef4fc05219 100644 --- a/source/java/org/alfresco/web/bean/SpaceDetailsBean.java +++ b/source/java/org/alfresco/web/bean/SpaceDetailsBean.java @@ -40,6 +40,7 @@ import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; import org.alfresco.web.ui.common.Utils.URLMode; import org.alfresco.web.ui.common.component.UIActionLink; +import org.alfresco.web.ui.common.component.UIPanel.ExpandedEvent; /** * Back bean provided access to the details of a Space @@ -70,6 +71,21 @@ public class SpaceDetailsBean /** Selected template Id */ private String template; + private Map panels = new HashMap(4, 1.0f); + + + // ------------------------------------------------------------------------------ + // Construction + + /** + * Default constructor + */ + public SpaceDetailsBean() + { + // initial state of some panels that don't use the default + panels.put("rules-panel", false); + } + // ------------------------------------------------------------------------------ // Bean property getters and setters @@ -118,6 +134,22 @@ public class SpaceDetailsBean this.ownableService = ownableService; } + /** + * @return Returns the panels expanded state map. + */ + public Map getPanels() + { + return this.panels; + } + + /** + * @param panels The panels expanded state map. + */ + public void setPanels(Map panels) + { + this.panels = panels; + } + /** * Returns the Space this bean is currently representing * @@ -358,6 +390,18 @@ public class SpaceDetailsBean } } + /** + * Save the state of the panel that was expanded/collapsed + */ + public void expandPanel(ActionEvent event) + { + if (event instanceof ExpandedEvent) + { + String id = event.getComponent().getId(); + this.panels.put(id, ((ExpandedEvent)event).State); + } + } + /** * Navigates to next item in the list of Spaces */ diff --git a/source/java/org/alfresco/web/ui/common/converter/DisplayPathConverter.java b/source/java/org/alfresco/web/ui/repo/converter/DisplayPathConverter.java similarity index 98% rename from source/java/org/alfresco/web/ui/common/converter/DisplayPathConverter.java rename to source/java/org/alfresco/web/ui/repo/converter/DisplayPathConverter.java index 3f7074b0ed..48533154e0 100644 --- a/source/java/org/alfresco/web/ui/common/converter/DisplayPathConverter.java +++ b/source/java/org/alfresco/web/ui/repo/converter/DisplayPathConverter.java @@ -14,7 +14,7 @@ * language governing permissions and limitations under the * License. */ -package org.alfresco.web.ui.common.converter; +package org.alfresco.web.ui.repo.converter; import javax.faces.component.UIComponent; import javax.faces.context.FacesContext; diff --git a/source/web/WEB-INF/faces-config-common.xml b/source/web/WEB-INF/faces-config-common.xml index 72020acd8b..a624e22c86 100644 --- a/source/web/WEB-INF/faces-config-common.xml +++ b/source/web/WEB-INF/faces-config-common.xml @@ -161,11 +161,6 @@ org.alfresco.web.ui.common.converter.ByteSizeConverter - - org.alfresco.faces.DisplayPathConverter - org.alfresco.web.ui.common.converter.DisplayPathConverter - - diff --git a/source/web/WEB-INF/faces-config-repo.xml b/source/web/WEB-INF/faces-config-repo.xml index 86b4e96aea..91a24b2eb3 100644 --- a/source/web/WEB-INF/faces-config-repo.xml +++ b/source/web/WEB-INF/faces-config-repo.xml @@ -131,6 +131,11 @@ org.alfresco.web.ui.repo.converter.MimeTypeConverter + + org.alfresco.faces.DisplayPathConverter + org.alfresco.web.ui.repo.converter.DisplayPathConverter + + diff --git a/source/web/jsp/dialog/document-details.jsp b/source/web/jsp/dialog/document-details.jsp index 3bf479f87c..fca1c0ca21 100644 --- a/source/web/jsp/dialog/document-details.jsp +++ b/source/web/jsp/dialog/document-details.jsp @@ -145,7 +145,7 @@ -
+
@@ -227,7 +227,7 @@ -
+
@@ -247,7 +247,7 @@ -
+
@@ -276,7 +276,7 @@ -
+
-
diff --git a/source/web/jsp/dialog/filelink-details.jsp b/source/web/jsp/dialog/filelink-details.jsp index c9e5fc630f..8142b719aa 100644 --- a/source/web/jsp/dialog/filelink-details.jsp +++ b/source/web/jsp/dialog/filelink-details.jsp @@ -134,10 +134,15 @@ + + + + + -
+
diff --git a/source/web/jsp/dialog/space-details.jsp b/source/web/jsp/dialog/space-details.jsp index 1ed6a727a9..b8f51cad60 100644 --- a/source/web/jsp/dialog/space-details.jsp +++ b/source/web/jsp/dialog/space-details.jsp @@ -114,7 +114,8 @@ + border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" + expanded='#{SpaceDetailsBean.panels["dashboard-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
@@ -132,7 +133,30 @@
-
+
+ + + + + + + + + +
+ + + + + + + +
+
+ +
<%-- wrapper comment used by the panel to add additional component facets --%> @@ -144,7 +168,8 @@
+ border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true" + expanded='#{SpaceDetailsBean.panels["properties-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
@@ -175,28 +200,8 @@
-
- - - - - - - - -
- - - - - - - -
-
+
-
@@ -205,7 +210,8 @@ + border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" + expanded='#{SpaceDetailsBean.panels["rules-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}"> -
<%-- TODO: implement this - but READONLY details only! Manage Space Users for edits... need support for panel with facets - so can hide edit link unless edit permissions @@ -272,7 +277,7 @@ -
+
--%> <%-- TBD @@ -280,7 +285,6 @@ border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
-
--%> @@ -298,7 +302,8 @@
<%-- Space Actions --%> - + diff --git a/source/web/jsp/dialog/spacelink-details.jsp b/source/web/jsp/dialog/spacelink-details.jsp index 5aa9709fd2..6674acee79 100644 --- a/source/web/jsp/dialog/spacelink-details.jsp +++ b/source/web/jsp/dialog/spacelink-details.jsp @@ -105,6 +105,33 @@ + + + + + + + + + + + +
+ + + + + + + +
+ +
+
+ +
+ <%-- wrapper comment used by the panel to add additional component facets --%> @@ -115,7 +142,8 @@ + border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true" + expanded='#{SpaceDetailsBean.panels["properties-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
@@ -146,27 +174,6 @@
-
- - - - - - - - -
- - - - - - - -
-
- @@ -183,7 +190,8 @@
<%-- Space Actions --%> - +