public ActionResult Index(string name, string mediaPath) {
     var mediaFolders = _mediaService.GetMediaFolders(mediaPath);
     var mediaFiles = string.IsNullOrEmpty(mediaPath) ? null : _mediaService.GetMediaFiles(mediaPath);
     var model = new MediaFolderEditViewModel { FolderName = name, MediaFiles = mediaFiles, MediaFolders = mediaFolders, MediaPath = mediaPath };
     ViewData["Service"] = _mediaService;
     return View(model);
 }
Example #2
0
 public ActionResult Edit(string name, string mediaPath) {
     try {
         IEnumerable<MediaFile> mediaFiles = _mediaService.GetMediaFiles(mediaPath);
         IEnumerable<MediaFolder> mediaFolders = _mediaService.GetMediaFolders(mediaPath);
         var model = new MediaFolderEditViewModel { FolderName = name, MediaFiles = mediaFiles, MediaFolders = mediaFolders, MediaPath = mediaPath };
         return View(model);
     }
     catch(ArgumentException exception) {
         Services.Notifier.Error(T("Editing failed: {0}", exception.Message));
         return RedirectToAction("Index");
     }
 }
 public ActionResult Index(string name, string mediaPath, string mediaType) {
     var mediaFolders = _mediaService.GetMediaFolders(mediaPath);
     var mediaFiles = string.IsNullOrEmpty(mediaPath) ? null : _mediaService.GetMediaFiles(mediaPath);
     var model = new MediaFolderEditViewModel { FolderName = name, MediaFiles = mediaFiles, MediaFolders = mediaFolders, MediaPath = mediaPath };
     ViewData["Service"] = _mediaService;
     switch (mediaType) {
         case "image":
             return View(model);
             break;
         case "word":
             return View("Word", model);
     }
     return View(model);
 }
 public ActionResult Edit(string name, string mediaPath) {
     IEnumerable<MediaFile> mediaFiles = _mediaService.GetMediaFiles(mediaPath);
     IEnumerable<MediaFolder> mediaFolders = _mediaService.GetMediaFolders(mediaPath);
     var model = new MediaFolderEditViewModel { FolderName = name, MediaFiles = mediaFiles, MediaFolders = mediaFolders, MediaPath = mediaPath };
     return View(model);
 }