コード例 #1
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (plcSelector.Visible)
        {
            // Get product name and price
            SKUInfo skuObj  = SKUInfoProvider.GetSKUInfo(SKUID);
            string  skuName = "";

            if (skuObj != null)
            {
                skuName = ResHelper.LocalizeString(skuObj.SKUName);
            }

            // Set SKU name label
            headSKUName.Text = HTMLHelper.HTMLEncode(skuName);

            // Set breadcrumb
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text        = GetString("Order_Edit_AddItems.Products"),
                RedirectUrl = ResolveUrl("~/CMSModules/Ecommerce/Pages/Tools/Orders/Order_Edit_AddItems.aspx?cart=" + HTMLHelper.HTMLEncode(QueryHelper.GetString("cart", ""))),
            });

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text = skuName
            });
        }
    }
コード例 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Ensure modal dialog opening
        ScriptHelper.RegisterDialogScript(this);

        int reportID = QueryHelper.GetInteger("reportid", 0);

        ucAbuseEdit.ReportID = reportID;

        AbuseReportInfo ar = AbuseReportInfoProvider.GetAbuseReportInfo(reportID);

        // Set edited object
        EditedObject = ar;

        if (ar != null)
        {
            // Set breadcrumb
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text = ar.ReportTitle
            });

            // Ensure that object belongs to current site or user is global admin
            if (!MembershipContext.AuthenticatedUser.CheckPrivilegeLevel(UserPrivilegeLevelEnum.Admin) && (ar.ReportSiteID != SiteContext.CurrentSiteID))
            {
                RedirectToInformation(GetString("general.notassigned"));
            }
        }

        ucAbuseEdit.OnCheckPermissions += ucAbuseEdit_OnCheckPermissions;
    }
コード例 #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PageTitle.TitleText = GetString("resource.ui.title");

        if (ParentID > 0)
        {
            int moduleId = QueryHelper.GetInteger("moduleid", 0);
            editElem.ResourceID = moduleId;
            editElem.ParentID   = ParentID;

            // Init breadcrumbs
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text        = GetString("resource.ui.element"),
                RedirectUrl = GetEditRedirectURL(moduleId)
            });

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text = GetString("resource.ui.newelement"),
            });
        }
        else
        {
            editElem.Visible = false;
            lblInfo.Visible  = true;
            lblInfo.Text     = GetString("resource.ui.rootelement");
        }
    }
コード例 #4
0
    /// <summary>
    /// Creates breadcrumbs.
    /// </summary>
    private void CreateBreadcrumbs()
    {
        if (IsProductOption)
        {
            OptionCategoryInfo categoryInfo = OptionCategoryInfoProvider.GetOptionCategoryInfo(OptionCategoryID);
            if (categoryInfo != null)
            {
                string productListText = GetString("Prodect_Edit_Header.ProductOptionsLink");
                string productListUrl  = "~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_Edit_Options.aspx";
                productListUrl = URLHelper.AddParameterToUrl(productListUrl, "categoryId", OptionCategoryID.ToString());
                productListUrl = URLHelper.AddParameterToUrl(productListUrl, "siteId", SiteID.ToString());
                productListUrl = URLHelper.AddParameterToUrl(productListUrl, "productId", ParentProductID.ToString());
                productListUrl = URLHelper.AddParameterToUrl(productListUrl, "dialog", QueryHelper.GetString("dialog", "0"));

                // Set breadcrumb
                PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
                {
                    Text        = productListText,
                    Target      = (categoryInfo.CategoryType == OptionCategoryTypeEnum.Products) ? "_parent" : null,
                    RedirectUrl = ResolveUrl(productListUrl)
                });

                PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
                {
                    Text = FormatBreadcrumbObjectName(SKU.SKUName, SiteID)
                });
            }
        }
        else
        {
            // Ensure correct suffix
            UIHelper.SetBreadcrumbsSuffix(GetString("objecttype.com_sku"));
        }
    }
