mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Ordered layers alphabetically in Widget admin UI.
This commit is contained in:
@@ -61,7 +61,7 @@ namespace Orchard.Widgets.Controllers {
|
||||
return RedirectToAction("Index", "Admin", new { area = "Dashboard" });
|
||||
}
|
||||
|
||||
IEnumerable<LayerPart> layers = _widgetsService.GetLayers().ToList();
|
||||
IEnumerable<LayerPart> layers = _widgetsService.GetLayers().OrderBy(x => x.Name).ToList();
|
||||
|
||||
if (!layers.Any()) {
|
||||
Services.Notifier.Error(T("There are no widget layers defined. A layer will need to be added in order to add widgets to any part of the site."));
|
||||
@@ -142,7 +142,7 @@ namespace Orchard.Widgets.Controllers {
|
||||
return RedirectToAction("Index");
|
||||
}
|
||||
|
||||
IEnumerable<LayerPart> layers = _widgetsService.GetLayers().ToList();
|
||||
IEnumerable<LayerPart> layers = _widgetsService.GetLayers().OrderBy(x => x.Name).ToList();
|
||||
|
||||
if (!layers.Any()) {
|
||||
Services.Notifier.Error(T("Layer not found: {0}", layerId));
|
||||
@@ -315,7 +315,8 @@ namespace Orchard.Widgets.Controllers {
|
||||
try {
|
||||
_widgetsService.DeleteLayer(id);
|
||||
Services.Notifier.Information(T("Layer was successfully deleted"));
|
||||
} catch (Exception exception) {
|
||||
}
|
||||
catch (Exception exception) {
|
||||
Logger.Error(T("Removing Layer failed: {0}", exception.Message).Text);
|
||||
Services.Notifier.Error(T("Removing Layer failed: {0}", exception.Message));
|
||||
}
|
||||
|
Reference in New Issue
Block a user