Skip to content

Commit

Permalink
Define a _NorthwindLayout so that Northwind.css is included in pages …
Browse files Browse the repository at this point in the history
…using GridPage extensions
  • Loading branch information
volkanceylan committed Oct 9, 2024
1 parent 94c8903 commit 49cf330
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@{
Layout = "_Layout";
}

@Html.Stylesheet("~/Serenity.Demo.Northwind/index.css")
@RenderBody()
1 change: 1 addition & 0 deletions src/Serenity.Demo.Northwind/Imports/MVC/MVC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace Serenity.Demo.Northwind.MVC;

public static class Views
{
public const string _NorthwindLayout = "~/Areas/Serenity.Demo.Northwind/_NorthwindLayout.cshtml";
public static class Order
{
public const string OrderDetailReport = "~/Areas/Serenity.Demo.Northwind/Order/OrderDetailReport.cshtml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class CategoryPage : Controller
[Route("Northwind/Category")]
public ActionResult Index()
{
return this.GridPage<CategoryRow>(ESM.CategoryPage);
return this.GridPage<CategoryRow>(ESM.CategoryPage, layout: MVC.Views._NorthwindLayout);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class CustomerPage : Controller
[Route("Northwind/Customer")]
public ActionResult Index()
{
return this.GridPage<CustomerRow>(ESM.CustomerPage);
return this.GridPage<CustomerRow>(ESM.CustomerPage, layout: MVC.Views._NorthwindLayout);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Serenity.Demo.Northwind/Modules/Region/RegionPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class RegionPage : Controller
[Route("Northwind/Region")]
public ActionResult Index()
{
return this.GridPage<RegionRow>(ESM.RegionPage);
return this.GridPage<RegionRow>(ESM.RegionPage, layout: MVC.Views._NorthwindLayout);
}
}
2 changes: 1 addition & 1 deletion src/Serenity.Demo.Northwind/Modules/Shipper/ShipperPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class ShipperPage : Controller
[Route("Northwind/Shipper")]
public ActionResult Index()
{
return this.GridPage<ShipperRow>(ESM.ShipperPage);
return this.GridPage<ShipperRow>(ESM.ShipperPage, layout: MVC.Views._NorthwindLayout);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class SupplierPage : Controller
[Route("Northwind/Supplier")]
public ActionResult Index()
{
return this.GridPage<SupplierRow>(ESM.SupplierPage);
return this.GridPage<SupplierRow>(ESM.SupplierPage, layout: MVC.Views._NorthwindLayout);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ public class TerritoryPage : Controller
[Route("Northwind/Territory")]
public ActionResult Index()
{
return this.GridPage<TerritoryRow>(ESM.TerritoryPage);
return this.GridPage<TerritoryRow>(ESM.TerritoryPage, layout: MVC.Views._NorthwindLayout);
}
}

0 comments on commit 49cf330

Please sign in to comment.