- Themes: Theme discovery and related infrastructure work. Theme content item and metadata (Theme.txt). Some initial Theme Admin and a couple skeleton themes.

- Extensions: Theme and Package extensions are now automatically discovered, their metadata parsed and their types loaded by the ExtensionManager. The ExtensionDescriptor now contains an ExtensionType property which will help distinguish extension types.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043750
This commit is contained in:
suhacan
2009-12-10 22:21:57 +00:00
parent 8188b70d01
commit a728a5ee92
23 changed files with 261 additions and 65 deletions

View File

@@ -1,4 +1,5 @@
using System.Web.Mvc;
using System;
using System.Web.Mvc;
using Orchard.Core.Themes.ViewModels;
using Orchard.Localization;
using Orchard.Themes;
@@ -19,7 +20,16 @@ namespace Orchard.Core.Themes.Controllers {
public Localizer T { get; set; }
public ActionResult Index() {
return View(new ThemesIndexViewModel());
try {
var themes = _themeService.GetInstalledThemes();
var currentTheme = _themeService.GetCurrentTheme();
var model = new ThemesIndexViewModel { CurrentTheme = currentTheme, Themes = themes };
return View(model);
}
catch (Exception exception) {
_notifier.Error(T("Listing themes failed: " + exception.Message));
return View(new ThemesIndexViewModel());
}
}
}
}