Example #1
0
        public ActionResult Import(string folderPath) {
            var mediaProviderMenu = _navigationManager.BuildMenu("mediaproviders");
            var imageSets = _navigationManager.BuildImageSets("mediaproviders");

            var viewModel = new MediaManagerImportViewModel {
                Menu = mediaProviderMenu,
                ImageSets = imageSets,
                FolderPath = folderPath
            };

            return View(viewModel);
        }
        public ActionResult Import(int id, bool dialog = false) {
            var mediaProviderMenu = _navigationManager.BuildMenu("mediaproviders");
            var imageSets = _navigationManager.BuildImageSets("mediaproviders");

            var hierarchy = _mediaLibraryService.GetMediaFolderHierarchy(id);

            var viewModel = new MediaManagerImportViewModel {
                DialogMode = dialog,
                Menu = mediaProviderMenu,
                Hierarchy = hierarchy.ToReadOnlyCollection(),
                ImageSets = imageSets
            };

            return View(viewModel);
        }
Example #3
0
        public ActionResult Import(string folderPath) {
            if (!Services.Authorizer.Authorize(Permissions.ManageMediaContent, T("Cannot import media")))
                return new HttpUnauthorizedResult();

            var mediaProviderMenu = _navigationManager.BuildMenu("mediaproviders");
            var imageSets = _navigationManager.BuildImageSets("mediaproviders");

            var viewModel = new MediaManagerImportViewModel {
                Menu = mediaProviderMenu,
                ImageSets = imageSets,
                FolderPath = folderPath,
                MediaTypes = _mediaLibraryService.GetMediaTypes()
            };

            return View(viewModel);
        }