Beispiel #1
0
    protected override void OnPreRender(EventArgs e)
    {
        if (CurrentWorkflow != null)
        {
            // Only basic workflow without auto-publish can be converted
            if (WorkflowInfoProvider.IsAdvancedWorkflowAllowed() && CurrentWorkflow.IsBasic)
            {
                HeaderAction convert = new HeaderAction()
                {
                    Text          = GetString("workflow.convert"),
                    ImageUrl      = GetImageUrl("Design/Controls/UniGrid/Actions/convert.png"),
                    OnClientClick = "return confirm(" + ScriptHelper.GetString(GetString("workflow.confirmconversion"), true) + ");",
                    EventName     = CONVERT_ACTION
                };

                if (editElem.CurrentWorkflow.WorkflowAutoPublishChanges)
                {
                    convert.ImageUrl = GetImageUrl("Design/Controls/UniGrid/Actions/convertdisabled.png");
                    convert.Tooltip  = GetString("workflow.conversionerror.versioningwithoutworkflow");
                    convert.Enabled  = false;
                }
                CurrentMaster.HeaderActions.AddAction(convert);
            }
        }
        base.OnPreRender(e);
    }
Beispiel #2
0
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);

        if (WorkflowInfoProvider.IsAdvancedWorkflowAllowed())
        {
            SetTab(1, GetString("workflow.action.title"), "Pages/WorkflowAction/List.aspx", "SetHelpTopic('helpTopic', 'workflow_action_list');");
            SetTab(2, GetString("macros.macrorules"), "Pages/MacroRule/List.aspx?displaytitle=false", "SetHelpTopic('helpTopic', 'macros_macrorule_list');");
        }
    }
    /// <summary>
    /// OnInit event handler
    /// </summary>
    public override void OnInit()
    {
        Control.OnExternalDataBound += OnExternalDataBound;
        Control.OnAction            += OnAction;

        if (WorkflowInfoProvider.IsAdvancedWorkflowAllowed())
        {
            Control.AddHeaderAction(new HeaderAction
            {
                // New advanced workflow link
                Text        = Control.GetString("Development-Workflow_List.NewAdvancedWorkflow"),
                RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "NewWorkflow", false), "type=1"),
                Index       = 1
            });
        }
    }
    /// <summary>
    ///  Initializes master page elements.
    /// </summary>
    private void InitializeMasterPage()
    {
        HeaderAction basic = new HeaderAction()
        {
            Text        = GetString("Development-Workflow_List.NewWorkflow"),
            ImageUrl    = GetImageUrl("Objects/CMS_Workflow/add.png"),
            RedirectUrl = "~/CMSModules/Workflows/Workflow_New.aspx"
        };

        AddHeaderAction(basic);

        if (WorkflowInfoProvider.IsAdvancedWorkflowAllowed())
        {
            HeaderAction advanced = new HeaderAction()
            {
                // Advanced workflow link
                Text        = GetString("Development-Workflow_List.NewAdvancedWorkflow"),
                ImageUrl    = GetImageUrl("Objects/CMS_Workflow/add_advanced.png"),
                RedirectUrl = "~/CMSModules/Workflows/Workflow_New.aspx?type=1"
            };

            AddHeaderAction(advanced);
        }
    }