edit multi-language models
This commit is contained in:
parent
0e88d76bdc
commit
ad42e73126
|
@ -81,20 +81,34 @@ class PageController extends Controller
|
||||||
/**
|
/**
|
||||||
* Update the specified resource in storage.
|
* Update the specified resource in storage.
|
||||||
*
|
*
|
||||||
* @param @param \App\Http\Requests\Pages\UpdatePageRequest $request
|
* @param \App\Http\Requests\Pages\UpdatePageRequest $request
|
||||||
* @param \App\Models\Page $page
|
* @param int $id
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
*/
|
*/
|
||||||
public function update(UpdatePageRequest $request, Page $page) : RedirectResponse
|
public function update(UpdatePageRequest $request, $id)
|
||||||
{
|
{
|
||||||
|
$page = Page::findOrFail($id);
|
||||||
// $this->pages->update($page, $request->except(['_method', '_token']));
|
// $this->pages->update($page, $request->except(['_method', '_token']));
|
||||||
$input = $request->except(['_method', '_token']);
|
$input = $request
|
||||||
|
->except(['_method', '_token', 'nav-tab', 'en_title', 'en_description', 'de_title', 'de_description']);
|
||||||
// Making extra fields
|
// Making extra fields
|
||||||
//$input['page_slug'] = str_slug($input['title']);
|
//$input['page_slug'] = str_slug($input['title']);
|
||||||
$input['status'] = isset($input['status']) ? 1 : 0;
|
$input['status'] = isset($input['status']) ? 1 : 0;
|
||||||
$input['updated_by'] = \Auth::user()->id;
|
$input['updated_by'] = \Auth::user()->id;
|
||||||
|
|
||||||
if ($page->update($input)) {
|
$article_data = [
|
||||||
|
'en' => [
|
||||||
|
'title' => $request->input('en_title'),
|
||||||
|
'description' => $request->input('en_description')
|
||||||
|
],
|
||||||
|
'de' => [
|
||||||
|
'title' => $request->input('de_title'),
|
||||||
|
'description' => $request->input('de_description')
|
||||||
|
],
|
||||||
|
];
|
||||||
|
$ergebnis = array_merge($input, $article_data);
|
||||||
|
|
||||||
|
if ($page->update($ergebnis)) {
|
||||||
event(new PageUpdated($page));
|
event(new PageUpdated($page));
|
||||||
|
|
||||||
return redirect()
|
return redirect()
|
||||||
|
|
|
@ -16,7 +16,8 @@ class UpdatePageRequest extends Request
|
||||||
*/
|
*/
|
||||||
public function authorize()
|
public function authorize()
|
||||||
{
|
{
|
||||||
return true;//return access()->allow('edit-page');
|
return true;
|
||||||
|
//return access()->allow('edit-page');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,8 +28,8 @@ class UpdatePageRequest extends Request
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'title' => 'required|max:191',
|
'en_title' => 'required|max:191'
|
||||||
'description' => 'required',
|
// 'description_en' => 'required'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ use Illuminate\Validation\Rule;
|
||||||
|
|
||||||
//https://packagist.org/packages/felixkiss/uniquewith-validator
|
//https://packagist.org/packages/felixkiss/uniquewith-validator
|
||||||
|
|
||||||
class CreatePersonRequest extends Request
|
class EditPersonRequest extends Request
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Determine if the user is authorized to make this request.
|
* Determine if the user is authorized to make this request.
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
|
// 1. To specify package’s class you are using
|
||||||
use App\Models\ModelTrait;
|
use App\Models\ModelTrait;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
@ -10,16 +11,18 @@ use Dimsav\Translatable\Translatable;
|
||||||
class Page extends Model
|
class Page extends Model
|
||||||
{
|
{
|
||||||
use ModelTrait;
|
use ModelTrait;
|
||||||
use Translatable;
|
use Translatable; // 2. To add translation methods
|
||||||
/**
|
|
||||||
|
// 3. To define which attributes needs to be translated
|
||||||
|
public $translatedAttributes = ['title', 'description'];
|
||||||
|
|
||||||
|
/**
|
||||||
* The database table used by the model.
|
* The database table used by the model.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $table;
|
protected $table;
|
||||||
|
|
||||||
public $translatedAttributes = ['title', 'description'];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The guarded field which are not mass assignable.
|
* The guarded field which are not mass assignable.
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,6 +8,6 @@ use Illuminate\Database\Eloquent\Model;
|
||||||
class PageTranslation extends Model
|
class PageTranslation extends Model
|
||||||
{
|
{
|
||||||
public $timestamps = false;
|
public $timestamps = false;
|
||||||
//protected $fillable = ['description'];
|
protected $fillable = ['title', 'description'];
|
||||||
protected $guarded = ['id'];
|
protected $guarded = ['id'];
|
||||||
}
|
}
|
||||||
|
|
169
public/backend/tabs.css
vendored
Normal file
169
public/backend/tabs.css
vendored
Normal file
|
@ -0,0 +1,169 @@
|
||||||
|
.tabs {
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
align-items: stretch;
|
||||||
|
display: flex;
|
||||||
|
font-size: 1rem;
|
||||||
|
justify-content: space-between;
|
||||||
|
overflow: hidden;
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs a {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom-color: #dbdbdb;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
color: #4a4a4a;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs a:hover {
|
||||||
|
border-bottom-color: #363636;
|
||||||
|
color: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs li.is-active a {
|
||||||
|
border-bottom-color: #3273dc;
|
||||||
|
color: #3273dc;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs ul {
|
||||||
|
align-items: center;
|
||||||
|
border-bottom-color: #dbdbdb;
|
||||||
|
border-bottom-style: solid;
|
||||||
|
border-bottom-width: 1px;
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs ul.is-left {
|
||||||
|
padding-right: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs ul.is-center {
|
||||||
|
flex: none;
|
||||||
|
justify-content: center;
|
||||||
|
padding-left: 0.75em;
|
||||||
|
padding-right: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs ul.is-right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
padding-left: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs .icon:first-child {
|
||||||
|
margin-right: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs .icon:last-child {
|
||||||
|
margin-left: 0.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-centered ul {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-right ul {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-boxed a {
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-boxed a:hover {
|
||||||
|
background-color: whitesmoke;
|
||||||
|
border-bottom-color: #dbdbdb;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-boxed li.is-active a {
|
||||||
|
background-color: white;
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
border-bottom-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-fullwidth li {
|
||||||
|
flex-grow: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle a {
|
||||||
|
border-color: #dbdbdb;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 1px;
|
||||||
|
margin-bottom: 0;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle a:hover {
|
||||||
|
background-color: whitesmoke;
|
||||||
|
border-color: #b5b5b5;
|
||||||
|
z-index: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle li + li {
|
||||||
|
margin-left: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle li:first-child a {
|
||||||
|
border-radius: 4px 0 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle li:last-child a {
|
||||||
|
border-radius: 0 4px 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle li.is-active a {
|
||||||
|
background-color: #3273dc;
|
||||||
|
border-color: #3273dc;
|
||||||
|
color: #fff;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle ul {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle.is-toggle-rounded li:first-child a {
|
||||||
|
border-bottom-left-radius: 290486px;
|
||||||
|
border-top-left-radius: 290486px;
|
||||||
|
padding-left: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-toggle.is-toggle-rounded li:last-child a {
|
||||||
|
border-bottom-right-radius: 290486px;
|
||||||
|
border-top-right-radius: 290486px;
|
||||||
|
padding-right: 1.25em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-small {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-medium {
|
||||||
|
font-size: 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tabs.is-large {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tab-pane {
|
||||||
|
/* background-color: azure; */
|
||||||
|
/* border: 1px solid #dbdbdb; */
|
||||||
|
border-bottom: 1px solid #dbdbdb;
|
||||||
|
padding: 1rem 1rem 1rem 1rem;
|
||||||
|
}
|
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/style.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/style.css') }}">
|
||||||
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/pagination.css') }}">
|
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/pagination.css') }}">
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ asset('/backend/tabs.css') }}">
|
||||||
@yield('styles')
|
@yield('styles')
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
@ -8,15 +8,16 @@
|
||||||
</h1>
|
</h1>
|
||||||
@endsection
|
@endsection
|
||||||
--}}
|
--}}
|
||||||
@section('content') {{ Form::model($page, ['method' => 'PATCH', 'route' => ['settings.page.update', $page],
|
@section('content')
|
||||||
'class' => 'pure-form pure-form-aligned', 'id' => 'edit-role', 'enctype' => 'multipart/form-data']) }}
|
{!! Form::model($page, ['method' => 'PATCH', 'route' => ['settings.page.update', $page->id],
|
||||||
|
'class' => 'pure-form pure-form-aligned', 'enctype' => 'multipart/form-data']) !!}
|
||||||
|
|
||||||
<div class="box box-info">
|
<div class="box box-info">
|
||||||
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h3 class="header-title">{{ trans('labels.backend.pages.edit') }}
|
<h3 class="header-title">{{ trans('labels.backend.pages.edit') }}
|
||||||
</h3>
|
</h3>
|
||||||
<div class="box-tools pull-right">
|
<div class="box-tools pull-right">
|
||||||
{{--
|
{{--
|
||||||
@include('backend.pages.partials.pages-header-buttons') --}}
|
@include('backend.pages.partials.pages-header-buttons') --}}
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,119 +25,127 @@
|
||||||
|
|
||||||
<div class="box-body box-content">
|
<div class="box-body box-content">
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<!-- Nav tabs -->
|
||||||
{{ Form::label('title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required'])
|
<input type="radio" id="english-option" name="nav-tab" type="hidden">
|
||||||
}}
|
<input type="radio" id="german-option" name="nav-tab" type="hidden">
|
||||||
<div class="col-lg-10">
|
|
||||||
{{ Form::text('title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'),
|
<div class="tabs is-boxed">
|
||||||
'required' => 'required', 'readonly' => 'true']) }}
|
<ul>
|
||||||
</div>
|
<li class="english-link">
|
||||||
<!--col-lg-10-->
|
<label for="english-option"><a class="remove-check">EN</a></label>
|
||||||
</div>
|
</li>
|
||||||
<!--form control-->
|
<li class="german-link">
|
||||||
|
<label for="german-option"><a class="remove-check">DE</a></label>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pure-control-group">
|
<!-- Tab panes -->
|
||||||
{{ Form::label('description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label
|
<div class="tab-content">
|
||||||
required']) }}
|
|
||||||
<div class="col-lg-10">
|
|
||||||
{{ Form::textarea('description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.description')])
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<!--col-lg-3-->
|
|
||||||
</div>
|
|
||||||
<!--form control-->
|
|
||||||
|
|
||||||
{{--
|
<div class="tab-pane content-pic" id="english-form">
|
||||||
<div class="pure-control-group">
|
<div class="pure-control-group">
|
||||||
{{ Form::label('language', 'Language..', ['class' => 'col-lg-2 control-label required']) }}
|
{!! Form::label('en_title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required'])
|
||||||
<div class="col-lg-10">
|
!!}
|
||||||
{{ Form::select('language', $languages, $page->language, ['placeholder' => '--no language--']) }}
|
<div class="col-lg-10">
|
||||||
</div>
|
{!! Form::text('en_title', $page->translate('en')->title, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'),
|
||||||
</div> --}}
|
'required' => 'required', 'readonly' => 'true']) !!}
|
||||||
|
</div>
|
||||||
<div class="pure-control-group">
|
</div>
|
||||||
{{ Form::label('cannonical_link', trans('validation.attributes.backend.pages.cannonical_link'), ['class' => 'col-lg-2 control-label'])
|
|
||||||
}}
|
<div class="pure-control-group">
|
||||||
<div class="col-lg-10">
|
{!! Form::label('en_description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label
|
||||||
{{ Form::text('cannonical_link', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.cannonical_link')])
|
required']) !!}
|
||||||
}}
|
<div class="col-lg-10">
|
||||||
</div>
|
{!! Form::textarea('en_description', $page->translate('en')->description, ['class' => 'form-control description', 'placeholder' => trans('validation.attributes.backend.pages.description')])
|
||||||
<!--col-lg-10-->
|
!!}
|
||||||
</div>
|
</div>
|
||||||
<!--form control-->
|
</div>
|
||||||
|
</div>
|
||||||
<div class="pure-control-group">
|
|
||||||
{{ Form::label('seo_title', trans('validation.attributes.backend.pages.seo_title'), ['class' => 'col-lg-2 control-label'])
|
<div class="tab-pane content-music" id="german-form">
|
||||||
}}
|
<div class="pure-control-group">
|
||||||
<div class="col-lg-10">
|
{!! Form::label('de_title', trans('validation.attributes.backend.pages.title'), ['class' => 'col-lg-2 control-label required'])
|
||||||
{{ Form::text('seo_title', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_title')])
|
!!}
|
||||||
}}
|
<div class="col-lg-10">
|
||||||
</div>
|
{!! Form::text('de_title', $page->translate('de')->title, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.title'),
|
||||||
<!--col-lg-10-->
|
'required' => 'required', 'readonly' => 'true']) !!}
|
||||||
</div>
|
</div>
|
||||||
<!--form control-->
|
</div>
|
||||||
|
<div class="pure-control-group">
|
||||||
<div class="pure-control-group">
|
{!! Form::label('de_description', trans('validation.attributes.backend.pages.description'), ['class' => 'col-lg-2 control-label
|
||||||
{{ Form::label('seo_keyword', trans('validation.attributes.backend.pages.seo_keyword'), ['class' => 'col-lg-2 control-label'])
|
required']) !!}
|
||||||
}}
|
<div class="col-lg-10">
|
||||||
<div class="col-lg-10">
|
{!! Form::textarea('de_description', $page->translate('de')->description, ['class' => 'form-control description', 'placeholder' => trans('validation.attributes.backend.pages.description')])
|
||||||
{{ Form::text('seo_keyword', null, ['class' => 'form-control box-size', 'placeholder' => trans('validation.attributes.backend.pages.seo_keyword')])
|
!!}
|
||||||
}}
|
</div>
|
||||||
</div>
|
|
||||||
<!--col-lg-10-->
|
|
||||||
</div>
|
|
||||||
<!--form control-->
|
|
||||||
|
|
||||||
<div class="pure-control-group">
|
|
||||||
{{ Form::label('seo_description', trans('validation.attributes.backend.pages.seo_description'), ['class' => 'col-lg-2 control-label'])
|
|
||||||
}}
|
|
||||||
<div class="col-lg-10">
|
|
||||||
{{ Form::textarea('seo_description', null,['class' => 'form-control', 'placeholder' => trans('validation.attributes.backend.pages.seo_description')])
|
|
||||||
}}
|
|
||||||
</div>
|
|
||||||
<!--col-lg-3-->
|
|
||||||
</div>
|
|
||||||
<!--form control-->
|
|
||||||
|
|
||||||
<div class="pure-control-group">
|
|
||||||
{{ Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) }}
|
|
||||||
|
|
||||||
<div class="col-lg-10">
|
|
||||||
<div class="control-group">
|
|
||||||
<label class="control control--checkbox">
|
|
||||||
{{ Form::checkbox('status', 1, ($page->status == 1) ? true : false ) }}
|
|
||||||
<div class="control__indicator"></div>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--col-lg-3-->
|
|
||||||
</div>
|
</div>
|
||||||
<!--form control-->
|
|
||||||
|
<div class="pure-control-group">
|
||||||
|
{!! Form::label('status', trans('validation.attributes.backend.pages.is_active'), ['class' => 'col-lg-2 control-label']) !!}
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control control--checkbox">
|
||||||
|
{!! Form::checkbox('status', 1, ($page->status == 1) ? true : false ) !!}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="pure-controls">
|
<div class="pure-controls">
|
||||||
{{ link_to_route('settings.page.index', trans('buttons.general.cancel'), [], ['class' => 'pure-button button-small is-warning'])
|
{{ link_to_route('settings.page.index', trans('buttons.general.cancel'), [], ['class' => 'pure-button button-small is-warning']) }}
|
||||||
}} {{ Form::submit(trans('buttons.general.crud.update'), ['class' => 'pure-button button-small is-primary'])
|
{!! Form::submit(trans('buttons.general.crud.update'), ['class' => 'pure-button button-small is-primary']) !!}
|
||||||
}}
|
|
||||||
<div class="clearfix"></div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- /.box-body -->
|
<!-- /.box-body -->
|
||||||
</div>
|
</div>
|
||||||
<!--box-->
|
|
||||||
{{ Form::close() }}
|
|
||||||
|
@include('errors._errors')
|
||||||
|
{!! Form::close() !!}
|
||||||
@endsection
|
@endsection
|
||||||
|
|
||||||
|
@section('styles')
|
||||||
|
{{-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.6.2/css/bulma.min.css"/> --}}
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
input[type="radio"], .tab-pane { display: none; }
|
||||||
|
|
||||||
|
#english-option:checked ~ .tab-content > .content-pic,
|
||||||
|
#german-option:checked ~ .tab-content > .content-music,
|
||||||
|
#video:checked ~ .tab-content > .content-video,
|
||||||
|
#doc:checked ~ .tab-content > .content-doc {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
#english-option:checked ~ .tabs .english-link a,
|
||||||
|
#german-option:checked ~ .tabs .german-link a {
|
||||||
|
/* border-bottom-color: #3273dc;
|
||||||
|
color: #3273dc; */
|
||||||
|
background-color: #3273dc;
|
||||||
|
border-color: #3273dc;
|
||||||
|
color: #fff;
|
||||||
|
z-index: 1;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
@endsection
|
||||||
|
|
||||||
@section("after-scripts")
|
@section("after-scripts")
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
// Backend.Pages.init();
|
// Backend.Pages.init();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.css" rel="stylesheet">
|
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.css" rel="stylesheet">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.10/summernote-lite.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
// $('#description').summernote();
|
// $('#description').summernote();
|
||||||
$('#description').summernote({
|
$('.description').summernote({
|
||||||
height: "300px",
|
height: "300px",
|
||||||
callbacks: {
|
callbacks: {
|
||||||
// onImageUpload: function(files, editor, welEditable) {
|
// onImageUpload: function(files, editor, welEditable) {
|
||||||
|
@ -144,6 +153,26 @@
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
document.getElementById("english-option").checked = true;
|
||||||
|
|
||||||
|
// var $englishForm = $('#english-form');
|
||||||
|
// var $germanForm = $('#german-form');
|
||||||
|
// var $englishLink = $('#english-link');
|
||||||
|
// var $germanLink = $('#german-link');
|
||||||
|
// $englishLink.click(function() {
|
||||||
|
// $englishLink.toggleClass('bg-aqua-active');
|
||||||
|
// $englishForm.toggleClass('hidden');
|
||||||
|
// $germanLink.toggleClass('bg-aqua-active');
|
||||||
|
// $germanForm.toggleClass('hidden');
|
||||||
|
// });
|
||||||
|
// $germanLink.click(function() {
|
||||||
|
// $englishLink.toggleClass('bg-aqua-active');
|
||||||
|
// $englishForm.toggleClass('hidden');
|
||||||
|
// $germanLink.toggleClass('bg-aqua-active');
|
||||||
|
// $germanForm.toggleClass('hidden');
|
||||||
|
// });
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
|
@ -53,7 +53,9 @@
|
||||||
<td>{{ $person->documents->count() }}</td>
|
<td>{{ $person->documents->count() }}</td>
|
||||||
<td>
|
<td>
|
||||||
<a class="edit" href="{{ route('settings.person.edit', $person->id) }}"><span> </span></a>
|
<a class="edit" href="{{ route('settings.person.edit', $person->id) }}"><span> </span></a>
|
||||||
<a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span> </span></a>
|
@if($person->documents->count() == 0)
|
||||||
|
<a class="delete" href="{{ route('settings.person.delete', $person->id) }}"><span> </span></a>
|
||||||
|
@endif
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
|
@ -90,15 +90,28 @@ Route::group(
|
||||||
/*
|
/*
|
||||||
* CMS Pages Management=============================================================================
|
* CMS Pages Management=============================================================================
|
||||||
*/
|
*/
|
||||||
Route::group(['namespace' => 'Settings', 'prefix' => 'settings', 'as' => 'settings.',], function () {
|
Route::group(
|
||||||
Route::resource('page', 'PageController', ['except' => ['show', 'update']]);
|
[
|
||||||
|
'middleware' => ['permission:settings'],
|
||||||
Route::patch('page/{page}', [
|
'namespace' => 'Settings',
|
||||||
'as' => 'page.update', 'uses' => 'PageController@update',
|
'prefix' => 'settings',
|
||||||
]);
|
'as' => 'settings.'
|
||||||
// //For DataTables
|
],
|
||||||
Route::get('pages/get', ['uses' => 'PagesTableController@get'])->name('page.get');
|
function () {
|
||||||
});
|
//Route::resource('page', 'PageController', ['except' => ['show', 'update']]);
|
||||||
|
Route::get('user', [
|
||||||
|
'as' => 'page.index', 'uses' => 'PageController@index',
|
||||||
|
]);
|
||||||
|
Route::get('page/edit/{page}', [
|
||||||
|
'as' => 'page.edit', 'uses' => 'PageController@edit',
|
||||||
|
]);
|
||||||
|
Route::patch('page/update/{id}', [
|
||||||
|
'as' => 'page.update', 'uses' => 'PageController@update',
|
||||||
|
]);
|
||||||
|
// //For DataTables
|
||||||
|
Route::get('pages/get', ['uses' => 'PagesTableController@get'])->name('page.get');
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
//=================================================setting home - dashboard=======================================
|
//=================================================setting home - dashboard=======================================
|
||||||
|
|
Loading…
Reference in New Issue
Block a user