license renew page
This commit is contained in:
21
app/views/shared/_license_expire_warning.html.erb
Normal file
21
app/views/shared/_license_expire_warning.html.erb
Normal file
@@ -0,0 +1,21 @@
|
||||
<% license_status = current_license.detail_with_local_file %>
|
||||
<% renewable_date = current_license.read_license("renewable_date") %>
|
||||
<% date_count = (renewable_date.to_date - Date.today).to_i %>
|
||||
<% day = pluralize( date_count, 'day' )%>
|
||||
|
||||
<% if license_status == 0
|
||||
text = 'Your license has expired.'
|
||||
elsif license_status == 2
|
||||
text = "Your license will expire in #{day}."
|
||||
end
|
||||
%>
|
||||
<% if license_status == 0 || license_status == 2 %>
|
||||
<div class="alert alert-warning fade show" role="alert" style="margin-top: -15px;">
|
||||
<strong style="margin-left: 40px !important"><%= text %></strong>
|
||||
<%= link_to 'Renew License', expire_url, class: 'btn btn-sm btn-primary', style: "margin-left: 40px !important"%>
|
||||
<button type="button" class="close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;">
|
||||
<span aria-hidden="true" class="text-white">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user