1 Star 0 Fork 18

xomoon/nop42formysql

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Index.cshtml 5.07 KB
一键复制 编辑 原始数据 按行查看 历史
糊里糊涂1 提交于 2019-06-17 15:53 . 代码生成
@model CampaignSearchModel
@{
//page title
ViewBag.Title = T("Admin.Promotions.Campaigns").Text;
//active menu item (system name)
Html.SetActiveMenuItemSystemName("Campaigns");
}
@{
const string hideSearchBlockAttributeName = "CampaignPage.HideSearchBlock";
var hideSearchBlock = genericAttributeService.GetAttribute<bool>(workContext.CurrentCustomer, hideSearchBlockAttributeName);
}
<nop-antiforgery-token />
<div class="content-header clearfix">
<h1 class="pull-left">
@T("Admin.Promotions.Campaigns")
</h1>
<div class="pull-right">
<a href="@Url.Action("Create")" class="btn bg-blue">
<i class="fa fa-plus-square"></i>
@T("Admin.Common.AddNew")
</a>
@await Component.InvokeAsync("AdminWidget", new { widgetZone = AdminWidgetZones.CampaignListButtons })
</div>
</div>
<div class="content">
<div class="form-horizontal">
<div class="panel-group">
@*hide the entire search block if no elements are displayed*@
<div class="panel panel-default panel-search" @(Model.HideStoresList ? Html.Raw("style=\"display:none\"") : null)>
<div class="panel-body">
<div class="row search-row @(!hideSearchBlock ? "opened" : "")" data-hideAttribute="@hideSearchBlockAttributeName">
<div class="search-text">@T("Admin.Common.Search")</div>
<div class="icon-search"><i class="fa fa-search" aria-hidden="true"></i></div>
<div class="icon-collapse"><i class="fa fa-angle-down" aria-hidden="true"></i></div>
</div>
<div class="search-body @(hideSearchBlock ? "closed" : "")">
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4">
<nop-label asp-for="StoreId" />
</div>
<div class="col-md-8">
<nop-select asp-for="StoreId" asp-items="Model.AvailableStores" />
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<button type="button" id="search-campaigns" class="btn btn-primary btn-search">
<i class="fa fa-search"></i>
@T("Admin.Common.Search")
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="panel panel-default">
<div class="panel-body">
@await Html.PartialAsync("Table", new DataTablesModel
{
Name = "campaigns-grid",
UrlRead = new DataUrl("List", "Campaign", null),
SearchButtonId = "search-campaigns",
Length = Model.PageSize,
LengthMenu = Model.AvailablePageSizes,
Filters = new List<FilterParameter>
{
new FilterParameter(nameof(Model.StoreId))
},
ColumnCollection = new List<ColumnProperty>
{
new ColumnProperty(nameof(CampaignModel.Name))
{
Title = T("Admin.Promotions.Campaigns.Fields.Name").Text
},
new ColumnProperty(nameof(CampaignModel.CreatedOn))
{
Title = T("Admin.Promotions.Campaigns.Fields.CreatedOn").Text,
Width = "200",
Render = new RenderDate()
},
new ColumnProperty(nameof(CampaignModel.DontSendBeforeDate))
{
Title = T("Admin.Promotions.Campaigns.Fields.DontSendBeforeDate").Text,
Width = "200",
Render = new RenderDate()
},
new ColumnProperty(nameof(CampaignModel.Id))
{
Title = T("Admin.Common.Edit").Text,
Width = "100",
ClassName = NopColumnClassDefaults.Button,
Render = new RenderButtonEdit(new DataUrl("Edit"))
}
}
})
</div>
</div>
</div>
</div>
</div>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/wenfeifei/nop42formysql.git
git@gitee.com:wenfeifei/nop42formysql.git
wenfeifei
nop42formysql
nop42formysql
master

搜索帮助