@extends('layout.default') @if($mode == 'edit') @section('title', $L('Edit recipe')) @else @section('title', $L('Create recipe')) @endif @section('viewJsName', 'recipeform') @push('pageScripts') @if(!empty($L('summernote_locale')))@endif @endpush @push('pageStyles') @endpush @section('content')

@yield('title')

@if($mode == 'edit') @if(!empty($recipe->picture_file_name)) @endif @endif
{{ $L('A name is required') }}

{{ $L('If you don\'t select a file, the current picture will not be altered') }}

{{ $L('Ingredients list') }} {{ $L('Add') }}

@if($mode == "edit") @foreach($recipePositions as $recipePosition) @endforeach @endif
# {{ $L('Product') }} {{ $L('Amount') }} {{ $L('Note') }} Hiden ingredient group
{{ FindObjectInArrayByPropertyValue($products, 'id', $recipePosition->product_id)->name }} @if($recipePosition->amount == round($recipePosition->amount)){{ round($recipePosition->amount) }}@else{{ $recipePosition->amount }}@endif {{ Pluralize($recipePosition->amount, FindObjectInArrayByPropertyValue($quantityunits, 'id', $recipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityunits, 'id', $recipePosition->qu_id)->name_plural) }} @if(FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $recipePosition->id)->need_fulfilled == 1) {{ $L('Enough in stock') }} @else {{ $L('Not enough in stock, #1 missing, #2 already on shopping list', round(FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $recipePosition->id)->missing_amount), round(FindObjectInArrayByPropertyValue($recipesFulfillment, 'recipe_pos_id', $recipePosition->id)->amount_on_shopping_list)) }} @endif {{ $recipePosition->ingredient_group }}

{{ $L('Included recipes') }} {{ $L('Add') }}

@if($mode == "edit") @foreach($recipeNestings as $recipeNesting) @endforeach @endif
# {{ $L('Recipe') }}
{{ FindObjectInArrayByPropertyValue($recipes, 'id', $recipeNesting->includes_recipe_id)->name }}
@if(!empty($recipe->picture_file_name))

{{ $L('The current picture will be deleted when you save the recipe') }}

@else

{{ $L('No picture available') }}

@endif
@stop