public ActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext) { if (action == null) { return; } _buttonLabel = Localization.CreateLazyLocalizedString(action.ButtonLabel, languageCode); _buttonTooltip = Localization.CreateLazyLocalizedString(action.ButtonTooltip, languageCode); _type = new Lazy <string>(() => action.GetType().Name, LazyThreadSafetyMode.None); }
public CreateActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var createAction = action as CreateAction; if (createAction == null) { return; } EntityFormId = createAction.EntityFormId; }
public WorkflowActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var workflowAction = action as WorkflowAction; if (workflowAction == null) { return; } WorkflowId = workflowAction.WorkflowId; }
public AssociateActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var associateAction = action as AssociateAction; if (associateAction == null) { return; } ViewId = associateAction.ViewId; }
public EditActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var editAction = action as EditAction; if (editAction == null) { return; } RecordIdQueryStringParameterName = editAction.RecordIdQueryStringParameterName; EntityFormId = editAction.EntityFormId; }
public DownloadActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var downloadAction = action as DownloadAction; if (downloadAction == null) { return; } _currentPageLabel = Localization.CreateLazyLocalizedString(downloadAction.CurrentPageLabel, languageCode); _allPagesLabel = Localization.CreateLazyLocalizedString(downloadAction.AllPagesLabel, languageCode); }
public SearchActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var searchAction = action as SearchAction; if (searchAction == null) { return; } _placeholderText = new Lazy <string>(() => searchAction.PlaceholderText, LazyThreadSafetyMode.None); _tooltipText = new Lazy <string>(() => searchAction.TooltipText, LazyThreadSafetyMode.None); }
public DeleteActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var deleteAction = action as DeleteAction; if (deleteAction == null) { return; } RedirectWebpageId = deleteAction.RedirectWebpageId; RedirectUrl = deleteAction.RedirectUrl; _confirmation = Localization.CreateLazyLocalizedString(deleteAction.Confirmation, languageCode); }
private void SetSpecialMessageActions(IPortalContext portalContext, FormActionMetadata formActionMetadata, int languageCode, Action action, List <ViewActionLink> topItemActionLinks, List <ViewActionLink> bottomItemActionLinks, string portalName = null) { if (action is CloseIncidentAction) { var closeIncidentAction = (CloseIncidentAction)action; if (!closeIncidentAction.IsConfigurationValid()) { return; } var closeIncidentActionLink = new CloseIncidentActionLink(portalContext, formActionMetadata, languageCode, closeIncidentAction, true, null, portalName); CloseIncidentActionLink = closeIncidentActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, closeIncidentActionLink); } if (action is ResolveCaseAction) { var resolveCaseAction = (ResolveCaseAction)action; if (!resolveCaseAction.IsConfigurationValid()) { return; } var resolveCaseActionLink = new ResolveCaseActionLink(portalContext, formActionMetadata, languageCode, resolveCaseAction, true, null, portalName); ResolveCaseActionLink = resolveCaseActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, resolveCaseActionLink); } if (action is ReopenCaseAction) { var reopenCaseAction = (ReopenCaseAction)action; if (!reopenCaseAction.IsConfigurationValid()) { return; } var reopenCaseActionLink = new ReopenCaseActionLink(portalContext, formActionMetadata, languageCode, reopenCaseAction, true, null, portalName); ReopenCaseActionLink = reopenCaseActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, reopenCaseActionLink); } if (action is CancelCaseAction) { var cancelCaseAction = (CancelCaseAction)action; if (!cancelCaseAction.IsConfigurationValid()) { return; } var cancelCaseActionLink = new CancelCaseActionLink(portalContext, formActionMetadata, languageCode, cancelCaseAction, true, null, portalName); CancelCaseActionLink = cancelCaseActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, cancelCaseActionLink); } if (action is QualifyLeadAction) { var qualifyLeadAction = (QualifyLeadAction)action; if (!qualifyLeadAction.IsConfigurationValid()) { return; } var qualifyLeadActionLink = new QualifyLeadActionLink(portalContext, formActionMetadata, languageCode, qualifyLeadAction, true, null, portalName); QualifyLeadActionLink = qualifyLeadActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, qualifyLeadActionLink); } if (action is ConvertQuoteToOrderAction) { var convertQuoteToOrderAction = (ConvertQuoteToOrderAction)action; if (!convertQuoteToOrderAction.IsConfigurationValid()) { return; } var convertQuoteToOrderActionLink = new ConvertQuoteToOrderActionLink(portalContext, formActionMetadata, languageCode, (ConvertQuoteToOrderAction)action); ConvertQuoteToOrderActionLink = convertQuoteToOrderActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, convertQuoteToOrderActionLink); } if (action is ConvertOrderToInvoiceAction) { var convertOrderToInvoiceAction = (ConvertOrderToInvoiceAction)action; if (!convertOrderToInvoiceAction.IsConfigurationValid()) { return; } var convertOrderToInvoiceActionLink = new ConvertOrderToInvoiceActionLink(portalContext, formActionMetadata, languageCode, convertOrderToInvoiceAction, true, null, portalName); ConvertOrderToInvoiceActionLink = convertOrderToInvoiceActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, convertOrderToInvoiceActionLink); } if (action is DeactivateAction) { var deactivateAction = (DeactivateAction)action; if (!deactivateAction.IsConfigurationValid()) { return; } var deactivateActionLink = new DeactivateActionLink(portalContext, formActionMetadata, languageCode, deactivateAction, true, null, portalName); DeactivateActionLink = deactivateActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, deactivateActionLink); } if (action is ActivateAction) { var activateAction = (ActivateAction)action; if (!activateAction.IsConfigurationValid()) { return; } var activateActionLink = new ActivateActionLink(portalContext, formActionMetadata, languageCode, activateAction, true, null, portalName); ActivateActionLink = activateActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, activateActionLink); } if (action is ActivateQuoteAction) { var activateQuoteAction = (ActivateQuoteAction)action; if (!activateQuoteAction.IsConfigurationValid()) { return; } var activateQuoteActionLink = new ActivateQuoteActionLink(portalContext, formActionMetadata, languageCode, activateQuoteAction, true, null, portalName); ActivateQuoteActionLink = activateQuoteActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, activateQuoteActionLink); } if (action is SetOpportunityOnHoldAction) { var setOpportunityOnHoldAction = (SetOpportunityOnHoldAction)action; if (!setOpportunityOnHoldAction.IsConfigurationValid()) { return; } var setOpportunityOnHoldActionLink = new SetOpportunityOnHoldActionLink(portalContext, formActionMetadata, languageCode, setOpportunityOnHoldAction, true, null, portalName); SetOpportunityOnHoldActionLink = setOpportunityOnHoldActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, setOpportunityOnHoldActionLink); } if (action is ReopenOpportunityAction) { var reopenOpportunityAction = (ReopenOpportunityAction)action; if (!reopenOpportunityAction.IsConfigurationValid()) { return; } var reopenOpportunityActionLink = new ReopenOpportunityActionLink(portalContext, formActionMetadata, languageCode, reopenOpportunityAction, true, null, portalName); ReopenOpportunityActionLink = reopenOpportunityActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, reopenOpportunityActionLink); } if (action is CalculateOpportunityAction) { var calculateOpportunityAction = (CalculateOpportunityAction)action; if (!calculateOpportunityAction.IsConfigurationValid()) { return; } var calculateOpportunityActionLink = new CalculateOpportunityActionLink(portalContext, formActionMetadata, languageCode, calculateOpportunityAction, true, null, portalName); CalculateOpportunityActionLink = calculateOpportunityActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, calculateOpportunityActionLink); } if (action is WinOpportunityAction) { var winOpportunityAction = (WinOpportunityAction)action; if (!winOpportunityAction.IsConfigurationValid()) { return; } var winOpportunityActionLink = new WinOpportunityActionLink(portalContext, formActionMetadata, languageCode, winOpportunityAction, true, null, portalName); WinOpportunityActionLink = winOpportunityActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, winOpportunityActionLink); } if (action is LoseOpportunityAction) { var loseOpportunityAction = (LoseOpportunityAction)action; if (!loseOpportunityAction.IsConfigurationValid()) { return; } var loseOpportunityActionLink = new LoseOpportunityActionLink(portalContext, formActionMetadata, languageCode, loseOpportunityAction, true, null, portalName); LoseOpportunityActionLink = loseOpportunityActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, loseOpportunityActionLink); } if (action is GenerateQuoteFromOpportunityAction) { var generateQuoteFromOpportunityAction = (GenerateQuoteFromOpportunityAction)action; if (!generateQuoteFromOpportunityAction.IsConfigurationValid()) { return; } var generateQuoteFromOpportunityActionLink = new GenerateQuoteFromOpportunityActionLink(portalContext, formActionMetadata, languageCode, generateQuoteFromOpportunityAction, true, null, portalName); GenerateQuoteFromOpportunityActionLink = generateQuoteFromOpportunityActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, generateQuoteFromOpportunityActionLink); } if (action is UpdatePipelinePhaseAction) { var updatePipelinePhaseAction = (UpdatePipelinePhaseAction)action; if (!updatePipelinePhaseAction.IsConfigurationValid()) { return; } var updatePipelinePhaseActionLink = new UpdatePipelinePhaseActionLink(portalContext, formActionMetadata, languageCode, updatePipelinePhaseAction, true, null, portalName); UpdatePipelinePhaseActionLink = updatePipelinePhaseActionLink; AddActionLinkToSet(topItemActionLinks, bottomItemActionLinks, updatePipelinePhaseActionLink); } }
public DisassociateActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { }
public CreateRelatedRecordActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) : base(portalLiquidContext, action, languageCode) { var createAction = action as CreateRelatedRecordAction; if (createAction == null) { return; } EntityName = createAction.EntityName; Relationship = createAction.Relationship; ParentRecord = createAction.ParentRecord; RecordIdQueryStringParameterName = createAction.RecordIdQueryStringParameterName; }
private static ActionDrop CreateActionDrop(IPortalLiquidContext portalLiquidContext, Action action, int languageCode) { if (action is CreateRelatedRecordAction) { return(new CreateRelatedRecordActionDrop(portalLiquidContext, action, languageCode)); } if (action is DetailsAction) { return(new DetailsActionDrop(portalLiquidContext, action, languageCode)); } if (action is EditAction) { return(new EditActionDrop(portalLiquidContext, action, languageCode)); } if (action is CreateAction) { return(new CreateActionDrop(portalLiquidContext, action, languageCode)); } if (action is WorkflowAction) { return(new WorkflowActionDrop(portalLiquidContext, action, languageCode)); } if (action is DeleteAction) { return(new DeleteActionDrop(portalLiquidContext, action, languageCode)); } if (action is AssociateAction) { return(new AssociateActionDrop(portalLiquidContext, action, languageCode)); } if (action is DisassociateAction) { return(new DisassociateActionDrop(portalLiquidContext, action, languageCode)); } if (action is SearchAction) { return(new SearchActionDrop(portalLiquidContext, action, languageCode)); } if (action is DownloadAction) { return(new DownloadActionDrop(portalLiquidContext, action, languageCode)); } return(new ActionDrop(portalLiquidContext, action, languageCode)); }