mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Show optionally an icon on the stock overview page if the product is already on the shopping list (closes #708)
This commit is contained in:
@@ -195,6 +195,14 @@
|
||||
@if($currentStockEntry->amount_opened_aggregated > 0)<span id="product-{{ $currentStockEntry->product_id }}-opened-amount-aggregated" class="small font-italic">{{ $__t('%s opened', $currentStockEntry->amount_opened_aggregated) }}</span>@endif
|
||||
</span>
|
||||
@endif
|
||||
@if(boolval($userSettings['show_icon_on_stock_overview_page_when_product_is_on_shopping_list']))
|
||||
@php $currentStockEntryShoppingListItems = FindAllObjectsInArrayByPropertyValue($shoppingListItems, 'product_id', $currentStockEntry->product_id) @endphp
|
||||
@if(count($currentStockEntryShoppingListItems) > 0)
|
||||
<span class="btn btn-link btn-sm text-muted">
|
||||
<i class="fas fa-shopping-cart"></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
@if (GROCY_FEATURE_FLAG_STOCK_BEST_BEFORE_DATE_TRACKING)
|
||||
<td>
|
||||
|
@@ -75,6 +75,14 @@
|
||||
'additionalCssClasses' => 'user-setting-control'
|
||||
))
|
||||
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="show_icon_on_stock_overview_page_when_product_is_on_shopping_list">
|
||||
<input type="checkbox" class="user-setting-control" id="show_icon_on_stock_overview_page_when_product_is_on_shopping_list" data-setting-key="show_icon_on_stock_overview_page_when_product_is_on_shopping_list"> {{ $__t('Show an icon if the product is already on the shopping list') }}
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="{{ $U('/stockoverview') }}" class="btn btn-success">{{ $__t('OK') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user