コード例 #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        PageTitle.TitleText = GetString("resource.ui.title");
        int parentId = QueryHelper.GetInteger("parentId", 0);
        int moduleId = QueryHelper.GetInteger("moduleid", 0);

        if (parentId > 0)
        {
            editElem.ParentID   = parentId;
            editElem.ResourceID = moduleId;

            // Init breadcrumbs
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text        = GetString("resource.ui.element"),
                RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Modules.UserInterface.Edit", false, parentId), "elementId=" + parentId + "&moduleid=" + moduleId + "&objectParentId=" + moduleId)
            });

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text = GetString("resource.ui.newelement"),
            });
        }
        else
        {
            editElem.Visible = false;
            lblInfo.Visible  = true;
            lblInfo.Text     = GetString("resource.ui.rootelement");
        }
    }
コード例 #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int siteId    = QueryHelper.GetInteger("siteid", 0);
        int contactId = QueryHelper.GetInteger("contactid", 0);

        // Init breadcrumbs
        var listBreadCrumb = new BreadcrumbItem
        {
            Text        = GetString("om.activity.list"),
            RedirectUrl = "~/CMSModules/Activities/Pages/Tools/Activities/Activity/List.aspx"
        };
        var newItemBreadCrumb = new BreadcrumbItem
        {
            Text = GetString("om.activity.newcustom")
        };

        if (contactId > 0)
        {
            // New custom activity page was opened from pages of edited contact
            listBreadCrumb.RedirectUrl = "~/CMSModules/ContactManagement/Pages/Tools/Contact/Tab_Activities.aspx?contactId=" + contactId;
        }

        listBreadCrumb.RedirectUrl = AddSiteQuery(listBreadCrumb.RedirectUrl, siteId);
        PageBreadcrumbs.AddBreadcrumb(listBreadCrumb);
        PageBreadcrumbs.AddBreadcrumb(newItemBreadCrumb);
    }
コード例 #7
0
    /// <summary>
    /// Creates breadcrumbs
    /// </summary>
    private void CreateBreadcrums()
    {
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("srch.index.itemlist"),
            RedirectUrl = "~/CMSModules/SmartSearch/SearchIndex_Content_List.aspx?indexid=" + indexId,
        });

        if (itemGuid != Guid.Empty)
        {
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text = GetString("srch.index.currentitem"),
            });
        }
        else
        {
            // Allowed or Excluded item
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text = itemType == SearchIndexSettingsInfo.TYPE_ALLOWED ? GetString("srch.index.newtitemallowed") : GetString("srch.index.newtitemexcluded"),
            });
        }

        // Do not provide suffix
        UIHelper.SetBreadcrumbsSuffix("");
    }
コード例 #8
0
    /// <summary>
    ///  Initializes breadcrumbs items.
    /// </summary>
    private void InitializeBreadcrumbs()
    {
        if (ShowBreadcrumbs)
        {
            ucBreadcrumbs.HideBreadcrumbs = false;
            ucBreadcrumbs.Items.Clear();
            ucBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text          = GetString("Messaging.BackToList"),
                OnClientClick = ControlsHelper.GetPostBackEventReference(lnkBackHidden) + "; return false;"
            });

            ucBreadcrumbs.AddBreadcrumb(new BreadcrumbItem());
        }
        else
        {
            ucBreadcrumbs.HideBreadcrumbs = true;
            if (PageBreadcrumbs != null)
            {
                PageBreadcrumbs.Items.Clear();
                PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
                {
                    Text        = GetString("Messaging.BackToList"),
                    RedirectUrl = UIContextHelper.GetElementUrl("CMS.Messaging", "MyMessages.Inbox", false)
                });

                PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem());
            }
        }

        breadcrumbsInitialized = true;
    }
コード例 #9
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        if (plcSelector.Visible)
        {
            // Remove css class dialog-content-scrollable to turn off position:relative. Our Selector control needs to overflow content container and hide dialog footer with his footer button.
            CurrentMaster.PanelContent.RemoveCssClass("dialog-content-scrollable");
            // Get product name and price
            SKUInfo skuObj  = SKUInfoProvider.GetSKUInfo(SKUID);
            string  skuName = "";

            if (skuObj != null)
            {
                skuName = ResHelper.LocalizeString(skuObj.SKUName);
            }

            // Set SKU name label
            headSKUName.Text = HTMLHelper.HTMLEncode(skuName);

            // Set breadcrumb
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text        = GetString("Order_Edit_AddItems.Products"),
                RedirectUrl = ResolveUrl("~/CMSModules/Ecommerce/Pages/Tools/Orders/Order_Edit_AddItems.aspx?cart=" + HTMLHelper.HTMLEncode(QueryHelper.GetString("cart", ""))),
            });

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text = skuName
            });
        }
    }
