mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
. 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
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
*
|
||||
|
@@ -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<String, Boolean> panels = new HashMap<String, Boolean>(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<String, Boolean> getPanels()
|
||||
{
|
||||
return this.panels;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param panels The panels expanded state map.
|
||||
*/
|
||||
public void setPanels(Map<String, Boolean> 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
|
||||
*/
|
||||
|
@@ -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;
|
@@ -161,11 +161,6 @@
|
||||
<converter-class>org.alfresco.web.ui.common.converter.ByteSizeConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
<converter>
|
||||
<converter-id>org.alfresco.faces.DisplayPathConverter</converter-id>
|
||||
<converter-class>org.alfresco.web.ui.common.converter.DisplayPathConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
|
||||
<!-- ==================== RENDERERS ==================== -->
|
||||
<render-kit>
|
||||
|
@@ -131,6 +131,11 @@
|
||||
<converter-class>org.alfresco.web.ui.repo.converter.MimeTypeConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
<converter>
|
||||
<converter-id>org.alfresco.faces.DisplayPathConverter</converter-id>
|
||||
<converter-class>org.alfresco.web.ui.repo.converter.DisplayPathConverter</converter-class>
|
||||
</converter>
|
||||
|
||||
|
||||
<!-- ==================== RENDERERS ==================== -->
|
||||
<render-kit>
|
||||
|
@@ -145,7 +145,7 @@
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<h:panelGroup id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
@@ -227,7 +227,7 @@
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<h:panelGroup id="workflow-panel-facets">
|
||||
<f:facet name="title">
|
||||
@@ -247,7 +247,7 @@
|
||||
<h:outputText id="no-workflow-msg" value="#{msg.not_in_workflow}" />
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<h:panelGroup id="category-panel-facets">
|
||||
<f:facet name="title">
|
||||
@@ -276,7 +276,7 @@
|
||||
</r:permissionEvaluator>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<a:panel label="#{msg.version_history}" id="version-history-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.versionable}"
|
||||
@@ -343,7 +343,6 @@
|
||||
rendered="#{DocumentDetailsBean.locked == false}" />
|
||||
</r:permissionEvaluator>
|
||||
</a:panel>
|
||||
<br/>
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
|
@@ -134,10 +134,15 @@
|
||||
<a href='<a:outputText value="#{DocumentDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=3>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{LinkPropertiesBean.fileLinkBookmarkUrl}" id="out5" />'><a:outputText value="#{msg.link_destination_details}" id="out6" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<h:panelGroup id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
|
@@ -114,7 +114,8 @@
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
<a:panel label="#{msg.dashboard_view}" id="dashboard-panel" progressive="true" facetsId="dashboard-panel-facets"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["dashboard-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width=100% cellspacing=0 cellpadding=0 border=0>
|
||||
<tr>
|
||||
<td align=left>
|
||||
@@ -132,7 +133,30 @@
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<a:panel label="#{msg.links}" id="links-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:panelGroup id="props-panel-facets">
|
||||
@@ -144,7 +168,8 @@
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true">
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true"
|
||||
expanded='#{SpaceDetailsBean.panels["properties-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width=80 align=center>
|
||||
@@ -175,28 +200,8 @@
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<a:panel label="#{msg.links}" id="preview-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<br/>
|
||||
<h:column id="rules-panel-facets">
|
||||
<f:facet name="title">
|
||||
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
|
||||
@@ -205,7 +210,8 @@
|
||||
</f:facet>
|
||||
</h:column>
|
||||
<a:panel label="#{msg.rules}" id="rules-panel" facetsId="rules-panel-facets" progressive="true"
|
||||
expanded="false" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["rules-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<a:richList id="rulesList" viewMode="details" value="#{RulesBean.rules}" var="r"
|
||||
styleClass="recordSet" headerStyleClass="recordSetHeader" rowStyleClass="recordSetRow"
|
||||
altRowStyleClass="recordSetRowAlt" width="100%" pageSize="10"
|
||||
@@ -260,7 +266,6 @@
|
||||
<a:dataPager styleClass="pager" />
|
||||
</a:richList>
|
||||
</a:panel>
|
||||
<br/>
|
||||
|
||||
<%-- 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 @@
|
||||
|
||||
</table>
|
||||
</a:panel>
|
||||
<br/>
|
||||
<div style="padding:4px"></div>
|
||||
--%>
|
||||
|
||||
<%-- TBD
|
||||
@@ -280,7 +285,6 @@
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||
<div></div>
|
||||
</a:panel>
|
||||
<br/>
|
||||
--%>
|
||||
</td>
|
||||
|
||||
@@ -298,7 +302,8 @@
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- Space Actions --%>
|
||||
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center" progressive="true">
|
||||
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center" progressive="true"
|
||||
expanded='#{SpaceDetailsBean.panels["actions-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<r:actions id="actions_space" value="space_details_actions" context="#{SpaceDetailsBean.space}" verticalSpacing="3" style="white-space:nowrap" />
|
||||
</a:panel>
|
||||
</td>
|
||||
|
@@ -105,6 +105,33 @@
|
||||
<tr>
|
||||
<td width="100%" valign="top">
|
||||
|
||||
<a:panel label="#{msg.links}" id="preview-panel" progressive="true" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
|
||||
expanded='#{SpaceDetailsBean.panels["links-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=4>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{LinkPropertiesBean.spaceLinkDestinationUrl}" id="out5" />'><a:outputText value="#{msg.link_destination_details}" id="out6" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- wrapper comment used by the panel to add additional component facets --%>
|
||||
<h:panelGroup id="props-panel-facets">
|
||||
<f:facet name="title">
|
||||
@@ -115,7 +142,8 @@
|
||||
</f:facet>
|
||||
</h:panelGroup>
|
||||
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true">
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" progressive="true"
|
||||
expanded='#{SpaceDetailsBean.panels["properties-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||
<tr>
|
||||
<td width=80 align=center>
|
||||
@@ -146,27 +174,6 @@
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
<br/>
|
||||
<a:panel label="#{msg.links}" id="preview-panel" progressive="true"
|
||||
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE">
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_webdav}" href="#{SpaceDetailsBean.webdavUrl}" target="new" id="link1" />
|
||||
</td>
|
||||
<td>
|
||||
<a:actionLink value="#{msg.view_in_cifs}" href="#{SpaceDetailsBean.cifsPath}" target="new" id="link2" />
|
||||
</td>
|
||||
<td>
|
||||
<a href='<%=request.getContextPath()%><a:outputText value="#{SpaceDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href='<a:outputText value="#{SpaceDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</a:panel>
|
||||
|
||||
</td>
|
||||
|
||||
<td valign="top">
|
||||
@@ -183,7 +190,8 @@
|
||||
<div style="padding:4px"></div>
|
||||
|
||||
<%-- Space Actions --%>
|
||||
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center" progressive="true">
|
||||
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center" progressive="true"
|
||||
expanded='#{SpaceDetailsBean.panels["actions-panel"]}' expandedActionListener="#{SpaceDetailsBean.expandPanel}">
|
||||
<r:actions id="actions_space" value="spacelink_details_actions" context="#{SpaceDetailsBean.space}" verticalSpacing="3" style="white-space:nowrap" />
|
||||
</a:panel>
|
||||
</td>
|
||||
|
Reference in New Issue
Block a user