- Extensions: Install extensions from zip files.

- Themes: installing new themes from the themes admin.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043816
This commit is contained in:
suhacan
2009-12-11 19:49:53 +00:00
parent f9be656e6c
commit cfa42b8663
7 changed files with 58 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using System;
using System.Web;
using System.Web.Mvc;
using Orchard.Core.Themes.ViewModels;
using Orchard.Localization;
@@ -51,6 +52,10 @@ namespace Orchard.Core.Themes.Controllers {
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Install(FormCollection input) {
try {
foreach (string fileName in Request.Files) {
HttpPostedFileBase file = Request.Files[fileName];
_themeService.InstallTheme(file);
}
return RedirectToAction("Index");
}
catch (Exception exception) {

View File

@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Web;
using Orchard.Extensions;
using Orchard.Logging;
using Orchard.Models;
@@ -71,6 +72,10 @@ namespace Orchard.Core.Themes.Services {
}
}
public void InstallTheme(HttpPostedFileBase file) {
_extensionManager.InstallExtension("Theme", file);
}
#endregion
}
}