コード例 #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        stringCodeName = QueryHelper.GetString("stringCodeName", String.Empty);
        cultureId      = QueryHelper.GetInteger("cultureId", 0);

        // Validate culture ID
        if (cultureId <= 0)
        {
            ShowError(GetString("general.invalidcultureid"));
            return;
        }

        if (QueryHelper.GetBoolean("saved", false))
        {
            ShowChangesSaved();
        }

        // Init new header action
        HeaderAction action = new HeaderAction
        {
            Text        = GetString("culture.newstring"),
            RedirectUrl = "~/CMSModules/SystemDevelopment/Development/Resources/UICulture_StringsDefault_New.aspx?cultureId=" + cultureId,
        };

        CurrentMaster.HeaderActions.ActionsList.Add(action);

        codeNameBreadcrumbItem = new BreadcrumbItem
        {
            Text = stringCodeName.ToLowerCSafe(),
        };
        PageBreadcrumbs.AddBreadcrumb(codeNameBreadcrumbItem);

        // Ensure breadcrumbs suffix
        UIHelper.SetBreadcrumbsSuffix(GetString("objecttype.cms_resourcestring"));

        // Initialize controls
        rfvKey.ErrorMessage = GetString("culture.enterakey");

        if (!RequestHelper.IsPostBack())
        {
            CultureInfo uic = CultureInfoProvider.GetCultureInfo(cultureId);

            if (uic != null)
            {
                string             cultureCode = uic.CultureCode;
                FileResourceEditor fre         = new FileResourceEditor(Server.MapPath(FileResourceManager.GetResFilename(cultureCode)), cultureCode);
                if (fre != null)
                {
                    txtKey.Text  = stringCodeName;
                    txtText.Text = fre.GetResourceString(stringCodeName, cultureCode);
                }
            }
            else
            {
                ShowError(GetString("general.invalidcultureid"));
            }
        }
    }
コード例 #11
0
    /// <summary>
    /// Initializes the master page.
    /// </summary>
    private void InitMasterPage()
    {
        string titleText = "";
        string productText;

        // Initialize creation of new product option
        if (OptionCategoryID > 0)
        {
            productText = GetString("product_new.newproductoption");
        }
        // Initialize creation of new product
        else
        {
            if (ParentNodeID > 0)
            {
                titleText = GetString((newObjectSiteId > 0) ? "com_sku_edit_general.newitemcaption" : "com.product.newglobal");
            }
            else
            {
                titleText = GetString((newObjectSiteId > 0) ? "com.sku.newsku" : "com.sku.newglobalsku");
            }

            productText = titleText;
        }


        // Set breadcrumbs
        if (OptionCategoryID > 0)
        {
            var productListUrl = "~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_Edit_Options.aspx";
            productListUrl = URLHelper.AddParameterToUrl(productListUrl, "siteId", SiteID.ToString());
            productListUrl = URLHelper.AddParameterToUrl(productListUrl, "categoryId", OptionCategoryID.ToString());

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text        = GetString("product_new.productoptionslink"),
                RedirectUrl = ResolveUrl(productListUrl),
            });

            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text = FormatBreadcrumbObjectName(productText, newObjectSiteId)
            });
        }
        else
        {
            EnsureProductBreadcrumbs(PageBreadcrumbs, productText, false, DisplayTreeInProducts, false);
        }

        PageTitle.TitleText = titleText;
    }
コード例 #12
0
    /// <summary>
    /// Creates breadcrumbs on master page title.
    /// </summary>
    private void CreateBreadcrumbs(string workflowList, string currentWorkflow)
    {
        // Initializes page title
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text        = workflowList,
            RedirectUrl = UIContextHelper.GetElementUrl(ModuleName.CMS, "Workflows", false)
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text = currentWorkflow
        });
    }
