mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
17075: Merged DEV-TEMPORARY to V3.2 16768: ETHREEOH-2359: System Error message appears while clicking "View Completed Task" icon for the task, if the user, whom the Adhoc task was assigned to, has been deleted 16792: *RECORD ONLY* ETHREEOH-1429: Unfriendly error occurs when two content managers create identical content items in appropriate user sandboxes 17078: Merged DEV-TEMPORARY to V3.2 16962: ETHREEOH-1289: It is possible to add one Web Form to Web Project twice and more times 17080: Merged DEV-TEMPORARY to V3.2 16960: ETHREEOH-1894: Unfriendly notifications appear when trying to edit unlocked content git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@17081 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -192,9 +192,7 @@ public class EditOnlineDialog extends CCCheckoutFileDialog
|
||||
catch (Throwable err)
|
||||
{
|
||||
try { if (tx != null) {tx.rollback();} } catch (Exception tex) {}
|
||||
|
||||
Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(),
|
||||
MSG_ERROR_CHECKOUT) + err.getMessage(), err);
|
||||
property.setDocument(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -1223,7 +1223,19 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
item.setLabel(form.getTitle());
|
||||
item.setDescription(form.getDescription());
|
||||
item.setImage(WebResources.IMAGE_WEBFORM_32);
|
||||
items.add(item);
|
||||
boolean skip = false;
|
||||
for (FormWrapper formWrapper : this.forms)
|
||||
{
|
||||
if (formWrapper.getTitle().equals(form.getTitle()))
|
||||
{
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!skip)
|
||||
{
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
this.formsList = items;
|
||||
return items;
|
||||
@@ -1368,9 +1380,21 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
item.setLabel(workflowDef.title);
|
||||
item.setDescription(workflowDef.description);
|
||||
item.setImage(WebResources.IMAGE_WORKFLOW_32);
|
||||
items.add(item);
|
||||
boolean skip = false;
|
||||
for (WorkflowWrapper workflowWrapper : this.workflows)
|
||||
{
|
||||
if (workflowWrapper.getTitle().equals(workflowDef.getTitle()))
|
||||
{
|
||||
skip = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!skip)
|
||||
{
|
||||
items.add(item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
|
@@ -60,6 +60,7 @@ public class UIAssociationEditor extends BaseAssociationEditor
|
||||
private static final Log logger = LogFactory.getLog(UIAssociationEditor.class);
|
||||
|
||||
public static final String MSG_WARN_CANNOT_VIEW_TARGET_DETAILS = "warn_cannot_view_target_details";
|
||||
public static final String MSG_WARN_USER_WAS_DELETED = "warn_user_was_deleted";
|
||||
|
||||
// ------------------------------------------------------------------------------
|
||||
// Component implementation
|
||||
@@ -171,42 +172,51 @@ public class UIAssociationEditor extends BaseAssociationEditor
|
||||
out.write("<tr><td>");
|
||||
AssociationRef assoc = (AssociationRef)iter.next();
|
||||
NodeRef targetNode = assoc.getTargetRef();
|
||||
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode)))
|
||||
{
|
||||
// if the node represents a person, show the username instead of the name
|
||||
out.write(Utils.encode(User.getFullNameAndUserId(nodeService, targetNode)));
|
||||
}
|
||||
else if (ContentModel.TYPE_AUTHORITY_CONTAINER.equals(nodeService.getType(targetNode)))
|
||||
{
|
||||
// if the node represents a group, show the group display name instead of the name
|
||||
String groupDisplayName = (String)nodeService.getProperty(targetNode,
|
||||
ContentModel.PROP_AUTHORITY_DISPLAY_NAME);
|
||||
if (groupDisplayName == null || groupDisplayName.length() == 0)
|
||||
|
||||
if (nodeService.exists(targetNode))
|
||||
{
|
||||
if (ContentModel.TYPE_PERSON.equals(nodeService.getType(targetNode)))
|
||||
{
|
||||
String group = (String)nodeService.getProperty(targetNode,
|
||||
ContentModel.PROP_AUTHORITY_NAME);
|
||||
groupDisplayName = group.substring(PermissionService.GROUP_PREFIX.length());
|
||||
// if the node represents a person, show the username instead of the name
|
||||
out.write(Utils.encode(User.getFullNameAndUserId(nodeService, targetNode)));
|
||||
}
|
||||
else if (ContentModel.TYPE_AUTHORITY_CONTAINER.equals(nodeService.getType(targetNode)))
|
||||
{
|
||||
// if the node represents a group, show the group display name instead of the name
|
||||
String groupDisplayName = (String)nodeService.getProperty(targetNode,
|
||||
ContentModel.PROP_AUTHORITY_DISPLAY_NAME);
|
||||
if (groupDisplayName == null || groupDisplayName.length() == 0)
|
||||
{
|
||||
String group = (String)nodeService.getProperty(targetNode,
|
||||
ContentModel.PROP_AUTHORITY_NAME);
|
||||
groupDisplayName = group.substring(PermissionService.GROUP_PREFIX.length());
|
||||
}
|
||||
|
||||
out.write(groupDisplayName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the standard cm:name property
|
||||
|
||||
// Fix AWC-1301
|
||||
String displayString = null;
|
||||
try
|
||||
{
|
||||
displayString = Repository.getDisplayPath(nodeService.getPath(targetNode)) + "/" + Repository.getNameForNode(nodeService, targetNode);
|
||||
}
|
||||
catch (AccessDeniedException ade)
|
||||
{
|
||||
displayString = Application.getMessage(context, MSG_WARN_CANNOT_VIEW_TARGET_DETAILS);
|
||||
}
|
||||
|
||||
out.write(Utils.encode(displayString));
|
||||
}
|
||||
|
||||
out.write(groupDisplayName);
|
||||
}
|
||||
else
|
||||
{
|
||||
// use the standard cm:name property
|
||||
|
||||
// Fix AWC-1301
|
||||
String displayString = null;
|
||||
try
|
||||
{
|
||||
displayString = Repository.getDisplayPath(nodeService.getPath(targetNode)) + "/" + Repository.getNameForNode(nodeService, targetNode);
|
||||
}
|
||||
catch (AccessDeniedException ade)
|
||||
{
|
||||
displayString = Application.getMessage(context, MSG_WARN_CANNOT_VIEW_TARGET_DETAILS);
|
||||
}
|
||||
|
||||
out.write(Utils.encode(displayString));
|
||||
}
|
||||
String message = Application.getMessage(context, MSG_WARN_USER_WAS_DELETED);
|
||||
out.write(message);
|
||||
}
|
||||
out.write("</td></tr>");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user