Exemplo n.º 1
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        StyleHelper objStyle = new StyleHelper();
            m_refmsg = (new Ektron.Cms.CommonApi()).EkMsgRef;

            HelpButton1.Text = objStyle.GetHelpButton("FormWizardStep1", "");
            HelpButton2.Text = objStyle.GetHelpButton("FormWizardStep2", "");
            HelpButton3.Text = objStyle.GetHelpButton("FormWizardStep3", "");
            HelpButton4.Text = objStyle.GetHelpButton("FormWizardStep4", "");
            HelpButton5.Text = objStyle.GetHelpButton("FormWizardStep5", "");
            objStyle = null;
    }
Exemplo n.º 2
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        StyleHelper objStyle;
            try
            {
                RegisterResources();
                Utilities.ValidateUserLogin();
                if ((m_refAPI.RequestInformationRef.IsMembershipUser > 0) || (m_refAPI.RequestInformationRef.UserId == 0))
                {
                    Response.Redirect("blank.htm", false);
                    return;
                }
                objStyle = new StyleHelper();
                StyleSheetJS.Text = objStyle.GetClientScript();
                jsAppImgPath.Text = m_refAPI.AppImgPath;
                HelpButton.Text = objStyle.GetHelpButton("navtoolbar_aspx", "");
                m_msgHelper = m_refAPI.EkMsgRef;

            }
            catch (Exception)
            {

            }
            finally
            {
                objStyle = null;
            }
    }
Exemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MsgHelper = new EkMessageHelper(ContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        Collection gtNavs = new Collection();
        string action = "";
        string checkout = "";
        string ErrorString = "";
        string CollectionTitle = "";
        ApplicationAPI AppUI = new ApplicationAPI();
        Int32 ContentLanguage = 0;
        if (Request.QueryString["LangType"] != null)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
            {
                ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                if (ContentLanguage == 0)
                    ContentLanguage = AppUI.DefaultContentLanguage;
                ContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            }
            else
            {
                if (!string.IsNullOrEmpty(ContentApi.GetCookieValue("LastValidLanguageID")))
                {
                    ContentLanguage = Convert.ToInt32(ContentApi.GetCookieValue("LastValidLanguageID"));
                }
            }
        }
        else
        {
            if (!string.IsNullOrEmpty(ContentApi.GetCookieValue("LastValidLanguageID")))
            {
                ContentLanguage = Convert.ToInt32(ContentApi.GetCookieValue("LastValidLanguageID"));
                if (ContentLanguage == 0)
                {
                    ContentLanguage = AppUI.DefaultContentLanguage;
                    ContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                }
            }
        }
        AppUI.FilterByLanguage = ContentLanguage;
        long nId = Convert.ToInt64(Request.QueryString["nid"]);
        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
            action = Request.QueryString["action"];
        if (!string.IsNullOrEmpty(Request.QueryString["bpage"]) | !string.IsNullOrEmpty(Request.QueryString["treeViewId"]))
            bpage = "&bpage=reports";
        if (action.ToString().ToLower() == "viewstage")
            gtNavs = AppUI.EkContentRef.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, false);
        else
        {
            gtNavs = AppUI.EkContentRef.GetEcmCollectionByID(nId, false, false, ref ErrorString, true, false, false);
            checkout = "";
        }
        if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && (((string)gtNavs["Status"] == "A") || ((string)gtNavs["Status"] == "S")))
            checkout = "&checkout=true";
        if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && (string)gtNavs["Status"] == "O")
            checkout = checkout + "&status=o";
        if (string.IsNullOrEmpty(Request.QueryString["folderid"]))
        {
            _folderId = Convert.ToInt64(gtNavs["FolderID"]);
            report = true;
        }
        else
        {
            _folderId = Convert.ToInt64(Request.QueryString["folderid"]);
        }
        if (ErrorString == "")
        {
            if (gtNavs.Count > 0)
                CollectionTitle = gtNavs["CollectionTitle"].ToString();
        }
        if (ErrorString != "")
        {
            divError.InnerHtml = ErrorString;
        }

        // Toolbar
        if (Request.QueryString["bpage"] == "reports" || _folderId == 0 || report)
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewCollectionReport", MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        else
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?folderid=" + _folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);

        bool primaryStyleApplied = false;

        if (action.ToString().ToLower() == "viewstage")
        {
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentViewPublished.png", "collections.aspx?action=View&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("btn view publish"), MsgHelper.GetMessage("btn view publish"), "", StyleHelper.ViewPublishedButtonCssClass, !primaryStyleApplied);

            primaryStyleApplied = true;

            if ((string)gtNavs["Status"] == "S")
            {
                if (IsCollectionApprover)
                {
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doPublishCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Publish"), MsgHelper.GetMessage("generic Publish"), "");
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/ui/icons/approvalDenyItem.png", "collections.aspx?action=doDeclineApprCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("lbl decline"), MsgHelper.GetMessage("lbl decline"), "");

                }
            }
            else if ((string)gtNavs["Status"] == "M")
            {
                if (CanDoCollections)
                {
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doDelete&nId=" + nId + "&folderid=" + _folderId + checkout + bpage, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\"");
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/ui/icons/approvalDenyItem.png", "collections.aspx?action=doDeclineDelCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("lbl decline"), MsgHelper.GetMessage("lbl decline"), "");
                }
            }
            else
            {
                if (IsCollectionApprover)
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentPublish.png", "collections.aspx?action=doPublishCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Publish"), MsgHelper.GetMessage("generic Publish"), "");
                else
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/approvalSubmitFor.png", "collections.aspx?action=doSubmitCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Submit"), MsgHelper.GetMessage("generic Submit"), "");
                litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentRestore.png", "collections.aspx?action=doUndoCheckoutCol&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("generic Undocheckout"), MsgHelper.GetMessage("generic Undocheckout"), "");
            }
        }
        else
        {
            if ((string)gtNavs["Status"] != "A")
            {
                litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/preview.png", "collections.aspx?action=ViewStage&LangType=" + ContentLanguage + "&nid=" + nId + "&folderid=" + _folderId, MsgHelper.GetMessage("btn view stage"), MsgHelper.GetMessage("btn view stage"), "", StyleHelper.ViewStagedButtonCssClass, !primaryStyleApplied);

                primaryStyleApplied = true;
            }
        }
        string enableQDOparam = null;

        if (gtNavs["EnableReplication"].ToString().Length == 1)
            enableQDOparam = "&qdo=1";

        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentAdd.png", "collections.aspx?LangType=" + ContentLanguage + "&action=AddLink&nid=" + nId + "&folderid=" + _folderId + checkout + enableQDOparam, MsgHelper.GetMessage("alt: add collection items text"), MsgHelper.GetMessage("add collection items"), "", StyleHelper.AddButtonCssClass, !primaryStyleApplied);

        primaryStyleApplied = true;

        if (((Collection)gtNavs["Contents"]).Count > 0)
        {
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/remove.png", "collections.aspx?LangType=" + ContentLanguage + "&action=DeleteLink&nid=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: remove collection items text"), MsgHelper.GetMessage("remove collection items"), "", StyleHelper.RemoveButtonCssClass);
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/arrowUpDown.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ReOrderLinks&nid=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: reorder collection text"), MsgHelper.GetMessage("btn reorder"), "", StyleHelper.ReOrderButtonCssClass);
        }

        if ((string)gtNavs["Status"] != "M")
        {
            if (CanDoCollections)
            {
                if (string.IsNullOrEmpty(bpage) && !string.IsNullOrEmpty(Request.QueryString["folderid"]) && Request.QueryString["folderid"] == "0")
                {
                    bpage = "&bpage=reports";
                }

                litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "collections.aspx?action=doDelete&nId=" + nId + "&folderid=" + _folderId + checkout + bpage, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\"", StyleHelper.DeleteButtonCssClass);

            }
            else
                litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "collections.aspx?action=doSubmitDelCol&nId=" + nId + "&folderid=" + _folderId + checkout, MsgHelper.GetMessage("alt: delete collection text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return ConfirmNavDelete();\"", StyleHelper.DeleteButtonCssClass);
        }

        litButtons.Text += StyleHelper.ActionBarDivider;

        if (action == "ViewStage")
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/properties.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ViewStageAttributes&nid=" + nId + "&folderid=" + _folderId + checkout + enableQDOparam, MsgHelper.GetMessage("alt collection properties button text"), MsgHelper.GetMessage("properties text"), "", StyleHelper.ViewPropertiesButtonCssClass);
        else
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/properties.png", "collections.aspx?LangType=" + ContentLanguage + "&action=ViewAttributes&nid=" + nId + "&folderid=" + _folderId + enableQDOparam, MsgHelper.GetMessage("alt collection properties button text"), MsgHelper.GetMessage("properties text"), "", StyleHelper.ViewPropertiesButtonCssClass);

        if (((string)gtNavs["Status"] == "A") && (Convert.ToInt32(gtNavs["EnableReplication"]) == 1))
        {
            litButtons.Text += StyleHelper.ActionBarDivider;
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/translation.png", "DynReplication.aspx?collid=" + nId, MsgHelper.GetMessage("alt quickdeploy collection button text"), MsgHelper.GetMessage("alt quickdeploy collection button text"), "", StyleHelper.TranslationButtonCssClass);
        }

        litViewCollection.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collection title") + " \"" + CollectionTitle + "\"");

        litCollItems.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("ViewCollectionItems", "") + "</td>";

        string genericView = MsgHelper.GetMessage("generic View");
        Collection gtLinks = (Collection)gtNavs["Contents"];

        DataTable dtCollection = new DataTable();
        dtCollection.Columns.Add("HTML");
        dtCollection.Columns.Add("ContentLanguage");
        dtCollection.Columns.Add("ContentID");
        dtCollection.Columns.Add("ContentLinks");

        foreach (Collection gtLink in gtLinks)
        {
            DataRow dRow = dtCollection.NewRow();
            String backPage = "Action=View&nid=" + nId + "&folderid=" + _folderId;
            String contentUrl = "content.aspx?action=View&LangType=" + gtLink["ContentLanguage"].ToString() + "&id=" + gtLink["ContentID"] + "&callerpage=collections.aspx&origurl=" + EkFunctions.UrlEncode(backPage);
            String contentTitle = genericView + " " + gtLink["ContentTitle"].ToString().Replace("'", "`");
            String iconurl = "";
            try
            {
                iconurl = gtLink["ImageUrl"].ToString();
            }
            catch
            {
                // ignore errors if we try getting imageurl on regular content
            }
            ContentApi.ContentLanguage = ContentLanguage;
            string dmsmenuhtml = ContentApi.GetDmsContextMenuHTML(Convert.ToInt64(gtLink["ContentID"]), Convert.ToInt64(gtLink["ContentLanguage"]), Convert.ToInt64(gtLink["ContentType"]), Convert.ToInt64(gtLink["ContentSubtype"]), gtLink["ContentTitle"].ToString(), MsgHelper.GetMessage("generic Title") + " " + gtLink["ContentTitle"], contentUrl, "", iconurl);

            dRow["HTML"] = dmsmenuhtml;
            dRow["ContentLanguage"] = gtLink["ContentLanguage"].ToString();
            dRow["ContentID"] = gtLink["ContentID"].ToString();
            dRow["ContentLinks"] = gtLink["ContentLinks"].ToString();
            dtCollection.Rows.Add(dRow);
        }
        rptColl.DataSource = dtCollection;
        rptColl.DataBind();

        if (ContentApi.EnableMultilingual == 1)
        {
            litEnableMult.Text = StyleHelper.ActionBarDivider;
            litViewLang.Text = MsgHelper.GetMessage("view language") + LangDD(false, "");
        }
        gtNavs = null;

        if ((Request.QueryString["rf"] != null && Request.QueryString["rf"] == "1") || (Request.QueryString["reloadtrees"] != null && Request.QueryString["reloadtrees"] == "coll"))
        {
            ReloadClientScript("");
            litRefreshCollAccordion.Text = "<script language=\"javascript\">" + ("\r\n" + "top.refreshCollectionAccordion(") + ContentLanguage + ");" + ("\r\n" + "</script>") + "\r\n";
        }
    }
