@model RecurringPaymentModel @using SmartStore.Core.Domain.Catalog; @using Telerik.Web.Mvc.UI; @Html.ValidationSummary(false) @Html.HiddenFor(model => model.Id) @Html.SmartStore().TabStrip().Name("recurringpayment-edit").Items(x => { var tabInfo = x.Add().Text(T("Admin.RecurringPayments.Info").Text).Content(TabInfo()).Selected(true); var tabHistory = x.Add().Text(T("Admin.RecurringPayments.History").Text).Content(TabHistory()); //generate an event EngineContext.Current.Resolve().Publish(new TabStripCreated(x, "recurringpayment-edit", this.Html, this.Model)); }) @helper TabInfo() {
@Html.SmartLabelFor(model => model.InitialOrderId) @Html.ActionLink(T("Admin.Common.View").Text, "Edit", "Order", new { id = Model.InitialOrderId }, new { })
@Html.SmartLabelFor(model => model.CustomerEmail) @Html.ActionLink(Model.CustomerEmail, "Edit", "Customer", new { id = Model.CustomerId }, new { })
@Html.SmartLabelFor(model => model.CycleLength) @Html.Telerik().IntegerTextBoxFor(model => model.CycleLength).MinValue(1) @Html.ValidationMessageFor(model => model.CycleLength)
@Html.SmartLabelFor(model => model.CyclePeriodId) @Html.DropDownListFor(model => model.CyclePeriodId, ((RecurringProductCyclePeriod)Model.CyclePeriodId).ToSelectList()) @Html.ValidationMessageFor(model => model.CyclePeriodId)
@Html.SmartLabelFor(model => model.TotalCycles) @Html.Telerik().IntegerTextBoxFor(model => model.TotalCycles).MinValue(1) @Html.ValidationMessageFor(model => model.TotalCycles)
@Html.SmartLabelFor(model => model.CyclesRemaining) @Model.CyclesRemaining
@Html.SmartLabelFor(model => model.PaymentType) @Model.PaymentType
@Html.SmartLabelFor(model => model.StartDate) @Model.StartDate
@Html.SmartLabelFor(model => model.IsActive) @Html.EditorFor(model => model.IsActive) @Html.ValidationMessageFor(model => model.IsActive)
} @helper TabHistory() {
@if (!String.IsNullOrEmpty(Model.NextPaymentDate)) { @T("Admin.RecurringPayments.History.NextPaymentDate") : @Model.NextPaymentDate } @if (Model.CanCancelRecurringPayment) { }
@(Html.Telerik().Grid(Model.History) .Name("history-grid") .Columns(columns => { columns.Bound(x => x.OrderId) .Width(100) .Template(x => Html.ActionLink(T("Admin.Common.View").Text, "Edit", "Order", new { id = x.OrderId }, new { })) .ClientTemplate("\">" + T("Admin.Common.View").Text + ""); columns.Bound(x => x.OrderStatus).Width(200); columns.Bound(x => x.PaymentStatus).Width(200); columns.Bound(x => x.ShippingStatus).Width(200); columns.Bound(x => x.CreatedOn).Width(200); }) .DataBinding(dataBinding => { dataBinding.Ajax().Select("HistoryList", "RecurringPayment", new { recurringPaymentId = Model.Id }); }) .EnableCustomBinding(true))
}