mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. WCM UI enhancements
- sizing of selected item lists - No modified items/no web forms messages added to sandbox views - Sizing of output path text boxes - Description textboxes in web project wizard now textareas - Selected Web Forms list in Create Web Project wizard now looks like lists in Create Form Wizard - Improved list layout in Configure Templates dialog - Mimetype of template shown next to name in list in Configure Templates dialog git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4793 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,7 +17,6 @@
|
||||
package org.alfresco.web.bean.wcm;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
@@ -67,7 +66,6 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
private static final String MSG_DESCRIPTION = "description";
|
||||
private static final String MSG_NAME = "name";
|
||||
private static final String MSG_USERROLES = "create_website_summary_users";
|
||||
private static final String MSG_FORM_SUMMARY = "website_form_summary";
|
||||
private static final String MSG_NONE = "workflow_not_set";
|
||||
|
||||
private static final String COMPONENT_FORMLIST = "form-list";
|
||||
@@ -844,6 +842,11 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
return this.templates;
|
||||
}
|
||||
|
||||
public int getTemplatesSize()
|
||||
{
|
||||
return getTemplates() != null ? getTemplates().size() : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param template to add to the list of PresentationTemplate
|
||||
*/
|
||||
@@ -863,18 +866,6 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
||||
{
|
||||
this.templates = templates;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Human readable summary of the configuration for this form
|
||||
*/
|
||||
public String getDetails()
|
||||
{
|
||||
String none = '<' + Application.getMessage(FacesContext.getCurrentInstance(), MSG_NONE) + '>';
|
||||
return MessageFormat.format(Application.getMessage(FacesContext.getCurrentInstance(), MSG_FORM_SUMMARY),
|
||||
getWorkflow() != null ? this.workflow.title : none,
|
||||
getOutputPathPattern() != null ? this.outputPathPattern : none,
|
||||
getTemplates() != null ? this.templates.size() : 0);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -133,7 +133,7 @@ public class FormTemplatesDialog extends BaseDialogBean
|
||||
PresentationTemplate wrapper = new PresentationTemplate(engine);
|
||||
UIListItem item = new UIListItem();
|
||||
item.setValue(wrapper);
|
||||
item.setLabel(wrapper.getTitle());
|
||||
item.setLabel(wrapper.getTitle() + " (" + engine.getMimetypeForRendition() + ")");
|
||||
item.setDescription(wrapper.getDescription());
|
||||
item.setImage(WebResources.IMAGE_TEMPLATE_32);
|
||||
items.add(item);
|
||||
|
@@ -108,6 +108,8 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
private static final String MSG_ACTIONS = "actions";
|
||||
private static final String MSG_DELETED_ITEM = "avm_node_deleted";
|
||||
private static final String MSG_SELECTED = "selected";
|
||||
private static final String MSG_NO_MODIFIED_ITEMS = "sandbox_no_modified_items";
|
||||
private static final String MSG_NO_WEB_FORMS = "sandbox_no_web_forms";
|
||||
|
||||
/** Content Manager role name */
|
||||
private static final String ROLE_CONTENT_MANAGER = "ContentManager";
|
||||
@@ -491,25 +493,25 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
String stagingStore = AVMConstants.buildStagingStoreName(storeRoot);
|
||||
String stagingStorePath = AVMConstants.buildStoreWebappPath(stagingStore, getWebapp());
|
||||
|
||||
// info we need to calculate preview paths for assets
|
||||
String dns = AVMConstants.lookupStoreDNS(userStore);
|
||||
int rootPathIndex = AVMConstants.buildSandboxRootPath(userStore).length();
|
||||
ClientConfigElement config = Application.getClientConfig(fc);
|
||||
|
||||
// get the UIActions component responsible for rendering context related user actions
|
||||
// TODO: we may need a component per user instance? (or use evaluators for roles...)
|
||||
UIActions uiFileActions = aquireUIActions(ACTIONS_FILE, userStore);
|
||||
UIActions uiFolderActions = aquireUIActions(ACTIONS_FOLDER, userStore);
|
||||
UIActions uiDeletedActions = aquireUIActions(ACTIONS_DELETED, userStore);
|
||||
|
||||
String id = getClientId(fc);
|
||||
|
||||
// use the sync service to get the list of diffs between the stores
|
||||
NameMatcher matcher = (NameMatcher)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean(
|
||||
"globalPathExcluder");
|
||||
List<AVMDifference> diffs = avmSyncService.compare(-1, userStorePath, -1, stagingStorePath, matcher);
|
||||
if (diffs.size() != 0)
|
||||
{
|
||||
// info we need to calculate preview paths for assets
|
||||
String dns = AVMConstants.lookupStoreDNS(userStore);
|
||||
int rootPathIndex = AVMConstants.buildSandboxRootPath(userStore).length();
|
||||
ClientConfigElement config = Application.getClientConfig(fc);
|
||||
|
||||
// get the UIActions component responsible for rendering context related user actions
|
||||
// TODO: we may need a component per user instance? (or use evaluators for roles...)
|
||||
UIActions uiFileActions = aquireUIActions(ACTIONS_FILE, userStore);
|
||||
UIActions uiFolderActions = aquireUIActions(ACTIONS_FOLDER, userStore);
|
||||
UIActions uiDeletedActions = aquireUIActions(ACTIONS_DELETED, userStore);
|
||||
|
||||
String id = getClientId(fc);
|
||||
|
||||
// store lookup of username to list of modified nodes
|
||||
List<AVMNodeDescriptor> nodes = new ArrayList<AVMNodeDescriptor>(diffs.size());
|
||||
this.userNodes.put(username, nodes);
|
||||
@@ -692,7 +694,10 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: output "no modified files found" message
|
||||
// output "no modified files found" message
|
||||
out.write("<div style='padding-left:16px'><i>");
|
||||
out.write(bundle.getString(MSG_NO_MODIFIED_ITEMS));
|
||||
out.write("</i></div>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -718,10 +723,10 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
{
|
||||
this.forms = new WebProject(websiteRef).getForms();
|
||||
}
|
||||
|
||||
ResourceBundle bundle = Application.getBundle(fc);
|
||||
if (this.forms.size() != 0)
|
||||
{
|
||||
ResourceBundle bundle = Application.getBundle(fc);
|
||||
|
||||
// output the table of available forms
|
||||
// TODO: apply tag style - removed hardcoded
|
||||
out.write("<table class='modifiedItemsList' cellspacing='2' cellpadding='1' border='0' width='100%'>");
|
||||
@@ -773,6 +778,13 @@ public class UIUserSandboxes extends SelfRenderingComponent
|
||||
|
||||
out.write("</table>");
|
||||
}
|
||||
else
|
||||
{
|
||||
// output "no web forms" message
|
||||
out.write("<div style='padding-left:16px'><i>");
|
||||
out.write(bundle.getString(MSG_NO_WEB_FORMS));
|
||||
out.write("</i></div>");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user