Exemplo n.º 4
0
    protected void BuildToolBar()
    {
        string helpScreenAlias = "salestrend";
        System.Text.StringBuilder result = new System.Text.StringBuilder();

        StyleHelper m_refStyle = new StyleHelper();
        Ektron.Cms.ContentAPI m_refContentAPI = new ContentAPI();
        Ektron.Cms.Common.EkMessageHelper m_refMsg = new EkMessageHelper(m_refContentAPI.RequestInformationRef);

        Utilities.ValidateUserLogin();

        divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("lbl sales trend"));
        //result.Append("<table cellspacing=\"0\"><tbody><tr><td>");
        result.Append("<div style=\"height:22px\">");
        result.Append(m_refStyle.GetHelpButton(helpScreenAlias, "center"));
        result.Append("</div>");
        //result.Append("</td></tr></tbody></table>");
        divToolBar.InnerHtml = result.ToString();

        StyleSheetJS.Text = m_refStyle.GetClientScript();
    }
Exemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        ApplicationAPI AppUI = new ApplicationAPI();
        String MenuTitle = String.Empty;
        long nId = Convert.ToInt64(Request.QueryString["nid"]);
        Collection gtLinks = AppUI.EkContentRef.GetMenuByID(nId, 0, false);

        if (gtLinks.Count > 0)
        {
            MenuTitle = gtLinks["MenuTitle"].ToString();
            gtLinks = (Collection)gtLinks["Items"];
        }
        string action = string.Empty;
        long folderId = 0;
        if (string.IsNullOrEmpty(Request.QueryString["action"]))
            action = Request.QueryString["action"].ToString();
        if (string.IsNullOrEmpty(Request.QueryString["folderId"]))
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "</td>";
        litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("delete menu items title") + " \"" + MenuTitle + "\"");

        if (m_refApi.TreeModel == 1)
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        else
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=ViewMenu&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);

        litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "#", MsgHelper.GetMessage("alt: delete menu items text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return SubmitForm(\'selections\', \'GetIDs()\');\"", StyleHelper.DeleteButtonCssClass, true);

         Int32 lLoop = 0;

         string cLanguagesArray="";
         DataTable dtItems = new DataTable();
        dtItems.Columns.Add("ItemTitle");
        dtItems.Columns.Add("ItemID");
        dtItems.Columns.Add("ItemLink");
        dtItems.Columns.Add("ItemType");
        dtItems.Columns.Add("ID");
        dtItems.Columns.Add("ContentLanguage");
        dtItems.Columns.Add("lLoop");
        foreach (Collection gtLink in gtLinks)
        {
            DataRow dRow = dtItems.NewRow();
            dRow["ItemTitle"] = gtLink["ItemTitle"].ToString();
            dRow["ItemID"] = gtLink["ItemID"].ToString();
            dRow["ItemLink"] = gtLink["ItemLink"].ToString();
            dRow["ItemType"] = gtLink["ItemType"].ToString();
            dRow["ID"] = gtLink["ID"].ToString();
            dRow["ContentLanguage"] = gtLink["ContentLanguage"].ToString();
            dRow["lLoop"] = lLoop.ToString();
            dtItems.Rows.Add(dRow);
            cLinkArray = cLinkArray + "," + gtLink["ID"] + "_" + gtLink["ItemType"];
            cLanguagesArray=cLanguagesArray + "," + gtLink["ContentLanguage"] + "_" + gtLink["ItemType"];
            fLinkArray = fLinkArray + "," + folderId;
            lLoop++;
        }
        rptItems.DataSource = dtItems;
        rptItems.DataBind();
        if (cLinkArray.Length > 0)
        {
            cLinkArray = cLinkArray.Remove(0, 1);
            fLinkArray = fLinkArray.Remove(0, 1);
            cLanguagesArray = cLanguagesArray.Remove(0, 1);
        }
        CollectionID.Value = nId.ToString();
        form1.Action = "collections.aspx?Action=doDeleteMenuItem&folderid=" + folderId + "&nid=" + nId;
        litURL.Text = MsgHelper.GetMessage("generic URL Link");
        litID.Text = MsgHelper.GetMessage("generic ID");
        litGenericTitle.Text = MsgHelper.GetMessage("generic Title");
        aSelect.InnerHtml = MsgHelper.GetMessage("generic select all msg");
        aClear.InnerHtml = MsgHelper.GetMessage("generic clear all msg");
    }
Exemplo n.º 6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        ApplicationAPI AppUI = new ApplicationAPI();
        sitePath = AppUI.SitePath;
        AppPath = AppUI.AppPath;
        AxMenuData menuData = new AxMenuData();
        string ErrorString ="";
        MenuId = Convert.ToInt64(Request.QueryString["nid"]);
        FolderId = Convert.ToInt64(Request.QueryString["folderid"]);
        if (Request.QueryString["LangType"] == "-1")
        {
            ContentLanguage = AppUI.DefaultContentLanguage;
            AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            AppUI.ContentLanguage = ContentLanguage;
        }
        else
        {
            ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            if (ContentLanguage == 0)
            {
                ContentLanguage = AppUI.DefaultContentLanguage;
                AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                AppUI.ContentLanguage = ContentLanguage;
            }
        }
        Hashtable cPerms = AppUI.EkSiteRef.GetPermissions(FolderId, 0, "folder");
        if (!(IsCollectionMenuRoleMember() || (cPerms.Contains("Collections") && Convert.ToBoolean(cPerms["Collections"]))))
            ErrorString = MsgHelper.GetMessage("com: user does not have permission");

        if (ErrorString == "")
        {
            if (m_refApi.TreeModel == 1)
                gtLinks = AppUI.EkContentRef.GetMenuByID(MenuId, 0,false);
            else
                gtLinks = AppUI.EkContentRef.GetMenuByID(MenuId, 0, true);
            menuData = AppUI.EkContentRef.GetMenuDataByID(MenuId);
            if (!string.IsNullOrEmpty(menuData.AssociatedFolderIdList))
            {
                AssociatedFolderIdListString = menuData.AssociatedFolderIdList;
                AssociatedFolderTitleListString = GetTitlesFromFolderIds(menuData.AssociatedFolderIdList);
            }
            if (!string.IsNullOrEmpty(menuData.AssociatedTemplates))
                AssociatedTemplatesString = menuData.AssociatedTemplates;
        }
        litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit menu title"));
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("editmenu", "") + "</td>";

        if (Request.QueryString["back"] != "")
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
        else if (Request.QueryString["iframe"] == "true")
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
        else
        {
            if (m_refApi.TreeModel == 1)
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
            else
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewMenu&nid=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        }

        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", "Save Menu", MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'menu\', \'VerifyMenuForm()\');\"", StyleHelper.SaveButtonCssClass, true);

        LanguageName = gtLinks["ContentLanguage"].ToString();
    }
