Fixed a couple of issues in converted trashcan item details dialog

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6937 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2007-10-09 10:59:55 +00:00
parent ac21fd6a18
commit 78b6dfe21e
4 changed files with 38 additions and 22 deletions

View File

@@ -26,16 +26,13 @@ package org.alfresco.web.bean;
import javax.faces.context.FacesContext;
import org.alfresco.service.cmr.repository.Path;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node;
public class TrashcanItemDetailsDialog extends TrashcanDialog
{
private static final String MSG_DETAILS_OF = "details_of";
private static final String MSG_ORIGINAL_LOCATION = "original_location";
private static final String MSG_CLOSE = "close";
protected PermissionService permissionService;
@@ -52,15 +49,6 @@ public class TrashcanItemDetailsDialog extends TrashcanDialog
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_DETAILS_OF) + " '" +
property.getItem().getName() + "'";
}
@Override
public String getContainerSubTitle()
{
Path path = (Path) property.getItem().getProperties().get("locationPath");
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_ORIGINAL_LOCATION) + ": " +
path.toDisplayPath(nodeService, permissionService);
}
@Override
public String getCancelButtonLabel()
@@ -68,6 +56,12 @@ public class TrashcanItemDetailsDialog extends TrashcanDialog
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_CLOSE);
}
@Override
public Object getActionsContext()
{
return getItem();
}
public Node getItem()
{
return property.getItem();

View File

@@ -28,6 +28,9 @@
<%@ taglib uri="/WEB-INF/alfresco.tld" prefix="a" %>
<%@ taglib uri="/WEB-INF/repo.tld" prefix="r" %>
<h:outputText value="#{msg.original_location}: " styleClass="mainSubTitle" />
<r:nodePath value="#{TrashcanDialogProperty.item.properties.locationPath}" breadcrumb="true" actionListener="#{BrowseBean.clickSpacePath}" showLeaf="true" />
<f:verbatim><div style="padding:4px"></div></f:verbatim>
<a:panel label="#{msg.view_links}" id="link-panel" progressive="true"
border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white">
@@ -87,15 +90,6 @@ columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true"
</f:verbatim>
</a:panel>
<f:verbatim><div style="padding:4px"></div></f:verbatim>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="lbgrey" expandedTitleBorder="dotted" titleBgcolor="white" style="text-align:center;white-space:nowrap" progressive="true">
<a:actionLink value="#{msg.recover}" image="/images/icons/recover.gif" action="dialog:recoverItem" padding="3">
<f:param name="id" value="#{TrashcanDialogProperty.item.id}" />
</a:actionLink>
<a:actionLink value="#{msg.delete}" image="/images/icons/delete.gif" action="dialog:deleteItem" padding="3">
<f:param name="id" value="#{TrashcanDialogProperty.item.id}" />
</a:actionLink>
</a:panel>