コード例 #13
0
    /// <summary>
    /// Initializes the breadcrumbs on the page.
    /// </summary>
    private void InitializeBreadcrumbs()
    {
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("board.subscription.subscriptions"),
            RedirectUrl = "~/CMSModules/MessageBoards/Tools/Boards/Board_Edit_Subscriptions.aspx?boardid=" + mBoardId + "&changemaster=" + changeMaster,
            Target      = "_self"
        });

        // Display current subscription e-mail
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = (mCurrentSubscription != null) ? mCurrentSubscription.SubscriptionEmail : GetString("board.subscriptions.newitem")
        });
    }
コード例 #14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Register script for pendingCallbacks repair
        ScriptHelper.FixPendingCallbacks(Page);

        if (RequestHelper.IsCallback())
        {
            return;
        }

        if (!RequestHelper.IsPostBack())
        {
            SiteDeletionLog = new SiteDeletionLog();
            SiteDeletionLog.PersistentLogKey = PersistentLogKey;
        }

        // Register the script to perform get flags for showing buttons retrieval callback
        ScriptHelper.RegisterClientScriptBlock(this, GetType(), "GetState", ScriptHelper.GetScript("function GetState(cancel){ return " + Page.ClientScript.GetCallbackEventReference(this, "cancel", "SetStateMssg", null) + " } \n"));

        // Setup page title text and image
        PageTitle.TitleText = GetString("Site_Edit.DeleteSite");
        mBackToSiteListUrl  = UIContextHelper.GetElementUrl(ModuleName.CMS, "Sites", false);

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("general.sites"),
            RedirectUrl = mBackToSiteListUrl,
            Target      = "cmsdesktop",
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = GetString("Site_Edit.DeleteSite"),
        });

        mSiteInfo = SiteInfoProvider.GetSiteInfo(QueryHelper.GetInteger("siteId", 0));
        if (mSiteInfo != null)
        {
            var siteDisplayName = HTMLHelper.HTMLEncode(ResHelper.LocalizeString(mSiteInfo.DisplayName));

            ucHeader.Header        = String.Format(GetString("Site_Delete.Header"), siteDisplayName);
            ucHeaderConfirm.Header = GetString("Site_Delete.HeaderConfirm");

            headConfirmation.Text = String.Format(GetString("Site_Edit.Confirmation"), siteDisplayName);
        }

        RegisterScripts();
    }
コード例 #15
0
    /// <summary>
    /// Creates breadcrumbs
    /// </summary>
    private void CreateBreadcrumbs()
    {
        var isNew = String.IsNullOrEmpty(objName);

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("sysdev.procedures"),
            RedirectUrl = UIContextHelper.GetElementUrl(ModuleName.CMS, "StoredProcedures", false),
        });
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = isNew ? GetString("sysdev.procedures.createprocedure") : objName
        });

        // Ensure suffix
        UIHelper.SetBreadcrumbsSuffix(isNew ? "" : GetString("sysdev.procedure"));
    }
コード例 #16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        editElem.EditForm.RedirectUrlAfterCreate = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "EditWorkflowsAction", false), "objectID={%EditedObject.ID%}&saved=1");

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index       = 0,
            RedirectUrl = UIContextHelper.GetElementUrl(ModuleName.CMS, "Workflows.Actions", false),
            Text        = GetString("cms.workflowaction.action.list")
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index = 1,
            Text  = GetString("cms.workflowaction.action.new")
        });
    }
コード例 #17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        var isNew = (EditedObject == null) || (((ConversionInfo)EditedObject).ConversionID <= 0);

        if (isNew && !mModalDialog)
        {
            // Set the title
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem {
                Text = GetString("conversion.conversion.list"), RedirectUrl = "~/CMSModules/WebAnalytics/Pages/Tools/Conversion/List.aspx"
            });
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem {
                Text = GetString("conversion.conversion.new")
            });
        }

        // Set info label
        editElem.UIFormControl.ShowInformation(mInfoText);
    }
