mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 01:24:06 -08:00
51 lines
1.9 KiB
PHP
51 lines
1.9 KiB
PHP
|
{{--
|
||
|
This is a simple notification bar to users who are exempt from the maintenance page, telling them that a
|
||
|
maintenance period is going on. You should place this within your main template(s) via a call to:
|
||
|
|
||
|
@include('maintenancemode::notification')
|
||
|
--}}
|
||
|
|
||
|
@if(isset(${Config::get('maintenancemode.inject.prefix').'Enabled'}) &&
|
||
|
${Config::get('maintenancemode.inject.prefix').'Enabled'} == true)
|
||
|
|
||
|
@if(Config::get('maintenancemode.notification-styles', true))
|
||
|
<style>
|
||
|
.maintenance-mode-alert {
|
||
|
width: 100%;
|
||
|
padding: .5em;
|
||
|
background-color: #FF130F;
|
||
|
color: #fff;
|
||
|
}
|
||
|
.maintenance-mode-alert strong {
|
||
|
font-weight: bold;
|
||
|
}
|
||
|
.maintenance-mode-alert time {
|
||
|
opacity: 0.7;
|
||
|
font-size: .8em;
|
||
|
padding-top: .1em;
|
||
|
float: right;
|
||
|
}
|
||
|
</style>
|
||
|
@endif
|
||
|
|
||
|
<div class="maintenance-mode-alert" id="maintenance-mode-alert" role="alert">
|
||
|
|
||
|
<strong>Maintenance Mode</strong>
|
||
|
|
||
|
{{-- Show the truncated message (so it doesn't overflow) --}}
|
||
|
@if(isset(${Config::get('maintenancemode.inject.prefix').'Message'}))
|
||
|
{{ str_limit(${Config::get('maintenancemode.inject.prefix').'Message'}, 100, "…") }}
|
||
|
@endif
|
||
|
|
||
|
{{-- And show a human-friendly timestamp --}}
|
||
|
@if(isset(${Config::get('maintenancemode.inject.prefix').'Timestamp'}) &&
|
||
|
${Config::get('maintenancemode.inject.prefix').'Timestamp'} instanceof DateTime)
|
||
|
|
||
|
<time datetime="{{ ${Config::get('maintenancemode.inject.prefix').'Timestamp'} }}" title="{{ ${Config::get('maintenancemode.inject.prefix').'Timestamp'} }}">
|
||
|
{{ ${Config::get('maintenancemode.inject.prefix').'Timestamp'}->diffForHumans() }}
|
||
|
</time>
|
||
|
|
||
|
@endif
|
||
|
</div>
|
||
|
|
||
|
@endif
|