mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Finish first early version of "pictures for products" (references #58)
This commit is contained in:
@@ -108,6 +108,16 @@
|
||||
'additionalHtmlElements' => '<p id="qu-conversion-info" class="form-text text-muted small d-none"></p>'
|
||||
))
|
||||
|
||||
<div class="form-group">
|
||||
<label for="product-picture">{{ $L('Product picture') }}</label>
|
||||
<input type="file" class="form-control-file" id="product-picture" accept="image/*">
|
||||
|
||||
@if(!empty($product->picture_file_name))
|
||||
<label class="mt-2">{{ $L('Current picture') }}</label>
|
||||
<img src="{{ $U('/api/files/get/productpictures?file_name=' . $product->picture_file_name) }}" class="img-fluid">
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<button id="save-product-button" class="btn btn-success">{{ $L('Save') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
@@ -74,6 +74,11 @@
|
||||
data-consume-amount="{{ $currentStockEntry->amount }}">
|
||||
<i class="fas fa-utensils"></i> {{ $L('All') }}
|
||||
</a>
|
||||
<a id="product-{{ $currentStockEntry->product_id }}-show-product-picture-button" class="btn btn-info btn-sm show-product-picture-button @if(empty(FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->picture_file_name)) disabled @endif" href="#"
|
||||
data-picture-url="{{ $U('/api/files/get/productpictures?file_name=' . FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->picture_file_name) }}"
|
||||
data-product-name="{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}">
|
||||
<i class="fas fa-image"></i>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ FindObjectInArrayByPropertyValue($products, 'id', $currentStockEntry->product_id)->name }}
|
||||
|
Reference in New Issue
Block a user