コード例 #18
0
    private void InitializeMasterPage()
    {
        string workflowScopes    = GetString("Development-Workflow_Scope_New.Scopes");
        string workflowScopesUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Workflows.Scope", false), "parentObjectID=" + CurrentWorkflow.WorkflowID + "&workflowID=" + CurrentWorkflow.WorkflowID + "&siteId=" + siteId);
        string currentScope      = CurrentScope.ScopeID > 0 ? CurrentScope.ScopeStartingPath : GetString("Development-Workflow_Scope_New.Scope");

        // Init breadcrumbs
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = workflowScopes,
            RedirectUrl = workflowScopesUrl
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = currentScope,
        });
    }
コード例 #19
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        // Parent category info for level up link
        SettingsCategoryInfo parentCategoryInfo = null;
        var categoryBreadcrumb = new BreadcrumbItem();

        if (mCategoryId <= 0)
        {
            catEdit.ShowParentSelector = false;

            if (catEdit.SettingsCategoryObj == null)
            {
                categoryBreadcrumb.Text = GetString(catEdit.IsGroupEdit ? "settings.group.new" : "settingsedit.category_list.newitemcaption");
            }
            else
            {
                categoryBreadcrumb.Text = catEdit.SettingsCategoryObj.CategoryDisplayName;
            }
        }
        else
        {
            categoryBreadcrumb.Text = GetString(catEdit.IsGroupEdit ? catEdit.SettingsCategoryObj.CategoryDisplayName : "settingsedit.settingscategory.edit.headercaption");
        }

        var parentCategoryBreadcrumb = new BreadcrumbItem();

        parentCategoryInfo = SettingsCategoryInfoProvider.GetSettingsCategoryInfo(catEdit.SelectedParentCategory);

        // Set up title and breadcrumbs
        if (parentCategoryInfo != null)
        {
            parentCategoryBreadcrumb.Text        = ResHelper.LocalizeString(parentCategoryInfo.CategoryDisplayName);
            parentCategoryBreadcrumb.RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Modules.Settings.EditKeys", false), "categoryid=" + parentCategoryInfo.CategoryID + "&moduleid=" + moduleId);
        }

        if (mCategoryId <= 0 || catEdit.IsGroupEdit)
        {
            PageBreadcrumbs.AddBreadcrumb(parentCategoryBreadcrumb);
            PageBreadcrumbs.AddBreadcrumb(categoryBreadcrumb);
        }
    }
コード例 #20
0
    /// <summary>
    /// Creates breadcrumbs
    /// </summary>
    private void CreateBreadcrumbs()
    {
        string url = (customerId > 0) ? "~/CMSModules/Ecommerce/Pages/Tools/Orders/Order_List.aspx?customerId=" + customerId : "~/CMSModules/Ecommerce/Pages/Tools/Orders/Order_List.aspx";

        // Set breadcrumb
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Index       = 0,
            Text        = GetString("Order_New.Orders"),
            RedirectUrl = ResolveUrl(url),
        });

        if (customerId <= 0)
        {
            PageTitle.TitleText = GetString("Order_New.HeaderCaption");
        }

        UIHelper.SetBreadcrumbsSuffix("");
    }
コード例 #21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        editElem.OnAfterSave += editElem_OnAfterSave;

        ucTransfCode.ClassID = ClassID;

        // Init breadcrumbs
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index       = 0,
            Text        = GetString("documenttype_edit_transformation_edit.transformations"),
            RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Transformations"), "parentobjectid=" + ClassID + "&classID=" + ClassID + "&displaytitle=false")
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index = 1,
            Text  = GetString("documenttype_edit_transformation_edit.newtransformation")
        });
    }
コード例 #22
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Set the inner control properties
        newDocWizard.Theme = Theme;
        int moduleID = newDocWizard.ModuleID = QueryHelper.GetInteger("moduleid", 0);

        // Init breadcrumbs
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index       = 0,
            Text        = GetString("sysdev.class_header.classes"),
            RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Module.Classes", false), "parentobjectid=" + moduleID + "&moduleid=" + moduleID)
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index = 1,
            Text  = GetString("sysdev.class_list.newclass")
        });
    }
