FEATURE #1435: small changes in layout

This commit is contained in:
Michal Kváček
2016-08-18 13:21:05 +02:00
parent fc1141184c
commit 7889548a7e
20 changed files with 1058 additions and 104 deletions
@@ -0,0 +1,14 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('admin/contents.edit', ['name' => e($page->title)]))
@section('content')
<div class="row">
<h2>@lang('admin/contents.edit', ['name' => e($page->title)])</h2>
</div>
<div class="row">
@include('admin.content.editForm')
</div>
@stop
@@ -0,0 +1,21 @@
<form method="POST" enctype="multipart/form-data" action="{{route('content.editPost', ['pageId' => $page->id])}}">
{!! csrf_field() !!}
@include('admin.content.formInputs')
<div class="row">
<div class="columns large-6">
<button type="submit" class="button success">@lang('admin/contents.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('admin/contents.showHistory', ['count' => $historySize])</a>
</div>
@endif
</div>
</form>
@section('javascripts')
@include('admin.snippets.ckEditor', ['textareaId' => 'pageContent'])
@stop
@@ -0,0 +1,50 @@
<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='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>--}}
@@ -0,0 +1,50 @@
@if($page->title_photo)
<div class="row">
<div class="col-lg-12 title-photo text-center">
<img src="{{config('app.upload_url')}}/{{$page->title_photo}}" alt="" />
</div>
</div>
@endif
<div class="row">
<div class="col-lg-12">
<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
</div>
</div>
<div class="row">
<div class="col-lg-12">
<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>
</div>
</div>
@@ -0,0 +1,106 @@
<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)}}" />
</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"
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
</div>
<div class="col-lg-2 text-center">
<div>
<label>
<input class="checkbox" value="1" id="lockUrl"
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
@endif name="lockUrl" type="checkbox">
<span>@lang('admin/contents.lockUrl')</span>
</label>
</div>
</div>
</div>
<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>
@if (isset($errors) && $errors->has('status'))
<div class="callout alert">
{{ $errors->first('status') }}
</div>
@endif
</div>
<div class="col-lg-6">
<label>
<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>
@if (isset($errors) && $errors->has('parentPage'))
<div class="callout alert">
{{ $errors->first('parentPage') }}
</div>
@endif
</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>
</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>
@@ -0,0 +1,20 @@
<div class="row">
@if(count($page->files))
<div class="col-lg-6">
<ul>
@foreach($page->files as $file)
<li><label><input type="checkbox" name="keepAssigned[{{$file->id}}]" checked /> {{$file->original_filename}}</label></li>
@endforeach
</ul>
</div>
@endif
<div class="col-lg-6">
<label>
@lang('admin/contents.files')
<input type="file" name="files[]" multiple />
</label>
</div>
</div>
@@ -0,0 +1,18 @@
<div class="row">
<div class="col-lg-12">
<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>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<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>
</div>
</div>
@@ -0,0 +1,31 @@
<div class="row">
<div class="col-lg-6">
<label>
@lang('admin/contents.field_published_from')
<input type="datetime" 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>
</div>
<div class="col-lg-6">
<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>
</div>
</div>
@@ -0,0 +1,7 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('admin/contents.new', ['name' => $moduleName]))
@section('content')
@include('admin.content.newForm')
@stop
@@ -0,0 +1,15 @@
<form method="POST" enctype="multipart/form-data" action="{{route('content.newPost', ['moduleId' => $moduleId])}}">
{!! csrf_field() !!}
@include('admin.content.formInputs')
<div class="row">
<div class="columns large-12">
<button type="submit" class="button success">@lang('admin/contents.save')</button>
</div>
</div>
</form>
@section('javascripts')
@include('admin.snippets.ckEditor', ['textareaId' => 'pageContent'])
@stop