@model MessageTemplateModel @using SmartStore.Collections; @using SmartStore.Core.Domain.Catalog; @using SmartStore.Web.Framework.UI; @using Telerik.Web.Mvc.UI; @Html.ValidationSummary(false) @Html.HiddenFor(model => model.Id) @Html.SmartStore().TabStrip().Name("template-edit").Style(TabsStyle.Tabs).Position(TabsPosition.Top).Items(x => { x.Add().Text(T("Admin.Common.Info").Text).Content(TabInfo()).Selected(true); x.Add().Text(T("Admin.Common.Stores").Text).Content(TabStores()); // generate an event EngineContext.Current.Resolve().Publish(new TabStripCreated(x, "template-edit", this.Html, this.Model)); }) @helper TokenSelector(TreeNode root) { if (root.HasChildren) { } } @helper TokenList(TreeNode node) { } @helper TabInfo() {
@Html.SmartLabelFor(model => model.TokensTree) @TokenSelector(Model.TokensTree)
@Html.SmartLabelFor(model => model.Name) @Model.Name @Html.HiddenFor(model => model.Name)
@Html.SmartLabelFor(model => model.IsActive) @Html.EditorFor(model => model.IsActive) @Html.ValidationMessageFor(model => model.IsActive)
@Html.SmartLabelFor(model => model.SendManually) @Html.EditorFor(model => model.SendManually) @Html.ValidationMessageFor(model => model.SendManually)
@(Html.LocalizedEditor("messagetemplate-localized", @
@Html.SmartLabelFor(model => model.Locales[item].EmailAccountId) @Html.DropDownListFor(model => Model.Locales[item].EmailAccountId, new SelectList(Model.AvailableEmailAccounts, "Id", "DisplayName", Model.Locales[item].EmailAccountId)) @Html.ValidationMessageFor(model => model.Locales[item].EmailAccountId)
@Html.SmartLabelFor(model => model.Locales[item].BccEmailAddresses) @Html.EditorFor(model => Model.Locales[item].BccEmailAddresses) @Html.ValidationMessageFor(model => model.Locales[item].BccEmailAddresses)
@Html.SmartLabelFor(model => model.Locales[item].Subject) @Html.TextBoxFor(model => Model.Locales[item].Subject, new { @class = "input-large" }) @Html.ValidationMessageFor(model => model.Locales[item].Subject)
@Html.SmartLabelFor(model => model.Locales[item].Attachment1FileId) @Html.EditorFor(model => Model.Locales[item].Attachment1FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Locales[item].Attachment1FileId)
@Html.SmartLabelFor(model => model.Locales[item].Attachment2FileId) @Html.EditorFor(model => Model.Locales[item].Attachment2FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Locales[item].Attachment2FileId)
@Html.SmartLabelFor(model => model.Locales[item].Attachment3FileId) @Html.EditorFor(model => Model.Locales[item].Attachment3FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Locales[item].Attachment3FileId)
@Html.SmartLabelFor(model => model.Locales[item].Body) @Html.EditorFor(model => Model.Locales[item].Body, "RichEditor") @Html.ValidationMessageFor(model => model.Locales[item].Body)
@Html.HiddenFor(model => model.Locales[item].LanguageId)
, @
@Html.SmartLabelFor(model => model.EmailAccountId) @Html.DropDownListFor(model => model.EmailAccountId, new SelectList(Model.AvailableEmailAccounts, "Id", "DisplayName")) @Html.ValidationMessageFor(model => model.EmailAccountId)
@Html.SmartLabelFor(model => model.BccEmailAddresses) @Html.EditorFor(model => model.BccEmailAddresses) @Html.ValidationMessageFor(model => model.BccEmailAddresses)
@Html.SmartLabelFor(model => model.Subject) @Html.TextBoxFor(model => model.Subject, new { @class = "input-large" }) @Html.ValidationMessageFor(model => model.Subject)
@Html.SmartLabelFor(model => model.Attachment1FileId) @Html.EditorFor(model => Model.Attachment1FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Attachment1FileId)
@Html.SmartLabelFor(model => model.Attachment2FileId) @Html.EditorFor(model => Model.Attachment2FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Attachment2FileId)
@Html.SmartLabelFor(model => model.Attachment3FileId) @Html.EditorFor(model => Model.Attachment3FileId, "Download", new { minimalMode = true }) @Html.ValidationMessageFor(model => model.Attachment3FileId)
@Html.SmartLabelFor(model => model.Body) @Html.EditorFor(model => model.Body, "RichEditor") @Html.ValidationMessageFor(model => model.Body)
)) } @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")
}
}