Merge branch 'module_static_pages' into dev
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('staticpages::admin.edit', ['name' => $page->title]))
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<h2>@lang('staticpages::admin.edit', ['name' => $page->title])</h2>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@include('staticpages::admin.editForm')
|
||||
</div>
|
||||
@stop
|
||||
@@ -1,212 +0,0 @@
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{route('staticpage.editPost', ['id' => $page->id])}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="row">
|
||||
<ul class="tabs" data-tabs id="static-page-controls">
|
||||
<li class="tabs-title is-active">
|
||||
<a href="#basic-info" aria-selected="true">@lang('staticpages::admin.basicInfo')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#meta">@lang('staticpages::admin.metaOptions')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#publication">@lang('staticpages::admin.publicationOptions')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#appearance">@lang('staticpages::admin.appearance')</a>
|
||||
</li>
|
||||
|
||||
<li class="tabs-title">
|
||||
<a href="#files">@lang('staticpages::admin.files')</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tabs-content" data-tabs-content="static-page-controls">
|
||||
<div class="tabs-panel is-active" id="basic-info">
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_title')
|
||||
|
||||
<input type="text" name="title" placeholder="@lang('staticpages::admin.field_title')"
|
||||
value="{{$page->title}}" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_url')
|
||||
|
||||
<input type="text" name="url" placeholder="@lang('staticpages::admin.field_url')"
|
||||
value="{{$page->url}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('url'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('url') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<select name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if($page->status == $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
@if (isset($errors) && $errors->has('status'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('status') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{$page->content}}
|
||||
</textarea>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs-panel" id="publication">
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_published_from')
|
||||
|
||||
<input type="datetime" name="publishedFrom" value="{{$page->published_from}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_from')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_from'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_from') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_published_to')
|
||||
|
||||
<input type="datetime" name="publishedTo" value="{{$page->published_to}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_to')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_to'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_to') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="meta">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_meta_keywords')
|
||||
|
||||
<input type="text" name="metaKeywords" value="{{$page->meta_keywords}}"
|
||||
placeholder="@lang('staticpages::admin.field_meta_keywords')" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_meta_description')
|
||||
|
||||
<textarea name="metaDescription"
|
||||
placeholder="@lang('staticpages::admin.field_meta_description')" rows="5">{{$page->meta_description}}</textarea>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="appearance">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.template')
|
||||
|
||||
<select name="template">
|
||||
@foreach($templates as $template)
|
||||
<option value="{{$template->template_name}}">
|
||||
{{$template->name}}
|
||||
@if($template->description != '')
|
||||
- {{str_limit($template->description, 60)}}
|
||||
@endif
|
||||
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="files">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.files')
|
||||
|
||||
|
||||
<input type="file" name="files[]" multiple />
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<button type="submit" class="button success">@lang('staticpages::admin.edit', ['name' => $page->title])</button>
|
||||
</div>
|
||||
|
||||
@if ($historySize > 0)
|
||||
<div class="columns text-right large-6">
|
||||
<a class="button warning" href="{{route('content.history', ['id' => $page->id])}}">@lang('staticpages::admin.showHistory', ['count' => $historySize])</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{asset('../resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
CKEDITOR.replace('pageContent');
|
||||
</script>
|
||||
@stop
|
||||
@@ -1,15 +0,0 @@
|
||||
@extends('admin.layout')
|
||||
|
||||
@section('pageName', @trans('staticpages::admin.new'))
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="row">
|
||||
<h2>@lang('staticpages::admin.new')</h2>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
@include('staticpages::admin.newForm')
|
||||
</div>
|
||||
@stop
|
||||
@@ -1,193 +0,0 @@
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<form method="POST" action="{{route('staticpage.newPost')}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<ul class="tabs" data-tabs id="static-page-controls">
|
||||
<li class="tabs-title is-active">
|
||||
<a href="#basic-info" aria-selected="true">@lang('staticpages::admin.basicInfo')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#meta">@lang('staticpages::admin.metaOptions')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#publication">@lang('staticpages::admin.publicationOptions')</a>
|
||||
</li>
|
||||
<li class="tabs-title">
|
||||
<a href="#appearance">@lang('staticpages::admin.appearance')</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tabs-content" data-tabs-content="static-page-controls">
|
||||
<div class="tabs-panel is-active" id="basic-info">
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_title')
|
||||
|
||||
<input type="text" name="title" placeholder="@lang('staticpages::admin.field_title')"
|
||||
value="{{old('title')}}" />
|
||||
</label>
|
||||
</div>
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_url')
|
||||
|
||||
<input type="text" name="url" placeholder="@lang('staticpages::admin.field_url')"
|
||||
value="{{old('url')}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('url'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('url') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<select name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if($selectedStatus== $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
@if (isset($errors) && $errors->has('status'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('status') }}
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent')}}
|
||||
</textarea>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tabs-panel" id="publication">
|
||||
<div class="row">
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_published_from')
|
||||
|
||||
<input type="datetime" name="published_from" value="{{old('published_from')}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_from')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_from'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_from') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="columns large-6">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_published_to')
|
||||
|
||||
<input type="datetime" name="published_to" value="{{old('published_to')}}"
|
||||
placeholder="@lang('staticpages::admin.field_published_to')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_to'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_to') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="meta">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_meta_keywords')
|
||||
|
||||
<input type="text" name="meta_keywords" value="{{old('meta_keywords')}}"
|
||||
placeholder="@lang('staticpages::admin.field_meta_keywords')" />
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.field_meta_description')
|
||||
|
||||
<textarea name="meta_description"
|
||||
placeholder="@lang('staticpages::admin.field_meta_description')" rows="5">{{old('meta_description')}}
|
||||
</textarea>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="tabs-panel" id="appearance">
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<label>
|
||||
@lang('staticpages::admin.template')
|
||||
|
||||
<select name="template">
|
||||
@foreach($templates as $template)
|
||||
<option value="{{$template->template_name}}">
|
||||
{{$template->name}}
|
||||
@if($template->description != '')
|
||||
- {{str_limit($template->description, 60)}}
|
||||
@endif
|
||||
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@if (isset($errors) && $errors->has('template'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('template') }}
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="columns large-12">
|
||||
<button type="submit" class="button success">@lang('staticpages::admin.save')</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@section('javascripts')
|
||||
<script src="{{asset('../resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
CKEDITOR.replace ('pageContent');
|
||||
</script>
|
||||
@stop
|
||||
@@ -1,76 +0,0 @@
|
||||
@extends('admin/layout')
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<h1>@lang('staticpages::admin.overview')</h1>
|
||||
|
||||
@if (session('success'))
|
||||
<div data-alert class="callout success">
|
||||
<strong>{{ session('success') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if (session('error'))
|
||||
<div data-alert class="callout alert">
|
||||
<strong>{{ session('error') }}</strong>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row" id="static-page-overview" data-equalizer>
|
||||
@forelse($pages as $page)
|
||||
<div class="columns large-3">
|
||||
<div class="page callout" data-equalizer-watch>
|
||||
|
||||
{{--<div class="controls pull-right">--}}
|
||||
{{--<button class="button tiny secondary" data-toggle="static-page-{{$page->id}}actions"><i class="fa fa-caret-down"></i></button>--}}
|
||||
|
||||
{{--<div class="dropdown-pane" id="static-page-{{$page->id}}actions" data-dropdown>--}}
|
||||
{{----}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
|
||||
<h4>{{$page->title}}</h4>
|
||||
<span class="date">{{date('d.m.Y', strtotime($page->created_at))}}</span>
|
||||
<span class="author">{{$page->author_name}}</span>
|
||||
|
||||
<p class="perex">
|
||||
@if (trim($page->meta_description))
|
||||
{{str_limit($page->meta_description)}}
|
||||
@else
|
||||
{{str_limit(strip_tags($page->content))}}
|
||||
@endif
|
||||
</p>
|
||||
|
||||
@if ($page->meta_keywords)
|
||||
<p class="keywords">{{$page->meta_keywords}}</p>
|
||||
@endif
|
||||
|
||||
<p class="controls row text-center">
|
||||
|
||||
{{--<a href="#" class="button tiny secondary has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.viewPage')"><i class="fa fa-desktop"></i></a>--}}
|
||||
<a href="{{route('staticpage.edit', ['id' => $page->id])}}" class="button tiny success has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.edit', ['name' => $page->title])"><i class="fa fa-edit"></i></a>
|
||||
|
||||
@if($page->status == \App\Models\Content::STATUS_DRAFT)
|
||||
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PUBLIC])}}" class="button tiny success confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makePublic')"><i class="fa fa-eye"></i></a>
|
||||
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PROTECTED])}}" class="button tiny warning confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makeProtected')"><i class="fa fa-lock"></i></a>
|
||||
@endif
|
||||
|
||||
@if(in_array($page->status, [\App\Models\Content::STATUS_PROTECTED, \App\Models\Content::STATUS_PUBLIC]))
|
||||
<a href="{{route('staticpage.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_DRAFT])}}" class="button tiny warning confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.makeDraft')"><i class="fa fa-eye-slash"></i></a>
|
||||
@endif
|
||||
|
||||
<a href="{{route('staticpage.delete', ['id' => $page->id])}}" class="button tiny alert confirm has-tip" data-tooltip aria-haspopup="true" title="@lang('staticpages::admin.deletePage')"><i class="fa fa-remove"></i></a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@empty
|
||||
<em>@lang('staticpages::admin.noPagesAvailable')</em>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{$pages->render()}}
|
||||
</div>
|
||||
@stop
|
||||
@@ -1,5 +0,0 @@
|
||||
@extendVisitor('layout')
|
||||
|
||||
@section('content')
|
||||
{!! $page->content !!}
|
||||
@endsection
|
||||
Reference in New Issue
Block a user