21 lines
908 B
Plaintext
21 lines
908 B
Plaintext
<% 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 %> |