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"; } }
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; } }
private void Page_Load(System.Object sender, System.EventArgs e) { StyleHelper m_refStyle = new StyleHelper(); m_refMsg = (new CommonApi()).EkMsgRef; RegisterResources(); if (PageAction == "viewlibrarycategory") { // txtTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library folder title bar") & " """ & FolderInfo.Name & """") // ViewLibraryCategoryToolBar() divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("library folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryByCategoryToolBar(); } else if (PageAction == "viewlibrarybycategory") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("library folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryByCategoryToolBar(); } else if (PageAction == "updateqlinktemplatebycategory") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("Update URL Link Template for") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); UpdateQLinkTemplateByCategoryToolBar(); } else if (PageAction == "addlibraryitem") { if (Operation == "overwrite") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("overwrite folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); } else { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("add to lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); } AddLibraryItemToolBar(); } else if (PageAction == "viewlibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("view lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); ViewLibraryItemToolBar(); } else if (PageAction == "deletelibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("delete lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); DeleteLibraryItemToolBar(); } else if (PageAction == "editlibraryitem") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar((string) (m_refMsg.GetMessage("edit lib folder title bar") + " \"" + FolderInfo.Name + "\\" + LibType + "\"")); EditLibraryItemToolBar(); } else if (PageAction == "viewlibrarysettings") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library page title")); ViewLibrarySettingsToolBar(); //ElseIf (PageAction = "viewloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("view lb settings")) // ViewLoadBalanceToolBar() //ElseIf (PageAction = "addloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("add lb path msg")) // AddLoadBalanceToolBar() //ElseIf (PageAction = "editloadbalancesettings") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("edit lb path msg")) // EditLoadBalanceSettingsToolBar() //ElseIf (PageAction = "removeloadbalance") Then // divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("remove lb path msg")) // RemoveLoadBalanceToolBar() } else if (PageAction == "editlibrarysettings") { divTitleBar.InnerHtml = m_refStyle.GetTitleBar(m_refMsg.GetMessage("library page title")); EditLibrarySettingsToolBar(); } }
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(); }
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"])))); } }
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"); }
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(); }
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); } }
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: " + ViewLangsForMenuID(idContainer, "", true, true, "javascript:LoadLanguage(this.value);") + " <br /></td>"; } else { if (m_refApi.EnableMultilingual == 1) { litViewLang.Text = StyleHelper.ActionBarDivider + "<td nowrap=\"nowrap\">View In: "; 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(); } }
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; }
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"); }
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"); }
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); }
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(); }
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"); }