FEATURE: ugly commit - rewritten widgets, menu made more compact, added profile menu, few bugfixes etc. Sorry..
This commit is contained in:
@@ -47,15 +47,16 @@
|
||||
style="background-image: url('{{Auth::user()->gravatar(40)}}')"></div>
|
||||
<span class="name">{{Auth::user()->getAttribute('name')}}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu profile-dropdown-menu" aria-labelledby="dropdownMenu1">
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-user icon"></i> Profile </a>
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-bell icon"></i> Notifications </a>
|
||||
<a class="dropdown-item" href="#"> <i class="fa fa-gear icon"></i> Settings </a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{{route('logout')}}"> <i
|
||||
class="fa fa-power-off icon"></i> Logout
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{!! Menu::render('profileMenu', 'profile-menu') !!}
|
||||
|
||||
{{--<div class="dropdown-menu profile-dropdown-menu" aria-labelledby="dropdownMenu1">--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-user icon"></i> Profile </a>--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-bell icon"></i> Notifications </a>--}}
|
||||
{{--<a class="dropdown-item" href="#"> <i class="fa fa-gear icon"></i> Settings </a>--}}
|
||||
{{--<div class="dropdown-divider"></div>--}}
|
||||
{{--<a class="dropdown-item" href="{{route('logout')}}"> <i class="fa fa-power-off icon"></i> Logout </a>--}}
|
||||
{{--</div>--}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="ace-editor-container large">
|
||||
<textarea class="ace-editor-textarea" name="{{$name}}" id="{{$name}}">{{$value}}</textarea>
|
||||
<textarea class="ace-editor-textarea" name="{{$name}}" id="{{$name}}" rows="5">{{$value}}</textarea>
|
||||
|
||||
<div class="ace-editor" id="{{$name}}Editor">{{$value}}</div>
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.edit', ['name' => $area->name]))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.area.form', ['action' => {{route('widgetareas.postEdit', ['id' => $area->id])}}])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<form action="{{$action}}" 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>
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.new'))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.area.form', ['action' => route('widgetareas.postNew')])
|
||||
@endsection
|
||||
@@ -0,0 +1,43 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgetAreas.overview'))
|
||||
|
||||
@section('content')
|
||||
<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
|
||||
@@ -0,0 +1,79 @@
|
||||
@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
|
||||
@@ -0,0 +1,15 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/htmlCode.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
<div class="col-lg-8">
|
||||
@include('admin.widgets.htmlCode.form', ['action' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h3>@lang('widgets/htmlCode.preview')</h3>
|
||||
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
<form action="{{$action}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.name')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="name" value="{{old('name', $widget->name)}}"
|
||||
placeholder="@lang('widgets/htmlCode.name')" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.description')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/htmlCode.description')"
|
||||
value="{{old('description', $widget->description)}}" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.containerClass')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="containerClass" placeholder="@lang('widgets/htmlCode.containerClass')"
|
||||
value="{{old('containerClass', isset($settings->containerClass) ? $settings->containerClass : '')}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/htmlCode.code')
|
||||
</label>
|
||||
|
||||
@include('admin.snippets.aceEditor', [
|
||||
'name' => 'code',
|
||||
'value' => old('code', isset($settings->code) ? $settings->code : ''),
|
||||
'theme' => 'xcode',
|
||||
'mode' => 'html'
|
||||
])
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@lang('widgets/htmlCode.save')
|
||||
</button>
|
||||
</form>
|
||||
@@ -0,0 +1,9 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/htmlCode.new'))
|
||||
@section('pageDescription', @trans($type->description))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.htmlCode.form', ['action' => route('widgets.postNew', ['type' => $type])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
@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
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
@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
|
||||
@@ -0,0 +1,10 @@
|
||||
@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
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<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>
|
||||
@@ -0,0 +1,18 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/menu.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
<div class="row">
|
||||
<div class="col-lg-8">
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<h3>@lang('widgets/menu.preview')</h3>
|
||||
|
||||
@widgetPreview($widget)
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
<form action="{{$formAction}}" id="widget-menu" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="settings" id="widgetSettings" value="{{json_encode($widget->settingsObj->links)}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.name')
|
||||
</label>
|
||||
<input class="form-control" required type="text" name="name" value="{{old("name", $widget->name)}}"
|
||||
placeholder="@lang('widgets/menu.name')" />
|
||||
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.description')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/menu.description')"
|
||||
value="{{old("description", $widget->description)}}" />
|
||||
|
||||
<label class="label-control">
|
||||
@lang('widgets/menu.containerClass')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="containerClass" placeholder="@lang('widgets/menu.containerClass')"
|
||||
value="{{old("containerClass")}}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<h3>@lang('widgets/menu.addedPages')</h3>
|
||||
|
||||
<div id="menu-items-container">
|
||||
@foreach($widget->settingsObj->links as $pageId => $details)
|
||||
<span class="btn btn-sm btn-info" data-page-id="{{$pageId}}"
|
||||
id="item-{{$pageId}}">{{$details->text}}</span>
|
||||
@endforeach
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<h3>@lang('widgets/menu.availablePages')</h3>
|
||||
|
||||
@foreach ($pages as $page)
|
||||
<a href="#"
|
||||
class="btn btn-sm menu-item @if(isset($widget->settingsObj->links->{$page->id})) btn-secondary @else btn-info @endif "
|
||||
data-page-url="{{$page->url}}" data-page-id="{{$page->id}}"
|
||||
id="page-{{$page->id}}">{{$page->title}}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">@lang('widgets/menu.save')</button>
|
||||
</form>
|
||||
|
||||
|
||||
@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 ('btn-secondary')) {
|
||||
// remove
|
||||
$ ('#item-' + id).remove ();
|
||||
|
||||
$ (this).addClass ('btn-info');
|
||||
$ (this).removeClass ('btn-secondary')
|
||||
} else {
|
||||
// add
|
||||
$ ('#menu-items-container').append ('<span class="btn btn-sm btn-info" id="item-' + id + '" data-page-id="' + id + '">' + text + '</span> ');
|
||||
$ (this).addClass ('btn-secondary');
|
||||
$ (this).removeClass ('btn-info');
|
||||
}
|
||||
|
||||
// distinguish between added and not-added page
|
||||
$ (this).toggleClass ('secondary');
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -0,0 +1,7 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', trans('widgets/menu.new'))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.menu.form', ['formAction' => route('widgets.postNew', ['type' => $type])])
|
||||
@endsection
|
||||
@@ -0,0 +1,8 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('widgets/orbitSlider.edit', ['name' => $widget->name]))
|
||||
|
||||
@section('content')
|
||||
@include('admin.widgets.orbitSlider.form', ['formAction' => route('widgets.postEdit', ['id' => $widget->id])])
|
||||
@stop
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
<form action="{{$formAction}}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.name')
|
||||
</label>
|
||||
|
||||
<input class="form-control" type="text" name="name" value="{{old('name', $widget->name)}}"
|
||||
placeholder="@lang('widgets/orbitSlider.name')" />
|
||||
|
||||
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.description')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="description" placeholder="@lang('widgets/orbitSlider.description')"
|
||||
value="{{old('description', $widget->description)}}" />
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-10">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.imagesPerSlide')
|
||||
</label>
|
||||
|
||||
<select class="form-control" name="imagePerSlide">
|
||||
@foreach($availableColumns as $value => $name)
|
||||
<option value="{{$value}}"
|
||||
@if (old('imagePerSlide', $settings->imagePerSlide) == $value) selected="selected" @endif>
|
||||
{{$name}}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-2 text-center">
|
||||
<label>
|
||||
<input class="checkbox" value="1" id="displayBullets"
|
||||
@if(old('displayBullets', $settings->displayBullets)) checked
|
||||
@endif name="displayBullets" type="checkbox">
|
||||
<span>@lang('widgets/orbitSlider.displayBullets')</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<h4>@lang('widgets/orbitSlider.extraSettings')</h4>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.containerClass')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="containerClass"
|
||||
placeholder="@lang('widgets/orbitSlider.containerClass')"
|
||||
value="{{old('containerClass', $settings->sliderClass)}}" />
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.slideContainerClass')
|
||||
</label>
|
||||
<input class="form-control" type="text" name="slideContainerClass"
|
||||
placeholder="@lang('widgets/orbitSlider.slideContainerClass')"
|
||||
value="{{old('slideContainerClass', $settings->slideContainerClass)}}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<label class="control-label">
|
||||
@lang('widgets/orbitSlider.code')
|
||||
</label>
|
||||
|
||||
@include('admin.snippets.aceEditor', [
|
||||
'name' => 'code',
|
||||
'value' => old('code', isset($settings->code) ? $settings->code : ''),
|
||||
'theme' => 'xcode',
|
||||
'mode' => 'html'
|
||||
])
|
||||
|
||||
@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="btn btn-primary">@lang('widgets/orbitSlider.editExisting')</button>
|
||||
@@ -0,0 +1,10 @@
|
||||
@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
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
@extends('admin.layoutWithNavigation')
|
||||
|
||||
@section('pageHeading', @trans('admin/widgets.overview'))
|
||||
@section('pageDescription', @trans('admin/widgets.descriptionOfWidgets'))
|
||||
|
||||
@section('content')
|
||||
@if (count($widgets))
|
||||
<table class="table table-striped 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><a href="{{route('widgets.edit', ['id' => $widget->id])}}">{{$widget->name}}</a></td>
|
||||
<td>{{$widget->description}}</td>
|
||||
<td class="text-center">
|
||||
<a href="{{route('widgets.edit', ['id' => $widget->id])}}"><i class="fa fa-fw fa-pencil"></i></a>
|
||||
<a href="{{route('widgets.delete', ['id' => $widget->id])}}"><i class="fa fa-fw remove fa-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
{!! $widgets->render() !!}
|
||||
@else
|
||||
<div class="alert alert-info">
|
||||
<em>@lang('admin/widgets.noEntries')</em>
|
||||
</div>
|
||||
@endif
|
||||
@stop
|
||||
Reference in New Issue
Block a user