. "Paste As Link" and link object support in the web-client:

. Filetype icons for PSD (Photoshop) file-format
. Import, Export and Manage Space Users actions added to Forums details page
. Manage Space Users action added to Forum and Topic details pages
. Removed some obsolete JSF navigation outcomes from dialogs/faces-config
. Approx 10% performance improvement when showing large search results pages

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2582 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-03-27 15:46:20 +00:00
parent 9be6273144
commit 8187b27ecf
41 changed files with 1578 additions and 199 deletions

View File

@@ -13,6 +13,7 @@ checkinfile_description=Check in your working copy for other team members to wor
checkoutfilelink_description=Edit the checked out file, undo the check out or carry on working. checkoutfilelink_description=Edit the checked out file, undo the check out or carry on working.
checkoutfile_description=Enter information about the check out. checkoutfile_description=Enter information about the check out.
documentdetails_description=View the details about the content. documentdetails_description=View the details about the content.
linkdetails_description=View the details about the link object.
previewdocument_description=Preview the content or space within a Template. previewdocument_description=Preview the content or space within a Template.
spacedetails_description=View the details about the space. spacedetails_description=View the details about the space.
undocheckoutfile_description=Cancel the check out of a document and discard any changes. undocheckoutfile_description=Cancel the check out of a document and discard any changes.
@@ -30,6 +31,7 @@ editdocument_description=Modify the document properties then click OK.
editcategory_description=Set the category for the document then click OK. editcategory_description=Set the category for the document then click OK.
editworkflow_description=Modify the simple workflow properties then click OK. editworkflow_description=Modify the simple workflow properties then click OK.
editspace_description=Modify the space properties then click OK. editspace_description=Modify the space properties then click OK.
editlink_description=Modify the link object properties then click OK.
newspace_description=Enter information about the new space then click Create Space. newspace_description=Enter information about the new space then click Create Space.
space_rules_description=This view shows you all the rules to be applied to content in this space. space_rules_description=This view shows you all the rules to be applied to content in this space.
warning_inline=This is only recommended for HTML or plain text documents. warning_inline=This is only recommended for HTML or plain text documents.
@@ -168,6 +170,8 @@ security=Security
all_formats=All Formats all_formats=All Formats
rules_count=Number of rules applied to this Space rules_count=Number of rules applied to this Space
working_copy_document=Working Copy working_copy_document=Working Copy
copy_of=Copy of
link_to=Link to
# Properties # Properties
username=User Name username=User Name
@@ -497,7 +501,9 @@ allow_versioning=Allow Versioning
version_history=Version History version_history=Version History
version=Version version=Version
document_properties=Document Properties document_properties=Document Properties
link_properties=Link Properties
other_properties=Other Properties other_properties=Other Properties
link_destination=Link Destination
no_other_properties=This document does not have any other properties to show. no_other_properties=This document does not have any other properties to show.
modify_categories_of=Modify categories of modify_categories_of=Modify categories of
space_props=Space Properties space_props=Space Properties
@@ -785,6 +791,7 @@ title_file_details=Document Details
title_file_preview=Preview In Template title_file_preview=Preview In Template
title_edit_categories=Edit Categories title_edit_categories=Edit Categories
title_edit_doc_props=Edit Document Properties title_edit_doc_props=Edit Document Properties
title_edit_link_props=Edit Link Properties
title_edit_file=Edit File title_edit_file=Edit File
title_edit_html_inline=Edit HTML File Inline title_edit_html_inline=Edit HTML File Inline
title_edit_text_inline=Edit Text File Inline title_edit_text_inline=Edit Text File Inline

View File

@@ -261,7 +261,7 @@
<action-listener>#{ClipboardBean.cutNode}</action-listener> <action-listener>#{ClipboardBean.cutNode}</action-listener>
<params> <params>
<param name="id">#{actionContext.id}</param> <param name="id">#{actionContext.id}</param>
<param name="parent">#{NavigationBean.currentNodeId}</param> <!--<param name="parent">#{NavigationBean.currentNodeId}</param>-->
</params> </params>
</action> </action>
@@ -272,12 +272,12 @@
<action-listener>#{ClipboardBean.copyNode}</action-listener> <action-listener>#{ClipboardBean.copyNode}</action-listener>
<params> <params>
<param name="id">#{actionContext.id}</param> <param name="id">#{actionContext.id}</param>
<param name="parent">#{NavigationBean.currentNodeId}</param> <!--<param name="parent">#{NavigationBean.currentNodeId}</param>-->
</params> </params>
</action> </action>
<!-- Cut a document or space to the clipboard, from space details screen --> <!-- Cut a document or space to the clipboard, from space details screen -->
<action id="cut_space_details"> <!--<action id="cut_space_details">
<permissions> <permissions>
<permission allow="true">Delete</permission> <permission allow="true">Delete</permission>
</permissions> </permissions>
@@ -288,10 +288,10 @@
<param name="id">#{actionContext.id}</param> <param name="id">#{actionContext.id}</param>
<param name="parent">#{SpaceDetailsBean.space}</param> <param name="parent">#{SpaceDetailsBean.space}</param>
</params> </params>
</action> </action>-->
<!-- Copy a document or space to the clipboard, from space details screen --> <!-- Copy a document or space to the clipboard, from space details screen -->
<action id="copy_space_details"> <!--<action id="copy_space_details">
<label-id>copy</label-id> <label-id>copy</label-id>
<image>/images/icons/copy.gif</image> <image>/images/icons/copy.gif</image>
<action-listener>#{ClipboardBean.copyNode}</action-listener> <action-listener>#{ClipboardBean.copyNode}</action-listener>
@@ -299,7 +299,7 @@
<param name="id">#{actionContext.id}</param> <param name="id">#{actionContext.id}</param>
<param name="parent">#{SpaceDetailsBean.space}</param> <param name="parent">#{SpaceDetailsBean.space}</param>
</params> </params>
</action> </action>-->
<!-- Paste All clipboard items into a space --> <!-- Paste All clipboard items into a space -->
<action id="paste_all"> <action id="paste_all">
@@ -566,6 +566,24 @@
<action idref="preview_space" /> <action idref="preview_space" />
</action-group> </action-group>
<!-- Actions Menu for File Link Details screen -->
<action-group id="filelink_details_actions">
<action idref="cut_node" />
<action idref="copy_node" />
<action idref="delete_doc" />
<action idref="take_ownership_doc" />
<action idref="manage_content_users" />
</action-group>
<!-- Actions Menu for Folder Link Details screen -->
<action-group id="spacelink_details_actions">
<action idref="cut_node" />
<action idref="copy_node" />
<action idref="delete_doc" />
<action idref="take_ownership_space" />
<action idref="manage_content_users" />
</action-group>
</actions> </actions>
</config> </config>

View File

@@ -269,6 +269,9 @@
<action idref="cut_node" /> <action idref="cut_node" />
<action idref="copy_node" /> <action idref="copy_node" />
<action idref="delete_space" /> <action idref="delete_space" />
<action idref="import_space" />
<action idref="export_space" />
<action idref="manage_space_users" />
<action idref="create_shortcut" /> <action idref="create_shortcut" />
</action-group> </action-group>
@@ -277,6 +280,7 @@
<action idref="cut_node" /> <action idref="cut_node" />
<action idref="copy_node" /> <action idref="copy_node" />
<action idref="delete_space" /> <action idref="delete_space" />
<action idref="manage_space_users" />
<action idref="create_shortcut" /> <action idref="create_shortcut" />
</action-group> </action-group>
@@ -285,6 +289,7 @@
<action idref="cut_node" /> <action idref="cut_node" />
<action idref="copy_node" /> <action idref="copy_node" />
<action idref="delete_space" /> <action idref="delete_space" />
<action idref="manage_space_users" />
<action idref="create_shortcut" /> <action idref="create_shortcut" />
</action-group> </action-group>

View File

@@ -27,4 +27,22 @@
</navigation> </navigation>
</config> </config>
<config evaluator="node-type" condition="app:filelink">
<navigation>
<override from-view-id="/jsp/dialog/document-details.jsp" to-view-id="/jsp/dialog/filelink-details.jsp" />
<override from-outcome="showDocDetails" to-view-id="/jsp/dialog/filelink-details.jsp" />
<override from-outcome="cancelEdit" to-view-id="/jsp/dialog/filelink-details.jsp" />
<override from-outcome="finishEdit" to-view-id="/jsp/dialog/filelink-details.jsp" />
</navigation>
</config>
<config evaluator="node-type" condition="app:folderlink">
<navigation>
<override from-view-id="/jsp/dialog/space-details.jsp" to-view-id="/jsp/dialog/spacelink-details.jsp" />
<override from-outcome="showSpaceDetails" to-view-id="/jsp/dialog/spacelink-details.jsp" />
<override from-outcome="cancelEdit" to-view-id="/jsp/dialog/spacelink-details.jsp" />
<override from-outcome="finishEdit" to-view-id="/jsp/dialog/spacelink-details.jsp" />
</navigation>
</config>
</alfresco-config> </alfresco-config>

View File

@@ -44,6 +44,18 @@
</property-sheet> </property-sheet>
</config> </config>
<config evaluator="node-type" condition="app:filelink">
<property-sheet>
<show-property name="destination" converter="org.alfresco.faces.DisplayPathConverter"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="app:folderlink">
<property-sheet>
<show-property name="destination" converter="org.alfresco.faces.DisplayPathConverter"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="complianceable"> <config evaluator="aspect-name" condition="complianceable">
<property-sheet> <property-sheet>
<show-property name="removeAfter"/> <show-property name="removeAfter"/>