コード例 #23
0
    /// <summary>
    /// Creates breadcrumbs.
    /// </summary>
    private void InitBreadcrumbs()
    {
        string url = UIContextHelper.GetElementUrl("CMS.ABTest", "ABTestListing", false);

        if (NodeID > 0)
        {
            url = URLHelper.AddParameterToUrl(url, "NodeID", NodeID.ToString());
        }

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = GetString("abtesting.abtest.list"),
            RedirectUrl = ResolveUrl(url)
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = GetString("abtesting.abtest.new")
        });
    }
コード例 #24
0
    /// <summary>
    /// Crates breadcrumbs on master page title.
    /// </summary>
    private void CreateBreadcrumbs()
    {
        string workflowSteps    = GetString("Development-Workflow_Step_New.Steps");
        string currentWorkflow  = GetString("Development-Workflow_Steps.NewStep");
        string workflowStepsUrl = URLHelper.AppendQuery(
            UIContextHelper.GetElementUrl(ModuleName.CMS, "Workflows.Steps", false),
            "parentObjectId=" + WorkflowId + "&workflowId=" + WorkflowId);

        // Set the breadcrumbs element
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text        = workflowSteps,
            RedirectUrl = workflowStepsUrl,
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text = currentWorkflow
        });
    }
コード例 #25
0
    /// <summary>
    /// Sets the page breadcrumb control.
    /// </summary>
    /// <param name="caption">Caption of the breadcrumb item displayed in the page title as resource string key</param>
    /// <param name="classId">ID of a class</param>
    private void InitBreadcrumb(string caption, int classId)
    {
        string backUrl = "~/CMSModules/CustomTables/CustomTable_Edit_Query_List.aspx";

        if (classId > 0)
        {
            backUrl += "?parentobjectid=" + classId;
        }

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text        = GetString("general.queries"),
            RedirectUrl = backUrl
        });

        // Add the custom item
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Text = GetString(caption)
        });
    }
コード例 #26
0
    protected void Page_Load(object sender, EventArgs e)
    {
        // Get the current class ID
        var classID  = queryEdit.ClassID = QueryHelper.GetInteger("parentobjectid", 0);
        var moduleID = queryEdit.ModuleID = QueryHelper.GetInteger("moduleid", 0);

        // Init breadcrumbs
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index       = 0,
            Text        = GetString("sysdev.class_edit_query_edit.queries"),
            RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Queries"), "parentobjectid=" + classID + "&moduleid=" + moduleID + "&displaytitle=false")
        });

        if (QueryObject == null)
        {
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Index = 1,
                Text  = GetString("sysdev.class_edit_query_edit.newquery"),
            });
        }

        // If the existing query is being edited
        if (QueryObject != null)
        {
            queryEdit.QueryID = QueryObject.QueryID;

            // Add the current item
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
            {
                Text = GetString(QueryObject.QueryName),
            });
        }
        else
        {
            // If the new query is being created
            queryEdit.QueryID = 0;
        }
    }
コード例 #27
0
    /// <summary>
    /// Creates breadcrumbs
    /// </summary>
    private void CreateBreadcrumbs()
    {
        var isNew = String.IsNullOrEmpty(objName);

        if (isNew)
        {
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text        = GetString("sysdev.views"),
                RedirectUrl = UIContextHelper.GetElementUrl(ModuleName.CMS, "Views", false),
            });
            PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
            {
                Text = GetString("sysdev.views.createview")
            });
        }
        else
        {
            // Ensure suffix
            UIHelper.SetBreadcrumbsSuffix(GetString("sysdev.view"));
        }
    }
