FEATURE #1435: add base of content overview and creating new content

This commit is contained in:
Michal Kváček
2016-08-18 13:21:35 +02:00
parent 7889548a7e
commit 6f6497d540
15 changed files with 3332 additions and 3270 deletions
+5
View File
@@ -36,6 +36,11 @@ class Translations extends Command
$defaultLocalesDir = $dir . '/' . $defaultLocales;
$currentLocalesDir = $dir . '/' . $currentLocales;
if (!is_dir($defaultLocalesDir)) {
// this is the place for checking for submodules
return;
}
if (!is_dir($currentLocalesDir)) {
File::makeDirectory($currentLocalesDir);
}
+799 -686
View File
File diff suppressed because it is too large Load Diff
+36
View File
@@ -12997,3 +12997,39 @@ a.bg-danger:focus, a.bg-danger:hover {
.morris-hover{position:absolute;z-index:1000}.morris-hover.morris-default-style{border-radius:10px;padding:6px;color:#666;background:rgba(255,255,255,0.8);border:solid 2px rgba(230,230,230,0.8);font-family:sans-serif;font-size:12px;text-align:center}.morris-hover.morris-default-style .morris-hover-row-label{font-weight:bold;margin:0.25em 0}
.morris-hover.morris-default-style .morris-hover-point{white-space:nowrap;margin:0.1em 0}
/*****************************************************************/
/*********************************/
a:focus {
outline: none;
}
.notification {
position: absolute;
z-index: 9999;
top: 0;
left: 0;
width: 100%;
border-radius: 0;
text-align: center;
transition: opacity .25s ease-in-out;
}
.notification:hover {
cursor: pointer;
opacity: .7;
}
.nav.nav-tabs-bordered + .tab-content {
padding-bottom: 20px !important;
}
.form-control {
margin: .3em 0;
}
.has-error {
color: #FF4444;
font-size: 13px;
display: block !important;
}
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -25,7 +25,7 @@ return [
"makePublic" => "Publikovat",
"metaOptions" => "Meta informace",
"new" => "Vytvořit nový :name",
"noHomepage" => "Dokomvská stránka není nastavena, případně je nastavena jako Koncept! Vyberte prosím jinou stránku, nebo stávající publikujte.",
"noHomepage" => "Domovská stránka není nastavena (a nebo je nastavena jako Koncept)! Vyberte prosím jinou stránku, nebo stávající publikujte.",
"noPagesAvailable" => "Nejsou dostupné žádné stránky. Pro zobrazení přehledu nejprve nějakou vytvořte.",
"noParentPage" => "-- Nadřazená stránka nevybrána --",
"nothingToEdit" => "Nebyly provedeny žádné změny, proto nedošlo k editaci.",
+2 -1
View File
@@ -45,5 +45,6 @@ return [
'parentPage' => 'Parent page',
'alreadyHomepage' => 'Homepage',
'files' => 'Files',
'lockUrl' => 'Keep URL'
'lockUrl' => 'Keep URL',
'noCategory' => ' -- No category -- ',
];
@@ -1,50 +1,16 @@
<ul class="nav nav-tabs with-tabs" role="tablist">
<ul class="nav nav-tabs nav-tabs-bordered" 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>
<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>
<div class="tab-content">
<div class="tab-content tabs-bordered card">
@foreach($formSections as $section => $view)
<div role="tabpanel" class="tabs-pane @if($view == reset($formSections)) in active @endif"
id="{{$section}}">
<div class="tab-pane @if($view == reset($formSections)) active @endif" id="{{$section}}" role="tabpanel">
@include($view)
</div>
@endforeach
</div>
{{--<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>--}}
@@ -6,27 +6,26 @@
</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')
</label>
<select name="template">
<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>
@@ -39,12 +38,6 @@
@endforeach
</select>
@if (isset($errors) && $errors->has('template'))
<div class="callout alert">
{{ $errors->first('template') }}
</div>
@endif
</label>
@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"
<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" class="form-control underlined slug-target"
<input type="text" name="url" required class="form-control 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>
@@ -47,14 +36,9 @@
@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>
@@ -65,22 +49,14 @@
</option>
@endforeach
</select>
</label>
@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>
<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>
@@ -88,19 +64,14 @@
</option>
@endforeach
</select>
</label>
</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>
</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>
+11 -1
View File
@@ -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
+36 -158
View File
@@ -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>
@if (!$homepage)
<div class="alert alert-warning">
<strong>@lang('admin/contents.noHomepage')</strong>
</div>
<section class="section">
@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">
<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">&times;</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">&times;</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 -->
{!! $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