View File

@@ -16,10 +16,14 @@
*/ */
package org.alfresco.web.action.evaluator; package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.security.PermissionService; import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/** /**
* UI Action Evaluator - Checkout document. * UI Action Evaluator - Checkout document.
@@ -33,9 +37,13 @@ public final class CheckoutDocEvaluator implements ActionEvaluator
*/ */
public boolean evaluate(Node node) public boolean evaluate(Node node)
{ {
return (node.hasPermission(PermissionService.CHECK_OUT) && DictionaryService dd = Repository.getServiceRegistry(
FacesContext.getCurrentInstance()).getDictionaryService();
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) &&
((node.hasPermission(PermissionService.CHECK_OUT) &&
(node.isLocked() == false && (node.isLocked() == false &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)); node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)));
} }
} }
/* /*

View File

@@ -19,9 +19,11 @@ package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/** /**
* UI Action Evaluator - Edit document via CIFS. * UI Action Evaluator - Edit document via CIFS.
@@ -36,19 +38,25 @@ public final class EditDocCIFSEvaluator implements ActionEvaluator
public boolean evaluate(Node node) public boolean evaluate(Node node)
{ {
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
DictionaryService dd = Repository.getServiceRegistry(fc).getDictionaryService();
boolean result = false;
// if the node is inline editable, the default http behaviour should always be used // if the node is inline editable, the default http behaviour should always be used
if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == false && if (dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT))
"webdav".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
if (node.isWorkingCopyOwner() == true || if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == false &&
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)) "webdav".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
return true; if (node.isWorkingCopyOwner() == true ||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false))
{
result = true;
}
} }
} }
return false; return result;
} }
} }
/* /*

View File

@@ -19,9 +19,11 @@ package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/** /**
* UI Action Evaluator - Edit document via HTTP or inline edit. * UI Action Evaluator - Edit document via HTTP or inline edit.
@@ -36,20 +38,26 @@ public final class EditDocHttpEvaluator implements ActionEvaluator
public boolean evaluate(Node node) public boolean evaluate(Node node)
{ {
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
DictionaryService dd = Repository.getServiceRegistry(fc).getDictionaryService();
boolean result = false;
// if the node is inline editable, the default http behaviour should // if the node is inline editable, the default http behaviour should
// always be used otherwise the configured approach is used // always be used otherwise the configured approach is used
if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == true || if (dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT))
"http".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
if (node.isWorkingCopyOwner() == true || if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == true ||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)) "http".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
return true; if (node.isWorkingCopyOwner() == true ||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false))
{
result = true;
}
} }
} }
return false; return result;
} }
} }
/* /*

View File

@@ -19,9 +19,11 @@ package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext; import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/** /**
* UI Action Evaluator - Edit document via Webdav. * UI Action Evaluator - Edit document via Webdav.
@@ -36,19 +38,25 @@ public final class EditDocWebDavEvaluator implements ActionEvaluator
public boolean evaluate(Node node) public boolean evaluate(Node node)
{ {
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
DictionaryService dd = Repository.getServiceRegistry(fc).getDictionaryService();
boolean result = false;
// if the node is inline editable, the default http behaviour should always be used // if the node is inline editable, the default http behaviour should always be used
if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == false && if (dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT))
"cifs".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
if (node.isWorkingCopyOwner() == true || if (node.hasAspect(ContentModel.ASPECT_INLINEEDITABLE) == false &&
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)) "cifs".equals(Application.getClientConfig(fc).getEditLinkType()))
{ {
return true; if (node.isWorkingCopyOwner() == true ||
(node.isLocked() == false && node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false))
{
result = true;
}
} }
} }
return false; return result;
} }
} }
/* /*

View File

@@ -16,9 +16,13 @@
*/ */
package org.alfresco.web.action.evaluator; package org.alfresco.web.action.evaluator;
import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.web.action.ActionEvaluator; import org.alfresco.web.action.ActionEvaluator;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/** /**
* UI Action Evaluator - Update document content. * UI Action Evaluator - Update document content.
@@ -32,9 +36,13 @@ public final class UpdateDocEvaluator implements ActionEvaluator
*/ */
public boolean evaluate(Node node) public boolean evaluate(Node node)
{ {
return (node.isWorkingCopyOwner() == true || DictionaryService dd = Repository.getServiceRegistry(
FacesContext.getCurrentInstance()).getDictionaryService();
return dd.isSubClass(node.getType(), ContentModel.TYPE_CONTENT) &&
((node.isWorkingCopyOwner() == true ||
(node.isLocked() == false && (node.isLocked() == false &&
node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)); node.hasAspect(ContentModel.ASPECT_WORKING_COPY) == false)));
} }
} }
/* /*

View File

@@ -424,11 +424,11 @@ public class BrowseBean implements IContextListener
{ {
// special properties to be used by the value binding components on the page // special properties to be used by the value binding components on the page
node.addPropertyResolver("url", this.resolverUrl); node.addPropertyResolver("url", this.resolverUrl);
node.addPropertyResolver("webdavUrl", this.resolverWebdavUrl);
node.addPropertyResolver("cifsPath", this.resolverCifsPath);
node.addPropertyResolver("fileType16", this.resolverFileType16); node.addPropertyResolver("fileType16", this.resolverFileType16);
node.addPropertyResolver("fileType32", this.resolverFileType32); node.addPropertyResolver("fileType32", this.resolverFileType32);
node.addPropertyResolver("size", this.resolverSize); node.addPropertyResolver("size", this.resolverSize);
node.addPropertyResolver("webdavUrl", this.resolverWebdavUrl);
node.addPropertyResolver("cifsPath", this.resolverCifsPath);
} }
@@ -557,35 +557,59 @@ public class BrowseBean implements IContextListener
if (typeDef != null) if (typeDef != null)
{ {
// look for Space or File nodes MapNode node = null;
// look for Space folder node
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) == true && if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) == true &&
this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false) this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
{ {
// create our Node representation // create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true); node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("icon", this.resolverSpaceIcon); node.addPropertyResolver("icon", this.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon); node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
for (NodeEventListener listener : getNodeEventListeners())
{
listener.created(node, type);
}
this.containerNodes.add(node); this.containerNodes.add(node);
} }
// look for File content node
else if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT)) else if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT))
{ {
// create our Node representation // create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true); node = new MapNode(nodeRef, this.nodeService, false);
setupCommonBindingProperties(node); setupCommonBindingProperties(node);
this.contentNodes.add(node);
}
// look for File Link object node
else if (ContentModel.TYPE_FILELINK.equals(type))
{
// create our File Link Node representation
node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("url", this.resolverLinkUrl);
node.addPropertyResolver("webdavUrl", this.resolverLinkWebdavUrl);
node.addPropertyResolver("cifsPath", this.resolverLinkCifsPath);
node.addPropertyResolver("fileType16", this.resolverFileType16);
node.addPropertyResolver("fileType32", this.resolverFileType32);
node.addPropertyResolver("size", this.resolverSize);
this.contentNodes.add(node);
}
else if (ContentModel.TYPE_FOLDERLINK.equals(type))
{
// create our Folder Link Node representation
node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("icon", this.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
this.containerNodes.add(node);
}
// inform any listeners that a Node wrapper has been created
if (node != null)
{
for (NodeEventListener listener : getNodeEventListeners()) for (NodeEventListener listener : getNodeEventListeners())
{ {
listener.created(node, type); listener.created(node, type);
} }
this.contentNodes.add(node);
} }
} }
else else
@@ -680,41 +704,69 @@ public class BrowseBean implements IContextListener
if (typeDef != null) if (typeDef != null)
{ {
MapNode node = null;
// look for Space or File nodes // look for Space or File nodes
if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) && if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_FOLDER) &&
this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false) this.dictionaryService.isSubClass(type, ContentModel.TYPE_SYSTEM_FOLDER) == false)
{ {
// create our Node representation // create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true); node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("path", this.resolverPath); node.addPropertyResolver("path", this.resolverPath);
node.addPropertyResolver("displayPath", this.resolverDisplayPath); node.addPropertyResolver("displayPath", this.resolverDisplayPath);
node.addPropertyResolver("icon", this.resolverSpaceIcon); node.addPropertyResolver("icon", this.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon); node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
for (NodeEventListener listener : getNodeEventListeners())
{
listener.created(node, type);
}
this.containerNodes.add(node); this.containerNodes.add(node);
} }
else if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT)) else if (this.dictionaryService.isSubClass(type, ContentModel.TYPE_CONTENT))
{ {
// create our Node representation // create our Node representation
MapNode node = new MapNode(nodeRef, this.nodeService, true); node = new MapNode(nodeRef, this.nodeService, false);
setupCommonBindingProperties(node); setupCommonBindingProperties(node);
node.addPropertyResolver("path", this.resolverPath); node.addPropertyResolver("path", this.resolverPath);
node.addPropertyResolver("displayPath", this.resolverDisplayPath); node.addPropertyResolver("displayPath", this.resolverDisplayPath);
this.contentNodes.add(node);
}
// look for File Link object node
else if (ContentModel.TYPE_FILELINK.equals(type))
{
// create our File Link Node representation
node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("url", this.resolverLinkUrl);
node.addPropertyResolver("webdavUrl", this.resolverLinkWebdavUrl);
node.addPropertyResolver("cifsPath", this.resolverLinkCifsPath);
node.addPropertyResolver("fileType16", this.resolverFileType16);
node.addPropertyResolver("fileType32", this.resolverFileType32);
node.addPropertyResolver("size", this.resolverSize);
node.addPropertyResolver("path", this.resolverPath);
node.addPropertyResolver("displayPath", this.resolverDisplayPath);
this.contentNodes.add(node);
}
else if (ContentModel.TYPE_FOLDERLINK.equals(type))
{
// create our Folder Link Node representation
node = new MapNode(nodeRef, this.nodeService, false);
node.addPropertyResolver("icon", this.resolverSpaceIcon);
node.addPropertyResolver("smallIcon", this.resolverSmallIcon);
node.addPropertyResolver("path", this.resolverPath);
node.addPropertyResolver("displayPath", this.resolverDisplayPath);
this.containerNodes.add(node);
}
// inform any listeners that a Node wrapper has been created
if (node != null)
{
for (NodeEventListener listener : getNodeEventListeners()) for (NodeEventListener listener : getNodeEventListeners())
{ {
listener.created(node, type); listener.created(node, type);
} }
this.contentNodes.add(node);
} }
} }
else else
@@ -794,6 +846,36 @@ public class BrowseBean implements IContextListener
} }
}; };
public NodePropertyResolver resolverLinkDownload = new NodePropertyResolver() {
public Object get(Node node) {
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
String destName = Repository.getNameForNode(nodeService, destRef);
return DownloadContentServlet.generateDownloadURL(node.getNodeRef(), destName);
}
};
public NodePropertyResolver resolverLinkUrl = new NodePropertyResolver() {
public Object get(Node node) {
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
String destName = Repository.getNameForNode(nodeService, destRef);
return DownloadContentServlet.generateBrowserURL(destRef, destName);
}
};
public NodePropertyResolver resolverLinkWebdavUrl = new NodePropertyResolver() {
public Object get(Node node) {
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.WEBDAV);
}
};
public NodePropertyResolver resolverLinkCifsPath = new NodePropertyResolver() {
public Object get(Node node) {
NodeRef destRef = (NodeRef)node.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
return Utils.generateURL(FacesContext.getCurrentInstance(), new Node(destRef), URLMode.CIFS);
}
};
public NodePropertyResolver resolverFileType16 = new NodePropertyResolver() { public NodePropertyResolver resolverFileType16 = new NodePropertyResolver() {
public Object get(Node node) { public Object get(Node node) {
return Utils.getFileTypeImage(node.getName(), true); return Utils.getFileTypeImage(node.getName(), true);
@@ -845,7 +927,7 @@ public class BrowseBean implements IContextListener
public NodePropertyResolver resolverSize = new NodePropertyResolver() { public NodePropertyResolver resolverSize = new NodePropertyResolver() {
public Object get(Node node) { public Object get(Node node) {
ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT); ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
return (content != null ? new Long(content.getSize()) : null); return (content != null ? new Long(content.getSize()) : 0L);
} }
}; };
@@ -889,6 +971,13 @@ public class BrowseBean implements IContextListener
try try
{ {
NodeRef ref = new NodeRef(Repository.getStoreRef(), id); NodeRef ref = new NodeRef(Repository.getStoreRef(), id);
// handle special folder link node case
if (ContentModel.TYPE_FOLDERLINK.equals(this.nodeService.getType(ref)))
{
ref = (NodeRef)this.nodeService.getProperty(ref, ContentModel.PROP_LINK_DESTINATION);
}
clickSpace(ref); clickSpace(ref);
} }
catch (InvalidNodeRefException refErr) catch (InvalidNodeRefException refErr)
@@ -1096,7 +1185,14 @@ public class BrowseBean implements IContextListener
Node node = new Node(ref); Node node = new Node(ref);
// store the URL to for downloading the content // store the URL to for downloading the content
node.addPropertyResolver("url", this.resolverDownload); if (ContentModel.TYPE_FILELINK.equals(node.getType()))
{
node.addPropertyResolver("url", this.resolverLinkDownload);
}
else
{
node.addPropertyResolver("url", this.resolverDownload);
}
node.addPropertyResolver("fileType32", this.resolverFileType32); node.addPropertyResolver("fileType32", this.resolverFileType32);
node.addPropertyResolver("mimetype", this.resolverMimetype); node.addPropertyResolver("mimetype", this.resolverMimetype);
node.addPropertyResolver("size", this.resolverSize); node.addPropertyResolver("size", this.resolverSize);

View File

@@ -156,7 +156,8 @@ public class DocumentDetailsBean
*/ */
public String getBrowserUrl() public String getBrowserUrl()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getDocument(), URLMode.HTTP_INLINE); Node doc = getLinkResolvedDocument();
return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.HTTP_INLINE);
} }
/** /**
@@ -166,7 +167,8 @@ public class DocumentDetailsBean
*/ */
public String getDownloadUrl() public String getDownloadUrl()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getDocument(), URLMode.HTTP_DOWNLOAD); Node doc = getLinkResolvedDocument();
return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.HTTP_DOWNLOAD);
} }
/** /**
@@ -176,7 +178,19 @@ public class DocumentDetailsBean
*/ */
public String getWebdavUrl() public String getWebdavUrl()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getDocument(), URLMode.WEBDAV); Node doc = getLinkResolvedDocument();
return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.WEBDAV);
}
/**
* Returns the CIFS path for the current document
*
* @return The CIFS path
*/
public String getCifsPath()
{
Node doc = getLinkResolvedDocument();
return Utils.generateURL(FacesContext.getCurrentInstance(), doc, URLMode.CIFS);
} }
/** /**
@@ -190,13 +204,19 @@ public class DocumentDetailsBean
} }
/** /**
* Returns the CIFS path for the current document * Resolve the actual document Node from any Link object that may be proxying it
* *
* @return The CIFS path * @return current document Node or document Node resolved from any Link object
*/ */
public String getCifsPath() private Node getLinkResolvedDocument()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getDocument(), URLMode.CIFS); Node document = getDocument();
if (ContentModel.TYPE_FILELINK.equals(document.getType()))
{
NodeRef destRef = (NodeRef)document.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
document = new Node(destRef);
}
return document;
} }
/** /**
@@ -1075,19 +1095,21 @@ public class DocumentDetailsBean
*/ */
public void takeOwnership(ActionEvent event) public void takeOwnership(ActionEvent event)
{ {
FacesContext fc = FacesContext.getCurrentInstance();
UserTransaction tx = null; UserTransaction tx = null;
try try
{ {
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance()); tx = Repository.getUserTransaction(fc);
tx.begin(); tx.begin();
this.ownableService.takeOwnership(getDocument().getNodeRef()); this.ownableService.takeOwnership(getDocument().getNodeRef());
FacesContext context = FacesContext.getCurrentInstance(); String msg = Application.getMessage(fc, MSG_SUCCESS_OWNERSHIP);
String msg = Application.getMessage(context, MSG_SUCCESS_OWNERSHIP);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg); FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage("document-details:document-props", facesMsg); String formId = Utils.getParentForm(fc, event.getComponent()).getClientId(fc);
fc.addMessage(formId + ":document-props", facesMsg);
// commit the transaction // commit the transaction
tx.commit(); tx.commit();
@@ -1097,7 +1119,7 @@ public class DocumentDetailsBean
// rollback the transaction // rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {} try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); fc, Repository.ERROR_GENERIC), e.getMessage()), e);
} }
} }
@@ -1125,7 +1147,7 @@ public class DocumentDetailsBean
*/ */
public Map getTemplateModel() public Map getTemplateModel()
{ {
HashMap model = new HashMap(3, 1.0f); HashMap model = new HashMap(2, 1.0f);
FacesContext fc = FacesContext.getCurrentInstance(); FacesContext fc = FacesContext.getCurrentInstance();
TemplateNode documentNode = new TemplateNode(getDocument().getNodeRef(), TemplateNode documentNode = new TemplateNode(getDocument().getNodeRef(),

View File

@@ -0,0 +1,263 @@
/*
* 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;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.Iterator;
import java.util.Map;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
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.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
/**
* Backing bean for the edit link properties dialog
*
* @author kevinr
*/
public class LinkPropertiesBean
{
protected NodeService nodeService;
protected DictionaryService dictionaryService;
protected BrowseBean browseBean;
protected NavigationBean navigator;
private Node editableNode;
/**
* Returns the node being edited
*
* @return The node being edited
*/
public Node getEditableNode()
{
return this.editableNode;
}
/**
* Event handler called to setup the link object for property editing
*
* @param event The event
*/
public void setupFileLinkForAction(ActionEvent event)
{
this.editableNode = new Node(this.browseBean.getDocument().getNodeRef());
}
/**
* Event handler called to setup the link object for property editing
*
* @param event The event
*/
public void setupFolderLinkForAction(ActionEvent event)
{
this.editableNode = new Node(this.browseBean.getActionSpace().getNodeRef());
}
/**
* @return Human readable version of the Path to the destination object
*/
public String getDestinationPath()
{
NodeRef destRef = (NodeRef)this.editableNode.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
return Repository.getNamePath(
this.nodeService, this.nodeService.getPath(destRef), null, "/", null);
}
/**
* Event handler used to save the edited properties back to the repository
*
* @return The outcome
*/
public String save()
{
String outcome = "cancelEdit";
// setup the dispatch context as it is required for correct cancel/finish back to link dialog
this.navigator.setupDispatchContext(this.editableNode);
UserTransaction tx = null;
try
{
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance());
tx.begin();
NodeRef nodeRef = this.editableNode.getNodeRef();
Map<String, Object> props = this.editableNode.getProperties();
// get the name and move the node as necessary
String name = (String)props.get(ContentModel.PROP_NAME);
//if (name != null)
//{
// fileFolderService.rename(nodeRef, name);
//}
Map<QName, Serializable> properties = this.nodeService.getProperties(nodeRef);
// we need to put all the properties from the editable bag back into
// the format expected by the repository
// deal with adding the "titled" aspect if required
String title = (String)props.get(ContentModel.PROP_TITLE);
String description = (String)props.get(ContentModel.PROP_DESCRIPTION);
if (title != null || description != null)
{
// add the aspect to be sure it's present
nodeService.addAspect(nodeRef, ContentModel.ASPECT_TITLED, null);
// other props will get added later in setProperties()
}
// add the remaining properties
Iterator<String> iterProps = props.keySet().iterator();
while (iterProps.hasNext())
{
String propName = iterProps.next();
QName qname = QName.createQName(propName);
// make sure the property is represented correctly
Serializable propValue = (Serializable)props.get(propName);
// check for empty strings when using number types, set to null in this case
if ((propValue != null) && (propValue instanceof String) &&
(propValue.toString().length() == 0))
{
PropertyDefinition propDef = this.dictionaryService.getProperty(qname);
if (propDef != null)
{
if (propDef.getDataType().getName().equals(DataTypeDefinition.DOUBLE) ||
propDef.getDataType().getName().equals(DataTypeDefinition.FLOAT) ||
propDef.getDataType().getName().equals(DataTypeDefinition.INT) ||
propDef.getDataType().getName().equals(DataTypeDefinition.LONG))
{
propValue = null;
}
}
}
properties.put(qname, propValue);
}
// send the properties back to the repository
this.nodeService.setProperties(nodeRef, properties);
// commit the transaction
tx.commit();
// set the outcome to refresh
outcome = "finishEdit";
// reset any document held by the browse bean as it's just been updated
// if this is a space link then it doesn't matter anyway
this.browseBean.getDocument().reset();
}
catch (InvalidNodeRefException err)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {this.browseBean.getDocument().getId()}) );
// this failure means the node no longer exists - we cannot show the doc properties screen
outcome = "browse";
}
catch (Throwable e)
{
// rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e);
}
return outcome;
}
public String cancel()
{
// setup the dispatch context as it is required for correct cancel/finish back to link dialog
this.navigator.setupDispatchContext(this.editableNode);
return "cancelEdit";
}
public Map<String, Object> getProperties()
{
return this.editableNode.getProperties();
}
/**
* @return Returns the nodeService.
*/
public NodeService getNodeService()
{
return this.nodeService;
}
/**
* @param nodeService The nodeService to set.
*/
public void setNodeService(NodeService nodeService)
{
this.nodeService = nodeService;
}
/**
* Sets the DictionaryService to use when persisting metadata
*
* @param dictionaryService The DictionaryService
*/
public void setDictionaryService(DictionaryService dictionaryService)
{
this.dictionaryService = dictionaryService;
}
/**
* @return The BrowseBean
*/
public BrowseBean getBrowseBean()
{
return this.browseBean;
}
/**
* @param browseBean The BrowseBean to set.
*/
public void setBrowseBean(BrowseBean browseBean)
{
this.browseBean = browseBean;
}
/**
* @param navigator The NavigationBean to set.
*/
public void setNavigator(NavigationBean navigator)
{
this.navigator = navigator;
}
}

