FEATURE: add settings
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/settings.overview'))
|
||||
|
||||
@section('content')
|
||||
<form action="{{route('settings.save')}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<ul class="nav nav-tabs nav-tabs-bordered" role="tablist">
|
||||
@foreach($formSections as $id => $section)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($section->getId() == reset($formSections)->getId()) active @endif"
|
||||
data-toggle="tab"
|
||||
href="#{{$section->getId()}}" role="tab"
|
||||
aria-controls="{{$section->getId()}}">{{trans($section->getName())}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<div class="tab-content tabs-bordered card">
|
||||
|
||||
@foreach($formSections as $section => $view)
|
||||
<div class="tab-pane @if($view == reset($formSections)) active @endif" id="{{$section}}"
|
||||
role="tabpanel">
|
||||
@include($view->getView())
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary">@lang('admin/settings.save')</button>
|
||||
</form>
|
||||
@stop
|
||||
@@ -0,0 +1,38 @@
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.pageName')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="pageName"
|
||||
value="{{old('pageName', isset($settings->pageName) ? $settings->pageName['val'] : '')}}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.author')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="author"
|
||||
value="{{old('author', isset($settings->author) ? $settings->author['val'] : '')}}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
@include('admin.settings.snippets.commonSettings', ['field' => 'author'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-9">
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.googleAnalyticsCode')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="googleAnalyticsCode"
|
||||
value="{{old('googleAnalyticsCode', isset($settings->googleAnalyticsCode) ? $settings->googleAnalyticsCode['val'] : '')}}" />
|
||||
</div>
|
||||
<div class="col-lg-3">
|
||||
@include('admin.settings.snippets.commonSettings', ['field' => 'googleAnalyticsCode'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<label class="control-lagel">
|
||||
@lang('admin/settings.metaKeywords')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="metaKeywords"
|
||||
value="{{old('metaKeywords', isset($settings->metaKeywords) ? $settings->metaKeywords['val'] : '')}}" />
|
||||
|
||||
<label class="control-label">
|
||||
@lang('admin/settings.metaDescription')
|
||||
</label>
|
||||
<textarea class="form-control" name="metaDescription"
|
||||
rows="3">{{old('metaDescription', isset($settings->metaDescription) ? $settings->metaDescription['val'] : '')}}</textarea>
|
||||
@@ -0,0 +1,29 @@
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.social.facebook')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="facebookProfile" value="{{old('facebookProfile', isset($settings->facebookProfile) ? $settings->facebookProfile['val'] : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.social.twitter')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="twitterProfile" value="{{old('twitterProfile', isset($settings->twitterProfile) ? $settings->twitterProfile['val'] : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.social.pinterest')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="pinterestProfile" value="{{old('pinterestProfile', isset($settings->pinterestProfile) ? $settings->pinterestProfile['val'] : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.social.gplus')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="gplusProfile" value="{{old('gplusProfile', isset($settings->gplusProfile) ? $settings->gplusProfile['val'] : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('admin/settings.social.instagram')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="instagramProfile" value="{{old('instagramProfile', isset($settings->instagramProfile) ? $settings->instagramProfile['val'] : '')}}" />
|
||||
@@ -0,0 +1,5 @@
|
||||
<input type="checkbox" name="commonSettings[{{$field}}]" value="1"
|
||||
@if(!isset($settings->{$field}) || $settings->{$field}['lang'] == null)
|
||||
checked
|
||||
@endif />
|
||||
@lang('admin/settings.commonSettings')
|
||||
Reference in New Issue
Block a user