mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Hide unsuitable fields from printed recipe pages (#1332)
* Hide unsuitable fields from printed recipe pages Resolves #1330. * Use proper total energy label in the recipe page
This commit is contained in:
parent
fc05044353
commit
0a6c7d73a7
@ -311,14 +311,14 @@
|
|||||||
<div class="row ml-1">
|
<div class="row ml-1">
|
||||||
@if(!empty($calories) && intval($calories) > 0)
|
@if(!empty($calories) && intval($calories) > 0)
|
||||||
<div class="col-6 col-xl-3">
|
<div class="col-6 col-xl-3">
|
||||||
<label>{{ $__t('Calories') }}</label>
|
<label>{{ $__t('Energy (kcal)') }}</label>
|
||||||
<h3 class="locale-number locale-number-generic pt-0">{{ $calories }}</h3>
|
<h3 class="locale-number locale-number-generic pt-0">{{ $calories }}</h3>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
@if(GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING)
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<label>{{ $__t('Costs') }} </label>
|
<label>{{ $__t('Costs') }} </label>
|
||||||
<i class="fas fa-question-circle text-muted"
|
<i class="fas fa-question-circle text-muted d-print-none"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
title="{{ $__t('Based on the prices of the default consume rule which is "Opened first, then first due first, then first in first out"') }}"></i>
|
title="{{ $__t('Based on the prices of the default consume rule which is "Opened first, then first due first, then first in first out"') }}"></i>
|
||||||
<h3 class="locale-number locale-number-currency pt-0">{{ $costs }}</h3>
|
<h3 class="locale-number locale-number-currency pt-0">{{ $costs }}</h3>
|
||||||
@ -410,8 +410,10 @@
|
|||||||
@endif
|
@endif
|
||||||
{{ $__n($selectedRecipePosition->recipe_amount, FindObjectInArrayByPropertyValue($quantityUnits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityUnits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }}
|
{{ $__n($selectedRecipePosition->recipe_amount, FindObjectInArrayByPropertyValue($quantityUnits, 'id', $selectedRecipePosition->qu_id)->name, FindObjectInArrayByPropertyValue($quantityUnits, 'id', $selectedRecipePosition->qu_id)->name_plural) }} {{ FindObjectInArrayByPropertyValue($products, 'id', $selectedRecipePosition->product_id)->name }}
|
||||||
@if(GROCY_FEATURE_FLAG_STOCK)
|
@if(GROCY_FEATURE_FLAG_STOCK)
|
||||||
@if($selectedRecipePosition->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif($selectedRecipePosition->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
<span class="d-print-none">
|
||||||
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @else {{ $__t('Not enough in stock (not included in costs), %1$s missing, %2$s already on shopping list', round($selectedRecipePosition->missing_amount, 2), round($selectedRecipePosition->amount_on_shopping_list, 2)) }} @endif</span>
|
@if($selectedRecipePosition->need_fulfilled == 1)<i class="fas fa-check text-success"></i>@elseif($selectedRecipePosition->need_fulfilled_with_shopping_list == 1)<i class="fas fa-exclamation text-warning"></i>@else<i class="fas fa-times text-danger"></i>@endif
|
||||||
|
<span class="timeago-contextual">@if(FindObjectInArrayByPropertyValue($recipePositionsResolved, 'recipe_pos_id', $selectedRecipePosition->id)->need_fulfilled == 1) {{ $__t('Enough in stock') }} @else {{ $__t('Not enough in stock (not included in costs), %1$s missing, %2$s already on shopping list', round($selectedRecipePosition->missing_amount, 2), round($selectedRecipePosition->amount_on_shopping_list, 2)) }} @endif</span>
|
||||||
|
</span>
|
||||||
@endif
|
@endif
|
||||||
@if($selectedRecipePosition->need_fulfilled == 1 && GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) <span class="float-right font-italic ml-2 locale-number locale-number-currency">{{ $selectedRecipePosition->costs }}</span> @endif
|
@if($selectedRecipePosition->need_fulfilled == 1 && GROCY_FEATURE_FLAG_STOCK_PRICE_TRACKING) <span class="float-right font-italic ml-2 locale-number locale-number-currency">{{ $selectedRecipePosition->costs }}</span> @endif
|
||||||
<span class="float-right font-italic"><span class="locale-number locale-number-quantity-amount">{{ $selectedRecipePosition->calories }} {{ $__t('Calories') }}</span></span>
|
<span class="float-right font-italic"><span class="locale-number locale-number-quantity-amount">{{ $selectedRecipePosition->calories }} {{ $__t('Calories') }}</span></span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user