@using SmartStore.ShippingByWeight.Models; @using SmartStore.Web.Framework; @using Telerik.Web.Mvc.UI; @model ShippingByWeightListModel @{ Layout = ""; }
@(Html.Telerik().Grid() .Name("Grid") .DataKeys(keys => keys.Add(x => x.Id).RouteKey("Id")) .Columns(columns => { columns.Bound(x => x.StoreName).ReadOnly(); columns.Bound(x => x.CountryName).ReadOnly(); columns.Bound(x => x.Zip); columns.Bound(x => x.ShippingMethodName).ReadOnly(); columns.Bound(x => x.From) .Format("{0:0.00}"); columns.Bound(x => x.To) .Format("{0:0.00}"); columns.Bound(x => x.UsePercentage) .Centered() .Template(item => @Html.SymbolForBool(item.UsePercentage)) .ClientTemplate(@Html.SymbolForBool("UsePercentage")); columns.Bound(x => x.ShippingChargePercentage) .Format("{0:0.00}"); columns.Bound(x => x.ShippingChargeAmount) .Format("{0:0.00}"); columns.Bound(x => x.SmallQuantitySurcharge) .Format("{0:0.00}"); columns.Bound(x => x.SmallQuantityThreshold) .Format("{0:0.00}"); columns.Command(commands => { commands.Edit(); commands.Delete(); }).Width(180); }) .Editable(x => { x.Mode(GridEditMode.InLine); }) .DataBinding(dataBinding => { dataBinding.Ajax() .Select("RatesList", "ShippingByWeight", new RouteValueDictionary() { { "area", "SmartStore.ShippingByWeight" } }) .Update("RateUpdate", "ShippingByWeight", new RouteValueDictionary() { { "area", "SmartStore.ShippingByWeight" } }) .Delete("RateDelete", "ShippingByWeight", new RouteValueDictionary() { { "area", "SmartStore.ShippingByWeight" } }); }) .Pageable(settings => settings.PageSize(Model.GridPageSize).Position(GridPagerPosition.Both)) .PreserveGridState() .EnableCustomBinding(true))

@using (Html.BeginForm()) {
@T("Plugins.Shipping.ByWeight.AddNewRecordTitle")
@Html.SmartLabelFor(model => model.AddStoreId) @Html.DropDownListFor(model => model.AddStoreId, Model.AvailableStores) @Html.ValidationMessageFor(model => model.AddStoreId)
@Html.SmartLabelFor(model => model.AddCountryId) @Html.DropDownListFor(model => model.AddCountryId, Model.AvailableCountries) @Html.ValidationMessageFor(model => model.AddCountryId)
@Html.SmartLabelFor(model => model.AddZip) @Html.EditorFor(model => model.AddZip) @Html.ValidationMessageFor(model => model.AddZip)
@Html.SmartLabelFor(model => model.AddShippingMethodId) @Html.DropDownListFor(model => model.AddShippingMethodId, Model.AvailableShippingMethods) @Html.ValidationMessageFor(model => model.AddShippingMethodId)
@Html.SmartLabelFor(model => model.AddFrom) @Html.EditorFor(model => model.AddFrom) [@Model.BaseWeightIn] @Html.ValidationMessageFor(model => model.AddFrom)
@Html.SmartLabelFor(model => model.AddTo) @Html.EditorFor(model => model.AddTo) [@Model.BaseWeightIn] @Html.ValidationMessageFor(model => model.AddTo)
@Html.SmartLabelFor(model => model.AddUsePercentage) @Html.EditorFor(model => model.AddUsePercentage) @Html.ValidationMessageFor(model => model.AddUsePercentage)
@Html.SmartLabelFor(model => model.AddShippingChargePercentage) @Html.EditorFor(model => model.AddShippingChargePercentage) @Html.ValidationMessageFor(model => model.AddShippingChargePercentage)
@Html.SmartLabelFor(model => model.AddShippingChargeAmount) @Html.EditorFor(model => model.AddShippingChargeAmount) [@Model.PrimaryStoreCurrencyCode] @Html.ValidationMessageFor(model => model.AddShippingChargeAmount)
@Html.SmartLabelFor(model => model.SmallQuantitySurcharge) @Html.EditorFor(model => model.SmallQuantitySurcharge) [@Model.PrimaryStoreCurrencyCode] @Html.ValidationMessageFor(model => model.SmallQuantitySurcharge)
@Html.SmartLabelFor(model => model.SmallQuantityThreshold) @Html.EditorFor(model => model.SmallQuantityThreshold) @Html.ValidationMessageFor(model => model.SmallQuantityThreshold)
 
@T("Plugins.Shipping.ByWeight.SettingsTitle")
@Html.SmartLabelFor(model => model.CalculatePerWeightUnit) @Html.EditorFor(model => model.CalculatePerWeightUnit) @Html.ValidationMessageFor(model => model.CalculatePerWeightUnit)
@Html.SmartLabelFor(model => model.LimitMethodsToCreated) @Html.EditorFor(model => model.LimitMethodsToCreated) @Html.ValidationMessageFor(model => model.LimitMethodsToCreated)
 
}