View File

@@ -155,7 +155,19 @@ public class SpaceDetailsBean
*/ */
public String getWebdavUrl() public String getWebdavUrl()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getSpace(), URLMode.WEBDAV); Node space = getLinkResolvedSpace();
return Utils.generateURL(FacesContext.getCurrentInstance(), space, URLMode.WEBDAV);
}
/**
* Returns the CIFS path for the current space
*
* @return The CIFS path
*/
public String getCifsPath()
{
Node space = getLinkResolvedSpace();
return Utils.generateURL(FacesContext.getCurrentInstance(), space, URLMode.CIFS);
} }
/** /**
@@ -169,13 +181,19 @@ public class SpaceDetailsBean
} }
/** /**
* Returns the CIFS path for the current space * Resolve the actual space Node from any Link object that may be proxying it
* *
* @return The CIFS path * @return current space Node or space Node resolved from any Link object
*/ */
public String getCifsPath() private Node getLinkResolvedSpace()
{ {
return Utils.generateURL(FacesContext.getCurrentInstance(), getSpace(), URLMode.CIFS); Node space = getSpace();
if (ContentModel.TYPE_FOLDERLINK.equals(space.getType()))
{
NodeRef destRef = (NodeRef)space.getProperties().get(ContentModel.PROP_LINK_DESTINATION);
space = new Node(destRef);
}
return space;
} }
/** /**
@@ -312,19 +330,21 @@ public class SpaceDetailsBean
*/ */
public void takeOwnership(ActionEvent event) public void takeOwnership(ActionEvent event)
{ {
FacesContext fc = FacesContext.getCurrentInstance();
UserTransaction tx = null; UserTransaction tx = null;
try try
{ {
tx = Repository.getUserTransaction(FacesContext.getCurrentInstance()); tx = Repository.getUserTransaction(fc);
tx.begin(); tx.begin();
this.ownableService.takeOwnership(getSpace().getNodeRef()); this.ownableService.takeOwnership(getSpace().getNodeRef());
FacesContext context = FacesContext.getCurrentInstance(); String msg = Application.getMessage(fc, MSG_SUCCESS_OWNERSHIP);
String msg = Application.getMessage(context, MSG_SUCCESS_OWNERSHIP);
FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg); FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, msg, msg);
context.addMessage("space-details:space-props", facesMsg); String formId = Utils.getParentForm(fc, event.getComponent()).getClientId(fc);
fc.addMessage(formId + ":space-props", facesMsg);
// commit the transaction // commit the transaction
tx.commit(); tx.commit();
@@ -334,7 +354,7 @@ public class SpaceDetailsBean
// rollback the transaction // rollback the transaction
try { if (tx != null) {tx.rollback();} } catch (Exception ex) {} try { if (tx != null) {tx.rollback();} } catch (Exception ex) {}
Utils.addErrorMessage(MessageFormat.format(Application.getMessage( Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_GENERIC), e.getMessage()), e); fc, Repository.ERROR_GENERIC), e.getMessage()), e);
} }
} }

