This commit is contained in:
@@ -40,6 +40,13 @@
|
|||||||
options: ''
|
options: ''
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Send some data (php version, mysql version) to phpVMS. See AnalyticsSvc code for details'
|
description: 'Send some data (php version, mysql version) to phpVMS. See AnalyticsSvc code for details'
|
||||||
|
- key: general.google_analytics_id
|
||||||
|
name: 'Google Analytics Tracking ID'
|
||||||
|
group: general
|
||||||
|
value: ''
|
||||||
|
options: ''
|
||||||
|
type: text
|
||||||
|
description: 'Enter your Google Analytics Tracking ID'
|
||||||
- key: units.distance
|
- key: units.distance
|
||||||
name: 'Distance Units'
|
name: 'Distance Units'
|
||||||
group: units
|
group: units
|
||||||
|
|||||||
@@ -70,13 +70,13 @@
|
|||||||
<li><a href="{!! url('/admin/roles') !!}"><i class="pe-7s-network"></i>roles</a></li>
|
<li><a href="{!! url('/admin/roles') !!}"><i class="pe-7s-network"></i>roles</a></li>
|
||||||
@endability
|
@endability
|
||||||
|
|
||||||
@ability('admin', 'settings')
|
|
||||||
<li><a href="{{ url('/admin/settings') }}"><i class="pe-7s-config"></i>settings</a></li>
|
|
||||||
@endability
|
|
||||||
|
|
||||||
@ability('admin', 'maintenance')
|
@ability('admin', 'maintenance')
|
||||||
<li><a href="{{ url('/admin/maintenance') }}"><i class="pe-7s-tools"></i>maintenance</a></li>
|
<li><a href="{{ url('/admin/maintenance') }}"><i class="pe-7s-tools"></i>maintenance</a></li>
|
||||||
@endability
|
@endability
|
||||||
|
|
||||||
|
@ability('admin', 'settings')
|
||||||
|
<li><a href="{{ url('/admin/settings') }}"><i class="pe-7s-config"></i>settings</a></li>
|
||||||
|
@endability
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -2,66 +2,80 @@
|
|||||||
@foreach($grouped_settings as $group => $settings)
|
@foreach($grouped_settings as $group => $settings)
|
||||||
<div class="card border-blue-bottom">
|
<div class="card border-blue-bottom">
|
||||||
<div class="content table-responsive table-full-width">
|
<div class="content table-responsive table-full-width">
|
||||||
<table class="table table-hover" id="flights-table">
|
<div class="row">
|
||||||
<thead>
|
<table class="table table-hover" id="flights-table">
|
||||||
<th colspan="2">
|
<thead>
|
||||||
<h5>{{ $group }}</h5>
|
<th colspan="2">
|
||||||
</th>
|
<h5>{{ $group }}</h5>
|
||||||
</thead>
|
</th>
|
||||||
|
</thead>
|
||||||
|
|
||||||
@foreach($settings as $setting)
|
@foreach($settings as $setting)
|
||||||
<tr>
|
<tr>
|
||||||
<td width="70%">
|
<td width="70%">
|
||||||
<p>{{ $setting->name }}</p>
|
<p>{{ $setting->name }}</p>
|
||||||
<p class="description">
|
<p class="description">
|
||||||
@component('admin.components.info')
|
@component('admin.components.info')
|
||||||
{{$setting->description}}
|
{{$setting->description}}
|
||||||
@endcomponent
|
@endcomponent
|
||||||
</p></td>
|
</p></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
@if($setting->type === 'date')
|
@if($setting->type === 'date')
|
||||||
{{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control', 'id' => 'datepicker']) }}
|
{{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control', 'id' => 'datepicker']) }}
|
||||||
@elseif($setting->type === 'boolean' || $setting->type === 'bool')
|
@elseif($setting->type === 'boolean' || $setting->type === 'bool')
|
||||||
{{ Form::hidden($setting->id, 0) }}
|
{{ Form::hidden($setting->id, 0) }}
|
||||||
{{ Form::checkbox($setting->id, null, $setting->value) }}
|
{{ Form::checkbox($setting->id, null, $setting->value) }}
|
||||||
@elseif($setting->type === 'int')
|
@elseif($setting->type === 'int')
|
||||||
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control']) }}
|
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control']) }}
|
||||||
@elseif($setting->type === 'number')
|
@elseif($setting->type === 'number')
|
||||||
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control', 'step' => '0.01']) }}
|
{{ Form::number($setting->id, $setting->value, ['class'=>'form-control', 'step' => '0.01']) }}
|
||||||
@elseif($setting->type === 'select')
|
@elseif($setting->type === 'select')
|
||||||
|
|
||||||
@if($setting->id === 'general_theme')
|
@if($setting->id === 'general_theme')
|
||||||
{{ Form::select(
|
{{ Form::select(
|
||||||
$setting->id,
|
|
||||||
list_to_assoc($themes),
|
|
||||||
$setting->value,
|
|
||||||
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
|
|
||||||
@else
|
|
||||||
{{ Form::select(
|
|
||||||
$setting->id,
|
$setting->id,
|
||||||
list_to_assoc(explode(',', $setting->options)),
|
list_to_assoc($themes),
|
||||||
$setting->value,
|
$setting->value,
|
||||||
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
|
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
|
||||||
|
@else
|
||||||
|
{{ Form::select(
|
||||||
|
$setting->id,
|
||||||
|
list_to_assoc(explode(',', $setting->options)),
|
||||||
|
$setting->value,
|
||||||
|
['class' => 'select2', 'style' => 'width: 100%; text-align: left;']) }}
|
||||||
|
@endif
|
||||||
|
@else
|
||||||
|
{{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) }}
|
||||||
@endif
|
@endif
|
||||||
@else
|
|
||||||
{{ Form::input('text', $setting->id, $setting->value, ['class' => 'form-control']) }}
|
|
||||||
@endif
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{--<div class="row">
|
||||||
|
<div class="col-sm-12 text-right">
|
||||||
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||||
|
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
||||||
|
</div>
|
||||||
|
</div>--}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="text-right">
|
<div class="row">
|
||||||
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
<div class="col-sm-12 text-right">
|
||||||
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
{{ Form::button('Save', ['type' => 'submit', 'class' => 'btn btn-success']) }}
|
||||||
|
<a href="{{ route('admin.subfleets.index') }}" class="btn btn-default">Cancel</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{ Form::close() }}
|
{{ Form::close() }}
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|||||||
@@ -108,5 +108,27 @@ with the EU Cookie Law https://privacypolicies.com/blog/eu-cookie-law
|
|||||||
$(".select2").select2({width: 'resolve'});
|
$(".select2").select2({width: 'resolve'});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{{--
|
||||||
|
Google Analytics tracking code. Only active if an ID has been entered
|
||||||
|
You can modify to any tracking code and re-use that settings field, or
|
||||||
|
just remove it completely. Only added as a convenience factor
|
||||||
|
--}}
|
||||||
|
@php
|
||||||
|
$gtag = setting('general.google_analytics_id');
|
||||||
|
@endphp
|
||||||
|
@if($gtag)
|
||||||
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ $gtag }}"></script>
|
||||||
|
<script>
|
||||||
|
window.dataLayer = window.dataLayer || [];
|
||||||
|
function gtag(){dataLayer.push(arguments);}
|
||||||
|
gtag('js', new Date());
|
||||||
|
|
||||||
|
gtag('config', '{{ $gtag }}');
|
||||||
|
</script>
|
||||||
|
@endif
|
||||||
|
{{-- End of the Google Analytics code --}}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user