Exemplo n.º 7
0
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        string helpScreenAlias = "";

        if(!String.IsNullOrEmpty(Request.QueryString["report"]))
        {
            helpScreenAlias = Request.QueryString["report"];
        }
        else
        {
            helpScreenAlias = "overview";
        }

        //report=visits&provider=Omniture, Omni_visits
        if (Request.Url.AbsolutePath.ToLower().Contains("trends.aspx"))
        {
            if (Request.QueryString["report"] == "visits" && Request.QueryString["provider"] == "Omniture")
            {
                helpScreenAlias = "Omni_visits";
            }
        }
        //Webtrend
        //Overview.aspx?provider=WebTrends, wt_overview
        if (Request.Url.AbsolutePath.ToLower().Contains("overview.aspx"))
        {
            if (string.IsNullOrEmpty(Request.QueryString["report"]) && Request.QueryString["provider"] == "WebTrends")
            {
                helpScreenAlias = "wt_overview";
            }
        }
        StyleHelper m_refStyle = new StyleHelper();

        DateRangePicker1.BadStartDateFormatErrorHandler += BadDateFormatErrorHandler;
        DateRangePicker1.BadEndDateFormatErrorHandler += BadDateFormatErrorHandler;

        DateRangePicker1.BadStartDateFormatMessage = GetMessage("msg bad start date format");
        DateRangePicker1.BadEndDateFormatMessage = GetMessage("msg bad end date format");

        DateRangePicker1.MaximumDate = DateTime.Today;
        DateRangePicker1.DefaultEndDate = DateTime.Today.AddDays(-1); // today is a partial day
        DateRangePicker1.DefaultStartDate = DateRangePicker1.DefaultEndDate.AddDays(-30);
        // set ID to make use of cookie persistence:
        DateRangePicker1.PersistenceId = "EktronWorkareaReportsAnalytics";
        litHelp.Text = m_refStyle.GetHelpButton(helpScreenAlias, "center");

        ////Defect:58466
        ////report=visits&provider=Omniture, Omni_visits
        //if (Request.Url.AbsolutePath.ToLower().Contains("trends.aspx"))
        //{
        //    if (Request.QueryString["report"] == "visits" && Request.QueryString["provider"] == "Omniture")
        //    {
        //        litHelp.Text = litHelp.Text.Replace("#visits", "#Omni_visits");
        //    }
        //}
        ////Webtrend
        ////Overview.aspx?provider=WebTrends, wt_overview
        //if (Request.Url.AbsolutePath.ToLower().Contains("overview.aspx"))
        //{
        //    if (string.IsNullOrEmpty(Request.QueryString["report"]) && Request.QueryString["provider"] == "WebTrends")
        //    {
        //        litHelp.Text = litHelp.Text.Replace("#overview", "#wt_overview");
        //    }
        //}
        Ektron.Cms.API.JS.RegisterJS(this, Ektron.Cms.API.JS.ManagedScript.EktronStyleHelperJS);
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        ContentAPI m_refContentApi = new ContentAPI();
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        ApplicationAPI AppUI = new ApplicationAPI();
        string action = "";
        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
        {
            action = Request.QueryString["action"].ToString();
        }
        if (!string.IsNullOrEmpty(Request.QueryString["folderid"]))
        {
            folderId = Convert.ToInt64(Request.QueryString["folderid"]);
            Hashtable cPerms = AppUI.EkSiteRef.GetPermissions(folderId, 0, "folder");
            nId = Convert.ToInt64(Request.QueryString["nid"]);
            EkContent gtObj = AppUI.EkContentRef;

            if (!string.IsNullOrEmpty(Request.QueryString["checkout"]))
                checkout = "&checkout=" + Request.QueryString["checkout"].ToString();
            if (!string.IsNullOrEmpty(Request.QueryString["status"]))
            {
                if (Request.QueryString["status"].ToString().ToLower() == "o")
                    checkout = checkout + "&status=o";
            }

            string ErrorString = "";

            if (ErrorString == "")
            {
                if (gtNavs.Count > 0)
                {
                     string CollectionTitle = gtNavs["CollectionTitle"].ToString();
                }
            }
            if (checkout != "")
                gtNavs = gtObj.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, true);
            else
                gtNavs = gtObj.GetEcmCollectionByID(nId, false, false, ref ErrorString, true, false, true);
            divErrorString.InnerHtml = ErrorString;
            litEditColl.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit collection title"));
            litEditCollectionTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit collection title"));
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=View&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt: update collection text"), MsgHelper.GetMessage("btn update"), "onclick=\"return SubmitForm(\'nav\', \'VerifyCollectionForm()\');\"", StyleHelper.SaveButtonCssClass, true);
            litSearch.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "</td>";
            litTitle.Text = MsgHelper.GetMessage("generic title label");
            litIDLabel.Text = MsgHelper.GetMessage("id label");
            litPath.Text = MsgHelper.GetMessage("lbl path") + ":";
            litTemplate.Text = MsgHelper.GetMessage("generic template label");
            litDesc.Text = MsgHelper.GetMessage("description label");
            litSitePath.Text = AppUI.SitePath;
            litLeaveTemplate.Text = MsgHelper.GetMessage("collections: leave template empty");
            litInclueSub.Text = MsgHelper.GetMessage("generic include subfolders msg");
            litApproval.Text = MsgHelper.GetMessage("lbl approval required");
            //// NEED SOME LOGIC HERE
            frm_nav_template.Value = gtNavs["CollectionTemplate"].ToString();
            trID.InnerHtml = gtNavs["CollectionID"].ToString();
            if (gtNavs.Contains("FolderPath") && null != gtNavs["FolderPath"] && !string.IsNullOrEmpty(gtNavs["FolderPath"].ToString())) {
                lblFolderPath.Text = gtNavs["FolderPath"].ToString();
                trFolderPath.Visible = true;
                litFolderSelect.Text = (m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/folderopen.png", "#", MsgHelper.GetMessage("alt select folder"), MsgHelper.GetMessage("btn select folder"), "onclick=\"LoadFolderChildPage(\'\',\'" + AppUI.ContentLanguage.ToString() + "\');\"")).Replace("<td ", "<span ").Replace("</td>", "</span>");
            }
            trApproval.Visible = (m_refApi.IsAdmin()
                || IsCollectionMenuAdmin()
                || IsCollectionApprover()
                || (IsFolderAdmin(Convert.ToInt64(gtNavs["FolderID"]))));
        }
    }
Exemplo n.º 9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();

        Collection gtNavs = new Collection();
        ApplicationAPI AppUI = new ApplicationAPI();
        FolderId = Convert.ToInt64(Request.QueryString["folderid"]);
        MenuId = Convert.ToInt64(Request.QueryString["nId"]);
        mpID = Convert.ToInt64(Request.QueryString["parentid"]);
        maID = Convert.ToInt64(Request.QueryString["ancestorid"]);
        if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
        {
            ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            if (ContentLanguage == ALL_CONTENT_LANGUAGES)
            {
                ContentLanguage = AppUI.DefaultContentLanguage;
            }

            AppUI.FilterByLanguage = ContentLanguage;
        }
        else
            ContentLanguage = AppUI.ContentLanguage;
        if (!string.IsNullOrEmpty(Request.QueryString["noworkarea"]) && Request.QueryString["noworkarea"] == "1")
        {
            noWorkAreaString = "&noworkarea=1";
        }

        if (MenuId != 0)
        {
            gtNavs = AppUI.EkContentRef.GetMenuByID(MenuId, false, false);
        }

        litAddMenuTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("Add Menu Item Title"));

        bool addHelpDivider = true;

        if (!(string.IsNullOrEmpty(Request.QueryString["back"])))
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
        else if (Request.QueryString["iframe"] == "true")
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
        else
        {
            if (Request.QueryString["noworkarea"] != "1")
            {
                if (m_refApi.TreeModel == 1)
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
                else
                    litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewMenu&nId=" + MenuId + "&folderid=" + FolderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
            }
            else
            {
                addHelpDivider = false;
            }
        }

        if (addHelpDivider)
        {
            litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("AddMenuItem", "") + "</td>";
        }
        else
        {
            litHelp.Text = m_refStyle.GetHelpButton("AddMenuItem", "");
        }

        if (!string.IsNullOrEmpty(Request.QueryString["noworkarea"]) && Request.QueryString["noworkarea"].ToString() == "1")
        {
            //ItemType.Visible = true;
            ContentBlock.Visible = true;
        }
        subMenu.Text = MsgHelper.GetMessage("Sub Menu Label");
        Hyperlink.Text = MsgHelper.GetMessage("External Hyperlink label");
        ContentBlock.Text = MsgHelper.GetMessage("lbl new content block");
        Library.Text = MsgHelper.GetMessage("Library Asset label");
        content.Text = MsgHelper.GetMessage("lbl content item");
        if (!string.IsNullOrEmpty(Request.QueryString["back"]))
            frm_back.Value = Request.QueryString["back"].ToString();
    }
Exemplo n.º 10
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        m_msgRef = (new Ektron.Cms.CommonApi()).EkMsgRef;
        StyleHelper objStyle = new StyleHelper();
        HelpButton1.Text = objStyle.GetHelpButton("RuleWizardStep1", "");
        HelpButton2.Text = objStyle.GetHelpButton("RuleWizardStep2", "");
        HelpButton3.Text = objStyle.GetHelpButton("RuleWizardStep3", "");
        HelpButton4.Text = objStyle.GetHelpButton("RuleWizardStep4", "");
        HelpButton5.Text = objStyle.GetHelpButton("RuleWizardStep5", "");
        objStyle = null;

        if (Request.QueryString["id"] != "")
        {
            m_iID = Convert.ToInt64(Request.QueryString["id"]);
        }

        RenderJS();
        RegisterResources();
    }
