--HG--
branch : dev
This commit is contained in:
Louis DeJardin
2010-07-08 11:29:07 -07:00
41 changed files with 213 additions and 144 deletions

View File

@@ -7,15 +7,14 @@ namespace Orchard.Core.Common.DataMigrations {
public int Create() {
//CREATE TABLE Common_BodyRecord (Id INTEGER not null, Text TEXT, Format TEXT, ContentItemRecord_id INTEGER, primary key (Id));
SchemaBuilder.CreateTable("BodyRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartVersionRecord()
.Column<string>("Text")
.Column<string>("Format")
.Column<int>("ContentItemRecord_id")
);
//CREATE TABLE Common_CommonRecord (Id INTEGER not null, OwnerId INTEGER, CreatedUtc DATETIME, PublishedUtc DATETIME, ModifiedUtc DATETIME, Container_id INTEGER, primary key (Id));
SchemaBuilder.CreateTable("CommonRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<int>("OwnerId")
.Column<DateTime>("CreatedUtc")
.Column<DateTime>("PublishedUtc")
@@ -25,20 +24,18 @@ namespace Orchard.Core.Common.DataMigrations {
//CREATE TABLE Common_CommonVersionRecord (Id INTEGER not null, CreatedUtc DATETIME, PublishedUtc DATETIME, ModifiedUtc DATETIME, ContentItemRecord_id INTEGER, primary key (Id));
SchemaBuilder.CreateTable("CommonVersionRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartVersionRecord()
.Column<DateTime>("CreatedUtc")
.Column<DateTime>("PublishedUtc")
.Column<DateTime>("ModifiedUtc")
.Column<int>("ContentItemRecord_id")
);
//CREATE TABLE Common_RoutableRecord (Id INTEGER not null, Title TEXT, Slug TEXT, Path TEXT, ContentItemRecord_id INTEGER, primary key (Id));
SchemaBuilder.CreateTable("RoutableRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartVersionRecord()
.Column<string>("Title")
.Column<string>("Slug")
.Column<string>("Path")
.Column<int>("ContentItemRecord_id")
);
return 0010;

View File

@@ -18,18 +18,18 @@ namespace Orchard.Core.Contents {
public string MenuName { get { return "admin"; } }
public void GetNavigation(NavigationBuilder builder) {
//var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
//builder.Add(T("Content"), "1", menu => {
// menu.Add(T("Manage Content"), "1.2", item => item.Action("List", "Admin", new {area = "Orchard.ContentTypes"}));
//foreach (var contentTypeDefinition in contentTypeDefinitions) {
// var ci = _contentManager.New(contentTypeDefinition.Name);
// var cim = _contentManager.GetItemMetadata(ci);
// var createRouteValues = cim.CreateRouteValues;
// if (createRouteValues.Any())
// menu.Add(T("Create New {0}", contentTypeDefinition.DisplayName), "1.3", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues));
//}
//});
builder.Add(T("Content"), "1", menu => {
menu.Add(T("Manage Content"), "1.2", item => item.Action("List", "Admin", new { area = "Contents" }));
foreach (var contentTypeDefinition in contentTypeDefinitions) {
var ci = _contentManager.New(contentTypeDefinition.Name);
var cim = _contentManager.GetItemMetadata(ci);
var createRouteValues = cim.CreateRouteValues;
if (createRouteValues.Any())
menu.Add(T("Create New {0}", contentTypeDefinition.DisplayName), "1.3", item => item.Action(cim.CreateRouteValues["Action"] as string, cim.CreateRouteValues["Controller"] as string, cim.CreateRouteValues));
}
});
}
}
}

View File

@@ -48,10 +48,17 @@ namespace Orchard.Core.Contents.Controllers {
const int pageSize = 20;
var skip = (Math.Max(model.Page ?? 0, 1) - 1) * pageSize;
var query = _contentManager.Query(VersionOptions.Latest);
var query = _contentManager.Query(VersionOptions.Latest, _contentDefinitionManager.ListTypeDefinitions().Select(ctd => ctd.Name).ToArray());
if (!string.IsNullOrEmpty(model.Id)) {
query = query.ForType(model.Id);
if (!string.IsNullOrEmpty(model.TypeName)) {
var contentTypeDefinition = _contentDefinitionManager.GetTypeDefinition(model.TypeName);
if (contentTypeDefinition == null)
return new NotFoundResult();
model.TypeDisplayName = !string.IsNullOrWhiteSpace(contentTypeDefinition.DisplayName)
? contentTypeDefinition.DisplayName
: contentTypeDefinition.Name;
query = query.ForType(model.TypeName);
}
var contentItems = query.Slice(skip, pageSize);
@@ -148,6 +155,18 @@ namespace Orchard.Core.Contents.Controllers {
return RedirectToAction("Edit", new RouteValueDictionary { { "Id", contentItem.Id } });
}
[HttpPost, ActionName("Remove")]
public ActionResult RemovePOST(int id, string returnUrl) {
var contentItem = _contentManager.Get(id);
if (contentItem != null)
_contentManager.Remove(contentItem);
if (!String.IsNullOrEmpty(returnUrl))
return Redirect(returnUrl);
return RedirectToAction("List");
}
private void PrepareEditorViewModel(ContentItemViewModel itemViewModel) {
if (string.IsNullOrEmpty(itemViewModel.TemplateName)) {
itemViewModel.TemplateName = "Items/Contents.Item";

View File

@@ -1,11 +1,12 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using Orchard.ContentManagement;
using Orchard.Mvc.ViewModels;
namespace Orchard.Core.Contents.ViewModels {
public class ListContentsViewModel : BaseViewModel {
public string Id { get; set; }
public string TypeName { get { return Id; } }
public string TypeDisplayName { get; set; }
public int? Page { get; set; }
public IList<Entry> Entries { get; set; }

View File

@@ -0,0 +1,7 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<ListContentTypesViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<h1><%:Html.TitleForPage(T("Create New Content").ToString())%></h1>
<%:Html.UnorderedList(
Model.Types,
(ctd, i) => MvcHtmlString.Create(string.Format("<p>{0}</p>", Html.ActionLink(ctd.Name, "Create", new { Area = "Contents", Id = ctd.Name }))),
"contentTypes")%>

View File

@@ -1,11 +0,0 @@
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<ListContentTypesViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<% Html.AddTitleParts(T("Create Content").ToString()); %>
<p>
Create content</p>
<ul>
<% foreach (var t in Model.Types) {%>
<li>
<%:Html.ActionLink(t.Name, "Create", new RouteValueDictionary{{"Area","Contents"},{"Id",t.Name}}) %></li>
<%} %>
</ul>

View File

@@ -0,0 +1,37 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<Orchard.Core.Contents.ViewModels.ListContentsViewModel>" %>
<%@ Import Namespace="Orchard.ContentManagement.Aspects"%>
<%@ Import Namespace="Orchard.ContentManagement"%>
<%@ Import Namespace="Orchard.Utility.Extensions" %>
<h1><%:Html.TitleForPage(T("Manage {0} Content", !string.IsNullOrEmpty(Model.TypeDisplayName) ? Model.TypeDisplayName : T("all").Text).ToString())%></h1>
<div class="manage">
<%:Html.ActionLink(!string.IsNullOrEmpty(Model.TypeDisplayName) ? T("Add new {0} content", Model.TypeDisplayName).Text : T("Add new content").Text, "Create", new { }, new { @class = "button primaryAction" })%>
</div>
<ul class="contentItems"><%
foreach (var entry in Model.Entries) { %>
<li>
<div class="summary">
<div class="properties">
<h3><%:entry.ContentItem.Is<IRoutableAspect>()
? Html.ActionLink(entry.ContentItem.As<IRoutableAspect>().Title, "Edit", new { id = entry.ContentItem.Id })
: MvcHtmlString.Create(string.Format("[title display template needed] (content type == \"{0}\")", entry.ContentItem.TypeDefinition.Name)) %></h3>
<ul class="pageStatus">
<li>
<%:T("Last modified: {0}",
entry.ContentItem.Is<ICommonAspect>() && entry.ContentItem.As<ICommonAspect>().ModifiedUtc.HasValue
? Html.DateTimeRelative(entry.ContentItem.As<ICommonAspect>().ModifiedUtc.Value, T)
: T("unknown"))%>
</li>
</ul>
</div>
<div class="related">
<%:Html.ActionLink(T("Edit").ToString(), "Edit", new { id = entry.ContentItem.Id }, new { title = T("Edit").ToString() })%><%: T(" | ")%>
<% using (Html.BeginFormAntiForgeryPost(Url.Action("Remove", new { id = entry.ContentItem.Id }), FormMethod.Post, new { @class = "inline link" })) { %>
<button type="submit" class="linkButton" title="<%: T("Remove") %>"><%: T("Remove") %></button>
<%:Html.Hidden("returnUrl", ViewContext.RequestContext.HttpContext.Request.ToUrlString())%><%
} %>
</div>
<div style="clear:both;"></div>
</div>
</li><%
} %>
</ul>

View File

@@ -1,32 +0,0 @@
<%@ Page Language="C#" Inherits="Orchard.Mvc.ViewPage<ListContentsViewModel>" %>
<%@ Import Namespace="Orchard.Core.Contents.ViewModels" %>
<% Html.AddTitleParts(T("Browse Contents").ToString()); %>
<p>
Browse Contents</p>
<table>
<% foreach (var t in Model.Entries) {%>
<tr>
<td>
<%:t.ContentItem.Id %>.
</td>
<td>
<%:t.ContentItem.ContentType %>
</td>
<td>
ver #<%:t.ContentItem.Version %>
</td>
<td>
<%if (t.ContentItemMetadata.DisplayRouteValues != null) {%>
<%:Html.ActionLink(t.ContentItemMetadata.DisplayText, t.ContentItemMetadata.DisplayRouteValues["Action"].ToString(), t.ContentItemMetadata.DisplayRouteValues)%>
<%}%>
</td>
<td>
<%if (t.ContentItemMetadata.EditorRouteValues != null) {%>
<%:Html.ActionLink("edit", t.ContentItemMetadata.EditorRouteValues["Action"].ToString(), t.ContentItemMetadata.EditorRouteValues)%>
<%}%>
</td>
</tr>
<%} %>
</table>
<p>
<%:Html.ActionLink("Create new item", "Create", "Admin", new RouteValueDictionary{{"Area","Contents"},{"Id",Model.Id}}, new Dictionary<string, object>()) %></p>

View File

@@ -6,7 +6,7 @@ namespace Orchard.Core.Localization.DataMigrations {
public int Create() {
//CREATE TABLE Localization_LocalizedRecord (Id INTEGER not null, CultureId INTEGER, MasterContentItemId INTEGER, primary key (Id));
SchemaBuilder.CreateTable("LocalizedRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<int>("CultureId")
.Column<int>("MasterContentItemId")
);

View File

@@ -6,13 +6,13 @@ namespace Orchard.Core.Navigation.DataMigrations {
public int Create() {
//CREATE TABLE Navigation_MenuItemRecord (Id INTEGER not null, Url TEXT, primary key (Id));
SchemaBuilder.CreateTable("MenuItemRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("Url")
);
//CREATE TABLE Navigation_MenuPartRecord (Id INTEGER not null, MenuText TEXT, MenuPosition TEXT, OnMainMenu INTEGER, primary key (Id));
SchemaBuilder.CreateTable("MenuPartRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("MenuText")
.Column<string>("MenuPosition")
.Column<bool>("OnMainMenu")

View File

@@ -210,10 +210,10 @@
<Content Include="Common\Views\EditorTemplates\Parts\Common.Container.ascx" />
<Content Include="Common\Views\EditorTemplates\PlainTextEditor.ascx" />
<Content Include="Contents\Module.txt" />
<Content Include="Contents\Views\Admin\List.aspx" />
<Content Include="Contents\Views\Admin\Edit.aspx" />
<Content Include="Contents\Views\Admin\CreatableTypeList.aspx" />
<Content Include="Contents\Views\Admin\CreatableTypeList.ascx" />
<Content Include="Contents\Views\Admin\Create.aspx" />
<Content Include="Contents\Views\Admin\List.ascx" />
<Content Include="Contents\Views\DisplayTemplates\Items\Contents.Item.ascx" />
<Content Include="Contents\Views\EditorTemplates\Items\Contents.Item.ascx" />
<Content Include="Contents\Views\Item\Preview.aspx" />

View File

@@ -82,7 +82,7 @@ namespace Orchard.Core.Settings.DataMigrations {
//CREATE TABLE Settings_SiteSettingsRecord (Id INTEGER not null, SiteSalt TEXT, SiteName TEXT, SuperUser TEXT, PageTitleSeparator TEXT, HomePage TEXT, SiteCulture TEXT, primary key (Id));
SchemaBuilder.CreateTable("SiteSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("SiteSalt")
.Column<string>("SiteName")
.Column<string>("SuperUser")

View File

@@ -1,5 +1,6 @@
.site-cultures {
font-size:1.2em;
font-size:1.4em;
line-height:1.8em;
overflow:auto;
}
.site-cultures li {
@@ -14,5 +15,5 @@
}
.site-cultures div {
float:left;
width:6em;
width:8em;
}

View File

@@ -1,18 +1,19 @@
<%@ Control Language="C#" Inherits="Orchard.Mvc.ViewUserControl<SiteCulturesViewModel>" %>
<%@ Import Namespace="Orchard.Core.Settings.ViewModels" %><%
Html.RegisterStyle("admin.css"); %>
<h1><%:Html.TitleForPage(T("Supported Cultures").ToString()) %></h1>
<h1><%:Html.TitleForPage(T("Cultures").ToString()) %></h1>
<p class="breadcrumb"><%:Html.ActionLink(T("Manage Settings").Text, "index") %><%:T(" &#62; ") %><%:T("Supported Cultures")%></p>
<h2><%:T("Cultures this site supports") %></h2>
<h3><%:T("Available Cultures") %></h3>
<% using (Html.BeginFormAntiForgeryPost("AddCulture")) { %>
<%:Html.ValidationSummary() %>
<fieldset class="addCulture">
<label for="CultureName"><%:T("Add a culture...") %></label>
<%:Html.DropDownList("CultureName", new SelectList(Model.AvailableSystemCultures.OrderBy(s => s), Model.CurrentCulture))%>
<button class="primaryAction" type="submit"><%:T("Add") %></button>
</fieldset>
<% } %>
<h3><%:T("Cultures this site supports") %></h3>
<%: Html.UnorderedList(
Model.SiteCultures.OrderBy(s => s),
(s, i) => Html.DisplayFor(scvm => s, s == Model.CurrentCulture ? "CurrentCulture" : "RemovableCulture", ""),
"site-cultures", "culture", "odd")%>
<% using (Html.BeginFormAntiForgeryPost("AddCulture")) { %>
<%:Html.ValidationSummary() %>
<fieldset>
<label for="CultureName"><%:T("Add a culture...") %></label>
<%:Html.DropDownList("CultureName", new SelectList(Model.AvailableSystemCultures.OrderBy(s => s), Model.CurrentCulture)) %>
<button class="primaryAction" type="submit"><%:T("Add") %></button>
</fieldset>
<% } %>
"site-cultures", "culture", "odd")%>

View File

@@ -11,7 +11,7 @@ namespace Futures.Widgets.DataMigrations {
//CREATE TABLE Futures_Widgets_WidgetRecord (Id INTEGER not null, Zone TEXT, Position TEXT, Scope_id INTEGER, primary key (Id));
SchemaBuilder.CreateTable("WidgetRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("Zone")
.Column<string>("Position")
.Column<int>("Scope_id")

View File

@@ -13,7 +13,7 @@ namespace Orchard.Comments.DataMigrations {
//CREATE TABLE Orchard_Comments_CommentRecord (Id INTEGER not null, Author TEXT, SiteName TEXT, UserName TEXT, Email TEXT, Status TEXT, CommentDateUtc DATETIME, CommentText TEXT, CommentedOn INTEGER, CommentedOnContainer INTEGER, primary key (Id));
SchemaBuilder.CreateTable("CommentRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("Author")
.Column<string>("SiteName")
.Column<string>("UserName")
@@ -27,7 +27,7 @@ namespace Orchard.Comments.DataMigrations {
//CREATE TABLE Orchard_Comments_CommentSettingsRecord (Id INTEGER not null, ModerateComments INTEGER, EnableSpamProtection INTEGER, AkismetKey TEXT, AkismetUrl TEXT, primary key (Id));
SchemaBuilder.CreateTable("CommentSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<bool>("ModerateComments")
.Column<bool>("EnableSpamProtection")
.Column<string>("AkismetKey")
@@ -36,7 +36,7 @@ namespace Orchard.Comments.DataMigrations {
//CREATE TABLE Orchard_Comments_HasCommentsRecord (Id INTEGER not null, CommentsShown INTEGER, CommentsActive INTEGER, primary key (Id));
SchemaBuilder.CreateTable("HasCommentsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<bool>("CommentsShown")
.Column<bool>("CommentsActive")
);

View File

@@ -32,6 +32,7 @@ namespace Orchard.DevTools.Commands {
string dataMigrationsPath = HostingEnvironment.MapPath("~/Modules/" + extension.Name + "/DataMigrations/");
string dataMigrationPath = dataMigrationsPath + extension.DisplayName + "DataMigration.cs";
string templatesPath = HostingEnvironment.MapPath("~/Modules/Orchard.DevTools/ScaffoldingTemplates/");
string moduleCsProjPath = HostingEnvironment.MapPath(string.Format("~/Modules/{0}/{0}.csproj", extension.Name));
if ( !Directory.Exists(dataMigrationsPath) ) {
Directory.CreateDirectory(dataMigrationsPath);
}
@@ -55,7 +56,20 @@ namespace Orchard.DevTools.Commands {
dataMigrationText = dataMigrationText.Replace("$$ClassName$$", extension.DisplayName);
dataMigrationText = dataMigrationText.Replace("$$Commands$$", stringWriter.ToString());
File.WriteAllText(dataMigrationPath, dataMigrationText);
Context.Output.WriteLine(T("Data migration created successfully in Module {0}", extension.DisplayName));
string projectFileText = File.ReadAllText(moduleCsProjPath);
// The string searches in solution/project files can be made aware of comment lines.
if ( projectFileText.Contains("<Compile Include") ) {
string compileReference = string.Format("<Compile Include=\"{0}\" />\r\n ", "DataMigrations\\" + extension.DisplayName + "DataMigration.cs");
projectFileText = projectFileText.Insert(projectFileText.LastIndexOf("<Compile Include"), compileReference);
}
else {
string itemGroupReference = string.Format("</ItemGroup>\r\n <ItemGroup>\r\n <Compile Include=\"{0}\" />\r\n ", "DataMigrations\\" + extension.DisplayName + "DataMigration.cs");
projectFileText = projectFileText.Insert(projectFileText.LastIndexOf("</ItemGroup>"), itemGroupReference);
}
File.WriteAllText(moduleCsProjPath, projectFileText);
Context.Output.WriteLine(T("Data migration created successfully in Module {0}", extension.Name));
return;
}
}

View File

@@ -4,9 +4,11 @@ using Orchard.Localization;
using Orchard.Mvc.ViewModels;
using Orchard.Themes;
using Orchard.UI.Notify;
using Orchard.UI.Admin;
namespace Orchard.DevTools.Controllers {
[Themed]
[Admin]
public class HomeController : Controller {
private readonly INotifier _notifier;

View File

@@ -5,7 +5,7 @@ namespace $$FeatureName$$.DataMigrations {
public class $$ClassName$$DataMigration : DataMigrationImpl {
public int Create() {
$$Commands$$
$$Commands$$
return 0100;
}

View File

@@ -13,7 +13,7 @@ namespace Orchard.DevTools.Services {
}
public override void Visit(CreateTableCommand command) {
_output.WriteLine("// Creating table {0}", command.Name);
_output.WriteLine("\t\t\t// Creating table {0}", command.Name);
_output.WriteLine("\t\t\tSchemaBuilder.CreateTable(\"{0}\", table => table", command.Name);
foreach ( var createColumn in command.TableCommands.OfType<CreateColumnCommand>() ) {
@@ -22,7 +22,7 @@ namespace Orchard.DevTools.Services {
var options = new List<string>();
if ( createColumn.IsPrimaryKey ) {
options.Add(string.Format("WithLength({0})", createColumn.Length));
options.Add("PrimaryKey()");
}
if ( createColumn.IsUnique ) {
@@ -33,10 +33,6 @@ namespace Orchard.DevTools.Services {
options.Add("NotNull()");
}
if ( createColumn.IsPrimaryKey ) {
options.Add("PrimaryKey()");
}
if ( createColumn.Length.HasValue ) {
options.Add(string.Format("WithLength({0})", createColumn.Length ));
}

View File

@@ -6,7 +6,7 @@ namespace Orchard.Media.DataMigrations {
public int Create() {
//CREATE TABLE Orchard_Media_MediaSettingsRecord (Id INTEGER not null, RootMediaFolder TEXT, primary key (Id));
SchemaBuilder.CreateTable("MediaSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("RootMediaFolder")
);

View File

@@ -17,7 +17,7 @@
<ul class="pageStatus" style="color:#666; margin:.6em 0 0 0;">
<li><%:T("Features: {0}", MvcHtmlString.Create(string.Join(", ", module.Features.Select(f => Html.Link(f.Name, string.Format("{0}#{1}", Url.Action("features", new { area = "Orchard.Modules" }), f.Name.AsFeatureId(n => T(n)))).ToString()).OrderBy(s => s).ToArray()))) %></li>
<li>&nbsp;&#124;&nbsp;<%: T("Author: {0}", !string.IsNullOrEmpty(module.Author) ? module.Author : (new []{"Bradley", "Bertrand", "Renaud", "Suha", "Sebastien", "Jon", "Nathan", "Erik"})[(module.DisplayName.Length + (new Random()).Next()) % 7]) %></li><%-- very efficient, I know --%>
<li>&nbsp;&#124;&nbsp;<%: T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : T("<a href=\"http://orchardproject.net\">http://orchardproject.net</a>").ToString())%></li>
<li>&nbsp;&#124;&nbsp;<%: T("Website: {0}", !string.IsNullOrEmpty(module.HomePage) ? module.HomePage : "http://orchardproject.net")%></li>
</ul>
</div>
</div>

View File

@@ -5,12 +5,12 @@ namespace Orchard.Sandbox.DataMigrations {
public int Create() {
SchemaBuilder.CreateTable("SandboxPageRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("Name")
);
SchemaBuilder.CreateTable("SandboxSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<bool>("AllowAnonymousEdits")
);

View File

@@ -6,7 +6,7 @@ namespace Orchard.Search.DataMigrations {
public int Create() {
SchemaBuilder.CreateTable("SearchSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<bool>("FilterCulture")
.Column<string>("SearchedFields")
);

View File

@@ -6,7 +6,7 @@ namespace Orchard.Search.Models {
public virtual string SearchedFields { get; set; }
public SearchSettingsRecord() {
FilterCulture = true;
FilterCulture = false;
SearchedFields = "body, title";
}
}

View File

@@ -6,7 +6,7 @@ namespace Orchard.Themes.DataMigrations {
public int Create() {
//CREATE TABLE Orchard_Themes_ThemeRecord (Id INTEGER not null, ThemeName TEXT, DisplayName TEXT, Description TEXT, Version TEXT, Author TEXT, HomePage TEXT, Tags TEXT, primary key (Id));
SchemaBuilder.CreateTable("ThemeRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("ThemeName")
.Column<string>("DisplayName")
.Column<string>("Description")
@@ -18,7 +18,7 @@ namespace Orchard.Themes.DataMigrations {
//CREATE TABLE Orchard_Themes_ThemeSiteSettingsRecord (Id INTEGER not null, CurrentThemeName TEXT, primary key (Id));
SchemaBuilder.CreateTable("ThemeSiteSettingsRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("CurrentThemeName")
);

View File

@@ -6,7 +6,7 @@ namespace Orchard.Users.DataMigrations {
public int Create() {
//CREATE TABLE Orchard_Users_UserRecord (Id INTEGER not null, UserName TEXT, Email TEXT, NormalizedUserName TEXT, Password TEXT, PasswordFormat TEXT, PasswordSalt TEXT, primary key (Id));
SchemaBuilder.CreateTable("UserRecord", table => table
.Column<int>("Id", column => column.PrimaryKey())
.ContentPartRecord()
.Column<string>("UserName")
.Column<string>("Email")
.Column<string>("NormalizedUserName")

View File

@@ -397,8 +397,8 @@ label input {
}
/* todo: (heskew) try to get .text on stuff like .text-box */
select, textarea, input.text, input.textMedium, input.text-box {
padding:2px;
border:1px solid #bdbcbc;
padding:1px;
border:1px solid #bdbcbc;
}
input.text, input.textMedium, input.text-box {
line-height:1.2em;