mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-02-09 09:16:41 +08:00
Added ImportBatchSize option to export screen.
This enables users to optionally provide the desired batch size to use when importing the recipe without having to manually edit it.
This commit is contained in:
@@ -108,6 +108,7 @@ namespace Orchard.ImportExport.Controllers {
|
||||
if (viewModel.Data) {
|
||||
exportOptions.ExportData = true;
|
||||
exportOptions.VersionHistoryOptions = (VersionHistoryOptions)Enum.Parse(typeof(VersionHistoryOptions), viewModel.DataImportChoice, true);
|
||||
exportOptions.ImportBatchSize = viewModel.ImportBatchSize;
|
||||
}
|
||||
var exportFilePath = _importExportService.Export(contentTypesToExport, exportOptions);
|
||||
|
||||
|
||||
@@ -4,10 +4,11 @@ namespace Orchard.ImportExport.ViewModels {
|
||||
public class ExportViewModel {
|
||||
public IList<ContentTypeEntry> ContentTypes { get; set; }
|
||||
public IList<CustomStepEntry> CustomSteps { get; set; }
|
||||
public virtual bool Metadata { get; set; }
|
||||
public virtual bool Data { get; set; }
|
||||
public virtual string DataImportChoice { get; set; }
|
||||
public virtual bool SiteSettings { get; set; }
|
||||
public bool Metadata { get; set; }
|
||||
public bool Data { get; set; }
|
||||
public int? ImportBatchSize { get; set; }
|
||||
public string DataImportChoice { get; set; }
|
||||
public bool SiteSettings { get; set; }
|
||||
}
|
||||
|
||||
public class ContentTypeEntry {
|
||||
|
||||
@@ -22,12 +22,17 @@
|
||||
<div>
|
||||
@Html.EditorFor(m => m.Metadata)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Metadata)">@T("Metadata")</label>
|
||||
<span class="hint">@T("Metadata is the definition of your content types: what parts and fields they have, with what settings.")</span>
|
||||
@Html.Hint(T("Metadata is the definition of your content types: what parts and fields they have, with what settings."))
|
||||
</div>
|
||||
<div>
|
||||
@Html.EditorFor(m => m.Data)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.Data)">@T("Data")</label>
|
||||
<span class="hint">@T("Data is the actual content of your site.")</span>
|
||||
@Html.Hint(T("Data is the actual content of your site."))
|
||||
</div>
|
||||
<div>
|
||||
@Html.LabelFor(m => m.ImportBatchSize, T("Batch Size"))
|
||||
@Html.TextBoxFor(m => m.ImportBatchSize, new { @class = "text small" })
|
||||
@Html.Hint(T("The batch size to use when importing the data. Leave empty to disable batched imports."))
|
||||
</div>
|
||||
<div>
|
||||
<p>@T("Version History")</p>
|
||||
@@ -40,7 +45,7 @@
|
||||
<div>
|
||||
@Html.EditorFor(m => m.SiteSettings)
|
||||
<label class="forcheckbox" for="@Html.FieldIdFor(m => m.SiteSettings)">@T("Site Settings")</label><br />
|
||||
<span class="hint">@T("Please verify that you are not exporting confidential information, such as passwords or application keys.")</span>
|
||||
@Html.Hint(T("Please verify that you are not exporting confidential information, such as passwords or application keys."))
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user