src/Orchard.Web/Modules/Orchard.Lists/Views/Admin/Choose.cshtml
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
@using Orchard.Lists.ViewModels;
@using Orchard.ContentManagement;
@{
var sourceContainerId = (int)Model.SourceContainerId;
var targetContainerId = (int)Model.TargetContainerId;
Layout.Title = T("Choose Items");
var targetContainers = ((IEnumerable<ContentItem>)Model.Containers).Select(
contentItem => new SelectListItem {
Text = T("Move to {0}", contentItem.ContentManager.GetItemMetadata(contentItem).DisplayText ?? contentItem.ContentType).ToString(),
Value = contentItem.Id.ToString(System.Globalization.CultureInfo.InvariantCulture),
Selected = contentItem.Id == targetContainerId
}).ToList();
var sourceContainers = ((IEnumerable<ContentItem>)Model.Containers).Select(
contentItem => new SelectListItem {
Text = contentItem.ContentManager.GetItemMetadata(contentItem).DisplayText ?? contentItem.ContentType,
Value = contentItem.Id.ToString(System.Globalization.CultureInfo.InvariantCulture),
Selected = contentItem.Id == sourceContainerId
}).ToList();
sourceContainers.Insert(0, new SelectListItem { Text = T("No list").ToString(), Value = "" });
}
@using (Html.BeginFormAntiForgeryPost()) {
<fieldset class="bulk-actions">
<label for="filterResults">@T("Show")</label>
<select id="filterResults" name="SelectedFilter">
@Html.SelectOption((string)Model.SelectedFilter, "", T("any (show all)").ToString())
@foreach(var filterOption in Model.FilterOptions) {
@Html.SelectOption((string)Model.SelectedFilter, (string)filterOption.Key, (string)filterOption.Value)
}
</select>
<label for="SourceContainerId">@T("from")</label>
@Html.DropDownList("SourceContainerId", sourceContainers, new { id = "SourceContainerId" })
<label for="orderResults" class="bulk-order">@T("Ordered by")</label>
<select id="orderResults" name="OrderBy">
@Html.SelectOption((ContentsOrder)Model.OrderBy, ContentsOrder.Created, T("recently created").ToString())
@Html.SelectOption((ContentsOrder)Model.OrderBy, ContentsOrder.Modified, T("recently modified").ToString())
@Html.SelectOption((ContentsOrder)Model.OrderBy, ContentsOrder.Published, T("recently published").ToString())
</select>
<button type="submit" name="submit.Filter" value="yes">@T("Apply")</button>
</fieldset>
<div class="manage">
@Html.DropDownList("TargetContainerId", targetContainers)
<button type="submit" name="submit.MoveTo" value="yes">@T("Apply")</button>
</div>
if ((int)Model.ContentItems.Items.Count == 0) {
<div class="message info">@T("There are no content items.")</div>
}
else {
<fieldset class="contentItems bulk-items">
@Display(Model.ContentItems)
</fieldset>
后面还有 4 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
