DELETE: delete old admin templates

This commit is contained in:
Michal Kváček
2016-09-20 11:57:17 +02:00
parent f92c1d0089
commit 4ac084139c
75 changed files with 0 additions and 3079 deletions
@@ -1,58 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/actionLog.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/actionLog.overview')</h2>
</div>
<div class="row" data-equalizer>
@if (!empty($actions))
<ul class="accordion" data-accordion>
@foreach($actions as $action)
<li class="accordion-item" data-accordion-item>
<a class="accordion-title">
<img src="{{\App\Helpers\Gravatar::img($action->email, 20)}}" alt="{{$action->email}}" />
<strong>{{$action->name}}</strong>
{{date('d.m.Y', strtotime($action->created_at))}}
</a>
<div class="accordion-content" data-tab-content>
<div class="row">
<div class="column large-1 text-center">
<img src="{{\App\Helpers\Gravatar::img($action->email, 70)}}"
alt="{{$action->email}}" />
<p>
{{$action->user_name}}<br />
{{date('G:i', strtotime($action->created_at))}}</p>
</div>
<div class="column large-11">
<div class="row column">
{{$action->value}}
</div>
<div class="clearfix"></div>
<div class="row column">
<p>
<strong>@lang('admin/actionLog.ip')</strong>: {{$action->ip}},
<br />
<strong>@lang('admin/actionLog.userAgent')</strong>: {{$action->user_agent}}
</p>
</div>
</div>
</div>
</div>
</li>
@endforeach
</ul>
@else
<em>@lang('admin/userManagement.noActions')</em>
@endif
</div>
<div class="row pagination">
{!! $actions->render() !!}
</div>
@stop
@@ -1,14 +0,0 @@
@extends('admin.layout')
@section('pageName', @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
@@ -1,33 +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" 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
@@ -1,17 +0,0 @@
<ul class="tabs" data-tabs id="static-page-controls">
@foreach($formSectionNames as $section => $sectionName)
<li class="tabs-title @if($sectionName == reset($formSectionNames)) is-active @endif">
<a href="#{{$section}}" @if($sectionName == reset($formSectionNames)) aria-selected="true" @endif>
{{trans($sectionName)}}
</a>
</li>
@endforeach
</ul>
<div class="tabs-content" data-tabs-content="static-page-controls">
@foreach($formSections as $section => $view)
<div class="tabs-panel @if($view == reset($formSections)) is-active @endif" id="{{$section}}">
@include($view)
</div>
@endforeach
</div>
@@ -1,50 +0,0 @@
@if($page->title_photo)
<div class="row">
<div class="column large-12 title-photo text-center">
<img src="{{config('app.upload_url')}}/{{$page->title_photo}}" alt="" />
</div>
</div>
@endif
<div class="row">
<div class="column large-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="columns large-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>
@@ -1,103 +0,0 @@
<div class="row">
<div class="columns large-6">
<label>
@lang('admin/contents.field_title')
<input type="text" name="title" class="slug-source" placeholder="@lang('admin/contents.field_title')"
value="{{old('title', $page->title)}}" />
</label>
</div>
<div class="columns large-4">
<label>
@lang('admin/contents.field_url')
<input type="text" name="url" class="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
</label>
</div>
<div class="column large-2 text-center">
<label>
@lang('admin/contents.lockUrl')<br />
<input type="checkbox" value="1" id="lockUrl"
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
@endif name="lockUrl" />
</label>
</div>
</div>
<div class="row">
<div class="columns large-6">
<label>
<select name="status">
@foreach($contentStatuses as $status => $translation)
<option value="{{$status}}" @if(old('status', $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 class="column large-6">
<label>
<select 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="column large-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="columns large-12">
<label>
<textarea name="pageContent" id="pageContent" class="wysiwyg-editor">
{{old('pageContent', $page->content)}}
</textarea>
</label>
</div>
</div>
@@ -1,20 +0,0 @@
<div class="row">
@if(count($page->files))
<div class="column large-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="columns large-6">
<label>
@lang('admin/contents.files')
<input type="file" name="files[]" multiple />
</label>
</div>
</div>
@@ -1,18 +0,0 @@
<div class="row">
<div class="columns large-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="columns large-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>
@@ -1,31 +0,0 @@
<div class="row">
<div class="columns large-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="columns large-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>
@@ -1,14 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/contents.new', ['name' => $moduleName]))
@section('content')
<div class="row">
<h2>@lang('admin/contents.new', ['name' => $moduleName])</h2>
</div>
<div class="row">
@include('admin.content.newForm')
</div>
@stop
@@ -1,27 +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" 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
@@ -1,39 +0,0 @@
@extends('admin/layout')
@section('content')
<div class="row">
<h1>@lang('admin/contents.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>
@if (!$homepage)
<div class="row">
<div class="callout alert">
<strong>@lang('admin/contents.noHomepage')</strong>
</div>
</div>
@elseif(!$homepage->isPublic())
<div class="row">
<div class="callout warning">
<strong>@lang('admin/contents.homepageProtected')</strong>
</div>
</div>
@endif
@include('admin.content.overviewTiles')
<div class="row">
{!! $pages->render() !!}
</div>
@stop
@@ -1,83 +0,0 @@
@forelse($pages as $page)
<div class="page callout page {{$page->status}} row">
<div class="row column">
@if ($page->parent_id && $page->parent_url)
<span class="parent">
@lang('admin/contents.parentPage'):
<a href="{{route('content.edit', ['id' => $page->parent_id])}}">{{$page->parent_title}}</a>,
</span>
@endif
<span class="author">{{$page->author_name}}</span>,
<span class="date">{{date('d.m.Y', strtotime($page->created_at))}}</span>
</div>
<div class="column large-1">
@if ($page->title_photo)
<a href="{{route('content.edit', ['id' => $page->id])}}">
<img src="@upload($page->title_photo)" class="float-left" alt="" />
</a>
@endif
</div>
<div class="column large-8">
<h4>
<a href="{{route('content.edit', ['id' => $page->id])}}">
{{$page->title}}
<small>(@lang($page->module_name))</small>
</a>
</h4>
<p class="perex">
@if (trim($page->meta_description))
{{str_limit($page->meta_description)}}
@else
{{str_limit(strip_tags($page->content))}}
@endif
</p>
</div>
<div class="controls column float-right large-3">
@if($page->is_homepage)
<a class="button tiny disabled">
<i class="fa fa-home"></i>
@lang('admin/contents.alreadyHomepage')
</a>
@else
<a href="{{route('content.setHomepage', ['id' => $page->id])}}"
class="button tiny success">
<i class="fa fa-home"></i>
@lang('admin/contents.setHomepage')
</a>
@endif
<a href="{{route('content.edit', ['id' => $page->id])}}" class="button tiny success">
<i class="fa fa-edit"></i>
@lang('admin/contents.editPlain')
</a>
@if($page->status == \App\Models\Content::STATUS_DRAFT)
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PUBLIC])}}"
class="button tiny success confirm">
<i class="fa fa-eye"></i> @lang('admin/contents.makePublic')</a>
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_PROTECTED])}}"
class="button tiny warning confirm">
<i class="fa fa-lock"></i> @lang('admin/contents.makeProtected')</a>
@else
<a href="{{route('page.content', ['url' => $page->url])}}" target="_blank"
class="button tiny secondary"><i
class="fa fa-desktop"></i> @lang('admin/contents.viewPage')</a>
<a href="{{route('content.changeStatus', ['id' => $page->id, 'status' => \App\Models\Content::STATUS_DRAFT])}}"
class="button tiny warning confirm"><i
class="fa fa-eye-slash"></i> @lang('admin/contents.makeDraft')</a>
@endif
<a href="{{route('content.delete', ['id' => $page->id])}}"
class="button tiny alert confirm"><i
class="fa fa-remove"></i> @lang('admin/contents.deletePage')</a>
</div>
</div>
@empty
<em>@lang('admin/contents.noPagesAvailable')</em>
@endforelse
@@ -1,14 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/customFields.edit', ['name' => $field->name]))
@section('content')
<div class="row">
<h2>@lang('admin/customFields.edit', ['name' => $field->name])</h2>
</div>
<div class="row">
@include('admin.customFields.editForm')
</div>
@stop
@@ -1,136 +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('customfields.editPost', ['id' => $field->id])}}">
{!! csrf_field() !!}
<div class="row">
<div class="large-12 columns">
<label>
@lang('admin/customFields.name')
<input type="text" placeholder="@lang('admin/customFields.name')" value="{{$field->name}}" name="name">
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
</div>
</div>
<div class="row">
<div class="large-6 columns">
<label>
@lang('admin/customFields.description')
<textarea rows="5" name="description" placeholder="@lang('admin/customFields.description')">{{$field->description}}</textarea>
</label>
</div>
<div class="large-6 columns">
<label>
@lang('admin/customFields.type')
<select name="type" disabled>
@foreach($types as $type => $translation)
<option value="{{$type}}"@if($field->type_id == $type) selected @endif>{{$translation}}</option>
@endforeach
</select>
@if (isset($errors) && $errors->has('type'))
<div class="callout alert">
{{ $errors->first('type') }}
</div>
@endif
</label>
<label>
@lang('admin/customFields.resource')
<select name="resource" disabled>
@foreach($resources as $resource => $translation)
<option value="{{$resource}}"@if($field->resource_id == $resource) selected @endif>{{$translation}}</option>
@endforeach
</select>
@if (isset($errors) && $errors->has('resource'))
<div class="callout alert">
{{ $errors->first('resource') }}
</div>
@endif
</label>
<label>
@lang('admin/customFields.required')
<input type="checkbox" placeholder="@lang('admin/customFields.required')" @if ($field->required) checked="checked" @endif name="required">
</label>
</div>
</div>
<div class="row">
<div class="columns large-6">
<label>
@lang('admin/customFields.possibleValues')
<textarea placeholder="@lang('admin/customFields.possibleValues')" name="possibleValues" rows="4">{{$field->possibleValues}}</textarea>
</label>
</div>
<div class="columns large-6">
<label>
@lang('admin/customFields.defaultValue')
<input type="text" placeholder="@lang('admin/customFields.defaultValue')" value="{{$field->defaultValue}}" name="defaultValue">
</label>
<label>
@lang('admin/customFields.regExp')
<input type="text" placeholder="@lang('admin/customFields.regExp')" value="{{$field->regExp}}" name="regExp">
</label>
</div>
</div>
<div class="row">
<div class="large-6 columns">
<label>
@lang('admin/customFields.minLength')
<input type="text" placeholder="@lang('admin/customFields.minLength')" value="{{$field->minLength}}" name="minLength">
@if (isset($errors) && $errors->has('minLength'))
<div class="callout alert">
{{ $errors->first('minLength') }}
</div>
@endif
</label>
</div>
<div class="large-6 columns">
<label>
@lang('admin/customFields.maxLength')
<input type="text" placeholder="@lang('admin/customFields.maxLength')" value="{{$field->macLength}}" name="maxLength">
@if (isset($errors) && $errors->has('maxLength'))
<div class="callout alert">
{{ $errors->first('maxLength') }}
</div>
@endif
</label>
</div>
</div>
<label>
<button type="submit" class="button success">@lang('admin/customFields.createNew')</button>
</label>
</form>
@@ -1,26 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/customFields.new'))
@section('content')
<div class="row">
<h2>@lang('admin/customFields.new')</h2>
</div>
<div class="row">
@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
@include('admin.customFields.newForm')
</div>
@stop
@@ -1,124 +0,0 @@
<form method="POST" action="{{route('customfields.newPost')}}">
{!! csrf_field() !!}
<div class="row">
<div class="large-12 columns">
<label>
@lang('admin/customFields.name')
<input type="text" placeholder="@lang('admin/customFields.name')" value="{{old('name')}}" name="name">
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
</div>
</div>
<div class="row">
<div class="large-6 columns">
<label>
@lang('admin/customFields.description')
<textarea rows="5" name="description" placeholder="@lang('admin/customFields.description')">{{old('description')}}</textarea>
</label>
</div>
<div class="large-6 columns">
<label>
@lang('admin/customFields.type')
<select name="type">
@foreach($types as $type => $translation)
<option value="{{$type}}"@if(old('type') == $type) selected @endif>{{$translation}}</option>
@endforeach
</select>
@if (isset($errors) && $errors->has('type'))
<div class="callout alert">
{{ $errors->first('type') }}
</div>
@endif
</label>
<label>
@lang('admin/customFields.resource')
<select name="resource">
@foreach($resources as $resource => $translation)
<option value="{{$resource}}"@if(old('resource') == $resource) selected @endif>{{$translation}}</option>
@endforeach
</select>
@if (isset($errors) && $errors->has('resource'))
<div class="callout alert">
{{ $errors->first('resource') }}
</div>
@endif
</label>
<label>
@lang('admin/customFields.required')
<input type="checkbox" placeholder="@lang('admin/customFields.required')" @if (old('required')) checked="checked" @endif name="required">
</label>
</div>
</div>
<div class="row">
<div class="columns large-6">
<label>
@lang('admin/customFields.possibleValues')
<textarea placeholder="@lang('admin/customFields.possibleValues')" name="possibleValues" rows="4">{{old('possibleValues')}}</textarea>
</label>
</div>
<div class="columns large-6">
<label>
@lang('admin/customFields.defaultValue')
<input type="text" placeholder="@lang('admin/customFields.defaultValue')" value="{{old('defaultValue')}}" name="defaultValue">
</label>
<label>
@lang('admin/customFields.regExp')
<input type="text" placeholder="@lang('admin/customFields.regExp')" value="{{old('regExp')}}" name="regExp">
</label>
</div>
</div>
<div class="row">
<div class="large-6 columns">
<label>
@lang('admin/customFields.minLength')
<input type="text" placeholder="@lang('admin/customFields.minLength')" value="{{old('minLength')}}" name="minLength">
@if (isset($errors) && $errors->has('minLength'))
<div class="callout alert">
{{ $errors->first('minLength') }}
</div>
@endif
</label>
</div>
<div class="large-6 columns">
<label>
@lang('admin/customFields.maxLength')
<input type="text" placeholder="@lang('admin/customFields.maxLength')" value="{{old('macLength')}}" name="maxLength">
@if (isset($errors) && $errors->has('maxLength'))
<div class="callout alert">
{{ $errors->first('maxLength') }}
</div>
@endif
</label>
</div>
</div>
<label>
<button type="submit" class="button success">@lang('admin/customFields.createNew')</button>
</label>
</form>
@@ -1,74 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/customFields.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/customFields.overview')</h2>
</div>
<div class="row">
@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
{{--draw tabs--}}
@if (!empty($usedResources))
<ul class="tabs" data-tabs id="customFieldsOverview">
<?php $isFirst = true?>
@foreach($usedResources as $i => $resource)
<li class="tabs-title @if($isFirst)is-active @endif"><a href="#customFieldResource{{$resource}}">@lang($resources[$resource])</a></li>
<?php $isFirst = false?>
@endforeach
</ul>
{{--display list of custom fields--}}
<?php $isFirst = true?>
<div class="tabs-content" data-tabs-content="customFieldsOverview">
@foreach($customFields as $resourceId => $fields)
<div class="tabs-panel @if($isFirst)is-active @endif" id="customFieldResource{{$resourceId}}">
<table class="full-width">
<thead>
<tr>
<th>@lang('admin/customFields.name')</th>
<th>@lang('admin/customFields.description')</th>
<th>@lang('admin/customFields.type')</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach($fields as $field)
<tr>
<td>{{$field->name}}</td>
<td>{{str_limit($field->description)}}</td>
<td>@lang($types[$field->type_id])</td>
<td>
<a href="{{route('customfields.delete', ['id' => $field->id])}}"><i class="fa red confirm fa-remove"></i></a>
<a href="{{route('customfields.edit', ['id' => $field->id])}}"><i class="fa green fa-edit"></i></a>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<?php $isFirst = false?>
@endforeach
</div>
@else
<em>@lang('admin/customFields.noFields')</em>
@endif
</div>
@stop
@@ -1,7 +0,0 @@
@extends('admin.layout')
@section('content')
<h1>Dashboard</h1>
some fancy content
@stop
@@ -1,20 +0,0 @@
<h3>@lang('admin/fileManager.editDirectory')</h3>
<form method="POST" action="{{route('upload.postEditDirectory', ['id' => $directory->id])}}">
{!! csrf_field() !!}
<label>
@lang('admin/fileManager.directoryName')
<input type="text" name="name" value="{{old('name', $directory->name)}}" />
</label>
<label>
@lang('admin/fileManager.directoryDescription')
<textarea name="description" rows="3">{{old('description', $directory->description)}}</textarea>
</label>
<button type="submit" class="button success">@lang('admin/fileManager.editDirectory')</button>
</form>
@@ -1,36 +0,0 @@
<h3>@lang('admin/fileManager.newDirectory')</h3>
<form method="POST" action="{{route('upload.postNewDirectory')}}">
{!! csrf_field() !!}
@if($directory->id)
<input type="hidden" value="{{$directory->id}}" name="parentDirectory" />
@endif
<label>
@lang('admin/fileManager.directoryName')
<input type="text" name="name" value="{{old('name')}}" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.directoryDescription')
<textarea name="description" rows="2">{{old('description')}}</textarea>
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<button type="submit" class="button success">@lang('admin/fileManager.newDirectory')</button>
</form>
@@ -1,36 +0,0 @@
<div class="tile-overview" data-equalizer>
@if($directory->id)
<div class="columns large-2">
<div class="item directory" data-equalizer-watch>
<div class="preview row">
<a href="{{route('upload.overview', ['id' => $directory->parent_id])}}">
<i class="fa fa-level-up"></i>
</a>
</div>
<div class="detail row text-center highlight">
@lang('admin/fileManager.parentDirectory')
</div>
</div>
</div>
@endif
@forelse($subdirectories as $dir)
<div class="columns large-2">
<div class="item directory" data-equalizer-watch>
<div class="preview row">
<a href="{{route('upload.overview', ['id' => $dir->id])}}">
<i class="fa fa-folder"></i>
</a>
</div>
<div class="detail row text-center highlight">
{{str_limit($dir->name, 15)}}
</div>
</div>
</div>
@empty
{{--<em>@lang('admin/fileManager.noSubdirectories')</em>--}}
@endforelse
</div>
@@ -1,58 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/fileManager.edit', ['name' => $file->original_filename]))
@section('content')
<div class="row">
<h2>@lang('admin/fileManager.edit', ['name' => $file->original_filename])</h2>
</div>
<div class="row">
<div class="column large-8">
<div class="large-preview">
{!! \App\Helpers\FileManager::getLargePreview($file) !!}
</div>
</div>
<div class="column large-4">
<div class="row callout secondary">
<div class="column">
<h3>{{$file->original_filename}}</h3>
<ul>
<li>@lang('admin/fileManager.createdAt'): {{$file->created_at}}</li>
<li>@lang('admin/fileManager.updatedAt'): {{$file->updated_at}}</li>
<li>@lang('admin/fileManager.mime'): {{$file->mime_type}}</li>
<li>@lang('admin/fileManager.hash'): <span title="{{$file->file_hash}}">{{str_limit($file->file_hash, 10)}}</span></li>
<li>@lang('admin/fileManager.url'): <a href="{{config('app.upload_url')}}/{{$file->filename}}">{{$file->filename}}</a></li>
<li>@lang('admin/fileManager.fileSize'): {{\App\Helpers\FileManager::getFormattedSize($file)}}</li>
@foreach($extraInfo as $column => $info)
<li>{{$column}}: {{$info}}</li>
@endforeach
</ul>
</div>
</div>
<div class="row">
@include('admin.fileManager.editForm')
</div>
</div>
</div>
@stop
@section('head_stylesheets')
<link rel="stylesheet" href="{{asset('/resources/assets/js/vendor/highlightjs/style/default.css')}}">
@stop
@section('javascripts')
<script type="text/javascript" src="{{asset('/resources/assets/js/vendor/highlightjs/highlight.min.js')}}"></script>
<script type="text/javascript">
hljs.initHighlightingOnLoad();
</script>
@stop
@@ -1,53 +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('upload.postEdit', ['id' => $file->id])}}" enctype="multipart/form-data">
{!! csrf_field() !!}
<label>
@lang('admin/fileManager.name')
<input type="text" name="name" id="name" value="{{$file->name}}"/>
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.keywords')
<input type="text" name="keywords" id="keywords" value="{{$file->keywords}}"/>
@if (isset($errors) && $errors->has('keywords'))
<div class="callout alert">
{{ $errors->first('keywords') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.description')
<textarea rows="3" name="description" id="description">{{$file->description}}</textarea>
</label>
<button type="submit" class="button primary">@lang('admin/fileManager.editButton')</button>
<a href="{{route('upload.delete', ['id' => $file->id])}}" class="button text-center confirm alert pull-right" title="@lang('admin/fileManager.delete')">
<i class="fa fa-remove"></i>
</a>
</form>
@@ -1,32 +0,0 @@
<div class="row tile-overview" data-equalizer>
@forelse($files as $file)
<div class="columns large-2">
<div class="item" data-equalizer-watch>
<div class="preview row" title="{{ \App\Helpers\FileManager::getFormattedSize($file) }}">
<a href="{{route('upload.detail', ['id' => $file->id])}}">
{!! \App\Helpers\FileManager::getPreview($file) !!}
</a>
</div>
<div class="detail row text-center">
<div class="highlight">
{{str_limit($file->original_filename, 15)}}
</div>
<div class="small">
{{$file->mime_type}}
</div>
</div>
<div class="controls row">
<a href="{{route('upload.detail', ['id' => $file->id])}}" class="button text-center primary column large-6" title="@lang('admin/fileManager.edit')">
<i class="fa fa-edit"></i>
</a>
<a href="{{route('upload.delete', ['id' => $file->id])}}" class="button text-center confirm alert column large-6" title="@lang('admin/fileManager.delete')">
<i class="fa fa-remove"></i>
</a>
</div>
</div>
</div>
@empty
<em>@lang('admin/fileManager.noFiles')</em>
@endforelse
</div>
@@ -1,52 +0,0 @@
<h3>@lang('admin/fileManager.newFile')</h3>
<form method="POST" action="{{route('upload.postFile')}}" enctype="multipart/form-data">
{!! csrf_field() !!}
@if(isset($directory))
<input type="hidden" name="directoryId" value="{{$directory->id}}" />
@endif
<label>
@lang('admin/fileManager.selectFile')
<input type="file" multiple name="files[]" id="file" />
@if (isset($errors) && $errors->has('files[]'))
<div class="callout alert">
{{ $errors->first('files[]') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.name')
<input type="text" name="name" id="name" value="{{old('name')}}"/>
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.keywords')
<input type="text" name="keywords" id="keywords" value="{{old('keywords')}}" />
@if (isset($errors) && $errors->has('keywords'))
<div class="callout alert">
{{ $errors->first('keywords') }}
</div>
@endif
</label>
<label>
@lang('admin/fileManager.description')
<textarea rows="3" name="description" id="description">{{old('description')}}</textarea>
</label>
<button type="submit" class="button primary">@lang('admin/fileManager.upload')</button>
</form>
@@ -1,71 +0,0 @@
@extends('admin.layout')
@if ($directory->id)
@section('pageName', @trans('admin/fileManager.directories', ['directory' => $directory->name]))
@else
@section('pageName', @trans('admin/fileManager.rootDirectories'))
@endif
@section('content')
<div class="row">
<h2>
@if ($directory->id)
@lang('admin/fileManager.directories', ['directory' => $directory->name])
@else
@lang('admin/fileManager.rootDirectories')
@endif
</h2>
</div>
@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 class="columns large-8">
<div class="row">
@include('admin.fileManager.directories.subdirectoriesTiles')
</div>
<div class="row">
@include('admin.fileManager.filesTiles')
</div>
</div>
<div class="column large-4">
<ul class="accordion" data-accordion data-allow-all-closed="true">
<li class="accordion-item is-active" data-accordion-item>
<a href="#" class="accordion-title">@lang('admin/fileManager.newFile')</a>
<div class="accordion-content" data-tab-content>
@include('admin.fileManager.newFileForm')
</div>
</li>
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">@lang('admin/fileManager.newDirectory')</a>
<div class="accordion-content" data-tab-content>
@include('admin.fileManager.directories.newForm')
</div>
</li>
@if ($directory->id)
<li class="accordion-item" data-accordion-item>
<a href="#" class="accordion-title">@lang('admin/fileManager.editDirectory')</a>
<div class="accordion-content" data-tab-content>
@include('admin.fileManager.directories.editForm')
</div>
</li>
@endif
</ul>
</div>
@stop
@@ -1,25 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/history.diffPageName', ['column' => $columnName]))
@section('content')
<div class="row">
<h2>@lang('admin/history.diffPageName', ['column' => $columnName])</h2>
</div>
<div class="row callout">
{!! $diff !!}
</div>
<div class="row">
<a href="{{route('content.history', ['id' => $change->content_id])}}" class="button success">
@lang('admin/history.backToOverview')
</a>
<a href="{{route('content.edit', ['id' => $change->content_id])}}" class="button success">
@lang('admin/history.backToEdit')
</a>
</div>
@stop
@@ -1,35 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/history.pageName', ['name' => $page->title]))
@section('content')
<div class="row">
<h2>@lang('admin/history.pageName', ['name' => $page->title])</h2>
</div>
<div class="row">
<ul class="accordion" data-accordion>
@foreach($history['changesets'] as $revision => $changes)
<li class="accordion-item" data-accordion-item>
<a class="accordion-title">
<strong>{{$history['info'][$revision]['user']['name']}}</strong> |
{{$history['info'][$revision]['changed_at']}} |
{{trans_choice('admin/history.numOfChanges', count($changes))}}
</a>
@foreach($changes as $change)
<div class="accordion-content" data-tab-content>
<strong>{{$change->column_trans}}</strong>: {!! $change->diff !!}
</div>
@endforeach
</li>
@endforeach
</ul>
</div>
<a href="{{route('content.edit', ['id' => $page->id])}}" class="button success">
@lang('admin/history.backToEdit')
</a>
@stop
@@ -1,75 +0,0 @@
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@yield('head_meta')
<title>@yield('pageName', @trans('admin/common.admin')) | {{isset($pageName) ? $pageName : ''}}</title>
<link rel="stylesheet" href="{{asset('resources/assets/css/foundation.min.css')}}" />
<link rel="stylesheet" href="{{asset('resources/assets/css/font-awesome.min.css')}}" />
<link rel="stylesheet" href="{{asset('resources/assets/css/admin.css')}}" />
@yield('head_stylesheets')
</head>
<body class="admin">
<div id="container">
<header class="row nav top-bar">
<section class="logo columns small-1 medium-3 large-2">
<ul class="dropdown menu language_bar_chooser" data-dropdown-menu>
<li>
<a href="#">@lang(LaravelLocalization::getCurrentLocaleName())</a>
<ul class="menu">
@foreach(LaravelLocalization::getSupportedLocales() as $localeCode => $properties)
<li @if(LaravelLocalization::getCurrentLocale() == $localeCode) class="active" @endif>
<a rel="alternate" hreflang="{{$localeCode}}"
href="{{LaravelLocalization::getLocalizedURL($localeCode) }}">
{{ $properties['native'] }}
</a>
</li>
@endforeach
</ul>
</li>
</ul>
</section>
<section class="heading columns small-10 medium-8 large-8">
@include('admin.search.miniSearchForm')
</section>
<section class="profile columns small-10 medium-1 large-2">
<ul class="vertical dropdown menu" data-dropdown-menu>
<li>
<a href="#">
<img src="{{Auth::user()->gravatar(25)}}" alt="" />
{{Auth::user()->getAttribute('name')}}
</a>
{!! Menu::render('profileMenu', 'foundation-dropdown-initialized') !!}
</li>
</ul>
</section>
</header>
<div class="row">
<section class="sidebar large-2 columns">
{!! Menu::render('mainMenu', 'foundation-drilldown') !!}
</section>
<section class="content small-11 medium-9 large-10 columns">
@yield('content')
</section>
</div>
<footer class="row text-center">
&copy; {{isset($pageName) ? $pageName : ''}} {{date('Y')}}
</footer>
</div>
<script src="{{asset('resources/assets/js/vendor/jquery.min.js')}}"></script>
<script src="{{asset('resources/assets/js/vendor/what-input.min.js')}}"></script>
<script src="{{asset('resources/assets/js/foundation.min.js')}}"></script>
<script src="{{asset('resources/assets/js/app.js')}}"></script>
@yield('javascripts')
</body>
</html>
@@ -1,74 +0,0 @@
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@lang('admin/loginForm.login') | {{isset($pageName) ? $pageName : ''}}</title>
<link rel="stylesheet" href="{{asset('/resources/assets/css/foundation.css')}}" />
<link rel="stylesheet" href="{{asset('/resources/assets/css/admin.css')}}" />
</head>
<body>
<div class="row">
<div class="medium-6 medium-centered large-4 large-centered columns login-form">
@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('login') }}">
{!! csrf_field() !!}
<div class="row column log-in-form{{ $errors->has('email') ? ' has-error' : '' }}">
<h4 class="text-center">@lang('admin/loginForm.formHeading')</h4>
<label>
@lang('admin/loginForm.email')
<input type="text" placeholder="somebody@example.com" value="{{old('email')}}" name="email">
@if ($errors->has('email'))
<div data-alert class="callout alert text-center small">
{{ $errors->first('email') }}
</div>
@endif
</label>
<label>
@lang('admin/loginForm.password')
<input type="password" placeholder="@lang('admin/loginForm.password')" name="password">
@if ($errors->has('password'))
<div data-alert class="callout alert text-center small">
{{ $errors->first('password') }}
</div>
@endif
</label>
{{--<label>--}}
{{--@lang('admin/loginForm.rememberMe')--}}
{{--<input type="checkbox" name="remember">--}}
{{--</label>--}}
<p>
<button type="submit" class="button expanded">@lang('admin/loginForm.login')</button>
</p>
</div>
</form>
</div>
</div>
<script src="{{asset('/resources/assets/js/vendor/jquery.min.js')}}"></script>
<script src="{{asset('/resources/assets/js/vendor/what-input.min.js')}}"></script>
<script src="{{asset('/resources/assets/js/foundation.min.js')}}"></script>
</body>
</html>
@@ -1,9 +0,0 @@
<form action="{{route('search')}}" method="get">
<div class="input-group">
<input type="text" class="input-group-field" value="@if(isset($search)){{$search}}@endif" placeholder="@lang('search.term')" name="search" />
<div class="input-group-button">
<button class="button success"><i class="fa fa-search"></i></button>
</div>
</div>
</form>
@@ -1 +0,0 @@
@include('admin.search.form')
@@ -1,41 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('search.pageTitle'))
@section('content')
<div class="row">
<h2>@lang('search.pageTitle')</h2>
</div>
@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
@if ($search)
<div class="row">
<div class="column large-8">
<h3>@lang('search.results')</h3>
@include('admin.search.results')
</div>
<div class="column large-4">
<h3>@lang('search.term')</h3>
@include('admin.search.form')
</div>
</div>
@else
<div class="row">
@include('admin.search.form')
</div>
@endif
@stop
@@ -1,7 +0,0 @@
@foreach($results as $id => $result)
<div class="search-result" id="{{$id}}">
<h4>{{$result['name']}} ({{$result['count']}})</h4>
{!! $result['content'] !!}
</div>
@endforeach
@@ -1,3 +0,0 @@
<div class="content search-result">
<h3>{{$page->title}}</h3>
</div>
@@ -1,50 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/settings.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/settings.overview')</h2>
</div>
@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 class="row">
<ul class="tabs" data-tabs id="static-page-controls">
@foreach($formSections as $id => $section)
<li class="tabs-title @if($section->getId() == reset($formSections)->getId()) is-active @endif">
<a href="#{{$id}}" @if($section->getId() == reset($formSections)->getId()) aria-selected="true" @endif>
{{trans($section->getName())}}
</a>
</li>
@endforeach
</ul>
<form action="{{route('settings.save')}}" method="POST">
{!! csrf_field() !!}
<div class="tabs-content" data-tabs-content="static-page-controls">
@foreach($formSections as $id => $section)
<div class="tabs-panel @if($id == reset($formSections)->getId()) is-active @endif" id="{{$section->getId()}}">
@include($section->getView())
</div>
@endforeach
</div>
<div class="row">
<div class="columns large-12">
<button type="submit" class="button success">@lang('admin/settings.save')</button>
</div>
</div>
</form>
</div>
@stop
@@ -1,27 +0,0 @@
<label>
@lang('admin/settings.pageName')
<input type="text" name="pageName" value="{{old('pageName', isset($settings->pageName) ? $settings->pageName['val'] : '')}}" />
@if (isset($errors) && $errors->has('pageName'))
<div class="callout alert">
{{ $errors->first('pageName') }}
</div>
@endif
</label>
<label>
@lang('admin/settings.author')
<input type="text" name="author" value="{{old('author', isset($settings->author) ? $settings->author['val'] : '')}}" />
@include('admin.settings.snippets.commonSettings', ['field' => 'author'])
</label>
<label>
@lang('admin/settings.googleAnalyticsCode')
<input type="text" name="googleAnalyticsCode" value="{{old('googleAnalyticsCode', isset($settings->googleAnalyticsCode) ? $settings->googleAnalyticsCode['val'] : '')}}" />
@include('admin.settings.snippets.commonSettings', ['field' => 'googleAnalyticsCode'])
</label>
@@ -1,13 +0,0 @@
<label>
@lang('admin/settings.metaKeywords')
<input type="text" name="metaKeywords"
value="{{old('metaKeywords', isset($settings->metaKeywords) ? $settings->metaKeywords['val'] : '')}}" />
</label>
<label>
@lang('admin/settings.metaDescription')
<textarea name="metaDescription"
rows="3">{{old('metaDescription', isset($settings->metaDescription) ? $settings->metaDescription['val'] : '')}}</textarea>
</label>
@@ -1,29 +0,0 @@
<label>
@lang('admin/settings.social.facebook')
<input type="text" name="facebookProfile" value="{{old('facebookProfile', isset($settings->facebookProfile) ? $settings->facebookProfile['val'] : '')}}" />
</label>
<label>
@lang('admin/settings.social.twitter')
<input type="text" name="twitterProfile" value="{{old('twitterProfile', isset($settings->twitterProfile) ? $settings->twitterProfile['val'] : '')}}" />
</label>
<label>
@lang('admin/settings.social.pinterest')
<input type="text" name="pinterestProfile" value="{{old('pinterestProfile', isset($settings->pinterestProfile) ? $settings->pinterestProfile['val'] : '')}}" />
</label>
<label>
@lang('admin/settings.social.gplus')
<input type="text" name="gplusProfile" value="{{old('gplusProfile', isset($settings->gplusProfile) ? $settings->gplusProfile['val'] : '')}}" />
</label>
<label>
@lang('admin/settings.social.instagram')
<input type="text" name="instagramProfile" value="{{old('instagramProfile', isset($settings->instagramProfile) ? $settings->instagramProfile['val'] : '')}}" />
</label>
@@ -1,5 +0,0 @@
<input type="checkbox" name="commonSettings[{{$field}}]" value="1"
@if(!isset($settings->{$field}) || $settings->{$field}['lang'] == null)
checked
@endif />
@lang('admin/settings.commonSettings')
@@ -1,21 +0,0 @@
<div class="ace-editor-container large">
<textarea class="ace-editor-textarea" name="{{$name}}" id="{{$name}}">{{$value}}</textarea>
<div class="ace-editor" id="{{$name}}Editor">{{$value}}</div>
</div>
@section('javascripts')
<script src="{{asset('resources/assets/js/vendor/ace/ace.js')}}"></script>
<script type="application/javascript">
var editor = ace.edit("{{$name}}Editor");
editor.setTheme("ace/theme/{{$theme}}");
editor.getSession().setMode("ace/mode/{{$mode}}");
var textarea = $('#{{$name}}');//.hide();
editor.getSession().setValue(textarea.val());
editor.getSession().on('change', function(){
textarea.val(editor.getSession().getValue());
});
</script>
@endsection
@@ -1,26 +0,0 @@
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
<script type="application/javascript">
CKEDITOR.replace ('{{$textareaId}}', {
uiColor: "#F5F5F5",
forcePasteAsPlainText: true,
entities: false,
basicEntities: false,
entities_greek: false,
entities_latin: false,
removePlugins: 'elementspath,about,scayt',
extraPlugins: 'justify',
toolbarGroups: [
{name: 'undo', groups: ['undo']},
{name: 'styles'},
{name: 'basicstyles', groups: ['basicstyles', 'cleanup']},
{name: 'paragraph', groups: ['list', 'indent', 'align', 'blocks']},
{name: 'links'},
{name: 'editing', groups: ['find', 'selection']},
{name: 'insert'},
{name: 'forms'},
{name: 'document', groups: ['mode', 'document', 'doctools']},
{name: 'tools'}
]
});
</script>
@@ -1,25 +0,0 @@
@if($directory->parent_id)
<a href="{{route('templates.overview', ['path' => $directory->parent_id])}}" class="button full-width secondary">
@lang('admin/templates.parentDirectory') <i class="fa fa-level-up"></i>
</a>
<br />
@endif
<h4>@lang($directory->name)</h4>
{{--@if (true || isset($isWritable) && $isWritable)--}}
{{--<div class="text-right">--}}
{{--<a href="{{route('templates.new', ['pathId' => $directory->id])}}"><i class="fa fa-plus"></i> @lang('admin/templates.new')</a> <br />--}}
{{--</div>--}}
{{--@endif--}}
<div>
<h5>@lang('admin/templates.subdirectories')</h5>
@forelse($subdirectories as $subdirectory)
<a href="{{route('templates.overview', ['path' => $subdirectory->id])}}">{{trans($subdirectory->name)}}</a>
@empty
<em>@lang('admin/templates.noSubdirectories')</em>
@endforelse
</div>
@@ -1,14 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/templates.edit', ['name' => $template->template_name]))
@section('content')
<div class="row">
<h2>@lang('admin/templates.edit', ['name' => $template->template_name])</h2>
</div>
<div class="row">
@include('admin.templates.editForm')
</div>
@stop
@@ -1,54 +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
@if (!$isWritable)
<div data-alert class="callout warning">
@lang('admin/templates.notWritable', ['file' => $path->path])
</div>
@endif
<form action="{{route('templates.postEdit', ['id' => $template->id])}}" method="POST">
{!! csrf_field() !!}
<div class="row">
<div class="column large-8">
<div style="height: 30em">
@include('admin.snippets.aceEditor', [
'value' => old('templateContent', $templateContent),
'theme' => 'xcode',
'mode' => 'html',
'name' => 'templateContent'
])
</div>
</div>
<div class="column large-4">
<label>
@lang('admin/templates.name')
<input type="text" name="name" value="{{old('name', $template->name)}}" />
</label>
<label>
@lang('admin/templates.description')
<textarea name="description" rows="3">{{old('description', $template->description)}}</textarea>
</label>
<button type="submit" class="button success">
@lang('admin/templates.edit', ['name' => $template->template_name])
</button>
</div>
</div>
</form>
@@ -1,32 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/templates.overview'))
@section('content')
<h1>@lang('admin/templates.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 class="row">
<div class="column large-9">
@include('admin.templates.templatesTiles')
</div>
<div class="column large-3">
<div class="callout">
@include('admin.templates.directoriesList')
</div>
</div>
</div>
@stop
@@ -1,69 +0,0 @@
<div class="tile-overview" data-equalizer>
@forelse($templates as $template)
<div class="columns large-3">
<div class="item" data-equalizer-watch>
<div class="detail row text-center">
<div class="highlight" title="{{$template->name}}">
{{str_limit($template->name, 15)}}
</div>
<div>
{{str_limit($template->description, 150)}}
</div>
</div>
<div class="controls row">
@if($isWritable)
<a data-template-id="{{$template->id}}" data-template-name="{{$template->template_name}}"
class="button primary column large-6 copy-template"
title="@lang('admin/templates.copy')">
<i class="fa fa-copy"></i>
</a>
@else
<a href="#" class="button primary disabled column large-6"
title="@lang('admin/templates.cannotCopy')">
<i class="fa fa-copy"></i>
</a>
@endif
@if ($template->editable)
<a href="{{route('templates.edit', ['id' => $template->id])}}"
class="button success column large-6"
title="@lang('admin/templates.edit', ['name' => $template->name])">
<i class="fa fa-edit"></i>
</a>
@endif
</div>
</div>
</div>
@empty
<em>@lang('admin/templates.noTemplates')</em>
@endforelse
</div>
@section('javascripts')
<script type="text/javascript">
$ ('.copy-template').click (function () {
var link = $ (this);
var templateId = link.data ('template-id');
var templateName = link.data ('template-name');
templateName = templateName.substr (templateName.search ('::') + 2, templateName.length);
var newTemplateName = prompt ("@lang('admin/templates.newTemplateName')", templateName + "_" + "@lang('admin/templates.newTemplateNameSuffix')");
// no name given - give up
if (newTemplateName == null) return;
// copy given template
$.post ('{{route('templates.postCopy')}}', {
templateId: templateId,
newName: newTemplateName,
_token: "{{csrf_token()}}"
}, function (data) {
if (data.status == 'success') {
location.reload ();
}
});
});
</script>
@endsection
@@ -1,66 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/userManagement.detail', ['name' => $user->name, 'email' => $user->email]))
@section('content')
<div class="row">
<h3>@lang('admin/userManagement.detail', ['name' => str_limit($user->name, 20), 'email' => $user->email])</h3>
<div class="columns large-4">
<div class="callout">
<div class="user-img text-center">
<img src="{{$user->gravatar(200)}}" alt="" />
</div>
<div class="user-detail text-center">
<ul>
<li>{{$user->name}}</li>
<li>{{$user->email}}</li>
{{--todo: add custom fields--}}
</ul>
</div>
</div>
<div class="callout">
<h3>@lang('admin/userManagement.usersActions')</h3>
@if (!empty($actions))
<ul class="accordion" data-accordion>
@foreach($actions as $action)
<li class="accordion-item" data-accordion-item>
<a class="accordion-title">{{$action->name}}</a>
<div class="accordion-content" data-tab-content>
{{date('d.m.Y G:i', strtotime($action->created_at))}} <br />
{{$action->value}}
</div>
</li>
@endforeach
</ul>
@else
<em>@lang('admin/userManagement.noActions')</em>
@endif
</div>
</div>
<div class="columns large-8">
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<div class="callout">
<h3>@lang('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email])</h3>
@include('admin.userManagement.editForm')
</div>
</div>
</div>
@stop
@@ -1,24 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email]))
@section('content')
<div class="row">
<h1>@lang('admin/userManagement.editUser', ['name' => str_limit($user->name, 20), 'email' => $user->email])</h1>
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@include('admin.userManagement.editForm')
</div>
@stop
@@ -1,64 +0,0 @@
<form method="POST" action="{{route('users.editPost', ['id' => $user->id])}}">
{!! csrf_field() !!}
<label>
@lang('admin/userManagement.name')
<input type="text" placeholder="@lang('admin/userManagement.name')" value="{{$user->name}}" name="name">
</label>
<label>
@lang('admin/userManagement.email')
<input type="text" name="email" value="{{$user->email}}" placeholder="somebody@example.com">
@if (isset($errors) && $errors->has('email'))
<div class="callout alert">
{{ $errors->first('email') }}
</div>
@endif
</label>
<label>
@lang('admin/userManagement.password') <em>(@lang('admin/userManagement.passwordLeaveEmpty'))</em>
<input type="text" name="password" value="">
</label>
@if (\Auth::user()->role == \App\Models\User::ROLE_ADMIN && \Auth::user()->id != $user->id)
<label>
@lang('admin/userManagement.roles')
<select name="role">
@foreach($roles as $role => $translation)
<option value="{{$role}}" @if($role == $user->role) selected @endif>{{$translation}}</option>
@endforeach
</select>
</label>
@if (isset($errors) && $errors->has('role'))
<div class="callout alert">
{{ $errors->first('role') }}
</div>
@endif
<label>
@lang('admin/userManagement.status')
<select name="status">
@foreach($states as $status => $translation)
<option value="{{$status}}" @if($status == $user->status) selected @endif>{{$translation}}</option>
@endforeach
</select>
</label>
@if (isset($errors) && $errors->has('role'))
<div class="callout alert">
{{ $errors->first('role') }}
</div>
@endif
@endif
<label>
<button type="submit" class="button success">@lang('admin/userManagement.update')</button>
</label>
</form>
@@ -1,22 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/userManagement.addNewUser'))
@section('content')
<h1>@lang('admin/userManagement.addNewUser')</h1>
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@include('admin.userManagement.newForm', ['roles' => $roles])
@stop
@@ -1,54 +0,0 @@
<form method="POST" action="{{route('users.newPost')}}">
{!! csrf_field() !!}
<label>
@lang('admin/userManagement.name')
<input type="text" placeholder="@lang('admin/userManagement.name')" name="name">
</label>
<label>
@lang('admin/userManagement.email')
<input type="text" name="email" placeholder="somebody@example.com">
@if (isset($errors) && $errors->has('email'))
<div class="callout alert">
{{ $errors->first('email') }}
</div>
@endif
</label>
<label>
@lang('admin/userManagement.password')
<input type="text" name="password">
@if (isset($errors) && $errors->has('password'))
<div class="callout alert">
{{ $errors->first('password') }}
</div>
@endif
</label>
<label>
@lang('admin/userManagement.roles')
<select name="role">
@foreach($roles as $role => $translation)
<option value="{{$role}}">{{$translation}}</option>
@endforeach
</select>
</label>
@if (isset($errors) && $errors->has('role'))
<div class="callout alert">
{{ $errors->first('role') }}
</div>
@endif
<label>
<button type="submit" class="button success">@lang('admin/userManagement.register')</button>
</label>
</form>
@@ -1,41 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/userManagement.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/userManagement.overview')</h2>
<p>
@foreach($statuses as $status => $translation)
<a class="button tiny @if($status != $currentStatus) secondary @else primary @endif" href="{{route('users.overview', ['status' => $status])}}">{{$translation}}</a>
@endforeach
</p>
</div>
<div class="row" data-equalizer>
@forelse($users as $user)
<div class="user-detail large-2 medium-3 small-4 columns">
<div class="callout text-center small" data-equalizer-watch>
<a href="{{route('users.detail', ['id' => $user->id])}}" data-tooltip title="{{$roles[$user->role]}}">
<div class="user-img">
<img src="{{$user->gravatar(350)}}" alt="" />
</div>
<div class="user-info text-center">
{{ $user->name}}
</div>
</a>
</div>
</div>
@empty
<em>@lang('admin/userManagement.noUsers')</em>
@endforelse
</div>
<div class="row pagination">
{!! $users->render() !!}
</div>
@stop
@@ -1,10 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/widgetAreas.edit', ['name' => $area->name]))
@section('content')
<h1>@lang('admin/widgetAreas.edit', ['name' => $area->name])</h1>
@include('admin.widgets.area.editForm')
@stop
@@ -1,48 +0,0 @@
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<form action="{{route('widgetareas.postEdit', ['id' => $area->id])}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('admin/widgetAreas.name')
<input type="text" name="name" value="{{$area->name}}" placeholder="@lang('admin/widgetAreas.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('admin/widgetAreas.code')
<input type="text" name="code" disabled="true" value="{{$area->code}}"
placeholder="@lang('admin/widgetAreas.code')" />
</label>
<label>
@lang('admin/widgetAreas.description')
<textarea rows="3" name="description"
placeholder="@lang('admin/widgetAreas.description')">{{$area->description}}</textarea>
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<button type="submit" class="button success">@lang('admin/widgetAreas.editButton')</button>
</form>
@@ -1,10 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/widgetAreas.new'))
@section('content')
<h1>@lang('admin/widgetAreas.new')</h1>
@include('admin.widgets.area.newForm')
@stop
@@ -1,55 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{route('widgetareas.postNew')}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('admin/widgetAreas.name')
<input type="text" name="name" value="{{old("name")}}" placeholder="@lang('admin/widgetAreas.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('admin/widgetAreas.code')
<input type="text" name="code" value="{{old("code")}}" placeholder="@lang('admin/widgetAreas.code')" />
@if (isset($errors) && $errors->has('code'))
<div class="callout alert">
{{ $errors->first('code') }}
</div>
@endif
</label>
<label>
@lang('admin/widgetAreas.description')
<textarea rows="3" name="description"
placeholder="@lang('admin/widgetAreas.description')">{{old("description")}}</textarea>
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<button type="submit" class="button success">@lang('admin/widgetAreas.createNew')</button>
</form>
@@ -1,62 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/widgetAreas.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/widgetAreas.overview')</h2>
</div>
<div class="row">
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<div class="column large-8">
@if (count($areas) > 0)
<table class="full-width">
<tr>
<th>@lang('admin/widgetAreas.name')</th>
<th>@lang('admin/widgetAreas.code')</th>
<th>@lang('admin/widgetAreas.description')</th>
<th>@lang('admin/widgetAreas.actions')</th>
</tr>
@foreach($areas as $area)
<tr>
<td>{{$area->name}}</td>
<td>{{$area->code}}</td>
<td>{{str_limit($area->description, 100)}}</td>
<td class="text-center">
<a href="{{route('widgets.associate', ['widgetArea' => $area->id])}}"><i class="fa fa-plus"></i></a>
<a href="{{route('widgetareas.edit', ['id' => $area->id])}}"><i class="fa fa-edit"></i></a>
<a href="{{route('widgetareas.delete', ['id' => $area->id])}}"><i
class="fa fa-remove confirm"></i></a>
</td>
</tr>
@endforeach
</table>
@else
<em>@lang('admin/widgetAreas.noEntries')</em>
@endif
</div>
<div class="column large-4">
<h3>@lang('admin/widgetAreas.new')</h3>
@include('admin.widgets.area.newForm', ['hideMessages' => true])
</div>
</div>
<div class="row pagination">
{!! $areas->render() !!}
</div>
@stop
@@ -1,79 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/widgets.overview'))
@section('content')
<div class="row">
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
<div class="column large-9 tile-overview" data-equalizer>
<h2>@lang('admin/widgets.overview')</h2>
@forelse($widgets as $widget)
<div class="column large-4">
<div class="item" data-equalizer-watch>
<h4>{{str_limit($widget->name, 20)}}</h4>
<p>
{{trans(call_user_func([$widget->widget_type_handler, 'getName']))}}
</p>
<p>
{{str_limit($widget->description, 150)}}
</p>
<div class="controls row text-center">
<a href="{{route('widgets.edit', ['id' => $widget->id])}}" class="button column large-6 primary"><i class="fa fa-edit"></i></a>
@if (in_array($widget->id, $associatedWidgetIds))
<a href="{{route('widgets.deleteAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
class="button column confirm large-6 alert">
<i class="fa fa-remove"></i>
</a>
@else
<a href="{{route('widgets.makeAssociation', ['widgetId' => $widget->id, 'widgetArea' => $widgetArea->id])}}"
class="button column large-6 success"><i class="fa fa-plus"></i></a>
@endif
</div>
</div>
</div>
@empty
<em>@lang('admin/widgets.noEntries')</em>
@endforelse
<div class="row">
{!! $widgets->render() !!}
</div>
</div>
<div class="column large-3">
<h2>{{$widgetArea->name}}</h2>
<p>
{{$widgetArea->description}}
</p>
<ul>
<li>@lang('admin/widgets.createdAt'): {{$widgetArea->created_at}}</li>
<li>@lang('admin/widgets.updatedAt'): {{$widgetArea->updated_at}}</li>
</ul>
<a href="{{route('widgetareas.edit', ['id' => $widgetArea->id])}}">@lang('admin/widgetAreas.editButton')</a>
@if (!empty($associatedWidgetIds))
<h3>@lang('admin/widgets.preview')</h3>
@widgetArea($widgetArea->code)
@endif
</div>
</div>
@stop
@@ -1,20 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/htmlCode.edit', ['name' => $widget->name]))
@section('content')
<h1>@lang('widgets/htmlCode.edit', ['name' => $widget->name])</h1>
<div class="row">
<div class="column large-8">
@include('admin.widgets.htmlCode.editForm')
</div>
<div class="column large-4">
<h3>@lang('widgets/htmlCode.preview')</h3>
@widgetPreview($widget)
</div>
</div>
@stop
@@ -1,68 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{route('widgets.postEdit', ['id' => $widget->id])}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('widgets/htmlCode.name')
<input type="text" name="name" value="{{$widget->name}}" placeholder="@lang('widgets/htmlCode.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.description')
<input type="text" name="description" placeholder="@lang('widgets/htmlCode.description')"
value="{{$widget->description}}" />
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.containerClass')
<input type="text" name="containerClass" placeholder="@lang('widgets/htmlCode.containerClass')"
value="{{$settings->containerClass}}" />
@if (isset($errors) && $errors->has('containerClass'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.code')
<textarea rows="4" name="code" placeholder="@lang('widgets/htmlCode.code')">{{$settings->code}}</textarea>
@if (isset($errors) && $errors->has('code'))
<div class="callout alert">
{{ $errors->first('code') }}
</div>
@endif
</label>
<button type="submit" class="button success">@lang('widgets/htmlCode.editExisting')</button>
</form>
@@ -1,10 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/htmlCode.new'))
@section('content')
<h1>@lang('widgets/htmlCode.new')</h1>
@include('admin.widgets.htmlCode.newForm')
@stop
@@ -1,68 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{route('widgets.postNew', ['type' => $type])}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('widgets/htmlCode.name')
<input type="text" name="name" value="{{old("name")}}" placeholder="@lang('widgets/htmlCode.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.description')
<input type="text" name="description" placeholder="@lang('widgets/htmlCode.description')"
value="{{old("description")}}" />
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.containerClass')
<input type="text" name="containerClass" placeholder="@lang('widgets/htmlCode.containerClass')"
value="{{old("containerClass")}}" />
@if (isset($errors) && $errors->has('containerClass'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/htmlCode.code')
<textarea rows="4" name="code" placeholder="@lang('widgets/htmlCode.code')">{{old("code")}}</textarea>
@if (isset($errors) && $errors->has('code'))
<div class="callout alert">
{{ $errors->first('code') }}
</div>
@endif
</label>
<button type="submit" class="button success">@lang('widgets/htmlCode.createNew')</button>
</form>
@@ -1,20 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/menu.edit', ['name' => $widget->name]))
@section('content')
<h1>@lang('widgets/menu.edit', ['name' => $widget->name])</h1>
<div class="row">
<div class="column large-8">
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
</div>
<div class="column large-4">
<h3>@lang('widgets/menu.preview')</h3>
@widgetPreview($widget)
</div>
</div>
@stop
@@ -1,97 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{$formAction}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('widgets/menu.name')
<input type="text" name="name" value="{{old("name", $widget->name)}}" placeholder="@lang('widgets/menu.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('widgets/menu.description')
<input type="text" name="description" placeholder="@lang('widgets/menu.description')"
value="{{old("description", $widget->description)}}" />
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<textarea name="moduleSettings" id="menuConfig">{}</textarea>
<button type="submit" class="button success">@lang('widgets/menu.createNew')</button>
</form>
<ul class="tabs" data-tabs id="createMenu">
@foreach($extensions as $extension)
<li class="tabs-title @if($extension->getId() == reset($extensions)->getId()) is-active @endif">
<a href="#{{$extension->getId()}}" @if($extension->getId() == reset($extensions)->getId()) aria-selected="true" @endif>
{{trans($extension->getName())}}
</a>
</li>
@endforeach
</ul>
<div class="tabs-content" data-tabs-content="createMenu">
@foreach($extensions as $extension)
<div class="tabs-panel @if($extension->getId() == reset($extensions)->getId()) is-active @endif" id="{{$extension->getId()}}">
<h4>{{$extension->getName()}}</h4>
<p>{{$extension->getDescription()}}</p>
<form action="#" id="menuItem-{{$extension->getId()}}" class="menuItems" data-extension="{{$extension->getId()}}">
@include($extension->getFormExtensionTemplate())
<div class="row">
<button class="button" type="submit"><i class="fa fa-plus"></i></button>
</div>
</form>
</div>
@endforeach
</div>
@section('javascripts')
<script type="text/javascript">
$('.menuItems').submit(function () {
var id = $(this).data('extension');
var existingSettings = {};
try {
existingSettings = JSON.parse ($ ('#menuConfig').val ());
} catch (err) {
// ignore
}
$(this).find(':input').each(function () {
var name = $(this).attr('name');
var value = $(this).val();
alert('name: '+name+", value: "+value);
});
return false;
});
</script>
@stop
@@ -1,10 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/menu.new'))
@section('content')
<h1>@lang('widgets/menu.new')</h1>
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
@stop
@@ -1,17 +0,0 @@
<label>
@lang('widgets.url')
<input type="text" name="url" id="urlField"/>
</label>
<label>
@lang('widgets.anchor')
<input type="text" name="anchor" id="anchorField"/>
</label>
<label>
@lang('widgets.openInNewWindow')
<input type="checkbox" checked="checked" name="openInNewWindow" id="openInNewWindowField"/>
</label>
@@ -1,20 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/menu.edit', ['name' => $widget->name]))
@section('content')
<h1>@lang('widgets/menu.edit', ['name' => $widget->name])</h1>
<div class="row">
<div class="column large-8">
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
</div>
<div class="column large-4">
<h3>@lang('widgets/menu.preview')</h3>
@widgetPreview($widget)
</div>
</div>
@stop
@@ -1,126 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{$formAction}}" id="widget-menu" method="POST">
{!! csrf_field() !!}
<label>
@lang('widgets/menu.name')
<input type="text" name="name" value="{{old("name", $widget->name)}}"
placeholder="@lang('widgets/menu.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('widgets/menu.description')
<input type="text" name="description" placeholder="@lang('widgets/menu.description')"
value="{{old("description", $widget->description)}}" />
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/menu.containerClass')
<input type="text" name="containerClass" placeholder="@lang('widgets/menu.containerClass')"
value="{{old("containerClass")}}" />
@if (isset($errors) && $errors->has('containerClass'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<input type="hidden" name="settings" id="widgetSettings" value="{{json_encode($widget->settingsObj->links)}}" />
<div class="row column">
<h3>@lang('widgets/menu.addedPages')</h3>
<div id="menu-items-container">
@foreach($widget->settingsObj->links as $pageId => $details)
<span class="label" data-page-id="{{$pageId}}" id="item-{{$pageId}}">{{$details->text}}</span>
@endforeach
</div>
</div>
<div class="row column">
<button type="submit" class="button success">@lang('widgets/menu.save')</button>
</div>
</form>
<div class="row column">
<h3>@lang('widgets/menu.availablePages')</h3>
@foreach ($pages as $page)
<a href="#" class="button primary @if(isset($widget->settingsObj->links->{$page->id})) secondary @endif menu-item"
data-page-url="{{$page->url}}" data-page-id="{{$page->id}}" id="page-{{$page->id}}">{{$page->title}}</a>
@endforeach
</div>
@section('javascripts')
<script type="text/javascript">
$ ('#widget-menu').submit (function () {
var items = {};
var i = 0;
$ ('#menu-items-container').children ().each (function () {
var id = $ (this).data ('page-id');
items[id] = {
id: id,
type: 'content',
text: $ (this).text (),
order: i++,
children: {}
};
});
// check if menu is not empty
if (i == 0) {
alert ('@lang('widgets/menu.noLinks')');
return false;
}
$ ('#widgetSettings').val (JSON.stringify (items));
});
$ ('.menu-item').click (function () {
var url = $ (this).data ('page-url');
var text = $ (this).text ();
var id = $ (this).data ('page-id');
if ($ (this).hasClass ('secondary')) {
// remove
$ ('#item-' + id).remove ();
} else {
// add
$ ('#menu-items-container').append ('<span class="label" id="item-' + id + '" data-page-id="' + id + '">' + text + '</span> ');
}
// distinguish between added and not-added page
$ (this).toggleClass ('secondary');
});
</script>
@endsection
@@ -1,7 +0,0 @@
@extends('admin.layout')
@section('content')
<h1>@lang('widgets/menu.new')</h1>
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
@endsection
@@ -1,19 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/orbitSlider.edit', ['name' => $widget->name]))
@section('content')
<h1>@lang('widgets/orbitSlider.edit', ['name' => $widget->name])</h1>
<div class="row">
<div class="column large-8">
@include('admin.widgets.orbitSlider.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
</div>
<div class="column large-4">
<h3>@lang('widgets/orbitSlider.preview')</h3>
@widgetPreview($widget)
</div>
</div>
@stop
@@ -1,121 +0,0 @@
@if (!isset($hideMessages))
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@endif
<form action="{{$formAction}}" method="POST">
{!! csrf_field() !!}
<label>
@lang('widgets/orbitSlider.name')
<input type="text" name="name" value="{{old('name', $widget->name)}}"
placeholder="@lang('widgets/orbitSlider.name')" />
@if (isset($errors) && $errors->has('name'))
<div class="callout alert">
{{ $errors->first('name') }}
</div>
@endif
</label>
<label>
@lang('widgets/orbitSlider.description')
<input type="text" name="description" placeholder="@lang('widgets/orbitSlider.description')"
value="{{old('description', $widget->description)}}" />
@if (isset($errors) && $errors->has('description'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<div class="row">
<div class="column large-10">
<label>
@lang('widgets/orbitSlider.imagesPerSlide')
<select name="imagePerSlide">
@foreach($availableColumns as $value => $name)
<option value="{{$value}}"
@if (old('imagePerSlide', $settings->imagePerSlide) == $value) selected="selected" @endif>
{{$name}}
</option>
@endforeach
</select>
</label>
</div>
<div class="column large-2 text-center">
<label>@lang('widgets/orbitSlider.displayBullets')</label>
<div class="switch">
<input class="switch-input" id="displayBullets" type="checkbox"
@if($settings->displayBullets) checked="checked" @endif name="displayBullets">
<label class="switch-paddle" for="displayBullets">
<span class="show-for-sr">@lang('widgets/orbitSlider.displayBullets')</span>
</label>
</div>
</div>
</div>
<h4>@lang('widgets/orbitSlider.extraSettings')</h4>
<label>
@lang('widgets/orbitSlider.containerClass')
<input type="text" name="containerClass" placeholder="@lang('widgets/orbitSlider.containerClass')"
value="{{old('containerClass', $settings->sliderClass)}}" />
@if (isset($errors) && $errors->has('containerClass'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/orbitSlider.slideContainerClass')
<input type="text" name="slideContainerClass" placeholder="@lang('widgets/orbitSlider.slideContainerClass')"
value="{{old('slideContainerClass', $settings->slideContainerClass)}}" />
@if (isset($errors) && $errors->has('slideContainerClass'))
<div class="callout alert">
{{ $errors->first('description') }}
</div>
@endif
</label>
<label>
@lang('widgets/orbitSlider.code')
<textarea rows="4" name="code" placeholder="@lang('widgets/orbitSlider.code')">{{old('code', $settings->code)}}</textarea>
@if (isset($errors) && $errors->has('code'))
<div class="callout alert">
{{ $errors->first('code') }}
</div>
@endif
</label>
@if($settings->directoryId)
<div class="row column text-center">
<a href="{{route('upload.overview', ['id' => $settings->directoryId])}}"
class="button expanded large success">@lang('widgets/orbitSlider.upload')</a>
</div>
@endif
<button type="submit" class="button success">@lang('widgets/orbitSlider.editExisting')</button>
@@ -1,10 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('widgets/htmlCode.new'))
@section('content')
<h1>@lang('widgets/orbitSlider.new')</h1>
@include('admin.widgets.orbitSlider.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
@stop
@@ -1,50 +0,0 @@
@extends('admin.layout')
@section('pageName', @trans('admin/widgets.overview'))
@section('content')
<div class="row">
<h2>@lang('admin/widgets.overview')</h2>
</div>
<div class="row">
@if (session('success'))
<div class="callout success">
{{ session('success') }}
</div>
@endif
@if (session('error'))
<div class="callout alert">
{{ session('error') }}
</div>
@endif
@if (count($widgets))
<table class="full-width">
<tr>
<th>@lang('admin/widgets.widgetType')</th>
<th>@lang('admin/widgets.name')</th>
<th>@lang('admin/widgets.description')</th>
<th>@lang('admin/widgets.actions')</th>
</tr>
@foreach($widgets as $widget)
<tr>
<td>{{trans(call_user_func([$widget->widget_type_handler, 'getName']))}}</td>
<td>{{$widget->name}}</td>
<td>{{$widget->description}}</td>
<td class="text-center">
<a href="{{route('widgets.edit', ['id' => $widget->id])}}"><i class="fa fa-edit"></i></a>
</td>
</tr>
@endforeach
</table>
{!! $widgets->render() !!}
@else
<em>@lang('admin/widgets.noEntries')</em>
@endif
</div>
@stop