Exemplo n.º 11
0
    private void Page_Load(System.Object sender, System.EventArgs e)
    {
        objStyle = new StyleHelper();
            _SearchHelper = new SearchHelper();
            gtMess = m_refContentApi.EkMsgRef;
            AppPath = siteRef.AppPath;
            AppImgPath = siteRef.AppImgPath;
            CurrentUserId = siteRef.UserId;
            EnableMultilingual = siteRef.EnableMultilingual;

            ltrStyleSheet.Text = objStyle.GetClientScript();
            if (!String.IsNullOrEmpty(Request.QueryString["LangType"]))
            {
                 ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                 siteRef.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            }
            else if (!String.IsNullOrEmpty(siteRef.GetCookieValue("LastValidLanguageID")))
            {
                ContentLanguage = Convert.ToInt32(siteRef.GetCookieValue("LastValidLanguageID"));
            }

            RegisterResources();
            SetServerJSVariables();

            if (m_refContentApi.RequestInformationRef.IsMembershipUser == 1 || m_refContentApi.RequestInformationRef.UserId == 0 || ! m_refContentApi.EkUserRef.IsAllowed(m_refContentApi.UserId, 0, "users", "IsAdmin", 0))
            {
                Response.Redirect(m_refContentApi.ApplicationPath + "Login.aspx", true);
                return;
            }

            StringBuilder sb = new StringBuilder();
            action = Request.QueryString["action"];
            if ("SubmitIntegratedFolder" == action || "UpdateIntegratedFolder" == action || action == "DeleteIntegratedFolder")
            {
                try
                {
                    if (("SubmitIntegratedFolder" == action) || ("UpdateIntegratedFolder" == action))
                        {
                            cIntegratedFolder = new IntegratedFolderData();
                            cIntegratedFolder.TypeId = System.Convert.ToInt32(Request.Form["integrated_id"]);
                            cIntegratedFolder.DirectoryName = Request.Form["frm_directoryname"];
                            cIntegratedFolder.ExcludeFiles = Request.Form["frm_excludefiles"];
                            cIntegratedFolder.IncludeFiles = Request.Form["frm_includefiles"];
                            cIntegratedFolder.ExcludeDirs = Request.Form["frm_excludedirs"];
                            if (Strings.LCase(Request.Form["frm_recursive"]) == "on")
                            {
                                cIntegratedFolder.Recursive = true;
                            }
                            else
                            {
                                cIntegratedFolder.Recursive = false;
                            }
                            cIntegratedFolder.UserName = Request.Form["DomainUserName"];
                            cIntegratedFolder.Password = Request.Form["Password"];

                            if (Path.IsPathRooted(cIntegratedFolder.DirectoryName))
                            {
                                cIntegratedFolder.AbsolutePath = cIntegratedFolder.DirectoryName;
                            }
                            else
                            {
                                cIntegratedFolder.AbsolutePath = (string) (EnsureTrailingSlash(HttpContext.Current.Request.MapPath((string) ("/" + cIntegratedFolder.DirectoryName))).Replace("/", "\\\\"));
                                if (! Directory.Exists(cIntegratedFolder.AbsolutePath))
                                {
                                    cIntegratedFolder.AbsolutePath = (string) (EnsureTrailingSlash(HttpContext.Current.Request.MapPath((string) ("~/" + cIntegratedFolder.DirectoryName))).Replace("/", "\\\\"));
                                }
                            }

                            if ("AddIntegratedFolder" == action)
                            {
                                m_refContentApi.EkContentRef.AddIntegratedFolder(cIntegratedFolder);
                            }
                            else
                            {
                               m_refContentApi.EkContentRef.UpdateIntegratedFolderByID(cIntegratedFolder);
                            }

                            if ("AddIntegratedFolder" == action)
                            {
                                Response.Redirect("integratedsearch.aspx?action=ViewAllIntegratedFolders");
                            }
                            else
                            {
                                Response.Redirect((string) ("integratedsearch.aspx?action=ViewIntegratedFolder&id=" + Request.Form["integrated_id"]));
                            }

                        }
                        else if (action == "DeleteIntegratedFolder")
                        {
                            m_refContentApi.EkContentRef.DeleteIntegratedFolder(System.Convert.ToInt64(Request.QueryString["id"]));
                            Response.Redirect("integratedsearch.aspx?action=ViewAllIntegratedFolders");
                        }

                }
                catch (Exception ex)
                {
                    DebugErrLit.Text = ex.Message;
                }
            }
            else
            {
                if (action == "ViewAllIntegratedFolders")
                {
                    pnlViewAllIntegratedFolders.Visible = true;
                    pnlAddEditViewIntegratedFolder.Visible = false;
                    ContentObj = siteRef.EkContentRef;
                    cIntegratedFolderArray = ContentObj.GetIntegratedFolders();
                    foreach (IntegratedFolderData cTempIntFolder in cIntegratedFolderArray)
                    {
                        sb.Append("<tr>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append(Environment.NewLine);
                        sb.Append("     <a href=\"integratedsearch.aspx?action=ViewIntegratedFolder&id=").Append(cTempIntFolder.TypeId).Append("\" title=\"Click here to view Integrated Search Folder\">").Append(Environment.NewLine);
                        sb.Append(cTempIntFolder.DirectoryName).Append(Environment.NewLine);
                        sb.Append("     </a>").Append(Environment.NewLine);
                        sb.Append("  </td>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append(cTempIntFolder.TypeId).Append("</td>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append((cTempIntFolder.ExcludeFiles).Replace(",", ", ")).Append("</td>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append((cTempIntFolder.IncludeFiles).Replace(",", ", ")).Append("</td>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append((cTempIntFolder.ExcludeDirs).Replace(",", ", ")).Append("</td>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append(cTempIntFolder.UserName).Append("</td>").Append(Environment.NewLine);
                        sb.Append("</tr>").Append(Environment.NewLine);
                    }
                    ltrFolderList.Text = sb.ToString();
                }
                else if ("AddIntegratedFolder" == action || "EditIntegratedFolder" == action || "ViewIntegratedFolder" == action)
                {
                    pnlViewAllIntegratedFolders.Visible = false;
                    pnlAddEditViewIntegratedFolder.Visible = true;

                    bool bNew = false;
                    bool bEdit = false;
                    ContentObj = siteRef.EkContentRef;

                    bNew = ("AddIntegratedFolder" == action);
                    bEdit = ("EditIntegratedFolder" == action);
                    bView = ("ViewIntegratedFolder" == action);
                    if (bNew)
                    {
                        id = 0;
                        strTitleMsg = gtMess.GetMessage("alt Click here to add Integrated Search Folder");
                        cIntegratedFolder = new IntegratedFolderData();
                    }
                    else
                    {
                        id = Convert.ToInt64(Request.QueryString["id"]);
                        if (bEdit)
                        {
                            strTitleMsg = gtMess.GetMessage("alt Edit Integrated Search Folder");
                        }
                        else if (bView)
                        {
                            strTitleMsg = gtMess.GetMessage("alt View Integrated Search Folder");
                        }
                        cIntegratedFolder = ContentObj.GetIntegratedFolderByID(id);
                    }

                    if (bNew)
                    {
                        strAction = "SubmitIntegratedFolder";
                    }
                    else
                    {
                        strAction = "UpdateIntegratedFolder";
                        strTitleMsg = strTitleMsg + " \"" + cIntegratedFolder.DirectoryName + "\"";
                    }

                    if (!bView)
                        Ektron.Cms.API.JS.RegisterJS(this, m_refContentApi.ApplicationPath + "java/optiontransfer.js", "EktronOptionTransferJS");

                    //Toolbar
                    sb = new StringBuilder();
                    if (bNew)
                    {
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/back.png", "integratedsearch.aspx?action=ViewAllIntegratedFolders", gtMess.GetMessage("alt back button text"), gtMess.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true));
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/save.png", "#", gtMess.GetMessage("alt Click here to add this integrated search folder"), gtMess.GetMessage("btn save"), "Onclick=\"javascript:return SubmitForm('integratedform', 'VerifyIntegratedSearchForm()');\"", StyleHelper.SaveButtonCssClass, true));
                    }
                    else if (bEdit)
                    {
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/back.png", "integratedsearch.aspx?action=ViewIntegratedFolder&id=" + id + "", gtMess.GetMessage("alt back button text"), gtMess.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true));
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/save.png", "#", gtMess.GetMessage("alt Click here to updated this integrated search folder"), gtMess.GetMessage("btn update"), "Onclick=\"javascript:return SubmitForm('integratedform', 'VerifyIntegratedSearchForm()');\"", StyleHelper.SaveButtonCssClass, true));
                    }
                    else if (bView)
                    {
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/back.png", "integratedsearch.aspx?action=ViewAllIntegratedFolders", gtMess.GetMessage("alt back button text"), gtMess.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true));
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/contentEdit.png", "integratedsearch.aspx?action=EditIntegratedFolder&id=" + id + "", gtMess.GetMessage("alt Edit this integrated search folder"), gtMess.GetMessage("btn edit"), "", StyleHelper.EditButtonCssClass, true));
                        sb.Append(objStyle.GetButtonEventsWCaption(AppPath + "images/UI/Icons/delete.png", "integratedsearch.aspx?action=DeleteIntegratedFolder&id=" + id + "", gtMess.GetMessage("alt Delete this integrated search folder"), gtMess.GetMessage("btn delete"), "OnClick=\"return ConfirmDelete();\"", StyleHelper.DeleteButtonCssClass));
                    }
                    sb.Append(StyleHelper.ActionBarDivider);
                    sb.Append("<td>").Append(objStyle.GetHelpButton(action, "")).Append("</td>").Append(Environment.NewLine);
                    ltrToolBar.Text = sb.ToString();

                    //PageHolder
                    sb = new StringBuilder();
                    sb.Append("<table class=\"ektronForm\">	").Append(Environment.NewLine);
                    //tr
                    sb.Append("     <tr>").Append(Environment.NewLine);
                    sb.Append("         <td class=\"label\"><label for=\"DirectoryName\" title=\"Site Directory\">").Append(gtMess.GetMessage("lbl Site Directory")).Append("</label></td>").Append(Environment.NewLine);
                    if (bView)
                    {
                        sb.Append("     <td class=\"readOnlyValue\" title=\"").Append(cIntegratedFolder.DirectoryName).Append("\" >").Append(cIntegratedFolder.DirectoryName).Append("</td>").Append(Environment.NewLine);
                    }
                    else
                    {
                        sb.Append("     <td class=\"value\">").Append(Environment.NewLine);
                        sb.Append("         <input type=\"text\" title=\"Enter Directory Name here\" id=\"DirectoryName\" name=\"frm_directoryname\" maxlength=\"255\" value=\"").Append(EkFunctions.HtmlEncode(cIntegratedFolder.DirectoryName)).Append("\" />").Append(Environment.NewLine);
                        sb.Append("         <div class=\"ektronCaption\" title=\"Directory or virtual directory relative to site root\">").Append(gtMess.GetMessage("alt Directory or virtual directory relative to site root")).Append("</div>").Append(Environment.NewLine);
                        if (bNew || bEdit)
                            sb.Append("     <span class=\"ektronCaption\" style=\"color:Red\" title=\"Please make sure you create virtual directory first before adding the virtual directory name\">").Append(gtMess.GetMessage("alt the virtual directory name")).Append("</span>").Append(Environment.NewLine);
                        sb.Append("     </td>").Append(Environment.NewLine);
                    }
                    sb.Append("     </tr>").Append(Environment.NewLine);
                    if (!bNew)
                    {
                        sb.Append("  <tr>").Append(Environment.NewLine);
                        sb.Append("     <td class=\"label\" title=\"ID\">").Append(gtMess.GetMessage("id label")).Append("</td>").Append(Environment.NewLine);
                        sb.Append("     <td class=\"readOnlyValue\" title=\"").Append(cIntegratedFolder.TypeId).Append("\" >").Append(cIntegratedFolder.TypeId).Append("</td>").Append(Environment.NewLine);
                        sb.Append("  </tr>").Append(Environment.NewLine);
                    }
                    //tr
                    sb.Append("  <tr>").Append(Environment.NewLine);
                    sb.Append("     <td class=\"label\"><label for=\"Recursive\" title=\"Recursive\">").Append(gtMess.GetMessage("lbl Recursive")).Append(":</label></td>").Append(Environment.NewLine);
                    if (bView)
                        sb.Append("   <td class=\"readOnlyValue\" title=\"").Append(_SearchHelper.BoolToYesNo(cIntegratedFolder.Recursive)).Append("\" >").Append(_SearchHelper.BoolToYesNo(cIntegratedFolder.Recursive)).Append("</td>").Append(Environment.NewLine);
                    else
                        sb.Append("  <td class=\"value\"><input type=\"checkbox\" title=\"Recursive Option\" id=\"Recursive\" name=\"frm_recursive\" ").Append(_SearchHelper.CheckedAttr(cIntegratedFolder.Recursive)).Append(" /></td>").Append(Environment.NewLine);
                    sb.Append("  </tr>").Append(Environment.NewLine);

                    //tr
                    sb.Append("  <tr>").Append(Environment.NewLine);
                    sb.Append("      <td class=\"label\"><label for=\"IncludeFiles\" title=\"Exclude Directories\">").Append(gtMess.GetMessage("lbl exclude directories")).Append("</label></td>").Append(Environment.NewLine);
                    if (bView)
                    {
                        sb.Append("  <td class=\"readOnlyValue\" title=\"").Append((cIntegratedFolder.ExcludeDirs).Replace(",", ", ")).Append("\" >").Append((cIntegratedFolder.ExcludeDirs).Replace(",", ", ")).Append(":</td>").Append(Environment.NewLine);
                    }
                    else
                    {
                        sb.Append("  <td class=\"value\">").Append(Environment.NewLine);
                        sb.Append("    <input type=\"text\" title=\"Enter Exclude Directories here\" id=\"ExcludeDirs\" name=\"frm_excludedirs\" maxlength=\"255\" value=\"").Append(EkFunctions.HtmlEncode((cIntegratedFolder.ExcludeDirs).Replace(",", ", "))).Append("\"/>").Append(Environment.NewLine);
                        sb.Append("    <div class=\"ektronCaption\" title=\"Sub directories not to include in search\" >").Append(gtMess.GetMessage("alt Sub directories not to include in search")).Append("</div>").Append(Environment.NewLine);
                        sb.Append("  </td>").Append(Environment.NewLine);
                    }
                    sb.Append("  </tr>").Append(Environment.NewLine);
                    //tr
                    sb.Append("  <tr>").Append(Environment.NewLine);
                    sb.Append("     <td class=\"label\"><label for=\"ExcludeFiles\" title=\"Exclude Extensions\">").Append(gtMess.GetMessage("lbl exclude extension")).Append(":</label></td>").Append(Environment.NewLine);
                    if (bView)
                    {
                        sb.Append("  <td class=\"readOnlyValue\" title=\"").Append(cIntegratedFolder.ExcludeFiles).Append("\" >").Append(cIntegratedFolder.ExcludeFiles).Append("</td>").Append(Environment.NewLine);
                    }
                    else
                    {
                        sb.Append("  <td class=\"value\">").Append(Environment.NewLine);
                        sb.Append("     <input type=\"text\" title=\"Enter Excluded File Extensions here\" id=\"ExcludeFiles\" name=\"frm_excludefiles\" maxlength=\"255\" value=\"").Append(EkFunctions.HtmlEncode((cIntegratedFolder.ExcludeFiles).Replace(",", ", "))).Append("\" />").Append(Environment.NewLine);
                        sb.Append("     <div class=\"ektronCaption\" title=\"Extensions not to include *.aspx,*.ascx\">").Append(gtMess.GetMessage("alt Extensions not to include *.aspx,*.ascx")).Append("</div>").Append(Environment.NewLine);
                        sb.Append("  <td>").Append(Environment.NewLine);
                    }
                    sb.Append("  </tr>").Append(Environment.NewLine);
                    //tr
                    sb.Append("  <tr>").Append(Environment.NewLine);
                    sb.Append("       <td class=\"label\"><label for=\"IncludeFiles\" title=\"Include Extensions\">").Append(gtMess.GetMessage("lbl include extensions")).Append(":</label></td>").Append(Environment.NewLine);
                    if (bView)
                    {
                        sb.Append("   <td class=\"readOnlyValue\" title=\"").Append(cIntegratedFolder.IncludeFiles).Append("\">").Append(cIntegratedFolder.IncludeFiles).Append("</td>").Append(Environment.NewLine);
                    }
                    else
                    {
                        sb.Append("   <td class=\"value\">").Append(Environment.NewLine);
                        sb.Append("     <input type=\"text\" title=\"Enter Included File Extensions here\" id=\"IncludeFiles\" name=\"frm_includefiles\" maxlength=\"255\" value=\"").Append(EkFunctions.HtmlEncode((cIntegratedFolder.IncludeFiles).Replace(",", ", "))).Append("\"/>").Append(Environment.NewLine);
                        sb.Append("     <div class=\"ektronCaption\" title=\"*.html,*.doc exclude extensions is ignored if include is specified\">").Append(gtMess.GetMessage("alt extensions is ignored if include is specified")).Append("</div>").Append(Environment.NewLine);
                        sb.Append("   </td>").Append(Environment.NewLine);
                    }
                    sb.Append("  </tr>").Append(Environment.NewLine);
                    //tr
                    sb.Append("  <tr>").Append(Environment.NewLine);
                    sb.Append("     <td class=\"label\"><label title=\"Domain/User Name\" for=\"DomainUserName\">").Append(gtMess.GetMessage("lbl domain username")).Append(":</label></td>").Append(Environment.NewLine);
                    if (bView)
                    {
                        sb.Append("  <td class=\"readOnlyValue\">").Append(cIntegratedFolder.UserName).Append(Environment.NewLine);
                    }
                    else
                    {
                        sb.Append("  <td class=\"value\"><input type=\"text\" title=\"Enter Domain or User Name here\" id=\"DomainUserName\" name=\"DomainUserName\" maxlength=\"255\" value=\"").Append(EkFunctions.HtmlEncode(cIntegratedFolder.UserName)).Append("\"/>").Append(Environment.NewLine);
                    }
                    sb.Append("          <div class=\"ektronCaption\" title=\"Specify domain or username\">").Append(gtMess.GetMessage("alt domain username")).Append("</div>").Append(Environment.NewLine);
                    sb.Append("     </td>").Append(Environment.NewLine);
                    sb.Append("  </tr>").Append(Environment.NewLine);

                    if (bNew)
                    {
                        string integratedFolderNames = "";
                        cIntegratedFolderArray = ContentObj.GetIntegratedFolders();
                        foreach (IntegratedFolderData cTempIntFolder in cIntegratedFolderArray)
                        {
                            if (cTempIntFolder.DirectoryName != null && cTempIntFolder.DirectoryName.Length > 0)
                            {
                                if (integratedFolderNames.Length > 0)
                                {
                                    integratedFolderNames += ",";
                                }
                                integratedFolderNames += cTempIntFolder.DirectoryName;
                            }
                        }
                        sb.Append("<input type=\"hidden\" id=\"integrated_fol_names\" value=\"").Append(integratedFolderNames).Append("\" />").Append(Environment.NewLine);
                    }
                    ektronPageHolder.InnerHtml = sb.ToString();
                }
            }
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        ApplicationAPI AppUI = new ApplicationAPI();
        if (Request.QueryString["LangType"] == "-1")
        {
            ContentLanguage = AppUI.DefaultContentLanguage;
            AppUI.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            AppUI.ContentLanguage = ContentLanguage;
        }
        else
        {
            AppUI.ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            ContentLanguage = AppUI.ContentLanguage;
        }

        if (!string.IsNullOrEmpty(Request.QueryString["noworkarea"]) && Request.QueryString["noworkarea"] == "1")
        {
            noWorkAreaString = "&noworkarea=1";
        }
        long mpID = Convert.ToInt64(Request.QueryString["parentid"]);
        long maID = Convert.ToInt64(Request.QueryString["ancestorid"]);

        string AncestorIDParam = "";
        string ParentIDParam = "";
        Collection gtNavs = new Collection();
        if (string.IsNullOrEmpty(Request.QueryString["ancestorid"]))
            AncestorIDParam = "&ancestorid=" + Request.QueryString["ancestorid"];
         if (string.IsNullOrEmpty(Request.QueryString["parentid"]))
            ParentIDParam = "&parentid=" + Request.QueryString["parentid"];

        FolderId = Convert.ToInt64(Request.QueryString["folderid"]);
        MenuId = Convert.ToInt64(Request.QueryString["nId"]);
        string ItemType = Request.Form["ItemType"];

        if (mpID != 0)
        {
            gtNavs = AppUI.EkContentRef.GetMenuByID(mpID, 0, false);
            if (gtNavs.Count > 0)
            {
                if (gtNavs.Contains("EnableReplication"))
                    enableQDOparam = "&qdo=1";
            }
        }
        switch (ItemType)
        {
            case "content":
                Response.Redirect("collections.aspx?action=AddLink&addto=Menu&folderid=" + FolderId + "&nid=" + MenuId + "&LangType=" + ContentLanguage + "&iframe=" + Request.QueryString["iframe"] + AncestorIDParam + ParentIDParam + "&back=" + Server.UrlEncode(Request.QueryString["back"]) + enableQDOparam + noWorkAreaString);
                break;
            case "newcontent":
                Response.Redirect("collectiontree.aspx?action=AddLink&addto=menu&noworkarea=1&nid=" + MenuId + "&folderid=" + FolderId + "&LangType=" + ContentLanguage);
                break;
            case "submenu":
                string enableReplicationFlag = "";
                if ((gtNavs.Count > 0) && (gtNavs.Contains("EnableReplication")))
                    enableReplicationFlag = gtNavs["EnableReplication"].ToString();
                string strPath = "collections.aspx?action=AddSubMenu&folderid=" + FolderId + "&nId=" + MenuId + "&parentid=" + mpID + "&ancestorid=" + maID + "&LangType=" + ContentLanguage + "&iframe=" + Request.QueryString["iframe"] + "&back=" + Server.UrlEncode(Request.QueryString["back"]) + "&QD=" + enableReplicationFlag + noWorkAreaString;
                Response.Redirect(strPath);
                break;
            case "library":
                divLibrary.Visible = true;
                Collection gtFolderInfo = AppUI.EkContentRef.GetFolderInfoWithPath(FolderId);
                FolderPath = gtFolderInfo["Path"].ToString();
           	        if (FolderPath.Substring(FolderPath.Length - 1, 1) == "\\")
                    FolderPath = FolderPath.Remove(FolderPath.Length - 1, 1);
                FolderPath = FolderPath.Replace(@"\", @"\\");
                divLibrary.Visible = true;
                litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("Add Menu Item Title"));
                litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("pAddMenuItem", "") + "</td>";
                if (!string.IsNullOrEmpty(Request.QueryString["back"]))
                    litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
                else if (Request.QueryString["iframe"] == "true")
                    litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
                else
                    litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"top.close();\"", StyleHelper.CancelButtonCssClass, true);
                litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt Save Menu Item"), MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'AddMenuItem\', \'VerifyLibraryAssest()\');\"", StyleHelper.SaveButtonCssClass, true);
            break;
            default:
            divOther.Visible = true;
            litHelp1.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("pAddMenuItem", "") + "</td>";
            litTitle1.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("Add Menu Item Title"));

            if (!string.IsNullOrEmpty(Request.QueryString["back"]))
                litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
            else if (Request.QueryString["iframe"] == "true")
                litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
            else
                litButtons1.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"top.close();\"", StyleHelper.CancelButtonCssClass, true);
            litButtons1.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt Save Menu Item"), MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'AddMenuItem\', \'VerifyAddMenuItem()\');\"", StyleHelper.SaveButtonCssClass, true);
            break;
        }
    }