コード例 #28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int classId  = QueryHelper.GetInteger("classid", 0);
        int moduleId = QueryHelper.GetInteger("moduleid", 0);

        altFormEdit.OnBeforeSave += (s, ea) => ((AlternativeFormInfo)altFormEdit.EditedObject).FormClassID = classId;
        altFormEdit.OnAfterSave  += (s, ea) => URLHelper.Redirect(URLHelper.AppendQuery(
                                                                      UIContextHelper.GetElementUrl(ModuleName.CMS, "EditForm"),
                                                                      "&objectid=" + ((AlternativeFormInfo)EditedObject).FormID + "&parentobjectid=" + classId + "&classid=" + classId + "&moduleid=" + moduleId + "&displaytitle=false&saved=1")
                                                                  );
        altFormEdit.RedirectUrlAfterCreate = String.Empty;

        // Check if the 'Combine With User Settings' feature should be available
        if (classId > 0)
        {
            string className = DataClassInfoProvider.GetClassName(classId);
            if (className != null && (className.ToLowerCSafe().Trim() == UserInfo.OBJECT_TYPE.ToLowerCSafe()))
            {
                altFormEdit.ShowCombineUsersSettings = true;
            }
        }

        // Init breadcrumbs
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index       = 0,
            Text        = GetString("altforms.listlink"),
            RedirectUrl = URLHelper.AppendQuery(
                UIContextHelper.GetElementUrl(ModuleName.CMS, "AlternativeForms"),
                "parentobjectid=" + classId + "&classid=" + classId + "&moduleid=" + moduleId + "&displaytitle=false")
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem()
        {
            Index = 1,
            Text  = GetString("altform.newbread")
        });
    }
コード例 #29
0
    /// <summary>
    /// Creates breadcrumbs.
    /// </summary>
    /// <param name="skuObj">Product SKU</param>
    private void CreateBreadcrumbs(SKUInfo skuObj)
    {
        string productListText = GetString("Prodect_Edit_Header.ProductOptionsLink");
        string productListUrl  = "~/CMSModules/Ecommerce/Pages/Tools/ProductOptions/OptionCategory_Edit_Options.aspx";

        productListUrl = URLHelper.AddParameterToUrl(productListUrl, "categoryId", OptionCategoryID.ToString());
        productListUrl = URLHelper.AddParameterToUrl(productListUrl, "siteId", SiteID.ToString());
        productListUrl = URLHelper.AddParameterToUrl(productListUrl, "productId", ParentProductID.ToString());
        productListUrl = URLHelper.AddParameterToUrl(productListUrl, "dialog", QueryHelper.GetString("dialog", "0"));

        // Set breadcrumb
        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text        = productListText,
            Target      = "_parent",
            RedirectUrl = ResolveUrl(productListUrl)
        });

        PageBreadcrumbs.AddBreadcrumb(new BreadcrumbItem
        {
            Text = FormatBreadcrumbObjectName(skuObj.SKUName, SiteID)
        });
    }
コード例 #30
0
    protected override void OnPreRender(EventArgs e)
    {
        base.OnPreRender(e);

        var categoryBreadcrumb = new BreadcrumbItem();

        var settingBreadcrumb = new BreadcrumbItem();

        // Set bradcrumbs for editing
        if (skeEditKey.SettingsKeyObj != null)
        {
            var sci = SettingsCategoryInfoProvider.GetSettingsCategoryInfo(skeEditKey.SettingsKeyObj.KeyCategoryID);

            categoryBreadcrumb.Text        = sci.CategoryDisplayName;
            categoryBreadcrumb.RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Modules.Settings.EditKeys", false), "categoryid=" + sci.CategoryParentID + "&moduleid=" + mModuleId);

            settingBreadcrumb.Text = skeEditKey.SettingsKeyObj.KeyDisplayName;
        }
        // Set bradcrumbs for creating new key
        else
        {
            if (mParentGroup != null)
            {
                var parentCat = SettingsCategoryInfoProvider.GetSettingsCategoryInfoByName(mParentGroup);
                if (parentCat != null)
                {
                    categoryBreadcrumb.Text        = parentCat.CategoryDisplayName;
                    categoryBreadcrumb.RedirectUrl = URLHelper.AppendQuery(UIContextHelper.GetElementUrl(ModuleName.CMS, "Modules.Settings.EditKeys", false), "categoryid=" + parentCat.CategoryParentID + "&moduleid=" + mModuleId);

                    settingBreadcrumb.Text = GetString("Development.CustomSettings.NewKey");
                }
            }
        }

        PageBreadcrumbs.AddBreadcrumb(categoryBreadcrumb);
        PageBreadcrumbs.AddBreadcrumb(settingBreadcrumb);
    }