Ejemplo n.º 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            // Load Protal Definition and the current Tab
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab currentTab = pd.GetTab(Request["TabRef"]);

            // Foreach Tab...
            ArrayList tabList    = new ArrayList();
            ArrayList subTabList = new ArrayList();

            foreach (PortalDefinition.Tab t in pd.tabs)
            {
                DisplayTabItem dt = BuildDisplayTabItem(t);
                if (dt != null)
                {
                    // Set current Tab Property
                    if (currentTab == null)
                    {
                        if (tabList.Count == 1)
                        {
                            // First tab -> default
                            dt.CurrentTab = true;
                        }
                    }
                    else
                    {
                        dt.CurrentTab = currentTab.RootTab == t;
                    }
                    tabList.Add(dt);

                    if (dt.CurrentTab && Config.TabMenuShowSubTabs)
                    {
                        foreach (PortalDefinition.Tab st in t.tabs)
                        {
                            DisplayTabItem sdt = BuildDisplayTabItem(st);
                            if (sdt != null)
                            {
                                subTabList.Add(sdt);
                            }
                        }
                    }
                }
            }             // foreach(tab)

            // Bind Repeater
            Tabs.DataSource = tabList;
            Tabs.DataBind();

            if (subTabList.Count > 0)
            {
                TabMenu_SubTab.Visible = true;
                SubTabs.DataSource     = subTabList;
                SubTabs.DataBind();
            }
            else
            {
                TabMenu_SubTab.Visible = false;
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            PortalDefinition.Tab currentTab = PortalDefinition.GetCurrentTab();
            if (currentTab == null || currentTab.tabs == null)
            {
                return;
            }

            ArrayList tabList = new ArrayList();

            foreach (PortalDefinition.Tab t in currentTab.tabs)
            {
                ChannelUsers objUser = new ChannelUsers();
                if (objUser.HasViewRights(Page.User, t.roles))
                {
                    DisplayTabItem dt = new DisplayTabItem();
                    tabList.Add(dt);

                    dt.m_Text = t.title;
                    dt.m_URL  = "../../" + Portal.API.Config.GetTabURL(t.reference);
                }
            }
            Tabs.DataSource = tabList;
            Tabs.DataBind();
        }
Ejemplo n.º 3
0
        private void LoadData(ArrayList subTabList)
        {
            ArrayList tabList = new ArrayList();

            foreach (PortalDefinition.Tab t in subTabList)
            {
                DisplayTabItem dt = new DisplayTabItem(t, false);
                tabList.Add(dt);
            }
            Tabs.DataSource = tabList;
            Tabs.DataBind();
        }
Ejemplo n.º 4
0
		private void LoadData(ArrayList subTabList)
		{
			ArrayList tabList = new ArrayList();
			foreach(PortalDefinition.Tab t in subTabList)
			{
				DisplayTabItem dt = new DisplayTabItem();
				tabList.Add(dt);

				dt.m_Title = t.title;
				dt.m_Reference = t.reference;
			}
			Tabs.DataSource = tabList;
			Tabs.DataBind();
		}
Ejemplo n.º 5
0
        public void LoadTabs()
        {
            AddFieldsTab();
            AddLayoutsTab();

            AddLinkSettingsTab();
            AddSEOSettingsTab();
            AddPublishSettingsTab();

            //AddTagsTab();
            AddSettingsTab();
            AddInjectHtmlTab();


            //AddShoppingCartSettingsTab();

            if (SelectedItem.Media.Comments.Any())
            {
                AddCommentsTab();
            }

            if ((this.SelectedItem != null) && ((this.SelectedItem.ID != 0)))
            {
                AddRolesUsersTab();
                AddHistoryTab();
            }

            ChildrensTab();

            Tabs.DataSource = base.Tabs.Select(i => i.Name);
            Tabs.DataBind();

            TabPanels.DataSource = base.Tabs;
            TabPanels.DataBind();

            //UpdateFieldsFromObject();
        }