Exemplo n.º 1
0
        private void SetMediaParameters()
        {
            MediaListParameters mediaParameters = new MediaListParameters();
            mediaParameters.MoreUrl = Utility.ResolveUrl(Constants.Urls.Media.Url);
            mediaParameters.MediaType = Core.Media.MediaType.All;
            mediaParameters.Header = ResourceManager.GetLiteral("Admin.Media.List.AllHeader");
            mediaParameters.DisplayTableHeader = false;
            mediaParameters.HideEdit = true;
            mediaParameters.HidePreview = true;
            mediaParameters.HideUrl = true;
            mediaParameters.ShortDate = true;
            mediaParameters.NothingFoundText = ResourceManager.GetLiteral("Admin.Media.List.All.NoFound");

            this.mediaList.Parameters = mediaParameters;
        }
Exemplo n.º 2
0
        private void SetMediaListParameters()
        {
            MediaListParameters parameters = new MediaListParameters();
            parameters.DisplayTableHeader = true;
            parameters.HideHeader = true;
            parameters.Count = this.Pager.PageSize;
            parameters.Query = this.Query;
            parameters.Start = this.Start;

            switch (View)
            {
                case MediaType.Photo:
                        parameters.MediaType = MediaType.Photo;
                        parameters.NothingFoundText = ResourceManager.GetLiteral("Admin.Media.List.NoPhotosFound");
                    break;
                case MediaType.Document:
                        parameters.MediaType = MediaType.Document;
                        parameters.NothingFoundText = ResourceManager.GetLiteral("Admin.Media.List.NoDocumentsFound");
                    break;
                case MediaType.Video:
                        parameters.MediaType = MediaType.Video;
                        parameters.NothingFoundText = ResourceManager.GetLiteral("Admin.Media.List.NoVideosFound");
                    break;
                case MediaType.Other:
                        parameters.MediaType = MediaType.Other;
                        parameters.NothingFoundText = ResourceManager.GetLiteral("Admin.Media.List.NoOthersFound");
                    break;
            }

            if (View == MediaType.Photo)
            {
                this.imagesList.Parameters = parameters;
                this.mediaList.Visible = false;
            }
            else
            {
                this.mediaList.Parameters = parameters;
                this.imagesList.Visible = false;
            }
        }