mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-03-14 12:29:44 +01:00
Fixes #644 - Incident presenter respects the date format.
This commit is contained in:
parent
c097585ca0
commit
f2e869f610
@ -38,6 +38,7 @@ class IncidentPresenter extends BasePresenter
|
||||
parent::__construct($resource);
|
||||
|
||||
$this->tz = Setting::get('app_timezone');
|
||||
$this->format = Setting::get('incident_date_format') ?: 'l jS F Y H:i:s';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -71,7 +72,7 @@ class IncidentPresenter extends BasePresenter
|
||||
{
|
||||
return ucfirst((new Date($this->wrappedObject->created_at))
|
||||
->setTimezone($this->tz)
|
||||
->format('l jS F Y H:i:s'));
|
||||
->format($this->format));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -105,7 +106,7 @@ class IncidentPresenter extends BasePresenter
|
||||
{
|
||||
return ucfirst((new Date($this->wrappedObject->scheduled_at))
|
||||
->setTimezone($this->tz)
|
||||
->format('l jS F Y H:i:s'));
|
||||
->format($this->format));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -86,18 +86,19 @@ return [
|
||||
'settings' => [
|
||||
/// Application setup
|
||||
'app-setup' => [
|
||||
'site-name' => 'Site Name',
|
||||
'site-url' => 'Site URL',
|
||||
'site-timezone' => 'Site Timezone',
|
||||
'site-locale' => 'Site Language',
|
||||
'date-format' => 'Date Format',
|
||||
'display-graphs' => 'Display graphs on status page?',
|
||||
'about-this-page' => 'About this page',
|
||||
'days-of-incidents' => 'How many days of incidents to show?',
|
||||
'banner' => 'Banner Image',
|
||||
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
|
||||
'analytics_google' => 'Google Analytics code',
|
||||
'analytics_gosquared' => 'GoSquared Analytics code',
|
||||
'site-name' => 'Site Name',
|
||||
'site-url' => 'Site URL',
|
||||
'site-timezone' => 'Site Timezone',
|
||||
'site-locale' => 'Site Language',
|
||||
'date-format' => 'Date Format',
|
||||
'incident-date-format' => 'Incident Timestamp Format',
|
||||
'display-graphs' => 'Display graphs on status page?',
|
||||
'about-this-page' => 'About this page',
|
||||
'days-of-incidents' => 'How many days of incidents to show?',
|
||||
'banner' => 'Banner Image',
|
||||
'banner-help' => "It's recommended that you upload files no bigger than 930px wide .",
|
||||
'analytics_google' => 'Google Analytics code',
|
||||
'analytics_gosquared' => 'GoSquared Analytics code',
|
||||
],
|
||||
'security' => [
|
||||
'allowed-domains' => 'Allowed domains',
|
||||
|
@ -85,7 +85,18 @@
|
||||
{{ trans('forms.settings.app-setup.date-format') }}
|
||||
<a href="http://php.net/manual/en/function.date.php" target="_blank"><i class="icon ion-help-circled"></i></a>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="date_format" value="{{ Setting::get('date_format') ?: 'jS F Y' }}">
|
||||
<input type="text" class="form-control" name="date_format" value="{{ Setting::get('date_format') ?: 'l jS F Y H:i:s' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>
|
||||
{{ trans('forms.settings.app-setup.incident-date-format') }}
|
||||
<a href="http://php.net/manual/en/function.date.php" target="_blank"><i class="icon ion-help-circled"></i></a>
|
||||
</label>
|
||||
<input type="text" class="form-control" name="incident_date_format" value="{{ Setting::get('incident_date_format') ?: 'l jS F Y H:i:s' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user