mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 21:13:35 +08:00
More settings work
- stubs of work to continue tonight (IShellSettinsLoader's SaveSettings) --HG-- branch : dev
This commit is contained in:
@@ -54,6 +54,10 @@ namespace Orchard.Tests.Environment {
|
|||||||
public IEnumerable<IShellSettings> LoadSettings() {
|
public IEnumerable<IShellSettings> LoadSettings() {
|
||||||
return new[] { new ShellSettings { Name = "testing" } };
|
return new[] { new ShellSettings { Name = "testing" } };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SaveSettings(IShellSettings settings) {
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class StuExtensionManager : IExtensionManager {
|
public class StuExtensionManager : IExtensionManager {
|
||||||
|
@@ -1,7 +1,13 @@
|
|||||||
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SetupViewModel>" %>
|
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SetupViewModel>" %>
|
||||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||||
<%@ Import Namespace="Orchard.Setup.ViewModels"%>
|
<%@ Import Namespace="Orchard.Setup.ViewModels"%>
|
||||||
<h1><%=Html.TitleForPage("Orchard " + _Encoded("Setup"))%></h1><%
|
<h1><%=Html.TitleForPage("Orchard " + _Encoded("Setup"))%></h1>
|
||||||
|
<div class="">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<%
|
||||||
using (Html.BeginFormAntiForgeryPost()) { %>
|
using (Html.BeginFormAntiForgeryPost()) { %>
|
||||||
<%=Html.ValidationSummary() %>
|
<%=Html.ValidationSummary() %>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
@@ -8,6 +8,7 @@ using Yaml.Grammar;
|
|||||||
namespace Orchard.Environment.Configuration {
|
namespace Orchard.Environment.Configuration {
|
||||||
public interface IShellSettingsLoader {
|
public interface IShellSettingsLoader {
|
||||||
IEnumerable<IShellSettings> LoadSettings();
|
IEnumerable<IShellSettings> LoadSettings();
|
||||||
|
void SaveSettings(IShellSettings settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShellSettingsLoader : IShellSettingsLoader {
|
public class ShellSettingsLoader : IShellSettingsLoader {
|
||||||
@@ -16,6 +17,10 @@ namespace Orchard.Environment.Configuration {
|
|||||||
return LoadSettings().ToArray();
|
return LoadSettings().ToArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SaveSettings(IShellSettings settings) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
static IEnumerable<IShellSettings> LoadSettings() {
|
static IEnumerable<IShellSettings> LoadSettings() {
|
||||||
foreach (var yamlDocument in LoadFiles()) {
|
foreach (var yamlDocument in LoadFiles()) {
|
||||||
yield return ParseSettings(yamlDocument);
|
yield return ParseSettings(yamlDocument);
|
||||||
|
Reference in New Issue
Block a user