FEATURE #1435: add login and layout of new admin theme
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
@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
|
||||
@@ -0,0 +1,136 @@
|
||||
@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>
|
||||
@@ -0,0 +1,26 @@
|
||||
@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
|
||||
@@ -0,0 +1,124 @@
|
||||
<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>
|
||||
@@ -0,0 +1,74 @@
|
||||
@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
|
||||
Reference in New Issue
Block a user