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

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

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

Basic Information

{!! Form::label('Name') !!} {!! Form::text('name', $flora->name, ['class' => 'form-control']) !!}
{!! Form::label('Scientific Name (Optional)') !!} {!! Form::text('scientific_name', $flora->scientific_name, ['class' => 'form-control']) !!}
{!! Form::label('Category') !!} {!! add_help('What category of flora is this?') !!} {!! Form::select('category_id', [0 => 'Choose a Category'] + $categories, $flora->category_id, ['class' => 'form-control selectize', 'id' => 'category']) !!}
{!! Form::label('Summary (Optional)') !!} {!! Form::text('summary', $flora->summary, ['class' => 'form-control']) !!}

Images

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

Attachments

@include('widgets._attachment_select', ['attachments' => $flora->attachments])
@if ($flora->attachers->count()) @endif
@endif
{!! Form::checkbox('is_active', 1, $flora->id ? $flora->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($flora->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!} @include('widgets._attachment_select_row')
{!! Form::select('item_id[]', $items, null, ['class' => 'form-control mr-2 item-select', 'placeholder' => 'Select Item']) !!} ×
{!! Form::select('location_id[]', $locations, null, ['class' => 'form-control mr-2 location-select', 'placeholder' => 'Select Location']) !!} ×
@endsection @section('scripts') @parent @include('js._attachment_js') @endsection