@extends('admin.layout') @section('admin-title') Figure @endsection @section('admin-content') {!! breadcrumbs(['Admin Panel' => 'admin', 'Figures' => 'admin/world/figures', ($figure->id ? 'Edit' : 'Create') . ' Figure' => $figure->id ? 'admin/world/figures/edit/' . $figure->id : 'admin/world/figures/create']) !!}

{{ $figure->id ? 'Edit' : 'Create' }} Figure @if ($figure->id) ({!! $figure->displayName !!}) Delete Figure @endif

{!! Form::open(['url' => $figure->id ? 'admin/world/figures/edit/' . $figure->id : 'admin/world/figures/create', 'files' => true]) !!}

Basic Information

{!! Form::label('Name') !!} {!! Form::text('name', $figure->name, ['class' => 'form-control']) !!}
{!! Form::label('Category') !!} {!! add_help('What type of figure is this?') !!} {!! Form::select('category_id', [0 => 'Choose a Category'] + $categories, $figure->category_id, ['class' => 'form-control selectize', 'id' => 'category']) !!}
{!! Form::label('Summary (Optional)') !!} {!! Form::text('summary', $figure->summary, ['class' => 'form-control']) !!}
{!! Form::label('birth_date', 'Birth Date (Optional)') !!} {!! Form::text('birth_date', $figure->birth_date, ['class' => 'form-control datepicker']) !!}
{!! Form::label('death_date', 'Death Date (Optional)') !!} {!! Form::text('death_date', $figure->death_date, ['class' => 'form-control datepicker']) !!}
{!! Form::label('faction_id', 'Faction (Optional)') !!} {!! add_help( 'This will set the figure as a member of this faction. To associate this figure with a faction without being a part of it, edit the faction instead. Changing this will remove this figure from any special ranks in their existing faction.', ) !!} {!! Form::select('faction_id', [0 => 'Choose a Faction'] + $factions, $figure->faction_id, ['class' => 'form-control selectize', 'id' => 'category']) !!}

Images

@if ($figure->thumb_extension) @endif {!! Form::label('Thumbnail Image (Optional)') !!} {!! add_help('This thumbnail is used on the figure index.') !!}
{!! Form::file('image_th') !!}
Recommended size: 200x200
@if (isset($figure->thumb_extension))
{!! Form::checkbox('remove_image_th', 1, false, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-off' => 'Leave Thumbnail As-Is', 'data-on' => 'Remove Thumbnail Image']) !!}
@endif
@if ($figure->image_extension) @endif {!! Form::label('Figure Image (Optional)') !!} {!! add_help('This image is used on the figure page as a header.') !!}
{!! Form::file('image') !!}
Recommended size: None (Choose a standard size for all figure header images.)
@if (isset($figure->image_extension))
{!! Form::checkbox('remove_image', 1, false, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-off' => 'Leave Header Image As-Is', 'data-on' => 'Remove Current Header Image']) !!}
@endif
{!! Form::label('Description (Optional)') !!}
{!! Form::textarea('description', $figure->description, ['class' => 'form-control wysiwyg']) !!}
@if ($figure->id)

Attachments

@include('widgets._attachment_select', ['attachments' => $figure->attachments])
@if ($figure->attachers->count()) @endif
@endif
{!! Form::checkbox('is_active', 1, $figure->id ? $figure->is_active : 1, ['class' => 'form-check-input', 'data-toggle' => 'toggle']) !!} {!! Form::label('is_active', 'Set Active', ['class' => 'form-check-label ml-3']) !!} {!! add_help('If turned off, the category will not be visible to regular users.') !!}
{!! Form::submit($figure->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @include('widgets._attachment_select_row') @endsection @section('scripts') @parent @include('js._attachment_js') @endsection