@extends('admin.layout')
@section('admin-title')
Recipes
@endsection
@section('admin-content')
{!! breadcrumbs(['Admin Panel' => 'admin', 'Recipes' => 'admin/data/recipes', ($recipe->id ? 'Edit' : 'Create') . ' Recipe' => $recipe->id ? 'admin/data/recipes/edit/' . $recipe->id : 'admin/data/recipes/create']) !!}
{{ $recipe->id ? 'Edit' : 'Create' }} Recipe
@if ($recipe->id)
Delete Recipe
@endif
{!! Form::open(['url' => $recipe->id ? 'admin/data/recipes/edit/' . $recipe->id : 'admin/data/recipes/create', 'files' => true]) !!}
Basic Information
{!! Form::label('Name') !!}
{!! Form::text('name', $recipe->name, ['class' => 'form-control']) !!}
{!! Form::checkbox('needs_unlocking', 1, $recipe->needs_unlocking, ['class' => 'form-check-input', 'data-toggle' => 'toggle', 'data-on' => 'Needs to be Unlocked', 'data-off' => 'Automatically Unlocked']) !!}
{!! Form::label('Description (Optional)') !!}
{!! Form::textarea('description', $recipe->description, ['class' => 'form-control wysiwyg']) !!}
Restrict Recipe
{!! Form::checkbox('is_limited', 1, $recipe->is_limited, ['class' => 'is-limited-class form-check-label', 'data-toggle' => 'toggle']) !!}
{!! Form::label('is_limited', 'Should this recipe have a requirement?', ['class' => 'is-limited-label form-check-label ml-3']) !!} {!! add_help('If turned on, the recipe cannot be used/crafted unless the user currently owns all required items.') !!}
@include('widgets._recipe_limit_select', ['limits' => $recipe->limits, 'showRecipes' => true])
Recipe Ingredients
@include('widgets._recipe_ingredient_select', ['ingredients' => $recipe->ingredients])
Recipe Rewards
@include('widgets._recipe_reward_select', ['rewards' => $recipe->rewards])
{!! Form::submit($recipe->id ? 'Edit' : 'Create', ['class' => 'btn btn-primary']) !!}
{!! Form::close() !!}
@include('widgets._recipe_ingredient_select_row', ['items' => $items, 'categories' => $categories, 'currencies' => $currencies])
@include('widgets._recipe_reward_select_row', ['items' => $items, 'currencies' => $currencies, 'tables' => $tables, 'raffles' => $raffles])
@include('widgets._recipe_limit_row', ['items' => $items, 'currencies' => $currencies, 'recipes' => $recipes])
@if ($recipe->id)
Preview
@include('world._entry', ['imageUrl' => $recipe->imageUrl, 'name' => $recipe->displayName, 'description' => $recipe->parsed_description, 'searchUrl' => $recipe->searchUrl])
@endif
@endsection
@section('scripts')
@parent
@include('js._recipe_limit_js')
@include('js._recipe_reward_js')
@include('js._recipe_ingredient_js')
@endsection