File tree 3 files changed +17
-20
lines changed
src/Presentation/SmartStore.Web/Administration
3 files changed +17
-20
lines changed Original file line number Diff line number Diff line change @@ -11,21 +11,5 @@ public class LicenseLabelModel : ModelBase
11
11
public LicensingState LicenseState { get ; set ; }
12
12
public string TruncatedLicenseKey { get ; set ; }
13
13
public int ? RemainingDemoUsageDays { get ; set ; }
14
-
15
- public string RemainingDemoUsageDaysLabel
16
- {
17
- get
18
- {
19
- if ( RemainingDemoUsageDays . HasValue )
20
- {
21
- if ( RemainingDemoUsageDays <= 3 )
22
- return "badge-dark" ;
23
-
24
- if ( RemainingDemoUsageDays <= 6 )
25
- return "badge-warning" ;
26
- }
27
- return "badge-success" ;
28
- }
29
- }
30
14
}
31
15
}
Original file line number Diff line number Diff line change 14
14
else if (Model .LicenseState == LicensingState .Unlicensed && Model .TruncatedLicenseKey .HasValue ())
15
15
{
16
16
<span class =" badge badge-danger" >@T( " Admin.Common.Unlicensed" )</span >
17
- }
18
- else
19
- {
20
- <span class =" badge @(Model.RemainingDemoUsageDaysLabel)" >
17
+ }
18
+ else
19
+ {
20
+ var remainingDaysLabel = " badge-success" ;
21
+ if (Model .RemainingDemoUsageDays .HasValue )
22
+ {
23
+ if (Model .RemainingDemoUsageDays <= 3 )
24
+ {
25
+ remainingDaysLabel = " badge-dark" ;
26
+ }
27
+ else if (Model .RemainingDemoUsageDays <= 6 )
28
+ {
29
+ remainingDaysLabel = " badge-warning" ;
30
+ }
31
+ }
32
+
33
+ <span class =" badge @remainingDaysLabel" >
21
34
@if (! Model .RemainingDemoUsageDays .HasValue )
22
35
{
23
36
@T( " Admin.Plugins.LicensingDemoNotStarted" )
You can’t perform that action at this time.
0 commit comments