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

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

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

Basic Information

{!! Form::label('Name*') !!} {!! Form::text('name', $location->name, ['class' => 'form-control']) !!}
@if (isset($location->parent_id))
{!! Form::label('Style') !!} {!! add_help('How this location will be displayed.
Options are editable in the Location model.') !!} {!! Form::select('style', $location->displayStyles, isset($location->display_style) ? $location->display_style : null, ['class' => 'form-control selectize']) !!}
@endif
{!! Form::label('Type*') !!} {!! add_help('What type of location is this?') !!} {!! Form::select('type_id', [0 => 'Choose a Location Type'] + $types, $location->type_id, ['class' => 'form-control selectize', 'id' => 'type']) !!}
{!! Form::label('Parent (Optional)') !!} {!! add_help('For instance, the parent of Paris is France.
If left blank, this will be \'top level.\'""') !!} {!! Form::select('parent_id', [0 => 'Choose a Parent'] + $locations, isset($location->parent_id) ? $location->parent_id : null, ['class' => 'form-control selectize']) !!}
@if ($user_enabled || $ch_enabled)
@if ($user_enabled) {!! Form::checkbox('user_home', 1, $location->id ? $location->is_user_home : 0, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Users Can Live Here', 'data-off' => 'Users Cannot Live Here']) !!} @endif @if ($ch_enabled) {!! Form::checkbox('character_home', 1, $location->id ? $location->is_character_home : 0, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Characters Can Live Here', 'data-off' => 'Characters Cannot Live Here']) !!} @endif
@endif
{!! Form::label('Summary (Optional)') !!} {!! Form::text('summary', $location->summary, ['class' => 'form-control']) !!}

Images

@if ($location->thumb_extension) @endif {!! Form::label('Thumbnail Image (Optional)') !!} {!! add_help('This thumbnail is used on the location index.') !!}
{!! Form::file('image_th') !!}
Recommended size: 200x200
@if (isset($location->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 ($location->image_extension) @endif {!! Form::label('location Image (Optional)') !!} {!! add_help('This image is used on the location page as a header.') !!}
{!! Form::file('image') !!}
Recommended size: None (Choose a standard size for all location header images.)
@if (isset($location->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', $location->description, ['class' => 'form-control wysiwyg']) !!}
@if ($location->id)

Attachments

@include('widgets._attachment_select', ['attachments' => $location->attachments])
@if ($location->attachers->count()) @endif
@endif
{!! Form::checkbox('is_active', 1, $location->id ? $location->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 type will not be visible to regular users.') !!}
{!! Form::submit($location->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @include('widgets._attachment_select_row') @endsection @section('scripts') @parent @include('js._attachment_js') @endsection