mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. More progress on Define Web Content Forms dialog
- ad-hoc workflow selection screen (as per new wireframes) - fixed selection bug on Form Details screen (and in UISelectList component) . Invite Users step of Create Web Project wizard now has email notification as optional . Fixed issue to restrict the selection of the same authority only allowed once in the Invite Users step git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4296 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -806,7 +806,6 @@ create_website_step1_title=Step One - Web Project Details
|
|||||||
create_website_step1_desc=Enter the information about the web project.
|
create_website_step1_desc=Enter the information about the web project.
|
||||||
website_dnsname=DNS name
|
website_dnsname=DNS name
|
||||||
validation_invalid_dns_name=Invalid website DNS name, a minimum of 2 alpha-numeric characters are accepted.
|
validation_invalid_dns_name=Invalid website DNS name, a minimum of 2 alpha-numeric characters are accepted.
|
||||||
website_forms=Form Templates
|
|
||||||
website_selected_forms=Selected Web Content Forms
|
website_selected_forms=Selected Web Content Forms
|
||||||
website_save_location=Save Location
|
website_save_location=Save Location
|
||||||
website_save_location_info=Use the following pattern when saving content
|
website_save_location_info=Use the following pattern when saving content
|
||||||
@@ -814,23 +813,29 @@ website_filename_pattern=Filename pattern
|
|||||||
website_workflow=Workflow
|
website_workflow=Workflow
|
||||||
website_workflow_info=Use the following workflow
|
website_workflow_info=Use the following workflow
|
||||||
website_form_summary=Using workflow ''{0}'', with filename pattern ''{1}'', {2} template(s) selected.
|
website_form_summary=Using workflow ''{0}'', with filename pattern ''{1}'', {2} template(s) selected.
|
||||||
|
website_forms=Define Forms
|
||||||
form_template_details=Form Details
|
form_template_details=Form Details
|
||||||
form_template_details_desc=Edit the details of this Form Template
|
form_template_details_desc=Edit the details of this Form Template
|
||||||
form_template_conf_workflow=Configure Workflow
|
form_template_conf_workflow=Configure Workflow
|
||||||
form_template_select_templates=Select Templates
|
form_template_select_templates=Select Templates
|
||||||
form_template_templates=Manage Presentation Templates
|
form_template_templates=Manage Presentation Templates
|
||||||
form_template_templates_desc=Setup the Presentation Templates you want to use for the Web Content Form.
|
form_template_templates_desc=Setup the Presentation Templates you want to use for the Web Content Form.
|
||||||
create_website_step2_title=Step Two - Form Templates
|
create_website_step2_title=Step Two - Define Web Content Forms
|
||||||
create_website_step2_desc=Setup the forms you want to use in this project.
|
create_website_step2_desc=Setup the forms you want to use in this project.
|
||||||
website_select_form=Select Form Templates to use
|
website_select_form=Select Form Templates to use
|
||||||
website_select_templates=Select Presentation Templates to use
|
website_select_templates=Select Presentation Templates to use
|
||||||
website_selected_templates=Selected Presentation Templates
|
website_selected_templates=Selected Presentation Templates
|
||||||
|
website_settings=Specify Settings
|
||||||
|
create_website_step3_title=Step Three - Web Project Settings
|
||||||
|
create_website_step3_desc=Specify settings for this Web Project.
|
||||||
|
website_select_workflows=Select Workflows to use
|
||||||
|
website_selected_workflows=Selected Workflows
|
||||||
website_invite=Invite Users
|
website_invite=Invite Users
|
||||||
create_website_step3_title=Step Three - Invite Users
|
create_website_step4_title=Step Four - Invite Users
|
||||||
create_website_step3_desc=Select users and their roles.
|
create_website_step4_desc=Select users and their roles.
|
||||||
website_notify=Email Users
|
website_notify=Email Users
|
||||||
create_website_step4_title=Step Four - Notify Users
|
create_website_step5_title=Step Five - Notify Users
|
||||||
create_website_step4_desc=Notify the invited users.
|
create_website_step5_desc=Notify the invited users.
|
||||||
create_website_finish_instruction=To close this wizard and create your web project space click Finish. To review or change your selections click Back.
|
create_website_finish_instruction=To close this wizard and create your web project space click Finish. To review or change your selections click Back.
|
||||||
create_website_summary_users=Users and Roles
|
create_website_summary_users=Users and Roles
|
||||||
|
|
||||||
|
@@ -21,18 +21,24 @@
|
|||||||
description-id="create_website_step2_desc"
|
description-id="create_website_step2_desc"
|
||||||
instruction-id="default_instruction" />
|
instruction-id="default_instruction" />
|
||||||
</step>
|
</step>
|
||||||
<step name="invite" title-id="website_invite" description-id="create_website_step3_desc">
|
<step name="settings" title-id="website_settings" description-id="create_website_step3_desc">
|
||||||
<page path="/jsp/wcm/create-website-wizard/invite.jsp"
|
<page path="/jsp/wcm/create-website-wizard/settings.jsp"
|
||||||
title-id="create_website_step3_title"
|
title-id="create_website_step3_title"
|
||||||
description-id="create_website_step3_desc"
|
description-id="create_website_step3_desc"
|
||||||
instruction-id="default_instruction" />
|
instruction-id="default_instruction" />
|
||||||
</step>
|
</step>
|
||||||
<step name="notify" title-id="website_notify" description-id="create_website_step4_desc">
|
<step name="invite" title-id="website_invite" description-id="create_website_step4_desc">
|
||||||
<page path="/jsp/wcm/create-website-wizard/notify.jsp"
|
<page path="/jsp/wcm/create-website-wizard/invite.jsp"
|
||||||
title-id="create_website_step4_title"
|
title-id="create_website_step4_title"
|
||||||
description-id="create_website_step4_desc"
|
description-id="create_website_step4_desc"
|
||||||
instruction-id="default_instruction" />
|
instruction-id="default_instruction" />
|
||||||
</step>
|
</step>
|
||||||
|
<step name="notify" title-id="website_notify" description-id="create_website_step5_desc">
|
||||||
|
<page path="/jsp/wcm/create-website-wizard/notify.jsp"
|
||||||
|
title-id="create_website_step5_title"
|
||||||
|
description-id="create_website_step5_desc"
|
||||||
|
instruction-id="default_instruction" />
|
||||||
|
</step>
|
||||||
<step name="summary" title-id="summary" description-id="summary_step_description">
|
<step name="summary" title-id="summary" description-id="summary_step_description">
|
||||||
<page path="/jsp/wizard/summary.jsp"
|
<page path="/jsp/wizard/summary.jsp"
|
||||||
title-id="summary"
|
title-id="summary"
|
||||||
|
@@ -64,6 +64,7 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
public class CreateWebsiteWizard extends BaseWizardBean
|
public class CreateWebsiteWizard extends BaseWizardBean
|
||||||
{
|
{
|
||||||
private static final String COMPONENT_FORMLIST = "form-list";
|
private static final String COMPONENT_FORMLIST = "form-list";
|
||||||
|
private static final String COMPONENT_WORKFLOWLIST = "workflow-list";
|
||||||
private static final String MSG_DESCRIPTION = "description";
|
private static final String MSG_DESCRIPTION = "description";
|
||||||
private static final String MSG_NAME = "name";
|
private static final String MSG_NAME = "name";
|
||||||
private static final String MSG_USERROLES = "create_website_summary_users";
|
private static final String MSG_USERROLES = "create_website_summary_users";
|
||||||
@@ -90,12 +91,21 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
/** transient list of form UIListItem objects */
|
/** transient list of form UIListItem objects */
|
||||||
private List<UIListItem> formsList = null;
|
private List<UIListItem> formsList = null;
|
||||||
|
|
||||||
/** list of forms wrapper objects */
|
/** list of form wrapper objects */
|
||||||
private List<FormWrapper> forms = null;
|
private List<FormWrapper> forms = null;
|
||||||
|
|
||||||
/** Current form action dialog context */
|
/** Current form action dialog context */
|
||||||
private FormWrapper actionForm = null;
|
private FormWrapper actionForm = null;
|
||||||
|
|
||||||
|
/** datamodel for table of selected workflows */
|
||||||
|
private DataModel workflowsDataModel = null;
|
||||||
|
|
||||||
|
/** transient list of workflow UIListItem objects */
|
||||||
|
private List<UIListItem> workflowsList = null;
|
||||||
|
|
||||||
|
/** list of workflow wrapper objects */
|
||||||
|
private List<WorkflowWrapper> workflows = null;
|
||||||
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------
|
||||||
// Wizard implementation
|
// Wizard implementation
|
||||||
@@ -113,6 +123,8 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
this.description = null;
|
this.description = null;
|
||||||
this.formsDataModel = null;
|
this.formsDataModel = null;
|
||||||
this.forms = new ArrayList<FormWrapper>(8);
|
this.forms = new ArrayList<FormWrapper>(8);
|
||||||
|
this.workflowsDataModel = null;
|
||||||
|
this.workflows = new ArrayList<WorkflowWrapper>(4);
|
||||||
|
|
||||||
// init the dependant bean we are using for the invite users pages
|
// init the dependant bean we are using for the invite users pages
|
||||||
InviteWebsiteUsersWizard wiz = getInviteUsersWizard();
|
InviteWebsiteUsersWizard wiz = getInviteUsersWizard();
|
||||||
@@ -208,6 +220,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
return outcome;
|
return outcome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Service setters
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param avmService The AVMService to set.
|
* @param avmService The AVMService to set.
|
||||||
*/
|
*/
|
||||||
@@ -224,6 +240,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
this.permissionService = permissionService;
|
this.permissionService = permissionService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Bean getters and setters
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return Returns the name.
|
* @return Returns the name.
|
||||||
*/
|
*/
|
||||||
@@ -239,26 +259,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataModel getFormsDataModel()
|
|
||||||
{
|
|
||||||
if (this.formsDataModel == null)
|
|
||||||
{
|
|
||||||
this.formsDataModel = new ListDataModel();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.formsDataModel.setWrappedData(this.forms);
|
|
||||||
|
|
||||||
return this.formsDataModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setFormsDataModel(DataModel formsDataModel)
|
|
||||||
{
|
|
||||||
this.formsDataModel = formsDataModel;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return DNS name
|
||||||
*/
|
*/
|
||||||
public String getDnsName()
|
public String getDnsName()
|
||||||
{
|
{
|
||||||
@@ -266,7 +269,7 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dnsName
|
* @param DNS name
|
||||||
*/
|
*/
|
||||||
public void setDnsName(String dnsName)
|
public void setDnsName(String dnsName)
|
||||||
{
|
{
|
||||||
@@ -340,8 +343,35 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
new String[] {this.name, this.description, buf.toString()});
|
new String[] {this.name, this.description, buf.toString()});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Define Web Content Workflows page
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return List of UI items to represent the available Forms for all websites
|
* @return JSF data model for the Form templates
|
||||||
|
*/
|
||||||
|
public DataModel getFormsDataModel()
|
||||||
|
{
|
||||||
|
if (this.formsDataModel == null)
|
||||||
|
{
|
||||||
|
this.formsDataModel = new ListDataModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.formsDataModel.setWrappedData(this.forms);
|
||||||
|
|
||||||
|
return this.formsDataModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param formsDataModel JSF data model for the Form templates
|
||||||
|
*/
|
||||||
|
public void setFormsDataModel(DataModel formsDataModel)
|
||||||
|
{
|
||||||
|
this.formsDataModel = formsDataModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return List of UI items to represent the available Workflows for all websites
|
||||||
*/
|
*/
|
||||||
public List<UIListItem> getFormsList()
|
public List<UIListItem> getFormsList()
|
||||||
{
|
{
|
||||||
@@ -410,7 +440,83 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
{
|
{
|
||||||
this.actionForm = actionForm;
|
this.actionForm = actionForm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Specify Settings (ah-hoc Workflows) page
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return JSF data model for the Workflow templates
|
||||||
|
*/
|
||||||
|
public DataModel getWorkflowsDataModel()
|
||||||
|
{
|
||||||
|
if (this.workflowsDataModel == null)
|
||||||
|
{
|
||||||
|
this.workflowsDataModel = new ListDataModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.workflowsDataModel.setWrappedData(this.workflows);
|
||||||
|
|
||||||
|
return this.workflowsDataModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param workflowsDataModel JSF data model for the Workflow templates
|
||||||
|
*/
|
||||||
|
public void setWorkflowsDataModel(DataModel workflowsDataModel)
|
||||||
|
{
|
||||||
|
this.workflowsDataModel = workflowsDataModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return List of UI items to represent the available Workflows for all websites
|
||||||
|
*/
|
||||||
|
public List<UIListItem> getWorkflowsList()
|
||||||
|
{
|
||||||
|
List<UIListItem> items = new ArrayList<UIListItem>();
|
||||||
|
|
||||||
|
// TODO: add list of workflows from config
|
||||||
|
UIListItem item = new UIListItem();
|
||||||
|
item.setValue("default");
|
||||||
|
item.setLabel("Default");
|
||||||
|
item.setDescription("Default adhoc workflow");
|
||||||
|
item.setImage(WebResources.IMAGE_WORKFLOW_32);
|
||||||
|
items.add(item);
|
||||||
|
|
||||||
|
this.workflowsList = items;
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action handler called when the Add to List button is pressed for a workflow
|
||||||
|
*/
|
||||||
|
public void addWorkflow(ActionEvent event)
|
||||||
|
{
|
||||||
|
UISelectList selectList = (UISelectList)event.getComponent().findComponent(COMPONENT_WORKFLOWLIST);
|
||||||
|
int index = selectList.getRowIndex();
|
||||||
|
if (index != -1)
|
||||||
|
{
|
||||||
|
String workflow = (String)this.workflowsList.get(index).getValue();
|
||||||
|
this.workflows.add(new WorkflowWrapper(workflow, null));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove a workflow from the selected list
|
||||||
|
*/
|
||||||
|
public void removeWorkflow(ActionEvent event)
|
||||||
|
{
|
||||||
|
WorkflowWrapper wrapper = (WorkflowWrapper)this.workflowsDataModel.getRowData();
|
||||||
|
if (wrapper != null)
|
||||||
|
{
|
||||||
|
this.workflows.remove(wrapper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Invite users page
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the InviteWebsiteUsersWizard delegate bean
|
* @return the InviteWebsiteUsersWizard delegate bean
|
||||||
*/
|
*/
|
||||||
@@ -420,6 +526,10 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
FacesContext.getCurrentInstance(), "InviteWebsiteUsersWizard");
|
FacesContext.getCurrentInstance(), "InviteWebsiteUsersWizard");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Helper methods
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Helper to get the ID of the 'Websites' system folder
|
* Helper to get the ID of the 'Websites' system folder
|
||||||
*
|
*
|
||||||
@@ -670,8 +780,11 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------------------
|
||||||
|
// Inner classes
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper class for a configurable template Form instance in the UI
|
* Wrapper class for a configurable template Form instance
|
||||||
*/
|
*/
|
||||||
public static class FormWrapper
|
public static class FormWrapper
|
||||||
{
|
{
|
||||||
@@ -779,6 +892,9 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to represent a single configured Presentation Template instance
|
||||||
|
*/
|
||||||
public static class PresentationTemplate
|
public static class PresentationTemplate
|
||||||
{
|
{
|
||||||
private RenderingEngine engine;
|
private RenderingEngine engine;
|
||||||
@@ -835,4 +951,43 @@ public class CreateWebsiteWizard extends BaseWizardBean
|
|||||||
this.filenamePattern = filenamePattern;
|
this.filenamePattern = filenamePattern;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to represent a single configured Workflow instance
|
||||||
|
*/
|
||||||
|
public static class WorkflowWrapper
|
||||||
|
{
|
||||||
|
private String name;
|
||||||
|
private String filenamePattern;
|
||||||
|
|
||||||
|
public WorkflowWrapper(String name, String filenamePattern)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
this.filenamePattern = filenamePattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the name of the workflow.
|
||||||
|
*/
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return Returns the filename pattern.
|
||||||
|
*/
|
||||||
|
public String getFilenamePattern()
|
||||||
|
{
|
||||||
|
return this.filenamePattern;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param filenamePattern The filename pattern to set.
|
||||||
|
*/
|
||||||
|
public void setFilenamePattern(String filenamePattern)
|
||||||
|
{
|
||||||
|
this.filenamePattern = filenamePattern;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -21,13 +21,9 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.faces.context.FacesContext;
|
import javax.faces.context.FacesContext;
|
||||||
import javax.faces.event.ActionEvent;
|
|
||||||
|
|
||||||
import org.alfresco.service.cmr.avm.AVMService;
|
import org.alfresco.service.cmr.avm.AVMService;
|
||||||
import org.alfresco.service.cmr.repository.NodeRef;
|
|
||||||
import org.alfresco.web.bean.TemplateSupportBean;
|
|
||||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
|
||||||
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
|
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
|
||||||
import org.alfresco.web.ui.common.component.UIListItem;
|
import org.alfresco.web.ui.common.component.UIListItem;
|
||||||
import org.alfresco.web.ui.wcm.WebResources;
|
import org.alfresco.web.ui.wcm.WebResources;
|
||||||
@@ -35,6 +31,9 @@ import org.apache.commons.logging.Log;
|
|||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Backing bean for the Website Project Form Details dialog.
|
||||||
|
* Launched from the Form Details button on the Define Web Content Forms page.
|
||||||
|
*
|
||||||
* @author Kevin Roast
|
* @author Kevin Roast
|
||||||
*/
|
*/
|
||||||
public class FormDetailsDialog extends BaseDialogBean
|
public class FormDetailsDialog extends BaseDialogBean
|
||||||
@@ -47,7 +46,7 @@ public class FormDetailsDialog extends BaseDialogBean
|
|||||||
private String title;
|
private String title;
|
||||||
private String description;
|
private String description;
|
||||||
private String filenamePattern;
|
private String filenamePattern;
|
||||||
private String[] workflowSelectedValue = {"default"};
|
private String[] workflowSelectedValue;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -59,6 +58,8 @@ public class FormDetailsDialog extends BaseDialogBean
|
|||||||
super.init(parameters);
|
super.init(parameters);
|
||||||
this.title = null;
|
this.title = null;
|
||||||
this.description = null;
|
this.description = null;
|
||||||
|
this.filenamePattern = null;
|
||||||
|
this.workflowSelectedValue = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -150,6 +151,14 @@ public class FormDetailsDialog extends BaseDialogBean
|
|||||||
*/
|
*/
|
||||||
public String[] getWorkflowSelectedValue()
|
public String[] getWorkflowSelectedValue()
|
||||||
{
|
{
|
||||||
|
if (this.workflowSelectedValue == null)
|
||||||
|
{
|
||||||
|
String workflow = getActionForm().getWorkflow();
|
||||||
|
if (workflow != null)
|
||||||
|
{
|
||||||
|
this.workflowSelectedValue = new String[] {workflow};
|
||||||
|
}
|
||||||
|
}
|
||||||
return this.workflowSelectedValue;
|
return this.workflowSelectedValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -168,6 +177,7 @@ public class FormDetailsDialog extends BaseDialogBean
|
|||||||
{
|
{
|
||||||
List<UIListItem> items = new ArrayList<UIListItem>();
|
List<UIListItem> items = new ArrayList<UIListItem>();
|
||||||
|
|
||||||
|
// TODO: add list of workflows from config
|
||||||
UIListItem item = new UIListItem();
|
UIListItem item = new UIListItem();
|
||||||
item.setValue("default");
|
item.setValue("default");
|
||||||
item.setLabel("Default");
|
item.setLabel("Default");
|
||||||
|
@@ -29,15 +29,18 @@ import org.alfresco.service.cmr.avm.AVMService;
|
|||||||
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
import org.alfresco.web.bean.dialog.BaseDialogBean;
|
||||||
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
|
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.FormWrapper;
|
||||||
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.PresentationTemplate;
|
import org.alfresco.web.bean.wcm.CreateWebsiteWizard.PresentationTemplate;
|
||||||
|
import org.alfresco.web.forms.Form;
|
||||||
|
import org.alfresco.web.forms.RenderingEngine;
|
||||||
import org.alfresco.web.ui.common.component.UIListItem;
|
import org.alfresco.web.ui.common.component.UIListItem;
|
||||||
import org.alfresco.web.ui.common.component.UISelectList;
|
import org.alfresco.web.ui.common.component.UISelectList;
|
||||||
import org.alfresco.web.ui.wcm.WebResources;
|
import org.alfresco.web.ui.wcm.WebResources;
|
||||||
import org.alfresco.web.forms.Form;
|
|
||||||
import org.alfresco.web.forms.RenderingEngine;
|
|
||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Backing bean for the Website Project Form Templates dialog.
|
||||||
|
* Launched from the Select Templates button on the Define Web Content Forms page.
|
||||||
|
*
|
||||||
* @author Kevin Roast
|
* @author Kevin Roast
|
||||||
*/
|
*/
|
||||||
public class FormTemplatesDialog extends BaseDialogBean
|
public class FormTemplatesDialog extends BaseDialogBean
|
||||||
@@ -94,6 +97,9 @@ public class FormTemplatesDialog extends BaseDialogBean
|
|||||||
return this.websiteWizard.getActionForm();
|
return this.websiteWizard.getActionForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return JSF data model wrapping the templates selected by the user
|
||||||
|
*/
|
||||||
public DataModel getTemplatesDataModel()
|
public DataModel getTemplatesDataModel()
|
||||||
{
|
{
|
||||||
if (this.templatesDataModel == null)
|
if (this.templatesDataModel == null)
|
||||||
@@ -106,6 +112,9 @@ public class FormTemplatesDialog extends BaseDialogBean
|
|||||||
return this.templatesDataModel;
|
return this.templatesDataModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param templatesDataModel JSF data model wrapping the templates
|
||||||
|
*/
|
||||||
public void setTemplatesDataModel(DataModel templatesDataModel)
|
public void setTemplatesDataModel(DataModel templatesDataModel)
|
||||||
{
|
{
|
||||||
this.templatesDataModel = templatesDataModel;
|
this.templatesDataModel = templatesDataModel;
|
||||||
|
@@ -25,6 +25,18 @@ public class InviteWebsiteUsersWizard extends InviteUsersWizard
|
|||||||
|
|
||||||
private Node website;
|
private Node website;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see org.alfresco.web.bean.wizard.InviteUsersWizard#init()
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void init()
|
||||||
|
{
|
||||||
|
super.init();
|
||||||
|
// only allow one selection per authority
|
||||||
|
allowDuplicateAuthorities = false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#getWizardDescription()
|
* @see org.alfresco.web.bean.wizard.AbstractWizardBean#getWizardDescription()
|
||||||
*/
|
*/
|
||||||
|
@@ -94,6 +94,9 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
|
|||||||
/** list of user/group role wrapper objects */
|
/** list of user/group role wrapper objects */
|
||||||
private List<UserGroupRole> userGroupRoles = null;
|
private List<UserGroupRole> userGroupRoles = null;
|
||||||
|
|
||||||
|
/** True to allow duplicate authorities (with a different role) */
|
||||||
|
protected boolean allowDuplicateAuthorities = true;
|
||||||
|
|
||||||
/** dialog state */
|
/** dialog state */
|
||||||
private String notify = NOTIFY_YES;
|
private String notify = NOTIFY_YES;
|
||||||
|
|
||||||
@@ -387,7 +390,7 @@ public abstract class InviteUsersWizard extends AbstractWizardBean
|
|||||||
{
|
{
|
||||||
UserGroupRole wrapper = this.userGroupRoles.get(n);
|
UserGroupRole wrapper = this.userGroupRoles.get(n);
|
||||||
if (authority.equals(wrapper.getAuthority()) &&
|
if (authority.equals(wrapper.getAuthority()) &&
|
||||||
role.equals(wrapper.getRole()))
|
(!this.allowDuplicateAuthorities || role.equals(wrapper.getRole())))
|
||||||
{
|
{
|
||||||
foundExisting = true;
|
foundExisting = true;
|
||||||
break;
|
break;
|
||||||
|
@@ -441,17 +441,20 @@ public class UISelectList extends UIInput implements NamingContainer
|
|||||||
*/
|
*/
|
||||||
public void setRowIndex(int rowIndex)
|
public void setRowIndex(int rowIndex)
|
||||||
{
|
{
|
||||||
this.rowIndex = rowIndex;
|
if (isActiveSelect())
|
||||||
for (Iterator itr=getChildren().iterator(); itr.hasNext(); /**/)
|
|
||||||
{
|
{
|
||||||
UIComponent child = (UIComponent)itr.next();
|
this.rowIndex = rowIndex;
|
||||||
if (child instanceof UIListItem == false && child instanceof UIListItems == false)
|
for (Iterator itr=getChildren().iterator(); itr.hasNext(); /**/)
|
||||||
{
|
{
|
||||||
// forces a reset of the clientId for the component
|
UIComponent child = (UIComponent)itr.next();
|
||||||
// This is then regenerated - relative to this naming container which itself uses the
|
if (child instanceof UIListItem == false && child instanceof UIListItems == false)
|
||||||
// current row index as part of the Id. This is what facilities the correct component
|
{
|
||||||
// rendering submit script and then identified during the decode() phase.
|
// forces a reset of the clientId for the component
|
||||||
child.setId(child.getId());
|
// This is then regenerated - relative to this naming container which itself uses the
|
||||||
|
// current row index as part of the Id. This is what facilities the correct component
|
||||||
|
// rendering submit script and then identified during the decode() phase.
|
||||||
|
child.setId(child.getId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
rendered="#{DialogManager.bean.templatesDataModel.rowCount != 0}">
|
rendered="#{DialogManager.bean.templatesDataModel.rowCount != 0}">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="#{msg.title}" />
|
<h:outputText value="#{msg.name}" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
<h:outputText value="#{row.title}" />
|
<h:outputText value="#{row.title}" />
|
||||||
</h:column>
|
</h:column>
|
||||||
|
@@ -43,7 +43,7 @@
|
|||||||
rendered="#{WizardManager.bean.formsDataModel.rowCount != 0}">
|
rendered="#{WizardManager.bean.formsDataModel.rowCount != 0}">
|
||||||
<h:column>
|
<h:column>
|
||||||
<f:facet name="header">
|
<f:facet name="header">
|
||||||
<h:outputText value="#{msg.title}" />
|
<h:outputText value="#{msg.name}" />
|
||||||
</f:facet>
|
</f:facet>
|
||||||
<h:outputText value="#{row.title}" />
|
<h:outputText value="#{row.title}" />
|
||||||
</h:column>
|
</h:column>
|
||||||
|
@@ -52,7 +52,15 @@
|
|||||||
</script>
|
</script>
|
||||||
</f:verbatim>
|
</f:verbatim>
|
||||||
|
|
||||||
<h:outputText styleClass="mainSubTitle" value="#{msg.email_message}" />
|
<h:panelGrid style="padding-bottom:12px" columns="1" cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||||
|
<h:outputText value="#{msg.send_email}" />
|
||||||
|
<h:selectOneRadio value="#{InviteWebsiteUsersWizard.notify}">
|
||||||
|
<f:selectItem itemValue="yes" itemLabel="#{msg.yes}" />
|
||||||
|
<f:selectItem itemValue="no" itemLabel="#{msg.no}" />
|
||||||
|
</h:selectOneRadio>
|
||||||
|
</h:panelGrid>
|
||||||
|
|
||||||
|
<h:outputText value="#{msg.email_message}" styleClass="mainSubTitle" />
|
||||||
<h:panelGrid columns="2" cellpadding="2" cellspacing="2" border="0" width="100%">
|
<h:panelGrid columns="2" cellpadding="2" cellspacing="2" border="0" width="100%">
|
||||||
<h:outputText value="#{msg.subject}:" />
|
<h:outputText value="#{msg.subject}:" />
|
||||||
<h:panelGroup>
|
<h:panelGroup>
|
||||||
|
70
source/web/jsp/wcm/create-website-wizard/settings.jsp
Normal file
70
source/web/jsp/wcm/create-website-wizard/settings.jsp
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<%--
|
||||||
|
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="/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" %>
|
||||||
|
|
||||||
|
<h:panelGrid columns="1" cellpadding="2" cellpadding="2" width="100%">
|
||||||
|
<%-- Workflow selection list - scrollable DIV area --%>
|
||||||
|
<h:outputText styleClass="mainSubText" value="#{msg.website_select_workflows}:" />
|
||||||
|
<h:panelGroup>
|
||||||
|
<f:verbatim><div style="height:108px;*height:112px;width:300px;overflow:auto" class='selectListTable'></f:verbatim>
|
||||||
|
<a:selectList id="workflow-list" activeSelect="true" style="width:276px" itemStyleClass="selectListItem">
|
||||||
|
<a:listItems value="#{WizardManager.bean.workflowsList}" />
|
||||||
|
<h:commandButton value="#{msg.add_to_list_button}" styleClass="dialogControls" actionListener="#{WizardManager.bean.addWorkflow}" />
|
||||||
|
</a:selectList>
|
||||||
|
<f:verbatim></div></f:verbatim>
|
||||||
|
</h:panelGroup>
|
||||||
|
|
||||||
|
<%-- Selected Workflow table, with configuration buttons and info text --%>
|
||||||
|
<h:outputText styleClass="mainSubText" style="padding-top:8px" value="#{msg.website_selected_workflows}:" />
|
||||||
|
<h:dataTable value="#{WizardManager.bean.workflowsDataModel}" var="row"
|
||||||
|
rowClasses="selectedItemsRow,selectedItemsRowAlt"
|
||||||
|
styleClass="selectedItems" headerClass="selectedItemsHeader"
|
||||||
|
cellspacing="0" cellpadding="4"
|
||||||
|
rendered="#{WizardManager.bean.workflowsDataModel.rowCount != 0}">
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputText value="#{msg.name}" />
|
||||||
|
</f:facet>
|
||||||
|
<h:outputText value="#{row.name}" />
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<f:facet name="header">
|
||||||
|
<h:outputText value="#{msg.configure}" />
|
||||||
|
</f:facet>
|
||||||
|
<h:outputText value="#{msg.website_filename_pattern}:" style="padding-right:4px" />
|
||||||
|
<h:inputText value="#{row.filenamePattern}" />
|
||||||
|
<h:commandButton value="#{msg.form_template_conf_workflow}" style="margin-left:4px" styleClass="dialogControls" />
|
||||||
|
</h:column>
|
||||||
|
<h:column>
|
||||||
|
<a:actionLink actionListener="#{WizardManager.bean.removeWorkflow}" image="/images/icons/delete.gif"
|
||||||
|
value="#{msg.remove}" showLink="false" style="padding-left:6px" />
|
||||||
|
</h:column>
|
||||||
|
</h:dataTable>
|
||||||
|
|
||||||
|
<a:panel id="no-items" rendered="#{WizardManager.bean.workflowsDataModel.rowCount == 0}">
|
||||||
|
<h:panelGrid columns="1" cellpadding="2" styleClass="selectedItems" rowClasses="selectedItemsHeader,selectedItemsRow">
|
||||||
|
<h:outputText id="no-items-name" value="#{msg.name}" />
|
||||||
|
<h:outputText styleClass="selectedItemsRow" id="no-items-msg" value="#{msg.no_selected_items}" />
|
||||||
|
</h:panelGrid>
|
||||||
|
</a:panel>
|
||||||
|
</h:panelGrid>
|
Reference in New Issue
Block a user