File tree Expand file tree Collapse file tree 2 files changed +42
-20
lines changed
aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Mvc/Views/Shared/Layout Expand file tree Collapse file tree 2 files changed +42
-20
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
+ <div class =" container-fluid" >
6
+ @if (AlertManager .Alerts .Any ())
7
+ {
8
+ @foreach ( var alertMessage in AlertManager .Alerts )
9
+ {
10
+ <
div class =
" alert [email protected] ().ToLowerInvariant() @(alertMessage.Dismissible ? " alert-dismisable " : " " ) mt-3 mr-1 ml-1" >
11
+ @if (alertMessage .Dismissible )
12
+ {
13
+ <button type =" button" class =" close" data-dismiss =" alert" aria-hidden =" true" >×</button >
14
+ }
15
+ <h5 >
16
+ @{
17
+ var iconClass = " info" ;
18
+ switch (alertMessage .Type )
19
+ {
20
+ case AlertType .Success :
21
+ iconClass = " check" ;
22
+ break ;
23
+ case AlertType .Danger :
24
+ iconClass = " ban" ;
25
+ break ;
26
+ case AlertType .Warning :
27
+ iconClass = " exclamation-triangle" ;
28
+ break ;
29
+ case AlertType .Info :
30
+ iconClass = " info" ;
31
+ break ;
32
+ }
33
+ }
34
+ <i class =" icon fas fa-@iconClass" ></i >
35
+ @alertMessage.Title
36
+ </h5 >
37
+ @alertMessage.Text
38
+ </div >
39
+ }
40
+ }
41
+ </div >
Original file line number Diff line number Diff line change 53
53
<div class =" wrapper" >
54
54
@await Html.PartialAsync("_Header.cshtml")
55
55
@await Html.PartialAsync("_SideBar.cshtml")
56
- <div >
57
- @if (AlertManager .Alerts .Any ())
58
- {
59
- <div id =" AbpPageAlerts" >
60
- @foreach ( var alertMessage in AlertManager .Alerts )
61
- {
62
- <
div class =
" alert [email protected] ().ToLower() @(alertMessage.Dismissible ? " alert-dismisable " : " " )" role =
" alert" >
63
- <h4 class =" alert-heading" >
64
- @alertMessage.Title
65
- @if (alertMessage .Dismissible )
66
- {
67
- <button type =" button" class =" close" data-dismiss =" alert" aria-label =" Close" ><span aria-hidden =" true" >× ; </span ></button >
68
- }
69
- </h4 >
70
- <p >@alertMessage.Text </p >
71
- </div >
72
- }
73
- </div >
74
- }
75
- </div >
76
56
<div class =" content-wrapper" >
57
+ @await Html.PartialAsync("_Layout.Alerts.cshtml")
77
58
@RenderBody()
78
59
</div >
79
60
@await Component.InvokeAsync(typeof(ControlSidebarViewComponent))
You can’t perform that action at this time.
0 commit comments