Exemplo n.º 13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        Collection gtNavs = new Collection();
        ApplicationAPI AppUI = new ApplicationAPI();
        long nId = Convert.ToInt64(Request.QueryString["nid"]);
        if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
        {
            Int32 ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            if (ContentLanguage == ALL_CONTENT_LANGUAGES)
            {
                ContentLanguage = AppUI.DefaultContentLanguage;
            }

            AppUI.FilterByLanguage=ContentLanguage;
        }
        string ErrorString = "";
        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
        {
            string action = Request.QueryString["action"].ToString();
            if (action.ToString().ToLower() == "viewstageattributes")
            {
                gtNavs = AppUI.EkContentRef.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, true);
            }
            else
            {
                gtNavs = AppUI.EkContentRef.GetEcmCollectionByID( nId, false, false, ref ErrorString, true, false, true);
            }
        }
        string checkout = "";
        if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && ((gtNavs["Status"].ToString() == "A") || (gtNavs["Status"].ToString() == "S")))
            checkout = "&checkout=true";
        if (Convert.ToBoolean(gtNavs["ApprovalRequired"]) == true && gtNavs["Status"].ToString() == "O")
            checkout = checkout + "&status=o";
        string CollectionTitle = "";
        if (ErrorString == "")
        {
            if (gtNavs.Count > 0)
                CollectionTitle = gtNavs["CollectionTitle"].ToString();
        }
        if (ErrorString != "")
        {
            titlebarerror.InnerHtml = ErrorString;
        }
        litViewCollection.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collection title"));
        litViewToolBarCollection.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collection title")) + " " + CollectionTitle;

        long folderId = 0;
        if (!string.IsNullOrEmpty(Request.QueryString["folderId"]))
        {
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);
        }

        if (Request.QueryString["bpage"] == "reports")
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewCollectionReport", MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        else
            litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=View&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);

        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/contentEdit.png", "collections.aspx?action=Edit&nid=" + nId + "&folderid=" + folderId + checkout, MsgHelper.GetMessage("alt: edit collection text"), MsgHelper.GetMessage("btn edit"), "", StyleHelper.EditButtonCssClass, true);

        if (m_refApi.EnableMultilingual == 1)
        {
            litLang.Text = StyleHelper.ActionBarDivider + "<td>" + MsgHelper.GetMessage("view language") + LangDD(false, "") + "</td>";
        }
        litTitle.Text = MsgHelper.GetMessage("generic title label");
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("ViewCollectionItems", "") + "</td>";
        litLabel.Text = MsgHelper.GetMessage("id label");
        litPath.Text = MsgHelper.GetMessage("lbl path") + ":";
        litTemplate.Text = MsgHelper.GetMessage("generic template label");
        litContentLUE.Text = MsgHelper.GetMessage("content LUE label");
        litLED.Text = MsgHelper.GetMessage("content LED label");
        litDC.Text = MsgHelper.GetMessage("content DC label");
        litDesc.Text = MsgHelper.GetMessage("description label");
        litStatus.Text = MsgHelper.GetMessage("lbl linkcheck status");
        litSubFolders.Text = MsgHelper.GetMessage("generic include subfolders msg");
        litApproval.Text = MsgHelper.GetMessage("lbl approval required");

        tdTitle.InnerHtml = gtNavs["CollectionTitle"].ToString();
        tdID.InnerHtml = gtNavs["CollectionID"].ToString();
        if (gtNavs.Contains("FolderPath") && !string.IsNullOrEmpty(gtNavs["FolderPath"].ToString())) {
            tdPath.InnerHtml = gtNavs["FolderPath"].ToString();
        }
        tdTemplate.InnerHtml = gtNavs["TemplatePath"].ToString();
        tdLUE.InnerHtml = gtNavs["EditorFName"] + " " + gtNavs["EditorLName"];
        tdLastEditDate.InnerHtml = gtNavs["DisplayLastEditDate"].ToString();
        tdDateCreated.InnerHtml = gtNavs["DisplayDateCreated"].ToString();
        tdDesc.InnerHtml = gtNavs["CollectionDescription"].ToString();
        tdStatus.InnerHtml = gtNavs["Status"].ToString();
        frm_recursive.Checked = (Convert.ToInt32(gtNavs["Recursive"]) == 1 ? true : false);
        approval.Checked = Convert.ToBoolean(gtNavs["ApprovalRequired"]);
        gtNavs = null;
    }
Exemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();

        Collection gtNavs = new Collection();
        if (Request.QueryString["LangType"] != null)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
            {
                ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
                if (ContentLanguage == 0)
                    ContentLanguage = AppUI.DefaultContentLanguage;
                m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
            }
            else
            {
                if (!string.IsNullOrEmpty(m_refContentApi.GetCookieValue("LastValidLanguageID")))
                {
                    ContentLanguage = Convert.ToInt32(m_refContentApi.GetCookieValue("LastValidLanguageID"));
                }
            }
        }
        else
        {
            if (!string.IsNullOrEmpty(m_refContentApi.GetCookieValue("LastValidLanguageID")))
            {
                ContentLanguage = Convert.ToInt32(m_refContentApi.GetCookieValue("LastValidLanguageID"));
                if (ContentLanguage == 0)
                {
                    ContentLanguage = AppUI.DefaultContentLanguage;
                    m_refContentApi.SetCookieValue("LastValidLanguageID", ContentLanguage.ToString());
                }
            }
        }
        AppUI.FilterByLanguage = ContentLanguage;

        nId = Convert.ToInt64(Request.QueryString["nid"]);
        folderId = Convert.ToInt64(Request.QueryString["folderid"]);
        if (Request.QueryString["OrderBy"] != null && Request.QueryString["OrderBy"].Length > 0)
            orderBy = Request.QueryString["OrderBy"].ToString();
        gtNavs = AppUI.EkContentRef.GetAllMenusInfo(folderId, orderBy);

        litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view all menu title"));
        litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "content.aspx?Action=ViewContentByCategory&id=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        litButtons.Text =  m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/add.png", "collections.aspx?action=AddMenu&folderid=" + folderId + "&LangType=" + ContentLanguage, MsgHelper.GetMessage("alt add new menu"), MsgHelper.GetMessage("btn add"), "", StyleHelper.AddButtonCssClass, true);
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("ViewAllMenus", "") + "</td>";
        litGenericTitle.Text = MsgHelper.GetMessage("generic Title");
        litGenericId.Text = MsgHelper.GetMessage("generic ID");
        litLangId.Text = MsgHelper.GetMessage("lbl Language ID");
        litDateMod.Text = MsgHelper.GetMessage("generic Date Modified");
        string idContainer = "";
        if (gtNavs.Count > 0)
        {
            foreach (Collection gtNav in gtNavs)
                idContainer = idContainer + gtNav["MenuID"] + ",";
            idContainer = idContainer.Remove(0, 1);
        }
        if ((idContainer != "") && (m_refApi.EnableMultilingual == 1))
        {
            litViewLang.Text = StyleHelper.ActionBarDivider + "<td nowrap=\"nowrap\"> View In:&nbsp;" + ViewLangsForMenuID(idContainer, "", true, true, "javascript:LoadLanguage(this.value);") + "&nbsp;<br /></td>";
        }
        else
        {
            if (m_refApi.EnableMultilingual == 1)
            {
                litViewLang.Text = StyleHelper.ActionBarDivider + "<td nowrap=\"nowrap\">View In:&nbsp";
                Hashtable colActiveLanguages = AppUI.EkSiteRef.GetAllActiveLanguages();
                litViewLang.Text += "<select id=selLang name=selLang onchange=\"LoadLanguageMenus('frmViewMenus');\">";
                if (ContentLanguage == -1)
                    litViewLang.Text += "<option value=" + ALL_CONTENT_LANGUAGES + " selected>" + MsgHelper.GetMessage("lbl abbreviation for all the words") + "</option>";
                else
                    litViewLang.Text += "<option value=" + ALL_CONTENT_LANGUAGES + ">" + MsgHelper.GetMessage("lbl abbreviation for all the words") + "</option>";

                foreach (DictionaryEntry Language in colActiveLanguages)
                {
                    Hashtable langData = Language.Value as Hashtable;
                    if (langData != null)
                    {
                        if (ContentLanguage.ToString() == langData["ID"].ToString())
                            litViewLang.Text += "<option value=\"" + langData["ID"] + "\" selected>" + langData["Name"] + "</option>";
                        else
                            litViewLang.Text += "<option value=\"" + langData["ID"] + "\" >" + langData["Name"] + "</option>";
                    }
                }
                litViewLang.Text += "</select>";
                litViewLang.Text += "</td>";
            }
        }

        if (gtNavs.Count > 0)
        {
            DataTable dtItems = new DataTable();
            dtItems.Columns.Add("MenuTitle");
            dtItems.Columns.Add("MenuID");
            dtItems.Columns.Add("ContentLanguage");
            dtItems.Columns.Add("DisplayLastEditDate");
            dtItems.Columns.Add("FolderId");
            foreach (Collection gtNav in gtNavs)
            {
                DataRow dRow = dtItems.NewRow();
                dRow["MenuTitle"] = gtNav["MenuTitle"].ToString();
                dRow["MenuID"] = gtNav["MenuID"].ToString();
                dRow["ContentLanguage"] = gtNav["ContentLanguage"].ToString();
                dRow["DisplayLastEditDate"] = gtNav["DisplayLastEditDate"].ToString();
                dRow["FolderId"] = folderId;
                dtItems.Rows.Add(dRow);
            }
            rptMenus.DataSource = dtItems;
            rptMenus.DataBind();
        }
    }
