@model BlogPostModel @using Telerik.Web.Mvc.UI; @Html.ValidationSummary(false) @Html.HiddenFor(model => model.Id) @Html.SmartStore().TabStrip().Name("blog-post-edit").Items(x => { x.Add().Text(T("Admin.ContentManagement.Blog.BlogPosts.Info").Text).Content(TabInfo()).Selected(true); x.Add().Text(T("Admin.Common.SEO").Text).Content(TabSeo()); x.Add().Text(T("Admin.Common.Stores").Text).Content(TabStores()); //generate an event EngineContext.Current.Resolve().Publish(new TabStripCreated(x, "blog-post-edit", this.Html, this.Model)); }) @helper TabInfo() {
@Html.SmartLabelFor(model => model.LanguageId) @Html.DropDownListFor(model => model.LanguageId, new SelectList(ViewBag.AllLanguages, "Id", "Name"))
@Html.SmartLabelFor(model => model.Title) @Html.EditorFor(model => model.Title) @Html.ValidationMessageFor(model => model.Title)
@Html.SmartLabelFor(model => model.Body) @Html.EditorFor(x => x.Body, Html.RichEditorFlavor()) @Html.ValidationMessageFor(model => model.Body)
@Html.SmartLabelFor(model => model.AllowComments) @Html.EditorFor(model => model.AllowComments) @Html.ValidationMessageFor(model => model.AllowComments)
@Html.SmartLabelFor(model => model.Tags) @Html.EditorFor(model => model.Tags) @Html.ValidationMessageFor(model => model.Tags)
@Html.SmartLabelFor(model => model.CreatedOnUtc) @Html.EditorFor(model => model.CreatedOnUtc) @Html.ValidationMessageFor(model => model.CreatedOnUtc)
@Html.SmartLabelFor(model => model.StartDate) @Html.EditorFor(model => model.StartDate) @Html.ValidationMessageFor(model => model.StartDate)
@Html.SmartLabelFor(model => model.EndDate) @Html.EditorFor(model => model.EndDate) @Html.ValidationMessageFor(model => model.EndDate)
} @helper TabSeo() {
@Html.SmartLabelFor(model => model.MetaKeywords) @Html.EditorFor(x => x.MetaKeywords) @Html.ValidationMessageFor(model => model.MetaKeywords)
@Html.SmartLabelFor(model => model.MetaDescription) @Html.EditorFor(x => x.MetaDescription) @Html.ValidationMessageFor(model => model.MetaDescription)
@Html.SmartLabelFor(model => model.MetaTitle) @Html.EditorFor(x => x.MetaTitle) @Html.ValidationMessageFor(model => model.MetaTitle)
@Html.SmartLabelFor(model => model.SeName) @Html.EditorFor(model => model.SeName) @if (Model.Id != 0) { @Html.Action("NamesPerEntity", "UrlRecord", new { entityName = "BlogPost", entityId = @Model.Id }) } @Html.ValidationMessageFor(model => model.SeName)
} @helper TabStores() {
@Html.SmartLabelFor(model => model.LimitedToStores) @Html.EditorFor(model => model.LimitedToStores) @Html.ValidationMessageFor(model => model.LimitedToStores)
@Html.SmartLabelFor(model => model.AvailableStores) @if (Model.AvailableStores != null && Model.AvailableStores.Count > 0) { foreach (var store in Model.AvailableStores) { } } else {
@T("Admin.Configuration.Stores.NoStoresDefined")
}
}