place expire warning in top
This commit is contained in:
@@ -10,12 +10,38 @@
|
||||
end
|
||||
%>
|
||||
<% if license_status == 0 || license_status == 2 %>
|
||||
<div class="alert alert-warning fade show" role="alert" style="margin-top: -15px;">
|
||||
<div class="alert alert-danger fade show text-center" role="alert">
|
||||
<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;">
|
||||
<%= link_to 'Review License', expire_url, class: 'btn btn-sm btn-primary', style: "margin-left: 20px !important"%>
|
||||
<button type="button" class="close btn-close" data-dismiss="alert" aria-label="Close" style="padding-top: 5px;">
|
||||
<span aria-hidden="true" class="text-white">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
if (<%= license_status %> == 1) {
|
||||
$('.navbar').css("top", 0)
|
||||
$('section.content').css('margin-top', '0 !important')
|
||||
}
|
||||
else {
|
||||
$('.navbar').css("top", '45px')
|
||||
$('.block-header, .addorder-pages').css('margin-top', '115px')
|
||||
$('.page-header, .m-top-100').css('margin-top', '100px')
|
||||
$('.alert-danger').css({
|
||||
'top': 0,
|
||||
'position': 'fixed',
|
||||
'z-index': 999,
|
||||
'width': '100%'
|
||||
})
|
||||
}
|
||||
$('.btn-close').on ('click', function() {
|
||||
$('.navbar').css("top", '0')
|
||||
$('.block-header, .addorder-pages').css('margin-top', '')
|
||||
$('.page-header, .m-top-100').css('margin-top', '')
|
||||
})
|
||||
})
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user