Exemplo n.º 15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Collection gtLink = new Collection();
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        nId = Convert.ToInt64(Request.QueryString["nid"]);
        ApplicationAPI AppUI = new ApplicationAPI();
        ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
        if (ContentLanguage == ALL_CONTENT_LANGUAGES)
        {
            ContentLanguage = AppUI.DefaultContentLanguage;
        }

        AppUI.FilterByLanguage=ContentLanguage;

        if (!string.IsNullOrEmpty(Request.QueryString["checkout"]))
            checkout = "&checkout=" + Request.QueryString["checkout"].ToString();
        Collection gtLinks = new Collection();
        string ErrorString = "";
        if (checkout != "")
            gtLinks = AppUI.EkContentRef.GetEcmStageCollectionByID(nId, false, false, ref ErrorString, true, false, true);
        else
        {
            if (string.IsNullOrEmpty(Request.QueryString["status"]) && Request.QueryString["status"] == "o")
                gtLinks = AppUI.EkContentRef.GetEcmStageCollectionByID(nId, false, false, ref ErrorString,true, false, true);
            else
                gtLinks = AppUI.EkContentRef.GetEcmCollectionByID(nId, false, false, ref ErrorString,true, false, true);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["status"]))
        {
            if (Request.QueryString["status"].ToString().ToLower() == "o")
                bAction = "&status=o";
        }
        else
        {
            if (Convert.ToBoolean(gtLinks["ApprovalRequired"]) == true && gtLinks["Status"].ToString().ToUpper() == "O")
                bAction = "&status=o";
        }
        string CollectionTitle = "";
        if (ErrorString == "")
        {
            if (gtLinks.Count > 0)
            {
                CollectionTitle = gtLinks["CollectionTitle"].ToString();
                gtLink = (Collection)gtLinks["Contents"];
            }
        }
        OrderList.Size =(gtLinks.Count < 20 ? gtLinks.Count : 20);
        reOrderList = "";
        foreach (Collection gtNav in gtLink)
        {
            if (reOrderList.Length > 0)
                reOrderList = reOrderList + "," + gtNav["ContentID"] + "|" + gtNav["ContentLanguage"];
            else
                reOrderList = gtNav["ContentID"] + "|" + gtNav["ContentLanguage"];
            OrderList.Items.Add(new ListItem(Server.HtmlDecode(gtNav["ContentTitle"].ToString()), gtNav["ContentID"] + "|" + gtNav["ContentLanguage"]));
        }
        if (gtLinks.Count > 0)
            OrderList.SelectedIndex = 0;
        long folderId = 0;
        if (string.IsNullOrEmpty(Request.QueryString["folderId"]))
        {
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);
        }
        reOrderList = "";
        if (ErrorString != "")
        {
            divError.InnerHtml = ErrorString;
            divErrors.Visible = true;
        }
        litReOrder.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("reorder collection title"));
        litReOrderTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("reorder collection title") + " \"" + CollectionTitle + "\"");

        litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=View&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt: update collection order text"), MsgHelper.GetMessage("btn update"), "onclick=\"return SubmitForm(\'link_order\', \'\');\"", StyleHelper.SaveButtonCssClass, true);

        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("ReOrderLinks", "") + "</td>";

        frm_folder_id.Value = folderId.ToString();
        Up.Src = AppUI.AppPath + "images/UI/Icons/arrowHeadUp.png";
        Up.Alt = MsgHelper.GetMessage("move selection up msg");
        Down.Src = AppUI.AppPath + "images/UI/Icons/arrowHeadDown.png";
        Down.Alt = MsgHelper.GetMessage("move selection down msg");
    }
Exemplo n.º 16
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();

        string MenuTitle = "";

        ApplicationAPI AppUI = new ApplicationAPI();
        nId = Convert.ToInt64(Request.QueryString["nid"]);
        Collection gtLinks = AppUI.EkContentRef.GetMenuByID(nId, 0, false);
        if (gtLinks.Count > 0)
        {
            MenuTitle = gtLinks["MenuTitle"].ToString();
            gtLinks = (Collection)gtLinks["Items"];
        }
        long folderId = 0;
        if (!string.IsNullOrEmpty(Request.QueryString["folderId"]))
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);

        string action = "";
        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
            action = Request.QueryString["action"].ToString();
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "</td>";
        litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("reorder menu item title") + " \"" + MenuTitle + "\"");

        if (string.IsNullOrEmpty(Request.QueryString["back"]))
           litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
        else if (Request.QueryString["iframe"] == "true")
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
        else
        {
            if (m_refApi.TreeModel == 1)
            {
                string treeViewIdParam = "";
                if (!string.IsNullOrEmpty(Request.QueryString["treeViewId"]))
                    treeViewIdParam = "&treeViewId=" + Request.QueryString["treeViewId"].ToString();
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menu.aspx?Action=viewcontent&menuid=" + nId + "&folderid=" + folderId + treeViewIdParam, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
            }
            else
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=ViewMenu&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        }

        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt: update menu order text"), MsgHelper.GetMessage("btn update"), "onclick=\"return SubmitForm(\'link_order\', \'true\');\"", StyleHelper.SaveButtonCssClass, true);

        if (gtLinks.Count < 20)
            OrderList.Size = gtLinks.Count;
        else
            OrderList.Size = 20;
        reOrderList = "";

        foreach (Collection gtNav in gtLinks)
        {
            if (reOrderList.Length > 0)
                reOrderList = reOrderList + "," + gtNav["ID"];
            else
                reOrderList = gtNav["ID"].ToString();

            if (Char.IsNumber(gtNav["ID"].ToString(), 0))
            {
                OrderList.Items.Add(new ListItem(gtNav["ItemTitle"].ToString(), gtNav["ID"].ToString()));
            }
        }
        if (gtLinks.Count > 0)
            OrderList.SelectedIndex = 0;
        frmfolderid.Value = folderId.ToString();
        UP.Src = AppUI.AppPath + "images/UI/Icons/arrowHeadUp.png";
        UP.Alt = MsgHelper.GetMessage("move selection up msg");
        DOWN.Src = AppUI.AppPath + "images/UI/Icons/arrowHeadDown.png";
        DOWN.Alt = MsgHelper.GetMessage("move selection down msg");
    }
Exemplo n.º 17
0
    protected void Page_Load(object sender, EventArgs e)
    {
        MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        ApplicationAPI AppUI = new ApplicationAPI();
        long Id = Convert.ToInt64(Request.QueryString["id"]);
        MenuId = Convert.ToInt64(Request.QueryString["nid"]);
        FolderId = Convert.ToInt64(Request.QueryString["folderid"]);
        gtLinks = AppUI.EkContentRef.GetMenuItemByID(MenuId, Id, true);
        sitePath = AppUI.SitePath;
        AppPath = AppUI.AppPath;
        long t_ID = Convert.ToInt64(gtLinks["ID"]);
        string t_ItemType = gtLinks["ItemType"].ToString();
        Int32 t_ContentLanguage = Convert.ToInt32(gtLinks["ContentLanguage"]);
        string t_iframe = "";
        if (!string.IsNullOrEmpty(Request.QueryString["iframe"]))
            t_iframe = Request.QueryString["iframe"].ToString();
        Title.Value = gtLinks["ItemTitle"].ToString();
        if ((string)gtLinks["ItemType"] == "1")
        {
            litInfo.Text += "<tr><td class=\"label\" title=\"Link\">";
            litInfo.Text += MsgHelper.GetMessage("lbl Link") + ":</td>";
            litInfo.Text += "<td class=\"value\">";
            litInfo.Text += "<input type=\"radio\" name=\"linkType\" value=\"0\" " + (((string)gtLinks["LinkType"] == "0" || (string)gtLinks["LinkType"] == "") ? "checked=\"checked\"" : "") + " title=\"QuickLink\" />" + MsgHelper.GetMessage("lbl QuickLink");
            litInfo.Text += "<input type=\"radio\" name=\"linkType\" value=\"1\" " + ((string)gtLinks["LinkType"] == "1" ? "checked=\"checked\"" : "") + " title=\"Menu Template\" />" + MsgHelper.GetMessage("lbl Menu Template") + "</td></tr>";
        }

        if ((Convert.ToInt32(t_ItemType) == 1) && (string.IsNullOrEmpty(gtLinks["ItemLink"].ToString())))
        {
            //Using the contentblock control to get the exact quicklink for asset which is not in contendata used above.
            //This is because the  contentdata or assetdata has nothing to show difference btw assets and privateassets.
            //Regarding the defect #58344
            Ektron.Cms.Controls.ContentBlock cBlock = new Ektron.Cms.Controls.ContentBlock();
            cBlock.Page = this.Page;
            cBlock.DefaultContentID = Convert.ToInt64(gtLinks["ItemID"]);
            cBlock.Fill();
            //urlLink.["URL"] = cBlock.EkItem.QuickLink;
            tdItemLink.Visible = false;
            tdURLLink.Visible = true;
            urlLink.Value = cBlock.EkItem.QuickLink;
        }
        if (t_ItemType != "5" && t_ItemType != "2")
        {
            if ((string)gtLinks["ItemLink"] != "")
                litInfo.Text += "<tr><td class=\"label\" title=\"Quick Link\">" + MsgHelper.GetMessage("lbl Quick Link") + ":</td><td class=\"readOnlyValue\">" + (string)gtLinks["ItemLink"] + "</td></tr>";
            if ((string)gtLinks["FolderId"] != "")
                litInfo.Text += "<tr><td class=\"label\" title=\"Folder Id\">" + MsgHelper.GetMessage("lbl Folder ID") + ":</td><td class=\"readOnlyValue\">" + (string)gtLinks["FolderId"] + "</td></tr>";
        }
        litImageLink.Text = MsgHelper.GetMessage("lbl Image Link");
        litTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("edit Menu items title"));
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("editmenuitem", "") + "</td>";
        litGenericTitle.Text = MsgHelper.GetMessage("generic title label");

        if (Request.QueryString["back"] != "")
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", Request.QueryString["back"], MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "", StyleHelper.CancelButtonCssClass, true);
        else if (Request.QueryString["iframe"] == "true")
            litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/cancel.png", "#", MsgHelper.GetMessage("generic Cancel"), MsgHelper.GetMessage("generic Cancel"), "onclick=\"parent.CancelIframe();\"", StyleHelper.CancelButtonCssClass, true);
        else
        {
            if (m_refApi.TreeModel == 1)
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "menutree.aspx?nid=" + MenuId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
            else
                litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?action=ViewMenu&nId=" + MenuId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        }

        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/save.png", "#", MsgHelper.GetMessage("alt save menu item"), MsgHelper.GetMessage("btn save"), "onclick=\"return SubmitForm(\'AddMenuItem\', \'VerifyAddMenuItem()\');\"", StyleHelper.SaveButtonCssClass, true);
    }
Exemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        ApplicationAPI AppUI = new ApplicationAPI();
        nId = Convert.ToInt64(Request.QueryString["nid"]);
        CollectionID.Value = nId.ToString();
        Collection gtLinks = new Collection();
        string ErrorString = "";
        string CollectionTitle = "";
        if (!string.IsNullOrEmpty(Request.QueryString["LangType"]))
        {
            Int32 ContentLanguage = Convert.ToInt32(Request.QueryString["LangType"]);
            if (ContentLanguage == ALL_CONTENT_LANGUAGES)
            {
                ContentLanguage = AppUI.DefaultContentLanguage;
            }

            AppUI.FilterByLanguage=ContentLanguage;
        }
        string checkout = "";
        if (!string.IsNullOrEmpty(Request.QueryString["checkout"]))
            checkout = Request.QueryString["checkout"].ToString();

        if (checkout == "true" || Request.QueryString["status"] == "o")
            gtLinks = AppUI.EkContentRef.GetEcmStageCollectionByID( nId, false, false, ref ErrorString, true, false, true);
        else
            gtLinks = AppUI.EkContentRef.GetEcmCollectionByID( nId, false, false, ref ErrorString, true, false, true);
        if (ErrorString == "")
        {
            if (gtLinks.Count > 0)
            {
                CollectionTitle = gtLinks["CollectionTitle"].ToString();
                gtLinks = (Collection)gtLinks["Contents"];
            }
            }
        if (ErrorString != "")
        {
            divError.Visible = true;
        }
        if (string.IsNullOrEmpty(Request.QueryString["folderId"]))
        {
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);
        }
        divTitle.InnerHtml = ErrorString;
        DeleteCollectionError.InnerHtml = m_refStyle.GetTitleBar(MsgHelper.GetMessage("delete collection items title"));
        DeleteCollection.InnerHtml = m_refStyle.GetTitleBar(MsgHelper.GetMessage("delete collection items title")) + " " + CollectionTitle;
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("deletecollectionitems", "") + "</td>";
        litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx?Action=View&nid=" + nId + "&folderid=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/delete.png", "#", MsgHelper.GetMessage("alt: delete collection items text"), MsgHelper.GetMessage("btn delete"), "onclick=\"return SubmitForm(\'selections\', \'GetIDs()\');\"", StyleHelper.DeleteButtonCssClass, true);
        litGenericTitle.Text = MsgHelper.GetMessage("generic Title");
        litGenericID.Text = MsgHelper.GetMessage("generic ID");
        litGenericURL.Text = MsgHelper.GetMessage("generic URL Link");

        Int32 lLoop = 0;
        string cLanguagesArray = "";
        DataTable dtItems = new DataTable();
        dtItems.Columns.Add("lLoop");
        dtItems.Columns.Add("ContentLanguage");
        dtItems.Columns.Add("ContentID");
        dtItems.Columns.Add("ContentLinks");
        dtItems.Columns.Add("ContentIcon");
        foreach (Collection gtLink in gtLinks)
        {
            DataRow dRow = dtItems.NewRow();
            dRow["lLoop"] = lLoop;
            dRow["ContentLanguage"] = gtLink["ContentLanguage"].ToString();
            dRow["ContentID"] = gtLink["ContentID"].ToString();
            dRow["ContentLinks"] = gtLink["ContentLinks"].ToString();
            dRow["ContentIcon"] = getContentTypeIconAspx(Convert.ToInt32(gtLink["ContentType"]), gtLink) + gtLink["ContentTitle"].ToString();
            dtItems.Rows.Add(dRow);

            cLinkArray = cLinkArray + "," + gtLink["ContentID"];
            cLanguagesArray=cLanguagesArray + "," + gtLink["ContentLanguage"];
            fLinkArray = fLinkArray + "," + folderId;
            lLoop = lLoop + 1;
        }
        rptItems.DataSource = dtItems;
        rptItems.DataBind();

        if (cLinkArray.Length > 0)
        {
            cLinkArray = cLinkArray.Remove(0, 1);
            fLinkArray = fLinkArray.Remove(0, 1);
            cLanguagesArray = cLanguagesArray.Remove(0, 1);
        }
    }
Exemplo n.º 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EkMessageHelper MsgHelper = new EkMessageHelper(m_refContentApi.RequestInformationRef);
        StyleHelper m_refStyle = new StyleHelper();
        CommonApi m_refApi = new CommonApi();
        Collection gtNavs = null;
        Collection gtNav = null;
        string ErrorString = "";
        string FolderName = "";
        ApplicationAPI AppUI = new ApplicationAPI();
        long folderId = 0;
        string action = "";
        if (!string.IsNullOrEmpty(Request.QueryString["folderId"]))
        {
            folderId = Convert.ToInt64(Request.QueryString["folderId"]);
        }
        if (!string.IsNullOrEmpty(Request.QueryString["action"]))
        {
            action = Request.QueryString["action"].ToString();
        }
        string OrderBy = Request.QueryString["OrderBy"];
        if (OrderBy == "")
            OrderBy = "title";
        gtNavs = AppUI.EkContentRef.GetAllCollectionsInfo(folderId, "title");
        if (ErrorString.Length  == 0)
        {
            gtNav = AppUI.EkContentRef.GetFolderInfov2_0(folderId);
            if (ErrorString.Length == 0)
                FolderName = gtNav["FolderName"].ToString();
        }
        if (ErrorString != "")
        {
            divError.Visible = true;

        }
        titlebarerror.InnerHtml = ErrorString;
        litErrorButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "collections.aspx", MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        litErrorHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton(action, "") + "<td>";
        litCollectionTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collections title")) + " " + FolderName;
        litErrorViewCollectionTitle.Text = m_refStyle.GetTitleBar(MsgHelper.GetMessage("view collections title"));
        litGenericError.Text = MsgHelper.GetMessage("generic page error message");
        litButtons.Text = m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/back.png", "content.aspx?Action=ViewContentByCategory&id=" + folderId, MsgHelper.GetMessage("alt back button text"), MsgHelper.GetMessage("btn back"), "", StyleHelper.BackButtonCssClass, true);
        litButtons.Text += m_refStyle.GetButtonEventsWCaption(AppUI.AppPath + "images/UI/Icons/add.png", "collections.aspx?action=Add&folderid=" + folderId, MsgHelper.GetMessage("alt: add new collection text"), MsgHelper.GetMessage("btn add"), "", StyleHelper.AddButtonCssClass, true);
        litHelp.Text = StyleHelper.ActionBarDivider + "<td>" + m_refStyle.GetHelpButton("view_collections_in_folder", "") + "<td>";

        if (gtNavs.Count > 0)
        {
            DataTable dtItems = new DataTable();
            dtItems.Columns.Add("CollectionID");
            dtItems.Columns.Add("DisplayLastEditDate");
            dtItems.Columns.Add("CollectionTemplate");
            dtItems.Columns.Add("CollectionTitle");
            dtItems.Columns.Add("CollectionLink");

            foreach (Collection gtNa in gtNavs)
            {
                string colAction = "";
                if (Convert.ToBoolean(gtNa["ApprovalRequired"]) && gtNa["Status"].ToString().ToUpper() != "A")
                    colAction = "&action=ViewStage";
                else
                    colAction = "&action=View";
                DataRow dRow = dtItems.NewRow();
                dRow["CollectionID"] = gtNa["CollectionID"].ToString();
                dRow["DisplayLastEditDate"] = gtNa["DisplayLastEditDate"].ToString();
                dRow["CollectionTemplate"] = gtNa["CollectionTemplate"].ToString();
                dRow["CollectionTitle"] = gtNa["CollectionTitle"].ToString();
                dRow["CollectionLink"] = "collections.aspx?folderid=" + folderId + colAction + "&nid=" + gtNa["CollectionID"].ToString();
                dtItems.Rows.Add(dRow);
            }
            rptInfo.DataSource = dtItems;
            rptInfo.DataBind();
        }
        gtNavs = null;
        aGenericTitle.HRef = "collections.aspx?folderid=" + folderId + "&OrderBy=navname";
        aGenericTitle.InnerHtml = MsgHelper.GetMessage("generic Title");
        aGenericId.HRef = "collections.aspx?folderid=" + folderId + "&OrderBy=CollectionID";
        aGenericId.InnerHtml = MsgHelper.GetMessage("generic ID");
        aGenericLast.HRef = "collections.aspx?folderid=" + folderId + "&OrderBy=date";
        aGenericLast.InnerHtml = MsgHelper.GetMessage("generic Date Modified");
        aGenericURL.HRef = "collections.aspx?folderid=" + folderId + "&OrderBy=CollectionTemplate";
        aGenericURL.InnerHtml = MsgHelper.GetMessage("generic URL Link");
    }