Skip to content

Commit 4a893f0

Browse files
committed
removed unused layout js resource and fixed alerts partial view naming convention mistake
1 parent 766d75b commit 4a893f0

File tree

3 files changed

+46
-43
lines changed

3 files changed

+46
-43
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
@using Abp.Web.Mvc.Alerts
2+
3+
@inject IAlertManager AlertManager
4+
5+
@if (AlertManager.Alerts.Any())
6+
{
7+
<div class="container-fluid">
8+
@foreach (var alert in AlertManager.Alerts)
9+
{
10+
var alertClass = "alert-";
11+
var iconClass = "fa-";
12+
switch (alert.Type)
13+
{
14+
case AlertType.Success:
15+
alertClass += "success";
16+
iconClass += "check";
17+
break;
18+
case AlertType.Danger:
19+
alertClass += "danger";
20+
iconClass += "ban";
21+
break;
22+
case AlertType.Warning:
23+
alertClass += "warning";
24+
iconClass += "exclamation-triangle";
25+
break;
26+
case AlertType.Info:
27+
alertClass += "info";
28+
iconClass += "info";
29+
break;
30+
}
31+
32+
<div class="alert @alertClass @(alert.Dismissible ? "alert-dismisable" : "") mt-3 mr-1 ml-1">
33+
@if (alert.Dismissible)
34+
{
35+
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
36+
}
37+
<h5>
38+
<i class="icon fas @iconClass"></i>
39+
@alert.Title
40+
</h5>
41+
@alert.Text
42+
</div>
43+
}
44+
</div>
45+
}

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Layout.Alerts.cshtml

Lines changed: 0 additions & 41 deletions
This file was deleted.

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout/_Layout.cshtml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
@await Html.PartialAsync("_Header.cshtml")
5353
@await Html.PartialAsync("_SideBar.cshtml")
5454
<div class="content-wrapper">
55-
@await Html.PartialAsync("_Layout.Alerts.cshtml")
55+
@await Html.PartialAsync("_Alerts.cshtml")
5656
@RenderBody()
5757
</div>
5858
@await Html.PartialAsync("_Footer.cshtml")
@@ -90,7 +90,6 @@
9090
<script src="~/libs/datatables/js/buttons.bootstrap4.js" asp-append-version="true"></script>
9191
<script src="~/js/abp.dataTable.js" asp-append-version="true"></script>
9292
<script src="~/js/main.js" asp-append-version="true"></script>
93-
<script src="~/view-resources/Views/Shared/_Layout.js" asp-append-version="true"></script>
9493
</environment>
9594

9695
<environment names="Staging,Production">

0 commit comments

Comments
 (0)