mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-12-03 12:03:51 +08:00
#18975: Maintaining current folder in media management
Work Item: 18975 --HG-- branch : 1.x
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Orchard.Media.Controllers {
|
|||||||
return View(viewModel);
|
return View(viewModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
return RedirectToAction("Edit", new { viewModel.Name, viewModel.MediaPath });
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult Edit(string name, string mediaPath) {
|
public ActionResult Edit(string name, string mediaPath) {
|
||||||
@@ -93,7 +93,7 @@ namespace Orchard.Media.Controllers {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ActionResult Edit(FormCollection input) {
|
public ActionResult Edit(FormCollection input, string name, string mediaPath) {
|
||||||
foreach (string key in input.Keys) {
|
foreach (string key in input.Keys) {
|
||||||
if (key.StartsWith("Checkbox.File.") && input[key] == "true") {
|
if (key.StartsWith("Checkbox.File.") && input[key] == "true") {
|
||||||
string fileName = key.Substring("Checkbox.File.".Length);
|
string fileName = key.Substring("Checkbox.File.".Length);
|
||||||
@@ -124,7 +124,8 @@ namespace Orchard.Media.Controllers {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return RedirectToAction("Index");
|
|
||||||
|
return RedirectToAction("Edit", new { name, mediaPath });
|
||||||
}
|
}
|
||||||
|
|
||||||
public ActionResult EditProperties(string folderName, string mediaPath) {
|
public ActionResult EditProperties(string folderName, string mediaPath) {
|
||||||
|
|||||||
Reference in New Issue
Block a user