mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 03:25:23 +08:00
Temporary check in working on blog post create cleanup.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4043640
This commit is contained in:
@@ -15,21 +15,32 @@ namespace Orchard.Blogs.Models {
|
||||
public int Id { get { return ContentItem.Id; } }
|
||||
|
||||
[Required]
|
||||
public string Title { get { return this.As<RoutableAspect>().Title; } }
|
||||
public string Title {
|
||||
get { return this.As<RoutableAspect>().Title; }
|
||||
set { this.As<RoutableAspect>().Record.Title = value; }
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string Slug { get { return this.As<RoutableAspect>().Slug; } }
|
||||
public string Slug {
|
||||
get { return this.As<RoutableAspect>().Slug; }
|
||||
set { this.As<RoutableAspect>().Record.Slug = value; }
|
||||
}
|
||||
|
||||
[Required]
|
||||
public string Body { get { return this.As<BodyAspect>().Record.Text; } }
|
||||
public string Body {
|
||||
get { return this.As<BodyAspect>().Record.Text; }
|
||||
set { this.As<BodyAspect>().Record.Text = value; }
|
||||
}
|
||||
|
||||
public IUser Creator { get { return this.As<CommonAspect>().OwnerField.Value; } }
|
||||
public IUser Creator {
|
||||
get { return this.As<CommonAspect>().OwnerField.Value; }
|
||||
set { this.As<CommonAspect>().Record.OwnerId = value.Id; }
|
||||
}
|
||||
|
||||
public DateTime? Published
|
||||
{
|
||||
get { return Record.Published; }
|
||||
set { Record.Published = value; }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -101,7 +101,6 @@
|
||||
<Content Include="Package.txt" />
|
||||
<Content Include="Views\BlogPost\Create.aspx" />
|
||||
<Content Include="Views\BlogPost\Edit.aspx" />
|
||||
<Content Include="Views\BlogPost\EditorTemplates\BlogPostEditViewModel.ascx" />
|
||||
<Content Include="Views\Models\DisplayTemplates\BlogDetailAdmin.ascx" />
|
||||
<Content Include="Views\Blog\ItemForAdmin.aspx" />
|
||||
<Content Include="Views\Models\DisplayTemplates\BlogSummaryAdmin.ascx" />
|
||||
|
@@ -1,45 +0,0 @@
|
||||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogPostEditViewModel>" %>
|
||||
<%@ Import Namespace="Orchard.Blogs.Extensions"%>
|
||||
<%@ Import Namespace="Orchard.Blogs.ViewModels"%>
|
||||
<div class="sections">
|
||||
<div class="primary">
|
||||
<%-- todo: (heskew) thin out the fieldsets if they become overkill --%>
|
||||
<fieldset>
|
||||
<label for="title">Title</label>
|
||||
<span><%=Html.TextBoxFor(m => m.Title, new { id = "title", @class = "large text" })%></span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label class="sub" for="permalink">Permalink<br /><span><%=Request.Url.ToRootString() %>/<%=Model.Blog.Slug %>/</span></label>
|
||||
<span><%=Html.TextBoxFor(m => m.Slug, new { id = "permalink", @class = "text", size = "100" })%></span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<%--<label for="body">Excerpt</label>
|
||||
<span>[still needed]</span>--%>
|
||||
<label for="body">Body</label>
|
||||
<span><%=Html.TextAreaFor(m => m.Body, new { id = "body", @class = "html" })%></span>
|
||||
</fieldset>
|
||||
<% foreach (var e in Model.ItemView.Editors) {
|
||||
var editor = e;
|
||||
// TODO: why is Body in editors?
|
||||
// TODO: because any content type using the body editor doesn't need
|
||||
// to re-implement the rich editor, media extensions, format filter chain selection, etc
|
||||
if (!String.Equals(editor.Prefix, "Body")) {
|
||||
%><%=Html.EditorFor(m=>editor.Model, editor.TemplateName, editor.Prefix) %>
|
||||
<% }
|
||||
} %>
|
||||
</div>
|
||||
<div class="secondary">
|
||||
<fieldset>
|
||||
<legend>Publish Settings</legend>
|
||||
<label for="Command_SaveDraft"><%=Html.RadioButton("Command", "SaveDraft", true, new { id = "Command_SaveDraft" }) %> Save Draft</label><br />
|
||||
<input class="button" type="submit" name="submit.Save" value="Save"/>
|
||||
</fieldset>
|
||||
<%--<fieldset>
|
||||
<label for="Command_PublishNow"><%=Html.RadioButton("Command", "PublishNow", new { id = "Command_PublishNow" }) %> Publish Now</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
|
||||
<%=Html.EditorFor(m => m.Published) %>
|
||||
</fieldset>--%>
|
||||
</div>
|
||||
</div>
|
@@ -33,6 +33,5 @@
|
||||
<label for="Command_PublishLater"><%=Html.RadioButton("Command", "PublishLater", new { id = "Command_PublishLater" }) %> Publish Later</label>
|
||||
<%=Html.EditorFor(m => m.Published) %>
|
||||
</fieldset>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user