protected List <string> uiGuide_OnGuideItemCreated(UIElementInfo uiElement, List <string> defaultItem) { switch (uiElement.ElementName.ToLowerCSafe()) { case "tools.ecommerce": if (!LicenseHelper.IsFeatureAvailableInUI(FeatureEnum.Ecommerce, ModuleEntry.ECOMMERCE)) { return(null); } break; case "tools.onlinemarketing": case "onlinemarketing.contactmanagement": if (!LicenseHelper.IsFeatureAvailableInUI(FeatureEnum.ContactManagement, ModuleEntry.ONLINEMARKETING)) { return(null); } break; case "onlinemarketing.automationprocess": if (!WorkflowInfoProvider.IsMarketingAutomationAllowed()) { return(null); } break; } return(defaultItem); }
/// <summary> /// Initializes master page elements. /// </summary> private void InitializeMasterPage() { if (!CurrentUser.IsGlobalAdministrator) { PageTitle title = CurrentMaster.Title; title.TitleText = GetString("ma.automationprocess.list"); title.TitleImage = GetImageUrl("Objects/MA_AutomationProcess/object.png"); title.HelpName = "helpTopic"; title.HelpTopicName = "ma_process_list"; } if (WorkflowInfoProvider.IsMarketingAutomationAllowed()) { HeaderAction newProcess = new HeaderAction() { // New process link Text = GetString("ma.newprocess"), ImageUrl = GetImageUrl("Objects/MA_AutomationProcess/add.png"), RedirectUrl = AddSiteQuery("Process/New.aspx", null), Enabled = WorkflowStepInfoProvider.CanUserManageAutomationProcesses(CurrentUser, CurrentSiteName) }; AddHeaderAction(newProcess); } }
/// <summary> /// Initializes master page elements. /// </summary> private void InitializeMasterPage() { if (WorkflowInfoProvider.IsMarketingAutomationAllowed()) { var newProcess = new HeaderAction { // New process link Text = GetString("ma.newprocess"), RedirectUrl = "Process/New.aspx", Enabled = CanManageProcesses }; AddHeaderAction(newProcess); } }
/// <summary> /// Initialize check-box indicating whether issue is used for Marketing automation based on <see cref="IssueInfo.IssueForAutomation"/> property. /// </summary> private void InitIssueForAutomation(IssueInfo issue) { if (issue != null && !RequestHelper.IsPostBack()) { chkIssueForAutomation.Checked = issue.IssueForAutomation; } if (QueryHelper.GetBoolean("isinautomation", false) || !WorkflowInfoProvider.IsMarketingAutomationAllowed()) { headGeneral.Visible = plcEmailUsage.Visible = false; } if (issue != null && !issue.IssueIsABTest) { lblEmailUsageNote.Visible = false; } chkIssueForAutomation.Enabled = Enabled; }
private void OnTabCreated(object sender, TabCreatedEventArgs e) { if (e.Tab == null) { return; } switch (e.Tab.TabName.ToLowerCSafe()) { case "contactcustomfields": // Check if contact has any custom fields var formInfo = FormHelper.GetFormInfo("OM.Contact", false); if (!formInfo.GetFields(true, false, false).Any()) { e.Tab = null; } break; case "contactaccounts": if (!AccountHelper.AuthorizedReadAccount(Contact.ContactSiteID, false) && !ContactHelper.AuthorizedReadContact(Contact.ContactSiteID, false)) { e.Tab = null; } break; case "ips": if (!ActivitySettingsHelper.IPLoggingEnabled(SiteContext.CurrentSiteName)) { e.Tab = null; } break; case "contactprocesses": // Marketing automation if (!WorkflowInfoProvider.IsMarketingAutomationAllowed()) { e.Tab = null; } break; } }
/// <summary> /// Initializes master page elements. /// </summary> private void InitializeMasterPage() { if (!CurrentUser.CheckPrivilegeLevel(UserPrivilegeLevelEnum.Editor)) { PageTitle title = PageTitle; title.TitleText = GetString("ma.automationprocess.list"); } if (WorkflowInfoProvider.IsMarketingAutomationAllowed()) { HeaderAction newProcess = new HeaderAction { // New process link Text = GetString("ma.newprocess"), RedirectUrl = "Process/New.aspx", Enabled = WorkflowStepInfoProvider.CanUserManageAutomationProcesses(CurrentUser, CurrentSiteName) }; AddHeaderAction(newProcess); } }
protected void Page_Load(object sender, EventArgs e) { if (ProcessID <= 0) { designerElem.StopProcessing = true; return; } designerElem.WorkflowID = ProcessID; designerElem.WorkflowType = WorkflowTypeEnum.Automation; bool licenseFail = !WorkflowInfoProvider.IsMarketingAutomationAllowed(); if (licenseFail || !WorkflowStepInfoProvider.CanUserManageAutomationProcesses(CurrentUser, CurrentSiteName)) { designerElem.ReadOnly = true; MessagesPlaceHolder.OffsetY = 10; MessagesPlaceHolder.UseRelativePlaceHolder = false; ShowInformation(GetString(licenseFail ? "wf.licenselimitation" : "general.modifynotallowed")); } }
/// <summary> /// Initializes master page elements. /// </summary> private void InitializeMasterPage() { if (!CurrentUser.IsGlobalAdministrator) { PageTitle title = PageTitle; title.TitleText = GetString("ma.automationprocess.list"); } if (WorkflowInfoProvider.IsMarketingAutomationAllowed()) { HeaderAction newProcess = new HeaderAction { // New process link Text = GetString("ma.newprocess"), RedirectUrl = AddSiteQuery("Process/New.aspx", null), Enabled = WorkflowStepInfoProvider.CanUserManageAutomationProcesses(CurrentUser, CurrentSiteName) }; AddHeaderAction(newProcess); } }
protected void Page_Load(object sender, EventArgs e) { // Register script for unimenu button selection AddMenuButtonSelectScript(this, "Contacts", null, "menu"); // Get current user info CurrentUserInfo user = CMSContext.CurrentUser; // Get contact info object ContactInfo ci = (ContactInfo)EditedObject; if (ci == null) { return; } // Check permission read ContactHelper.AuthorizedReadContact(ci.ContactSiteID, true); // Check if running under site manager (and distribute "site manager" flag to other tabs) string siteManagerParam = string.Empty; if (IsSiteManager) { siteManagerParam = "&issitemanager=1"; } // Set default help topic SetHelp("onlinemarketing_contact_general", "helpTopic"); // register scripts in modal dialog if (isDialogMode) { RegisterModalPageScripts(); } string append = null; if (ci.ContactMergedWithContactID != 0) { // Append '(merged)' behind contact name in breadcrumbs append = " " + GetString("om.contact.mergedsuffix"); } else if (ci.ContactSiteID == 0) { // Append '(global)' behind contact name in breadcrumbs append = " " + GetString("om.contact.globalsuffix"); } // Modify header appearance in modal dialog (display title instead of breadcrumbs) if (QueryHelper.GetBoolean("dialogmode", false)) { CurrentMaster.Title.TitleText = GetString("om.contact.edit") + " - " + HTMLHelper.HTMLEncode(ContactInfoProvider.GetContactFullName(ci)) + append; CurrentMaster.Title.TitleImage = GetImageUrl("Objects/OM_Contact/object.png"); } else { // Get url for breadcrumbs string url = ResolveUrl("~/CMSModules/ContactManagement/Pages/Tools/Contact/List.aspx"); url = URLHelper.AddParameterToUrl(url, "siteid", SiteID.ToString()); if (IsSiteManager) { url = URLHelper.AddParameterToUrl(url, "issitemanager", "1"); } CurrentPage.InitBreadcrumbs(2); CurrentPage.SetBreadcrumb(0, GetString("om.contact.list"), url, "_parent", null); CurrentPage.SetBreadcrumb(1, ContactInfoProvider.GetContactFullName(ci) + append, null, null, null); } // Check if contact has any custom fields int i = 0; FormInfo formInfo = FormHelper.GetFormInfo(ci.Generalized.DataClass.ClassName, false); if (formInfo.GetFormElements(true, false, true).Any()) { i = 1; } int contactId = ci.ContactID; bool ipTabAvailable = ActivitySettingsHelper.IPLoggingEnabled(CMSContext.CurrentSiteName) || ContactHelper.IsSiteManager; int counter = 0; // Initialize tabs InitTabs("content"); SetTab(counter++, GetString("general.general"), "Tab_General.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_general');"); if (i > 0) { // Add tab for custom fields SetTab(counter++, GetString("general.customfields"), "Tab_CustomFields.aspx?contactid=" + ci.ContactID + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_customfields');"); } if (AccountHelper.AuthorizedReadAccount(ci.ContactSiteID, false) || ContactHelper.AuthorizedReadContact(ci.ContactSiteID, false)) { SetTab(counter++, GetString("om.account.list"), "Tab_Accounts.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_accounts');"); } SetTab(counter++, GetString("om.membership.list"), "Membership/Tab_Membership.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_membership');"); SetTab(counter++, GetString("om.activity.list"), "Tab_Activities.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_activities');"); if (ipTabAvailable) { SetTab(counter++, GetString("om.activity.iplist"), "Tab_IPs.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_ips');"); } // Show contact groups SetTab(counter++, GetString("om.contactgroup.list"), "Tab_ContactGroups.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_contactgroups');"); // Show scoring tab for site contacts if (ci.ContactSiteID > 0) { SetTab(counter++, GetString("om.score.list"), "Tab_Scoring.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_scoring');"); } // Hide last 3 tabs if the contact is merged if (ci.ContactMergedWithContactID == 0) { SetTab(counter++, GetString("om.contact.merge"), "Tab_Merge.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_merge');"); } // Data.com SetTab(counter++, "Data.com", "Tab_DataCom.aspx?contactid=" + contactId + siteManagerParam, "SetHelpTopic('helpTopic', 'onlinemarketing_contact_datacom');"); // Marketing automation if (WorkflowInfoProvider.IsMarketingAutomationAllowed()) { string stateUrl = String.Format("{0}?objectid={1}{2}", "Tab_Processes.aspx", contactId, siteManagerParam); SetTab(counter++, GetString("ma.contact.processes"), stateUrl, "SetHelpTopic('helpTopic', 'automation_state_list');"); } }