src/Orchard.Web/Modules/Orchard.ImportExport/Views/Admin/Export.cshtml

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

@using Orchard.Utility.Extensions
@model Orchard.ImportExport.ViewModels.ExportViewModel

@{ Layout.Title = T("Export").ToString(); }

@using (Html.BeginFormAntiForgeryPost()) {
    Html.ValidationSummary();
	<fieldset>
		<legend>@T("Choose the types to include in the export file:")</legend>
		<ol>
		    @{var contentTypeIndex = 0;}
            @foreach (var contentTypeEntry in Model.ContentTypes) {
                <li>
                    <input type="hidden" value="@Model.ContentTypes[contentTypeIndex].ContentTypeName" name="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].ContentTypeName)"/>
                    <input type="checkbox" value="true" name="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)" id="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)" />
                    <label class="forcheckbox" for="@Html.NameOf(m => m.ContentTypes[contentTypeIndex].IsChecked)">@Model.ContentTypes[contentTypeIndex].ContentTypeName.CamelFriendly()</label>
                </li>
                contentTypeIndex = contentTypeIndex + 1;
            }
		</ol>
    </fieldset>
    <hr />
    <fieldset>
        <legend>@T("Choose what to save for these types:")</legend>
        <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>
        </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>
        </div>
        <div>
            <p>@T("Version History")</p>
            @Html.RadioButtonFor(m => m.DataImportChoice, "Published", new { id = "Published", Checked = "Checked" })
            <label for="@Html.FieldIdFor(m => m.DataImportChoice)" class="forcheckbox">@T("Only Published Versions")</label>
            <br />
            @Html.RadioButtonFor(m => m.DataImportChoice, "Draft", new { id = "Draft" })
            <label for="@Html.FieldIdFor(m => m.DataImportChoice)" class="forcheckbox">@T("Only Drafts")</label>
        </div>
        <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>
        </div>     
    </fieldset>

    if (Model.CustomSteps.Any()) {
         <fieldset>
             <legend>@T("Choose the custom steps to execute in the export file:")</legend>
             <ol>
                 @{ var customStepIndex = 0; }
                 @foreach (var customStepEntry in Model.CustomSteps) {
                     <li>
                         <input type="hidden" value="@Model.CustomSteps[customStepIndex].CustomStep" name="@Html.NameOf(m => m.CustomSteps[customStepIndex].CustomStep)"/>
                         <input type="checkbox" value="true" name="@Html.NameOf(m => m.CustomSteps[customStepIndex].IsChecked)" id="@Html.NameOf(m => m.CustomSteps[customStepIndex].IsChecked)" />
                         <label class="forcheckbox" for="@Html.NameOf(m => m.CustomSteps[customStepIndex].IsChecked)">@Model.CustomSteps[customStepIndex].CustomStep.CamelFriendly()</label>
                     </li>
后面还有 8 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。