@using SmartStore.Admin.Models.DataExchange; @model ImportProfileModel @{ Html.AddScriptParts("~/bundles/fileupload"); Html.AddCssFileParts("~/css/fileupload"); } @Html.ValidationSummary(false) @Html.HiddenFor(model => model.Id) @Html.HiddenFor(model => model.TempFileName) @Html.HiddenFor(x => x.EntityType) @if (Model.Id == 0) {
@T("Admin.DataExchange.Import.ProfileCreationNote")
} else if (Model.ExistingFileNames.Count > 1) {
@T("Admin.DataExchange.Import.MultipleFilesSameFileTypeNote")
}
@if (Model.ScheduleTaskId > 0) { } @if (Model.ImportResult != null) { } @if (Model.Id != 0) { } @if (Model.Id != 0) { if (Model.KeyFieldNames != null && Model.KeyFieldNames.Contains("Id", StringComparer.OrdinalIgnoreCase)) { } }
 
@T(Model.ExistingFileNames.Any() ? "Admin.DataExchange.Import.AddAnotherFile" : "Admin.DataExchange.Import.FileUpload")
 
  @foreach (var fileName in Model.ExistingFileNames) {

@Html.IconForFileExtension(Path.GetExtension(fileName), false) @fileName

}
@Html.SmartLabelFor(x => x.ScheduleTaskId) @Html.Action("MinimalTask", "ScheduleTask", new { taskId = Model.ScheduleTaskId, returnUrl = Request.RawUrl, cancellable = true, reloadPage = true, area = "admin" })
@Html.SmartLabelFor(x => x.ImportResult) @Html.Partial("ProfileImportResult", Model.ImportResult)
 
@Html.SmartLabelFor(x => x.Enabled) @Html.EditorFor(x => x.Enabled) @Html.ValidationMessageFor(x => x.Enabled)
@Html.SmartLabelFor(x => x.EntityTypeName) @Html.DisplayFor(x => x.EntityTypeName)
@Html.SmartLabelFor(x => x.Name) @Html.EditorFor(x => x.Name) @Html.ValidationMessageFor(x => x.Name)
@Html.SmartLabelFor(model => model.KeyFieldNames) @*ListBoxFor is insufficient here because the user cannot influence the stored order*@ @Html.ValidationMessageFor(model => model.KeyFieldNames)
@T("Admin.DataExchange.Import.KeyFieldNames.Note")
@Html.SmartLabelFor(x => x.Skip) @Html.EditorFor(x => x.Skip) @Html.ValidationMessageFor(x => x.Skip)
@Html.SmartLabelFor(x => x.Take) @Html.EditorFor(x => x.Take) @Html.ValidationMessageFor(x => x.Take)
@Html.SmartLabelFor(x => x.UpdateOnly) @Html.EditorFor(x => x.UpdateOnly) @Html.ValidationMessageFor(x => x.UpdateOnly)
@if (Model.Id != 0) { if (Model.CsvConfiguration != null) { var viewData = new ViewDataDictionary(); viewData.Add("ShowGroupCaption", true); viewData.TemplateInfo.HtmlFieldPrefix = "CsvConfiguration"; viewData.ModelState.Merge(ViewData.ModelState); @Html.Partial("CsvConfiguration", Model.CsvConfiguration, viewData) } if (Model.ExistingFileNames.Any()) { @Html.Partial("_ColumnMappings") } }