View File

@@ -16,8 +16,10 @@
*/ */
package org.alfresco.web.bean.clipboard; package org.alfresco.web.bean.clipboard;
import java.io.Serializable;
import java.text.MessageFormat; import java.text.MessageFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@@ -26,13 +28,16 @@ import javax.faces.event.ActionEvent;
import javax.transaction.UserTransaction; import javax.transaction.UserTransaction;
import org.alfresco.model.ContentModel; import org.alfresco.model.ContentModel;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.model.FileExistsException; import org.alfresco.service.cmr.model.FileExistsException;
import org.alfresco.service.cmr.model.FileFolderService; import org.alfresco.service.cmr.model.FileFolderService;
import org.alfresco.service.cmr.model.FileNotFoundException; import org.alfresco.service.cmr.model.FileNotFoundException;
import org.alfresco.service.cmr.repository.ChildAssociationRef; import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.CopyService;
import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.namespace.QName;
import org.alfresco.web.app.Application; import org.alfresco.web.app.Application;
import org.alfresco.web.app.context.UIContextService; import org.alfresco.web.app.context.UIContextService;
import org.alfresco.web.bean.NavigationBean; import org.alfresco.web.bean.NavigationBean;
@@ -67,6 +72,14 @@ public class ClipboardBean
this.fileFolderService = fileFolderService; this.fileFolderService = fileFolderService;
} }
/**
* @param nodeOperationsService The NodeOperationsService to set.
*/
public void setNodeOperationsService(CopyService nodeOperationsService)
{
this.nodeOperationsService = nodeOperationsService;
}
/** /**
* @param navigator The NavigationBean to set. * @param navigator The NavigationBean to set.
*/ */
@@ -218,49 +231,133 @@ public class ClipboardBean
{ {
NodeRef destRef = new NodeRef(Repository.getStoreRef(), this.navigator.getCurrentNodeId()); NodeRef destRef = new NodeRef(Repository.getStoreRef(), this.navigator.getCurrentNodeId());
// TODO: Should we use primary parent here? DictionaryService dd = Repository.getServiceRegistry(
FacesContext.getCurrentInstance()).getDictionaryService();
// TODO: Should we be using primary parent here?
// We are assuming that the item exists in only a single parent and that the source for // We are assuming that the item exists in only a single parent and that the source for
// the clipboard operation (e.g. the source folder) is specifically that parent node. // the clipboard operation (e.g. the source folder) is specifically that parent node.
// This does not allow for more than one possible parent node - or for linked objects! // So does not allow for more than one possible parent node - or for linked objects!
// This code should be refactored to use a parent ID when appropriate.
ChildAssociationRef assocRef = this.nodeService.getPrimaryParent(item.Node.getNodeRef()); ChildAssociationRef assocRef = this.nodeService.getPrimaryParent(item.Node.getNodeRef());
if (item.Mode == ClipboardStatus.COPY) // initial name to attempt the copy of the item with
String name = item.Node.getName();
boolean operationComplete = false;
while (operationComplete == false)
{ {
if (action == UIClipboardShelfItem.ACTION_PASTE_LINK) try
{ {
if (logger.isDebugEnabled()) if (item.Mode == ClipboardStatus.COPY)
logger.debug("Attempting to link node ID: " + item.Node.getId() + " into node ID: " + destRef.getId()); {
if (action == UIClipboardShelfItem.ACTION_PASTE_LINK)
{
if (logger.isDebugEnabled())
logger.debug("Attempting to link node ID: " + item.Node.getId() + " into node ID: " + destRef.getId());
// copy as link was specifically requested by the user // copy as link was specifically requested by the user
this.nodeService.addChild(
destRef, // we create a special Link Object node that has a property to reference the original
item.Node.getNodeRef(), // use FileFolderService to check if already exists as using nodeService directly here
ContentModel.ASSOC_CONTAINS, String linkTo = Application.getMessage(FacesContext.getCurrentInstance(), MSG_LINK_TO);
assocRef.getQName());
// create the node using the nodeService (can only use FileFolderService for content)
Map<QName, Serializable> props = new HashMap<QName, Serializable>(4, 1.0f);
String linkName = linkTo + ' ' + name;
props.put(ContentModel.PROP_NAME, linkName + ".lnk");
props.put(ContentModel.PROP_LINK_DESTINATION, item.Node.getNodeRef());
if (dd.isSubClass(item.Node.getType(), ContentModel.TYPE_CONTENT))
{
// create File Link node
ChildAssociationRef childRef = this.nodeService.createNode(
destRef,
ContentModel.ASSOC_CONTAINS,
assocRef.getQName(),
ContentModel.TYPE_FILELINK,
props);
// apply the titled aspect - title and description
Map<QName, Serializable> titledProps = new HashMap<QName, Serializable>(2, 1.0f);
titledProps.put(ContentModel.PROP_TITLE, linkName);
titledProps.put(ContentModel.PROP_DESCRIPTION, linkName);
this.nodeService.addAspect(childRef.getChildRef(), ContentModel.ASPECT_TITLED, titledProps);
}
else
{
// create Folder link node
ChildAssociationRef childRef = this.nodeService.createNode(
destRef,
ContentModel.ASSOC_CONTAINS,
assocRef.getQName(),
ContentModel.TYPE_FOLDERLINK,
props);
// apply the uifacets aspect - icon, title and description props
Map<QName, Serializable> uiFacetsProps = new HashMap<QName, Serializable>(3, 1.0f);
uiFacetsProps.put(ContentModel.PROP_ICON, "space-icon-link");
uiFacetsProps.put(ContentModel.PROP_TITLE, linkName);
uiFacetsProps.put(ContentModel.PROP_DESCRIPTION, linkName);
this.nodeService.addAspect(childRef.getChildRef(), ContentModel.ASPECT_UIFACETS, uiFacetsProps);
}
}
else
{
if (logger.isDebugEnabled())
logger.debug("Attempting to copy node ID: " + item.Node.getId() + " into node ID: " + destRef.getId());
if (dd.isSubClass(item.Node.getType(), ContentModel.TYPE_CONTENT))
{
// call the node ops service to initiate the copy
this.fileFolderService.copy(
item.Node.getNodeRef(),
destRef,
name);
}
else
{
this.nodeOperationsService.copy(
item.Node.getNodeRef(),
destRef,
ContentModel.ASSOC_CONTAINS,
assocRef.getQName(),
true);
}
}
}
else
{
if (logger.isDebugEnabled())
logger.debug("Attempting to move node ID: " + item.Node.getId() + " into node ID: " + destRef.getId());
if (dd.isSubClass(item.Node.getType(), ContentModel.TYPE_CONTENT))
{
// move the node
this.fileFolderService.move(
item.Node.getNodeRef(),
destRef,
name); // TODO: could add "Copy of ..." here if move fails
}
else
{
// move the node
this.nodeService.moveNode(
item.Node.getNodeRef(),
destRef,
ContentModel.ASSOC_CONTAINS,
assocRef.getQName());
}
}
// if we get here without an exception, the clipboard operation was successful
operationComplete = true;
} }
else catch (FileExistsException fileExistsErr)
{ {
if (logger.isDebugEnabled()) String copyOf = Application.getMessage(FacesContext.getCurrentInstance(), MSG_COPY_OF);
logger.debug("Attempting to copy node ID: " + item.Node.getId() + " into node ID: " + destRef.getId()); name = copyOf + ' ' + name;
// call the node ops service to initiate the copy
this.fileFolderService.copy(
item.Node.getNodeRef(),
destRef,
null); // TODO: could add "Copy of ..." here if copy fails
} }
} }
else
{
if (logger.isDebugEnabled())
logger.debug("Attempting to move node ID: " + item.Node.getId() + " into node ID: " + destRef.getId());
// move the node
this.fileFolderService.move(
item.Node.getNodeRef(),
destRef,
null); // TODO: could add "Copy of ..." here if move fails
}
} }
/** /**
@@ -308,7 +405,9 @@ public class ClipboardBean
private static Log logger = LogFactory.getLog(ClipboardBean.class); private static Log logger = LogFactory.getLog(ClipboardBean.class);
/** I18N messages */ /** I18N messages */
private static final String MSG_ERROR_PASTE = "error_paste"; private static final String MSG_ERROR_PASTE = "error_paste";
private static final String MSG_COPY_OF = "copy_of";
private static final String MSG_LINK_TO = "link_to";
/** The NodeService to be used by the bean */ /** The NodeService to be used by the bean */
protected NodeService nodeService; protected NodeService nodeService;
@@ -316,6 +415,9 @@ public class ClipboardBean
/** The FileFolderService to be used by the bean */ /** The FileFolderService to be used by the bean */
protected FileFolderService fileFolderService; protected FileFolderService fileFolderService;
/** The NodeOperationsService to be used by the bean */
protected CopyService nodeOperationsService;
/** The NavigationBean reference */ /** The NavigationBean reference */
protected NavigationBean navigator; protected NavigationBean navigator;

