mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Partially complete refactoring. Adding transactions. Adjusting template locations. CURRENTLY BROKEN
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044385
This commit is contained in:
@@ -141,7 +141,7 @@
|
||||
<Content Include="Common\Views\Shared\EditorTemplates\OwnerEditorViewModel.ascx" />
|
||||
<Content Include="Themes\Styles\site.css" />
|
||||
<Content Include="Themes\Views\Admin\Install.aspx" />
|
||||
<Content Include="Themes\Views\Shared\document.aspx" />
|
||||
<Content Include="Themes\Views\document.aspx" />
|
||||
<Content Include="Themes\Views\Shared\EditorTemplates\ThemeSiteSettingsRecord.ascx" />
|
||||
<Content Include="Themes\Views\Shared\layout.ascx" />
|
||||
<Content Include="Themes\Views\Shared\user.ascx" />
|
||||
|
@@ -26,14 +26,14 @@ namespace Orchard.Core.Settings.Controllers {
|
||||
public ActionResult Index(string tabName) {
|
||||
var model = new Orchard.Core.Settings.ViewModels.SettingsIndexViewModel {
|
||||
Site = _siteService.GetSiteSettings().As<SiteSettings>() };
|
||||
model.EditorModel = _modelManager.BuildEditorModel(model.Site, tabName);
|
||||
model.EditorModel = _modelManager.BuildEditorModel(model.Site);
|
||||
return View(model);
|
||||
}
|
||||
|
||||
[AcceptVerbs(HttpVerbs.Post)]
|
||||
public ActionResult Index(string tabName, FormCollection input) {
|
||||
var viewModel = new SettingsIndexViewModel { Site = _siteService.GetSiteSettings().As<SiteSettings>() };
|
||||
viewModel.EditorModel = _modelManager.UpdateEditorModel(viewModel.Site.ContentItem, tabName, this);
|
||||
viewModel.EditorModel = _modelManager.UpdateEditorModel(viewModel.Site.ContentItem, this);
|
||||
|
||||
if (!TryUpdateModel(viewModel, input.ToValueProvider())) {
|
||||
return View(viewModel);
|
||||
|
@@ -1,10 +1,28 @@
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Orchard.Core.Settings.ViewModels.SettingsIndexViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Mvc.Html"%>
|
||||
<h2>Edit Settings</h2>
|
||||
|
||||
<%@ Import Namespace="Orchard.Mvc.Html" %>
|
||||
<h2>
|
||||
Edit Settings</h2>
|
||||
<%using (Html.BeginForm()) { %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<%= Html.EditorForModel() %>
|
||||
<%= Html.ValidationSummary() %>
|
||||
<fieldset>
|
||||
<legend>Global Settings</legend>
|
||||
<fieldset>
|
||||
<input class="button" type="submit" value="Save" />
|
||||
<%=Html.LabelFor(x=>x.SiteName) %>
|
||||
<%=Html.EditorFor(x=>x.SiteName) %>
|
||||
<%=Html.ValidationMessage("SiteName", "*") %>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<%=Html.LabelFor(x => x.SuperUser) %>
|
||||
<%=Html.EditorFor(x=>x.SuperUser) %>
|
||||
<%=Html.ValidationMessage("SuperUser", "*") %>
|
||||
</fieldset>
|
||||
<%=Html.EditorFor(s=>s.Id) %>
|
||||
</fieldset>
|
||||
<% foreach (var e in Model.EditorModel.Editors) { %>
|
||||
<%=Html.EditorFor(m => e.Model, e.TemplateName, e.Prefix)%>
|
||||
<% } %>
|
||||
<fieldset>
|
||||
<input class="button" type="submit" value="Save" />
|
||||
</fieldset>
|
||||
<% } %>
|
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using Orchard.Mvc.ViewModels;
|
||||
|
||||
namespace Orchard.Core.Themes.ViewModels {
|
||||
public class CreateThemeViewModel : AdminViewModel {
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public string Author { get; set; }
|
||||
[Required]
|
||||
public string Description { get; set; }
|
||||
[Required]
|
||||
public string Version { get; set; }
|
||||
[Required]
|
||||
public string Tags { get; set; }
|
||||
[Required]
|
||||
public string Homepage { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user