File tree Expand file tree Collapse file tree 3 files changed +46
-43
lines changed
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout Expand file tree Collapse file tree 3 files changed +46
-43
lines changed Original file line number Diff line number Diff line change
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
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 52
52
@await Html.PartialAsync("_Header.cshtml")
53
53
@await Html.PartialAsync("_SideBar.cshtml")
54
54
<div class =" content-wrapper" >
55
- @await Html.PartialAsync("_Layout.Alerts .cshtml")
55
+ @await Html.PartialAsync("_Alerts .cshtml")
56
56
@RenderBody()
57
57
</div >
58
58
@await Html.PartialAsync("_Footer.cshtml")
90
90
<script src =" ~/libs/datatables/js/buttons.bootstrap4.js" asp-append-version =" true" ></script >
91
91
<script src =" ~/js/abp.dataTable.js" asp-append-version =" true" ></script >
92
92
<script src =" ~/js/main.js" asp-append-version =" true" ></script >
93
- <script src =" ~/view-resources/Views/Shared/_Layout.js" asp-append-version =" true" ></script >
94
93
</environment >
95
94
96
95
<environment names =" Staging,Production" >
You can’t perform that action at this time.
0 commit comments