Example #1
0
 protected override void CreateChildControls()
 {
     base.CreateChildControls();
     chkShowUploadButton      = new CheckBox();
     chkShowUploadButton.Text = SPSResources.GetResourceString("SPSPE_ShowUploadButton");
     Controls.Add(chkShowUploadButton);
 }
Example #2
0
        protected override void CreateChildControls()
        {
            ddlLists       = new DropDownList();
            ddlLists.Width = new Unit("100%");

            if (_documentLibrary)
            {
                SPSEditorPartsTools.FillLists(ddlLists, SPBaseType.DocumentLibrary);
            }
            else
            {
                SPSEditorPartsTools.FillListsExclude(ddlLists, SPBaseType.DocumentLibrary);
            }

            ddlLists.SelectedIndexChanged += ddlLists_SelectedIndexChanged;
            ddlLists.AutoPostBack          = true;
            //NavigationTools.FillWebParts(Context, ddlLists);
            Controls.Add(ddlLists);

            ddlViews       = new DropDownList();
            ddlViews.Width = new Unit("100%");
            SPSEditorPartsTools.FillListViews(ddlViews, ddlLists.SelectedValue);
            Controls.Add(ddlViews);

            chkShowTree      = new CheckBox();
            chkShowTree.Text = SPSResources.GetResourceString("SPSPE_ShowTree");
            Controls.Add(chkShowTree);

            chkSortHierarchyTree      = new CheckBox();
            chkSortHierarchyTree.Text = SPSResources.GetResourceString("SPSPE_SortHierarchyTree");
            Controls.Add(chkSortHierarchyTree);

            chkShowBreadCrumb      = new CheckBox();
            chkShowBreadCrumb.Text = SPSResources.GetResourceString("SPSPE_ShowBreadCrumb");
            Controls.Add(chkShowBreadCrumb);

            chkShowNewButton      = new CheckBox();
            chkShowNewButton.Text = SPSResources.GetResourceString("SPSPE_ShowNewButton");
            Controls.Add(chkShowNewButton);

            chkShowActionsButton      = new CheckBox();
            chkShowActionsButton.Text = SPSResources.GetResourceString("SPSPE_ShowActionsButton");
            Controls.Add(chkShowActionsButton);

            chkShowUpButton      = new CheckBox();
            chkShowUpButton.Text = SPSResources.GetResourceString("SPSPE_ShowUpFolderButton");
            Controls.Add(chkShowUpButton);

            chkShowNumberOfItems      = new CheckBox();
            chkShowNumberOfItems.Text = SPSResources.GetResourceString("SPSPE_CountItemsInTree");
            Controls.Add(chkShowNumberOfItems);
        }
Example #3
0
        protected override void RenderContents(HtmlTextWriter writer)
        {
            tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_ListName"));
            ddlLists.RenderControl(writer);
            tools.SectionFooterTag();

            tools.SectionHeaderTag(SPSResources.GetResourceString("SPSPE_ViewName"));
            ddlViews.RenderControl(writer);
            tools.SectionFooterTag();

            tools.SectionHeaderTag();
            chkShowTree.RenderControl(writer);
            chkSortHierarchyTree.RenderControl(writer);
            chkShowBreadCrumb.RenderControl(writer);
            chkShowNewButton.RenderControl(writer);
            chkShowActionsButton.RenderControl(writer);
            chkShowUpButton.RenderControl(writer);
            chkShowNumberOfItems.RenderControl(writer);
        }
Example #4
0
        private void CreateChildControlsInternal()
        {
            if (CheckParameters())
            {
                if (_showTree)
                {
                    _folderExplorer = new FolderExplorerControl(_listGuid, _listViewGuid)
                    {
                        ExpandAll      = true,
                        FollowListView = true,
                        ID             = (ID + "fe"),
                        AutoCollapse   = false,
                        ShowCounter    = _showNumberOfItems,
                        SortHierarchy  = _sortHierarchyTree,
                        CacheService   = GetCacheService()
                    };

                    Controls.Add(_folderExplorer);
                }

                // we are using this control to check RootFolder and generate
                // upload and goback buttons
                // we can hide it but we need create this always
                _breadCrumb = new BreadCrumbControl(_listGuid, _listViewGuid)
                {
                    MaxLevels = 3
                };

                Controls.Add(_breadCrumb);

                _listViewWP = new SPSListView
                {
                    ListId          = _listGuid,
                    ViewId          = _listViewGuid,
                    EnableViewState = true,
                };

                SPWeb  web  = SPContext.Current.Web;
                SPList list = web.Lists[new Guid(_listGuid)];
                SPView view = list.Views[new Guid(_listViewGuid)];

                SPContext context = SPContext.GetContext(Context, view.ID, list.ID, web);

                _toolbar = new ViewToolBar
                {
                    RenderContext = context
                };

                CustomButtons();

                // Up Folder button

                _buttonUpFolder = new SPLinkButton
                {
                    Text     = SPSResources.GetResourceString("SPS_UpFolderButton"),
                    ImageUrl = "/_layouts/images/UPFOLDER.GIF",
                    HoverCellActiveCssClass   = "ms-buttonactivehover",
                    HoverCellInActiveCssClass = "ms-buttoninactivehover",
                    NavigateUrl     = "#",
                    EnableViewState = false
                };



                Controls.Add(_toolbar);
                Controls.Add(_listViewWP);
            }
        }