@model AnnouncementViewModel
@using Nop.Core.Infrastructure
@using Nop.Web.Framework


@{
    var defaultGridPageSize = EngineContext.Current.Resolve<Nop.Core.Domain.Common.AdminAreaSettings>().DefaultGridPageSize;
    var gridPageSizes = EngineContext.Current.Resolve<Nop.Core.Domain.Common.AdminAreaSettings>().GridPageSizes;

    Layout = "_AdminLayout";
    //page title
    ViewBag.Title = T("Admin.Plugins.HomePageProduct").Text;
}

<div class="content-header clearfix">
    <div class="pull-right">
        <a href="../GetAnnouncementViewModel" class="btn bg-blue">
            <i class="fa fa-floppy-o"></i>
            Add
        </a>
    </div>
</div>

<div class="content">
    <div class="form-horizontal">
        <div class="panel-group">
            <div class="panel panel-default">
                <div class="panel-body">

                    @await Html.PartialAsync("Table", new DataTablesModel
               {
                   Name = "announcement-grid",
                   UrlRead = new DataUrl("GetAnnouncementList", "Announcement"),
                   Paging = false,
                   ColumnCollection = new List<ColumnProperty>
                    {
                    new ColumnProperty(nameof(Announcement.Name))
                    {
                    Title = "Name",
                    Width = "300"
                    },
                    new ColumnProperty(nameof(Announcement.Body))
                    {
                    Title = "Body",
                    Width = "400"
                    }
                    }
               })


                    
                </div>
            </div>
        </div>
    </div>
</div>

