diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties
index f3b4b1c29f..bc38c49c23 100644
--- a/config/alfresco/messages/webclient.properties
+++ b/config/alfresco/messages/webclient.properties
@@ -552,7 +552,6 @@ general=General
file_name=File Name
content_type=Content Type
content_format=Content Format
-author=Author
inline_editable=Inline Editable
locate_document=Locate document to upload
location=Location
diff --git a/config/alfresco/web-client-config.xml b/config/alfresco/web-client-config.xml
index 345470d4b9..7cffe13ad9 100644
--- a/config/alfresco/web-client-config.xml
+++ b/config/alfresco/web-client-config.xml
@@ -177,7 +177,7 @@
-
+
@@ -251,11 +251,17 @@
+
+
+
+
+
+
-
+
-
+
diff --git a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
index 19de6ce188..3f90e14004 100644
--- a/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
+++ b/source/java/org/alfresco/web/bean/AdvancedSearchBean.java
@@ -565,7 +565,7 @@ public class AdvancedSearchBean
}
if (this.author != null && this.author.length() != 0)
{
- search.addAttributeQuery(ContentModel.PROP_CREATOR, this.author);
+ search.addAttributeQuery(ContentModel.PROP_AUTHOR, this.author);
}
if (this.contentFormat != null && this.contentFormat.length() != 0)
{
diff --git a/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java b/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java
index af1f3a065d..dc411c9a51 100644
--- a/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java
+++ b/source/java/org/alfresco/web/bean/DocumentPropertiesBean.java
@@ -19,6 +19,7 @@ package org.alfresco.web.bean;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -146,6 +147,20 @@ public class DocumentPropertiesBean
}
}
+ // extra and deal with the Author prop if the aspect has not been applied yet
+ String author = (String)props.get(ContentModel.PROP_AUTHOR);
+ if (author != null)
+ {
+ // add aspect if required
+ if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == false)
+ {
+ Map authorProps = new HashMap(1, 1.0f);
+ authorProps.put(ContentModel.PROP_AUTHOR, author);
+ this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
+ }
+ // else it will get updated in the later setProperties() call
+ }
+
// add the remaining properties
Iterator iterProps = props.keySet().iterator();
while (iterProps.hasNext())
diff --git a/source/java/org/alfresco/web/bean/wizard/AddContentWizard.java b/source/java/org/alfresco/web/bean/wizard/AddContentWizard.java
index e2a514f1f6..e9f179432e 100644
--- a/source/java/org/alfresco/web/bean/wizard/AddContentWizard.java
+++ b/source/java/org/alfresco/web/bean/wizard/AddContentWizard.java
@@ -82,7 +82,7 @@ public class AddContentWizard extends BaseContentWizard
if (Repository.extractMetadata(FacesContext.getCurrentInstance(), cr, contentProps))
{
- this.author = (String)(contentProps.get(ContentModel.PROP_CREATOR));
+ this.author = (String)(contentProps.get(ContentModel.PROP_AUTHOR));
this.title = (String)(contentProps.get(ContentModel.PROP_TITLE));
this.description = (String)(contentProps.get(ContentModel.PROP_DESCRIPTION));
}
diff --git a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java
index 746bc82c4b..48a0570182 100644
--- a/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java
+++ b/source/java/org/alfresco/web/bean/wizard/BaseContentWizard.java
@@ -111,7 +111,21 @@ public abstract class BaseContentWizard extends AbstractWizardBean
Map contentProps = this.nodeService.getProperties(nodeRef);
contentProps.put(ContentModel.PROP_TITLE, this.title);
contentProps.put(ContentModel.PROP_DESCRIPTION, this.description);
- contentProps.put(ContentModel.PROP_CREATOR, this.author);
+
+ // add author property
+ if (this.author != null && this.author.length() != 0)
+ {
+ if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == false)
+ {
+ Map authorProps = new HashMap(1, 1.0f);
+ authorProps.put(ContentModel.PROP_AUTHOR, this.author);
+ this.nodeService.addAspect(nodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
+ }
+ else
+ {
+ contentProps.put(ContentModel.PROP_AUTHOR, this.author);
+ }
+ }
// set up content properties - copy or create the compound property
ContentData contentData = (ContentData)contentProps.get(ContentModel.PROP_CONTENT);
@@ -161,10 +175,12 @@ public abstract class BaseContentWizard extends AbstractWizardBean
Repository.resolveToQName(this.objectType));
NodeRef fileNodeRef = fileInfo.getNodeRef();
- // set the author (if we have)
+ // set the author aspect (if we have one)
if (this.author != null && this.author.length() > 0)
{
- this.nodeService.setProperty(fileNodeRef, ContentModel.PROP_CREATOR, this.author);
+ Map authorProps = new HashMap(1, 1.0f);
+ authorProps.put(ContentModel.PROP_AUTHOR, this.author);
+ this.nodeService.addAspect(fileNodeRef, ContentModel.ASPECT_AUTHOR, authorProps);
}
if (logger.isDebugEnabled())
diff --git a/source/web/jsp/dialog/edit-document-properties.jsp b/source/web/jsp/dialog/edit-document-properties.jsp
index 8afc9c43fc..bea10603ba 100644
--- a/source/web/jsp/dialog/edit-document-properties.jsp
+++ b/source/web/jsp/dialog/edit-document-properties.jsp
@@ -146,7 +146,7 @@
: |
-
+
|
|