View File

@@ -274,7 +274,10 @@ public final class Repository
// ignore root node check if not passed in // ignore root node check if not passed in
boolean foundRoot = (rootNode == null); boolean foundRoot = (rootNode == null);
buf.append(prefix); if (prefix != null)
{
buf.append(prefix);
}
// skip first element as it represents repo root '/' // skip first element as it represents repo root '/'
for (int i=1; i<path.size(); i++) for (int i=1; i<path.size(); i++)

View File

@@ -523,12 +523,14 @@ public final class Utils
* The supported values for the usage parameter are of URLMode enum type * The supported values for the usage parameter are of URLMode enum type
* @see URLMode * @see URLMode
* *
* @param context Faces context * @param context Faces context
* @param node The node to generate the URL for * @param node The node to generate the URL for
* @param usage What the URL is going to be used for * @param name Name to use for the download file part of the link if any
* @param usage What the URL is going to be used for
*
* @return The URL for the requested usage without the context path * @return The URL for the requested usage without the context path
*/ */
public static String generateURL(FacesContext context, Node node, URLMode usage) public static String generateURL(FacesContext context, Node node, String name, URLMode usage)
{ {
String url = null; String url = null;
@@ -612,13 +614,13 @@ public final class Utils
case HTTP_DOWNLOAD: case HTTP_DOWNLOAD:
{ {
url = DownloadContentServlet.generateDownloadURL(node.getNodeRef(), node.getName()); url = DownloadContentServlet.generateDownloadURL(node.getNodeRef(), name);
break; break;
} }
case HTTP_INLINE: case HTTP_INLINE:
{ {
url = DownloadContentServlet.generateBrowserURL(node.getNodeRef(), node.getName()); url = DownloadContentServlet.generateBrowserURL(node.getNodeRef(), name);
break; break;
} }
@@ -652,6 +654,23 @@ public final class Utils
return url; return url;
} }
/**
* Generates a URL for the given usage for the given node.
*
* The supported values for the usage parameter are of URLMode enum type
* @see URLMode
*
* @param context Faces context
* @param node The node to generate the URL for
* @param usage What the URL is going to be used for
*
* @return The URL for the requested usage without the context path
*/
public static String generateURL(FacesContext context, Node node, URLMode usage)
{
return generateURL(context, node, node.getName(), usage);
}
/** /**
* Build a context path safe image tag for the supplied image path. * Build a context path safe image tag for the supplied image path.
* Image path should be supplied with a leading slash '/'. * Image path should be supplied with a leading slash '/'.
@@ -665,7 +684,8 @@ public final class Utils
* *
* @return Populated <code>img</code> tag * @return Populated <code>img</code> tag
*/ */
public static String buildImageTag(FacesContext context, String image, int width, int height, String alt, String onclick) public static String buildImageTag(FacesContext context, String image, int width, int height,
String alt, String onclick)
{ {
return buildImageTag(context, image, width, height, alt, onclick, null); return buildImageTag(context, image, width, height, alt, onclick, null);
} }
@@ -684,7 +704,8 @@ public final class Utils
* *
* @return Populated <code>img</code> tag * @return Populated <code>img</code> tag
*/ */
public static String buildImageTag(FacesContext context, String image, int width, int height, String alt, String onclick, String align) public static String buildImageTag(FacesContext context, String image, int width, int height,
String alt, String onclick, String align)
{ {
StringBuilder buf = new StringBuilder(200); StringBuilder buf = new StringBuilder(200);

View File

@@ -0,0 +1,91 @@
/*
* 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.ui.common.converter;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.convert.ConverterException;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.Path;
import org.alfresco.web.bean.repository.Repository;
/**
* Converter class to convert a Path or NodeRef reference value (including null) into a human readable form.
*
* @author Kevin Roast
*/
public class DisplayPathConverter implements Converter
{
/**
* <p>The standard converter id for this converter.</p>
*/
public static final String CONVERTER_ID = "org.alfresco.faces.DisplayPathConverter";
/**
* @see javax.faces.convert.Converter#getAsObject(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.String)
*/
public Object getAsObject(FacesContext context, UIComponent component, String value)
throws ConverterException
{
return null;
}
/**
* @see javax.faces.convert.Converter#getAsString(javax.faces.context.FacesContext, javax.faces.component.UIComponent, java.lang.Object)
*/
public String getAsString(FacesContext context, UIComponent component, Object value)
throws ConverterException
{
String result = "";
if (value != null)
{
try
{
NodeService nodeService = Repository.getServiceRegistry(context).getNodeService();
Path path = null;
if (value instanceof NodeRef)
{
path = nodeService.getPath((NodeRef)value);
}
else if (value instanceof Path)
{
path = (Path)value;
}
if (path != null)
{
result = Repository.getNamePath(nodeService, path, null, "/", null);
}
}
catch (AccessDeniedException accessErr)
{
// use default if this occurs
}
catch (InvalidNodeRefException nodeErr)
{
// use default if this occurs
}
}
return result;
}
}

View File

@@ -30,6 +30,7 @@ public class WebResources extends org.alfresco.web.ui.common.WebResources
public static final String IMAGE_COPY = "/images/icons/copy.gif"; public static final String IMAGE_COPY = "/images/icons/copy.gif";
public static final String IMAGE_CUT = "/images/icons/cut.gif"; public static final String IMAGE_CUT = "/images/icons/cut.gif";
public static final String IMAGE_PASTE = "/images/icons/paste.gif"; public static final String IMAGE_PASTE = "/images/icons/paste.gif";
public static final String IMAGE_PASTE_LINK = "/images/icons/paste_link.gif";
public static final String IMAGE_LOCK = "/images/icons/locked.gif"; public static final String IMAGE_LOCK = "/images/icons/locked.gif";
public static final String IMAGE_LOCK_OWNER = "/images/icons/locked_owner.gif"; public static final String IMAGE_LOCK_OWNER = "/images/icons/locked_owner.gif";
public static final String IMAGE_PERSON = "/images/icons/person.gif"; public static final String IMAGE_PERSON = "/images/icons/person.gif";

View File

@@ -184,7 +184,7 @@ public class UIClipboardShelfItem extends UIShelfItem
} }
out.write(Utils.buildImageTag(context, icon, 16, 16, null, null, "absmiddle")); out.write(Utils.buildImageTag(context, icon, 16, 16, null, null, "absmiddle"));
} }
else if (dd.isSubClass(item.Node.getType(), ContentModel.TYPE_CONTENT)) else
{ {
String image = Utils.getFileTypeImage(item.Node.getName(), true); String image = Utils.getFileTypeImage(item.Node.getName(), true);
out.write(Utils.buildImageTag(context, image, null, "absmiddle")); out.write(Utils.buildImageTag(context, image, null, "absmiddle"));
@@ -200,11 +200,11 @@ public class UIClipboardShelfItem extends UIShelfItem
out.write(buildActionLink(ACTION_REMOVE_ITEM, i, bundle.getString(MSG_REMOVE_ITEM), WebResources.IMAGE_REMOVE)); out.write(buildActionLink(ACTION_REMOVE_ITEM, i, bundle.getString(MSG_REMOVE_ITEM), WebResources.IMAGE_REMOVE));
out.write("&nbsp;"); out.write("&nbsp;");
out.write(buildActionLink(ACTION_PASTE_ITEM, i, bundle.getString(MSG_PASTE_ITEM), WebResources.IMAGE_PASTE)); out.write(buildActionLink(ACTION_PASTE_ITEM, i, bundle.getString(MSG_PASTE_ITEM), WebResources.IMAGE_PASTE));
//if (item.Mode == ClipboardStatus.COPY) if (item.Mode == ClipboardStatus.COPY)
//{ {
// out.write("&nbsp;"); out.write("&nbsp;");
// out.write(buildActionLink(ACTION_PASTE_LINK, i, bundle.getString(MSG_PASTE_LINK), WebResources.IMAGE_PASTE_LINK)); out.write(buildActionLink(ACTION_PASTE_LINK, i, bundle.getString(MSG_PASTE_LINK), WebResources.IMAGE_PASTE_LINK));
//} }
// end actions cell and end row // end actions cell and end row
out.write("</nobr></td></tr>"); out.write("</nobr></td></tr>");

View File

@@ -161,6 +161,10 @@
<property-name>fileFolderService</property-name> <property-name>fileFolderService</property-name>
<value>#{FileFolderService}</value> <value>#{FileFolderService}</value>
</managed-property> </managed-property>
<managed-property>
<property-name>nodeOperationsService</property-name>
<value>#{CopyService}</value>
</managed-property>
</managed-bean> </managed-bean>
<managed-bean> <managed-bean>
@@ -474,6 +478,31 @@
</managed-property> </managed-property>
</managed-bean> </managed-bean>
<managed-bean>
<description>
The bean that backs up the Link Properties Dialog
</description>
<managed-bean-name>LinkPropertiesBean</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.LinkPropertiesBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
<managed-property>
<property-name>nodeService</property-name>
<value>#{NodeService}</value>
</managed-property>
<managed-property>
<property-name>dictionaryService</property-name>
<value>#{DictionaryService}</value>
</managed-property>
<managed-property>
<property-name>browseBean</property-name>
<value>#{BrowseBean}</value>
</managed-property>
<managed-property>
<property-name>navigator</property-name>
<value>#{NavigationBean}</value>
</managed-property>
</managed-bean>
<managed-bean> <managed-bean>
<description> <description>
The bean that backs up the New Rule Wizard The bean that backs up the New Rule Wizard

View File

@@ -161,6 +161,11 @@
<converter-class>org.alfresco.web.ui.common.converter.ByteSizeConverter</converter-class> <converter-class>org.alfresco.web.ui.common.converter.ByteSizeConverter</converter-class>
</converter> </converter>
<converter>
<converter-id>org.alfresco.faces.DisplayPathConverter</converter-id>
<converter-class>org.alfresco.web.ui.common.converter.DisplayPathConverter</converter-class>
</converter>
<!-- ==================== RENDERERS ==================== --> <!-- ==================== RENDERERS ==================== -->
<render-kit> <render-kit>

View File

@@ -263,14 +263,6 @@
<from-outcome>deleteSpace</from-outcome> <from-outcome>deleteSpace</from-outcome>
<to-view-id>/jsp/dialog/delete-space.jsp</to-view-id> <to-view-id>/jsp/dialog/delete-space.jsp</to-view-id>
</navigation-case> </navigation-case>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/dialog/space-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/dialog/space-details.jsp</to-view-id>
</navigation-case>
<navigation-case> <navigation-case>
<from-outcome>import</from-outcome> <from-outcome>import</from-outcome>
<to-view-id>/jsp/dialog/import.jsp</to-view-id> <to-view-id>/jsp/dialog/import.jsp</to-view-id>
@@ -355,14 +347,6 @@
<from-outcome>createAction</from-outcome> <from-outcome>createAction</from-outcome>
<to-view-id>/jsp/wizard/create-action/action.jsp</to-view-id> <to-view-id>/jsp/wizard/create-action/action.jsp</to-view-id>
</navigation-case> </navigation-case>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/dialog/document-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/dialog/document-details.jsp</to-view-id>
</navigation-case>
<navigation-case> <navigation-case>
<from-outcome>previewContent</from-outcome> <from-outcome>previewContent</from-outcome>
<to-view-id>/jsp/dialog/preview-file.jsp</to-view-id> <to-view-id>/jsp/dialog/preview-file.jsp</to-view-id>
@@ -445,6 +429,53 @@
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<!-- File Link object details page navigation -->
<navigation-rule>
<from-view-id>/jsp/dialog/filelink-details.jsp</from-view-id>
<navigation-case>
<from-outcome>editLinkProperties</from-outcome>
<to-view-id>/jsp/dialog/edit-link-properties.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>manageContentUsers</from-outcome>
<to-view-id>/jsp/roles/manage-content-users.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>deleteFile</from-outcome>
<to-view-id>/jsp/dialog/delete-file.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<!-- Space Link object details page navigation -->
<navigation-rule>
<from-view-id>/jsp/dialog/spacelink-details.jsp</from-view-id>
<navigation-case>
<from-outcome>editLinkProperties</from-outcome>
<to-view-id>/jsp/dialog/edit-link-properties.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>manageContentUsers</from-outcome>
<to-view-id>/jsp/roles/manage-content-users.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>deleteFile</from-outcome>
<to-view-id>/jsp/dialog/delete-file.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<!-- Edit Link object properties page navigation -->
<navigation-rule>
<from-view-id>/jsp/dialog/edit-link-properties.jsp</from-view-id>
<navigation-case>
<from-outcome>cancelEdit</from-outcome>
<to-view-id>/jsp/dialog/filelink-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>finishEdit</from-outcome>
<to-view-id>/jsp/dialog/filelink-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<!-- Manage Invited Users navigation --> <!-- Manage Invited Users navigation -->
<navigation-rule> <navigation-rule>
<from-view-id>/jsp/roles/manage-invited-users.jsp</from-view-id> <from-view-id>/jsp/roles/manage-invited-users.jsp</from-view-id>
@@ -1115,42 +1146,6 @@
</navigation-case> </navigation-case>
</navigation-rule> </navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/forums-details.jsp</from-view-id>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/forums-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/forum-details.jsp</from-view-id>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/forum-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
<from-view-id>/jsp/forums/topic-details.jsp</from-view-id>
<navigation-case>
<from-outcome>nextItem</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>previousItem</from-outcome>
<to-view-id>/jsp/forums/topic-details.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule> <navigation-rule>
<from-view-id>/jsp/forums/delete-forums.jsp</from-view-id> <from-view-id>/jsp/forums/delete-forums.jsp</from-view-id>
<navigation-case> <navigation-case>

View File

@@ -272,11 +272,13 @@ a.headbarLink
.recordSetRow .recordSetRow
{ {
background-color: #FFFFFF; background-color: #FFFFFF;
vertical-align: top;
} }
.recordSetRowAlt .recordSetRowAlt
{ {
background-color: #DEE5EC; background-color: #DEE5EC;
vertical-align: top;
} }
.recordSetHeader .recordSetHeader

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -88,11 +88,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td align=right> <td align=right>
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{DocumentDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{DocumentDetailsBean.previousItem}" action="showDocDetails">
<f:param name="id" value="#{DocumentDetailsBean.id}" /> <f:param name="id" value="#{DocumentDetailsBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{DocumentDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{DocumentDetailsBean.nextItem}" action="showDocDetails">
<f:param name="id" value="#{DocumentDetailsBean.id}" /> <f:param name="id" value="#{DocumentDetailsBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>
@@ -218,8 +218,7 @@
</td> </td>
<td> <td>
<r:propertySheetGrid id="document-props-locked" value="#{DocumentDetailsBean.document}" var="documentProps" <r:propertySheetGrid id="document-props-locked" value="#{DocumentDetailsBean.document}" var="documentProps"
columns="1" mode="view" labelStyleClass="propertiesLabel" columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" />
externalConfig="true" />
<h:outputText id="no-inline-msg2" value="<br/>#{msg.not_inline_editable}<br/>" <h:outputText id="no-inline-msg2" value="<br/>#{msg.not_inline_editable}<br/>"
rendered="#{DocumentDetailsBean.inlineEditable == false}" escape="false" /> rendered="#{DocumentDetailsBean.inlineEditable == false}" escape="false" />
<h:messages id="props-locked-msgs" styleClass="errorMessage" layout="table" /> <h:messages id="props-locked-msgs" styleClass="errorMessage" layout="table" />
@@ -240,8 +239,7 @@
<a:panel label="#{msg.workflow}" id="workflow-panel" facetsId="workflow-panel-facets" progressive="true" <a:panel label="#{msg.workflow}" id="workflow-panel" facetsId="workflow-panel-facets" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.approveStepName != null}" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.approveStepName != null}"
expanded='#{DocumentDetailsBean.panels["workflow-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}"> expanded='#{DocumentDetailsBean.panels["workflow-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<h:outputText id="workflow-overview" value="#{DocumentDetailsBean.workflowOverviewHTML}" <h:outputText id="workflow-overview" value="#{DocumentDetailsBean.workflowOverviewHTML}" escape="false" />
escape="false" />
</a:panel> </a:panel>
<a:panel label="#{msg.workflow}" id="no-workflow-panel" progressive="true" <a:panel label="#{msg.workflow}" id="no-workflow-panel" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.approveStepName == null}" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.approveStepName == null}"
@@ -338,8 +336,7 @@
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
rendered="#{DocumentDetailsBean.versionable == false}" rendered="#{DocumentDetailsBean.versionable == false}"
expanded='#{DocumentDetailsBean.panels["version-history-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}"> expanded='#{DocumentDetailsBean.panels["version-history-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<h:outputText id="no-history-msg" value="#{msg.not_versioned}<br/><br/>" <h:outputText id="no-history-msg" value="#{msg.not_versioned}<br/><br/>" escape="false" />
escape="false" />
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="eval_ver"> <r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write" id="eval_ver">
<a:actionLink id="make-versionable" value="#{msg.allow_versioning}" <a:actionLink id="make-versionable" value="#{msg.allow_versioning}"
action="#{DocumentDetailsBean.applyVersionable}" action="#{DocumentDetailsBean.applyVersionable}"

View File

@@ -0,0 +1,193 @@
<%--
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.
--%>
<%@ 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" %>
<%@ page buffer="32kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_edit_link_props">
<script language="JavaScript1.2">
function checkButtonState()
{
if (document.getElementById("edit-link-props:file-name").value.length == 0)
{
document.getElementById("edit-link-props:ok-button").disabled = true;
}
else
{
document.getElementById("edit-link-props:ok-button").disabled = false;
}
}
</script>
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="edit-link-props">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr>
<td width="32">
<h:graphicImage id="wizard-logo" url="/images/icons/details_large.gif" />
</td>
<td>
<div class="mainTitle"><h:outputText value="#{msg.modify_props_of}" /> '<h:outputText value="#{LinkPropertiesBean.properties.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.editlink_description}" /></div>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "white", "white"); %>
<table cellpadding="2" cellspacing="2" border="0" width="100%">
<tr>
<td colspan="2" class="wizardSectionHeading"><h:outputText value="#{msg.link_properties}" /></td>
</tr>
<tr><td colspan="2" class="paddingRow"></td></tr>
<tr>
<td><nobr><h:outputText value="#{msg.file_name}" />:</nobr></td>
<td width="90%">
<h:inputText id="file-name" value="#{LinkPropertiesBean.properties.name}" size="35" maxlength="1024"
onkeyup="javascript:checkButtonState();" />&nbsp;*
</td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.title}" />:</nobr></td>
<td>
<h:inputText id="title" value="#{LinkPropertiesBean.properties.title}" size="35" maxlength="1024" />
</td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.description}" />:</nobr></td>
<td>
<h:inputText value="#{LinkPropertiesBean.properties.description}" size="35" maxlength="1024" />
</td>
</tr>
<tr>
<td><nobr><h:outputText value="#{msg.link_destination}" />:</nobr></td>
<td>
<h:outputText value="#{LinkPropertiesBean.destinationPath}" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "white"); %>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0">
<tr>
<td align="center">
<h:commandButton id="ok-button" value="#{msg.ok}" action="#{LinkPropertiesBean.save}" styleClass="wizardButton" />
</td>
</tr>
<tr>
<td align="center">
<h:commandButton value="#{msg.cancel}" action="#{LinkPropertiesBean.cancel}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- Error Messages --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width=4></td>
<td>
<%-- messages tag to show messages not handled by other specific message tags --%>
<h:messages globalOnly="true" styleClass="errorMessage" layout="table" />
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width=4></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -0,0 +1,227 @@
<%--
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.
--%>
<%@ 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" %>
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_file_details">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="filelink-details">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr>
<td width="32">
<img src="<%=request.getContextPath()%>/images/icons/details_large.gif" width=32 height=32>
</td>
<td>
<div class="mainTitle">
<h:outputText value="#{msg.details_of}" /> '<h:outputText value="#{DocumentDetailsBean.name}" />'<r:lockIcon value="#{DocumentDetailsBean.document.nodeRef}" align="absmiddle" />
</div>
<div class="mainSubText">
<h:outputText value="#{msg.location}" />: <r:nodePath value="#{DocumentDetailsBean.document.nodeRef}" breadcrumb="true" actionListener="#{BrowseBean.clickSpacePath}" />
</div>
<div class="mainSubText"><h:outputText value="#{msg.linkdetails_description}" /></div>
</td>
<%-- Navigation --%>
<td align=right>
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{DocumentDetailsBean.previousItem}" action="showDocDetails">
<f:param name="id" value="#{DocumentDetailsBean.id}" />
</a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{DocumentDetailsBean.nextItem}" action="showDocDetails">
<f:param name="id" value="#{DocumentDetailsBean.id}" />
</a:actionLink>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<a:panel label="#{msg.view_links}" id="preview-panel" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE"
expanded='#{DocumentDetailsBean.panels["preview-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
<tr>
<td>
<a:actionLink value="#{msg.view_in_browser}" href="#{DocumentDetailsBean.browserUrl}" target="new" id="link1" />
</td>
<td>
<a:actionLink value="#{msg.view_in_webdav}" href="#{DocumentDetailsBean.webdavUrl}" target="new" id="link2" />
</td>
<td>
<a:actionLink value="#{msg.view_in_cifs}" href="#{DocumentDetailsBean.cifsPath}" target="new" id="link3" />
</td>
</tr>
<tr>
<td>
<a:actionLink value="#{msg.download_content}" href="#{DocumentDetailsBean.downloadUrl}" target="new" id="link4" />
</td>
<td>
<a href='<%=request.getContextPath()%><a:outputText value="#{DocumentDetailsBean.bookmarkUrl}" id="out1" />' onclick="return false;"><a:outputText value="#{msg.details_page_bookmark}" id="out2" /></a>
</td>
<td>
<a href='<a:outputText value="#{DocumentDetailsBean.nodeRefUrl}" id="out3" />' onclick="return false;"><a:outputText value="#{msg.noderef_link}" id="out4" /></a>
</td>
</tr>
</table>
</a:panel>
<br>
<h:panelGroup id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{DocumentDetailsBean.document}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif"
action="editLinkProperties" actionListener="#{LinkPropertiesBean.setupFileLinkForAction}" />
</r:permissionEvaluator>
</f:facet>
</h:panelGroup>
<a:panel label="#{msg.properties}" id="properties-panel" facetsId="props-panel-facets" progressive="true"
border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" rendered="#{DocumentDetailsBean.locked == false}"
expanded='#{DocumentDetailsBean.panels["properties-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center>
<%-- icon image for the doc --%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding:4px">
<a:actionLink id="doc-logo1" value="#{DocumentDetailsBean.name}" href="#{DocumentDetailsBean.url}" target="new"
image="#{DocumentDetailsBean.document.properties.fileType32}" showLink="false" />
</div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td>
<%-- properties for the doc link --%>
<r:propertySheetGrid id="document-props" value="#{DocumentDetailsBean.document}" var="documentProps"
columns="1" mode="view" labelStyleClass="propertiesLabel" externalConfig="true" />
<h:messages globalOnly="true" id="props-msgs" styleClass="errorMessage" layout="table" />
<h:message for="document-props" styleClass="statusMessage" />
</td>
</tr>
</table>
</a:panel>
</td>
<td valign="top">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td align="center">
<h:commandButton value="#{msg.close}" action="dialog:close" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
<div style="padding:4px"></div>
<%-- Document Actions --%>
<a:panel label="#{msg.actions}" id="actions-panel" border="white" bgcolor="white" titleBorder="blue" titleBgcolor="#D3E6FE" style="text-align:center"
progressive="true" expanded='#{DocumentDetailsBean.panels["actions-panel"]}' expandedActionListener="#{DocumentDetailsBean.expandPanel}">
<r:actions id="actions_doc" value="filelink_details_actions" context="#{DocumentDetailsBean.document}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -88,11 +88,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td class="separator" width=1></td> <td class="separator" width=1></td>
<td style="padding-left:4px" width=80> <td style="padding-left:4px" width=80>
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{DocumentDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{DocumentDetailsBean.previousItem}">
<f:param name="id" value="#{DocumentPreviewBean.id}" /> <f:param name="id" value="#{DocumentPreviewBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{DocumentDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{DocumentDetailsBean.nextItem}">
<f:param name="id" value="#{DocumentPreviewBean.id}" /> <f:param name="id" value="#{DocumentPreviewBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>

View File

@@ -88,11 +88,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td class="separator" width=1></td> <td class="separator" width=1></td>
<td style="padding-left:4px" width=80> <td style="padding-left:4px" width=80>
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}">
<f:param name="id" value="#{SpacePreviewBean.id}" /> <f:param name="id" value="#{SpacePreviewBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_space.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_space.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}">
<f:param name="id" value="#{SpacePreviewBean.id}" /> <f:param name="id" value="#{SpacePreviewBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>

