FEATURE #1435: add base of content overview and creating new content
This commit is contained in:
@@ -1,50 +1,16 @@
|
||||
<ul class="nav nav-tabs with-tabs" role="tablist">
|
||||
@foreach($formSectionNames as $section => $sectionName)
|
||||
<li class="nav-item">
|
||||
<a href="#{{$section}}" role="tab" data-toggle="tab"
|
||||
class="nav-link @if($sectionName == reset($formSectionNames)) active @endif">
|
||||
{{trans($sectionName)}}
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
@foreach($formSections as $section => $view)
|
||||
<div role="tabpanel" class="tabs-pane @if($view == reset($formSections)) in active @endif"
|
||||
id="{{$section}}">
|
||||
@include($view)
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
<ul class="nav nav-tabs nav-tabs-bordered" role="tablist">
|
||||
@foreach($formSectionNames as $section => $sectionName)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link @if($sectionName == reset($formSectionNames)) active @endif" data-toggle="tab"
|
||||
href="#{{$section}}" role="tab" id="{{$section}}-tab" aria-controls="{{$section}}">{{trans($sectionName)}}</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
{{--<ul class='tabs'>--}}
|
||||
{{--<li><a href='#tab1'>Tab 1</a></li>--}}
|
||||
{{--<li><a href='#tab2'>Tab 2</a></li>--}}
|
||||
{{--<li><a href='#tab3'>Tab 3</a></li>--}}
|
||||
{{--</ul>--}}
|
||||
{{--<div id='tab1'>--}}
|
||||
{{--<p>Hi, this is the first tab.</p>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div id='tab2'>--}}
|
||||
{{--<p>This is the 2nd tab.</p>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div id='tab3'>--}}
|
||||
{{--<p>And this is the 3rd tab.</p>--}}
|
||||
{{--</div>--}}
|
||||
|
||||
|
||||
{{--<ul class="nav nav-tabs">--}}
|
||||
{{--<li class="active"><a data-toggle="tab" href="#home">Home</a></li>--}}
|
||||
{{--<li><a data-toggle="tab" href="#menu1">Menu 1</a></li>--}}
|
||||
{{--</ul>--}}
|
||||
|
||||
{{--<div class="tab-content">--}}
|
||||
{{--<div id="home" class="tab-pane fade in active">--}}
|
||||
{{--<h3>HOME</h3>--}}
|
||||
{{--<p>Some content.</p>--}}
|
||||
{{--</div>--}}
|
||||
{{--<div id="menu1" class="tab-pane fade">--}}
|
||||
{{--<h3>Menu 1</h3>--}}
|
||||
{{--<p>Some content in menu 1.</p>--}}
|
||||
{{--</div>--}}
|
||||
{{--</div>--}}
|
||||
<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)
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -6,45 +6,38 @@
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.uploadTitleImage')
|
||||
<input type="file" id="titlePhoto" name="titlePhoto" />
|
||||
</label>
|
||||
@if (isset($errors) && $errors->has('titlePhoto'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('titlePhoto') }}
|
||||
</div>
|
||||
@endif
|
||||
<input type="file" id="titlePhoto" name="titlePhoto" class="form-control" />
|
||||
<span class="has-error">Neplatny template</span>
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'titlePhoto'])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.template')
|
||||
|
||||
<select name="template">
|
||||
@foreach($templates as $template)
|
||||
<option value="{{$template->template_name}}"
|
||||
@if(old('template', $page->template) == $template->template_name) selected @endif>
|
||||
{{$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>
|
||||
|
||||
|
||||
<select class="form-control" name="template">
|
||||
@foreach($templates as $template)
|
||||
<option value="{{$template->template_name}}"
|
||||
@if(old('template', $page->template) == $template->template_name) selected @endif>
|
||||
{{$template->name}}
|
||||
@if($template->description != '')
|
||||
- {{str_limit($template->description, 60)}}
|
||||
@endif
|
||||
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'template'])
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,29 +1,18 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_title')
|
||||
</label>
|
||||
|
||||
<input type="text" name="title" class="form-control underlined slug-source"
|
||||
placeholder="@lang('admin/contents.field_title')"
|
||||
value="{{old('title', $page->title)}}" />
|
||||
<input type="text" name="title" class="form-control slug-source"
|
||||
placeholder="@lang('admin/contents.field_title')"
|
||||
value="{{old('title', $page->title)}}" />
|
||||
|
||||
@include('admin.snippets.hasError', ['field' => 'title'])
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_url')
|
||||
</label>
|
||||
|
||||
<input type="text" name="url" required class="form-control slug-target"
|
||||
placeholder="@lang('admin/contents.field_url')"
|
||||
value="{{old('url', $page->url)}}" />
|
||||
|
||||
<input type="text" name="url" class="form-control underlined slug-target"
|
||||
placeholder="@lang('admin/contents.field_url')"
|
||||
value="{{old('url', $page->url)}}" />
|
||||
|
||||
@if (isset($errors) && $errors->has('url'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('url') }}
|
||||
</div>
|
||||
@endif
|
||||
@include('admin.snippets.hasError', ['field' => 'url'])
|
||||
</div>
|
||||
<div class="col-lg-2 text-center">
|
||||
<div>
|
||||
@@ -39,68 +28,50 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<select class="form-control" name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<select class="form-control" name="status">
|
||||
@foreach($contentStatuses as $status => $translation)
|
||||
<option value="{{$status}}" @if(old('status', $page->status) == $status) selected @endif>
|
||||
{{$translation}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@if (isset($errors) && $errors->has('status'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('status') }}
|
||||
</div>
|
||||
@endif
|
||||
@include('admin.snippets.hasError', ['field' => 'status'])
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label>
|
||||
<select class="form-control" name="parentPage">
|
||||
<option value="">@lang('admin/contents.noParentPage')</option>
|
||||
<select class="form-control" name="parentPage">
|
||||
<option value="">@lang('admin/contents.noParentPage')</option>
|
||||
|
||||
@foreach($rootPages as $rootPage)
|
||||
<option value="{{$rootPage->id}}"
|
||||
@if(old('parent_page', $page->parent_id) == $rootPage->id) selected @endif>
|
||||
{{$rootPage->title}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
@foreach($rootPages as $rootPage)
|
||||
<option value="{{$rootPage->id}}"
|
||||
@if(old('parent_page', $page->parent_id) == $rootPage->id) selected @endif>
|
||||
{{$rootPage->title}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
|
||||
@if (isset($errors) && $errors->has('parentPage'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('parentPage') }}
|
||||
</div>
|
||||
@endif
|
||||
@include('admin.snippets.hasError', ['field' => 'parentPage'])
|
||||
</div>
|
||||
|
||||
@if($module->support_categories && count($categories))
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
@lang('admin/contents.category')
|
||||
|
||||
<select name="category">
|
||||
<option value=""> ---</option>
|
||||
@foreach($categories as $category)
|
||||
<option value="{{$category->id}}"
|
||||
@if($category->id == old('category', $page->category_id)) selected @endif>
|
||||
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
<select class="form-control" name="category">
|
||||
<option value="">@lang('admin/contents.noCategory')</option>
|
||||
@foreach($categories as $category)
|
||||
<option value="{{$category->id}}"
|
||||
@if($category->id == old('category', $page->category_id)) selected @endif>
|
||||
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent', $page->content)}}
|
||||
</textarea>
|
||||
|
||||
</label>
|
||||
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
|
||||
{{old('pageContent', $page->content)}}
|
||||
</textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -11,10 +11,10 @@
|
||||
@endif
|
||||
|
||||
<div class="col-lg-6">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.files')
|
||||
|
||||
<input type="file" name="files[]" multiple />
|
||||
</label>
|
||||
|
||||
<input type="file" name="files[]" class="form-control" multiple />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,18 +1,19 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_meta_keywords')
|
||||
|
||||
<input type="text" name="metaKeywords" value="{{old('meta_keywords', $page->meta_keywords)}}" placeholder="@lang('admin/contents.field_meta_keywords')" />
|
||||
</label>
|
||||
|
||||
<input type="text" name="metaKeywords" class="form-control" value="{{old('meta_keywords', $page->meta_keywords)}}" placeholder="@lang('admin/contents.field_meta_keywords')" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_meta_description')
|
||||
|
||||
<textarea name="metaDescription" placeholder="@lang('admin/contents.field_meta_description')" rows="5">{{old('meta_description', $page->meta_description)}}</textarea>
|
||||
</label>
|
||||
|
||||
|
||||
<textarea class="form-control" name="metaDescription" placeholder="@lang('admin/contents.field_meta_description')" rows="5">{{old('meta_description', $page->meta_description)}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,31 +1,22 @@
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_published_from')
|
||||
</label>
|
||||
|
||||
<input type="datetime" name="published_from" value="{{old('published_from', $page->published_from)}}"
|
||||
<input type="datetime" class="form-control" name="published_from" value="{{old('published_from', $page->published_from)}}"
|
||||
placeholder="@lang('admin/contents.field_published_from')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_from'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_from') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
@include('admin.snippets.hasError', ['field' => 'published_from'])
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<label>
|
||||
<label class="control-label">
|
||||
@lang('admin/contents.field_published_to')
|
||||
|
||||
<input type="datetime" name="published_to" value="{{old('published_to', $page->published_to)}}"
|
||||
placeholder="@lang('admin/contents.field_published_to')" />
|
||||
|
||||
@if (isset($errors) && $errors->has('published_to'))
|
||||
<div class="callout alert">
|
||||
{{ $errors->first('published_to') }}
|
||||
</div>
|
||||
@endif
|
||||
</label>
|
||||
|
||||
<input type="datetime" class="form-control" name="published_to" value="{{old('published_to', $page->published_to)}}"
|
||||
placeholder="@lang('admin/contents.field_published_to')" />
|
||||
@include('admin.snippets.hasError', ['field' => 'published_to'])
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,5 +3,15 @@
|
||||
@section('pageHeading', @trans('admin/contents.new', ['name' => $moduleName]))
|
||||
|
||||
@section('content')
|
||||
@include('admin.content.newForm')
|
||||
<form method="POST" enctype="multipart/form-data" action="{{route('content.newPost', ['moduleId' => $moduleId])}}">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
@include('admin.content.formInputs')
|
||||
|
||||
<button type="submit" class="btn btn-primary">@lang('admin/contents.save')</button>
|
||||
</form>
|
||||
@stop
|
||||
|
||||
@section('javascripts')
|
||||
@include('admin.snippets.ckEditor', ['textareaId' => 'pageContent'])
|
||||
@stop
|
||||
@@ -1,166 +1,44 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/contents.overview'))
|
||||
|
||||
@section('content')
|
||||
<article class="content charts-flot-page">
|
||||
<div class="title-block">
|
||||
<h3 class="title">
|
||||
Charts Flot
|
||||
</h3>
|
||||
<p class="title-description"> List of sample charts with custom colors </p>
|
||||
</div>
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title-block">
|
||||
<h3 class="title">
|
||||
Bar Chart Example
|
||||
</h3> </div>
|
||||
<section class="example">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flot-bar-chart"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title-block">
|
||||
<h3 class="title">
|
||||
Line Cahrt Example
|
||||
</h3> </div>
|
||||
<section class="example">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flot-line-chart"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title-block">
|
||||
<h3 class="title">
|
||||
Pie Chart Example
|
||||
</h3> </div>
|
||||
<section class="example">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-pie-content" id="flot-pie-chart"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title-block">
|
||||
<h3 class="title">
|
||||
Live Chart Example
|
||||
</h3> </div>
|
||||
<section class="example">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flot-line-chart-moving"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="section">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-block">
|
||||
<div class="card-title-block">
|
||||
<h3 class="title">
|
||||
Multiple Axes Line Chart Example
|
||||
</h3> </div>
|
||||
<section class="example">
|
||||
<div class="flot-chart">
|
||||
<div class="flot-chart-content" id="flot-line-chart-multi"></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</article>
|
||||
<footer class="footer">
|
||||
<div class="footer-block buttons"> <iframe class="footer-github-btn" src="https://ghbtns.com/github-btn.html?user=modularcode&repo=modular-admin-html&type=star&count=true" frameborder="0" scrolling="0" width="140px" height="20px"></iframe> </div>
|
||||
<div class="footer-block author">
|
||||
<ul>
|
||||
<li> created by <a href="https://github.com/modularcode">ModularCode</a> </li>
|
||||
<li> <a href="https://github.com/modularcode/modular-admin-html#get-in-touch">get in touch</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="modal fade" id="modal-media">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
<h4 class="modal-title">Media Library</h4> </div>
|
||||
<div class="modal-body modal-tab-container">
|
||||
<ul class="nav nav-tabs modal-tabs" role="tablist">
|
||||
<li class="nav-item"> <a class="nav-link" href="#gallery" data-toggle="tab" role="tab">Gallery</a> </li>
|
||||
<li class="nav-item"> <a class="nav-link active" href="#upload" data-toggle="tab" role="tab">Upload</a> </li>
|
||||
</ul>
|
||||
<div class="tab-content modal-tab-content">
|
||||
<div class="tab-pane fade" id="gallery" role="tabpanel">
|
||||
<div class="images-container">
|
||||
<div class="row"> </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-pane fade active in" id="upload" role="tabpanel">
|
||||
<div class="upload-container">
|
||||
<div id="dropzone">
|
||||
<form action="/" method="POST" enctype="multipart/form-data" class="dropzone needsclick dz-clickable" id="demo-upload">
|
||||
<div class="dz-message-block">
|
||||
<div class="dz-message needsclick"> Drop files here or click to upload. </div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> <button type="button" class="btn btn-primary">Insert Selected</button> </div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
<div class="modal fade" id="confirm-modal">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title"><i class="fa fa-warning"></i> Alert</h4> </div>
|
||||
<div class="modal-body">
|
||||
<p>Are you sure want to do this?</p>
|
||||
</div>
|
||||
<div class="modal-footer"> <button type="button" class="btn btn-primary" data-dismiss="modal">Yes</button> <button type="button" class="btn btn-secondary" data-dismiss="modal">No</button> </div>
|
||||
</div>
|
||||
<!-- /.modal-content -->
|
||||
</div>
|
||||
<!-- /.modal-dialog -->
|
||||
</div>
|
||||
<!-- /.modal -->
|
||||
@if (!$homepage)
|
||||
<div class="alert alert-warning">
|
||||
<strong>@lang('admin/contents.noHomepage')</strong>
|
||||
</div>
|
||||
</div>
|
||||
@elseif(!$homepage->isPublic())
|
||||
<div class="alert alert-info">
|
||||
<strong>@lang('admin/contents.homepageProtected')</strong>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
@if (count($pages))
|
||||
<table>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
@foreach($pages as $page)
|
||||
<tr>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
{!! $pages->render() !!}
|
||||
</div>
|
||||
|
||||
@else
|
||||
<div class="alert alert-info">
|
||||
@lang('admin/contents.noPagesAvailable')
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
@@ -0,0 +1,5 @@
|
||||
@if (isset($errors) && $errors->has($field))
|
||||
<span class="has-error">
|
||||
{{ $errors->first($field) }}
|
||||
</span>
|
||||
@endif
|
||||
Reference in New Issue
Block a user