View File

@@ -76,11 +76,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td align="right"> <td align="right">
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_space.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_space.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>

View File

@@ -0,0 +1,212 @@
<%--
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.
--%>
<%@ 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" %>
<%@ page buffer="64kb" contentType="text/html;charset=UTF-8" %>
<%@ page isELIgnored="false" %>
<%@ page import="org.alfresco.web.ui.common.PanelGenerator" %>
<r:page titleId="title_space_details">
<f:view>
<%-- load a bundle of properties with I18N strings --%>
<f:loadBundle basename="alfresco.messages.webclient" var="msg"/>
<h:form acceptCharset="UTF-8" id="spacelink-details">
<%-- Main outer table --%>
<table cellspacing="0" cellpadding="2">
<%-- Title bar --%>
<tr>
<td colspan="2">
<%@ include file="../parts/titlebar.jsp" %>
</td>
</tr>
<%-- Main area --%>
<tr valign="top">
<%-- Shelf --%>
<td>
<%@ include file="../parts/shelf.jsp" %>
</td>
<%-- Work Area --%>
<td width="100%">
<table cellspacing="0" cellpadding="0" width="100%">
<%-- Breadcrumb --%>
<%@ include file="../parts/breadcrumb.jsp" %>
<%-- Status and Actions --%>
<tr>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_4.gif)" width="4"></td>
<td bgcolor="#EEEEEE">
<%-- Status and Actions inner contents table --%>
<%-- Generally this consists of an icon, textual summary and actions for the current object --%>
<table cellspacing="4" cellpadding="0" width="100%">
<tr>
<td width="32">
<img src="<%=request.getContextPath()%>/images/icons/details_large.gif" width=32 height=32>
</td>
<td>
<div class="mainTitle"><h:outputText value="#{msg.details_of}" /> '<h:outputText value="#{SpaceDetailsBean.name}" />'</div>
<div class="mainSubText"><h:outputText value="#{msg.location}" />: <r:nodePath value="#{SpaceDetailsBean.space.nodeRef}" breadcrumb="true" actionListener="#{BrowseBean.clickSpacePath}" /></div>
<div class="mainSubText"><h:outputText value="#{msg.linkdetails_description}" /></div>
</td>
<%-- Navigation --%>
<td align="right">
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_space.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with gradient shadow --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_7.gif" width="4" height="9"></td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/statuspanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/statuspanel_9.gif" width="4" height="9"></td>
</tr>
<%-- Details --%>
<tr valign=top>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_4.gif)" width="4"></td>
<td>
<table cellspacing="0" cellpadding="3" border="0" width="100%">
<tr>
<td width="100%" valign="top">
<%-- wrapper comment used by the panel to add additional component facets --%>
<h:panelGroup id="props-panel-facets">
<f:facet name="title">
<r:permissionEvaluator value="#{SpaceDetailsBean.space}" allow="Write">
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/Change_details.gif"
action="editLinkProperties" actionListener="#{LinkPropertiesBean.setupFolderLinkForAction}" />
</r:permissionEvaluator>
</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">
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width=80 align=center>
<%-- icon image for the space --%>
<table cellspacing=0 cellpadding=0 border=0>
<tr>
<td>
<div style="border: thin solid #CCCCCC; padding:4px">
<h:graphicImage id="space-logo" url="/images/icons/#{SpaceDetailsBean.space.properties.icon}.gif" width="32" height="32" />
</div>
</td>
<td><img src="<%=request.getContextPath()%>/images/parts/rightSideShadow42.gif" width=6 height=42></td>
</tr>
<tr>
<td colspan=2><img src="<%=request.getContextPath()%>/images/parts/bottomShadow42.gif" width=48 height=5></td>
</tr>
</table>
</td>
<td>
<%-- properties for the space link --%>
<r:propertySheetGrid id="space-props" value="#{SpaceDetailsBean.space}" var="spaceProps"
columns="1" mode="view" labelStyleClass="propertiesLabel"
externalConfig="true" />
<h:messages globalOnly="true" styleClass="errorMessage" layout="table" />
<h:message for="space-props" styleClass="statusMessage" />
</td>
</tr>
</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">
<% PanelGenerator.generatePanelStart(out, request.getContextPath(), "blue", "#D3E6FE"); %>
<table cellpadding="1" cellspacing="1" border="0" width="100%">
<tr>
<td align="center">
<h:commandButton value="#{msg.close}" action="#{SpaceDetailsBean.closeDialog}" styleClass="wizardButton" />
</td>
</tr>
</table>
<% PanelGenerator.generatePanelEnd(out, request.getContextPath(), "blue"); %>
<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">
<r:actions id="actions_space" value="spacelink_details_actions" context="#{SpaceDetailsBean.space}" verticalSpacing="3" style="white-space:nowrap" />
</a:panel>
</td>
</tr>
</table>
</td>
<td style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_6.gif)" width="4"></td>
</tr>
<%-- separator row with bottom panel graphics --%>
<tr>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_7.gif" width="4" height="4"></td>
<td width="100%" align="center" style="background-image: url(<%=request.getContextPath()%>/images/parts/whitepanel_8.gif)"></td>
<td><img src="<%=request.getContextPath()%>/images/parts/whitepanel_9.gif" width="4" height="4"></td>
</tr>
</table>
</td>
</tr>
</table>
</h:form>
</f:view>
</r:page>

View File

@@ -76,11 +76,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td align="right"> <td align="right">
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_forum.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_forum.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>

View File

@@ -76,11 +76,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td align=right> <td align=right>
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_forum.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_forum.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>

View File

@@ -77,11 +77,11 @@
<%-- Navigation --%> <%-- Navigation --%>
<td align="right"> <td align="right">
<a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="previousItem"> <a:actionLink value="#{msg.previous_item}" image="/images/icons/nav_prev.gif" showLink="false" actionListener="#{SpaceDetailsBean.previousItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
<img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle> <img src="<%=request.getContextPath()%>/images/icons/nav_file.gif" width=24 height=24 align=absmiddle>
<a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="nextItem"> <a:actionLink value="#{msg.next_item}" image="/images/icons/nav_next.gif" showLink="false" actionListener="#{SpaceDetailsBean.nextItem}" action="showSpaceDetails">
<f:param name="id" value="#{SpaceDetailsBean.id}" /> <f:param name="id" value="#{SpaceDetailsBean.id}" />
</a:actionLink> </a:actionLink>
</td> </td>